diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2012-01-04 18:17:44 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2012-01-04 18:17:44 +0000 |
| commit | 71fb33927ed70360073e7063c447b5ac46ee7c60 (patch) | |
| tree | 828bcdcddf9a1a3030fc758ef5d0a1193959ce3b /src/2geom/svg-path-parser.h | |
| parent | More GSEAL issues (diff) | |
| download | inkscape-71fb33927ed70360073e7063c447b5ac46ee7c60.tar.gz inkscape-71fb33927ed70360073e7063c447b5ac46ee7c60.zip | |
update 2geom to r2049. fixes bugs!
(bzr r10837)
Diffstat (limited to 'src/2geom/svg-path-parser.h')
| -rw-r--r-- | src/2geom/svg-path-parser.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/2geom/svg-path-parser.h b/src/2geom/svg-path-parser.h index 1aab8bb36..365287d8c 100644 --- a/src/2geom/svg-path-parser.h +++ b/src/2geom/svg-path-parser.h @@ -1,8 +1,7 @@ /** - * @file - * parse SVG path specifications. - */ -/* + * \file + * \brief parse SVG path specifications + * * Copyright 2007 MenTaLguY <mental@rydia.net> * Copyright 2007 Aaron Spike <aaron@ekips.org> * @@ -57,13 +56,18 @@ inline std::vector<Path> parse_svg_path(char const *str) throw(SVGPathParseError return subpaths; } +inline std::vector<Path> read_svgd_f(FILE * fi) throw(SVGPathParseError) { + char input[1024 * 10]; + fgets(input, 1024 * 10, fi); + return parse_svg_path(input); +} + inline std::vector<Path> read_svgd(char const * name) throw(SVGPathParseError) { FILE* fi = fopen(name, "r"); if(fi == NULL) throw(std::runtime_error("Error opening file")); - char input[1024 * 10]; - fgets(input, 1024 * 10, fi); + std::vector<Path> out = read_svgd_f(fi); fclose(fi); - return parse_svg_path(input); + return out; } } |
