summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-23 17:22:56 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-08-23 17:22:56 (GMT)
commitd40d38cf91ff5d8e6ab2494d3d0d018e1772ff7f (patch)
tree7abc72e07405c5c4cb15ebe829c00ab6d06033b8
parentc149e4a24ac2c670d315a5f1a4a83b58bf737c52 (diff)
downloadlibsvgtiny-chris/fetch-x-ent-ref.tar.gz
libsvgtiny-chris/fetch-x-ent-ref.tar.bz2
Fetch relative URIschris/fetch-x-ent-ref
-rw-r--r--include/svgtiny.h2
-rw-r--r--src/svgtiny.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/include/svgtiny.h b/include/svgtiny.h
index 50dbc7a..6464644 100644
--- a/include/svgtiny.h
+++ b/include/svgtiny.h
@@ -63,7 +63,7 @@ struct svgtiny_named_color {
};
typedef int (*svgtiny_dom_xml_parser_fetch_cb)(void *parser, const char *base, const char *uri,
- int (*svgtiny_expat_xmlparser_parse_cb)(void *parser, const char *data, int size));
+ int (*svgtiny_expat_xmlparser_parse_cb)(void *parser, const char *data, int size, const char *uri));
struct svgtiny_diagram *svgtiny_create(void);
svgtiny_code svgtiny_parse(struct svgtiny_diagram *diagram,
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 30d5d02..16dce3e 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -151,15 +151,13 @@ svgtiny_code svgtiny_parse(struct svgtiny_diagram *diagram,
assert(buffer);
assert(url);
- UNUSED(url);
-
state.gradient_x1 = NULL;
state.gradient_y1 = NULL;
state.gradient_x2 = NULL;
state.gradient_y2 = NULL;
- parser = dom_xml_parser_create(NULL, NULL,
- ignore_msg, NULL, &document, fetch_cb);
+ parser = dom_xml_parser_create(NULL, NULL, ignore_msg, NULL,
+ &document, url, fetch_cb);
if (parser == NULL)
return svgtiny_LIBDOM_ERROR;