summaryrefslogtreecommitdiff
path: root/css/ruleset.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-08-09 16:11:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-08-09 16:11:58 +0000
commitc9bd6fa9fce386526ea1327adea56128648f3355 (patch)
tree419a7d4fcfd1a7ae7229763f0b9ed2125be0a02c /css/ruleset.c
parent91e6c7c65bb496f88f6af622f558b35c436f9cd2 (diff)
downloadnetsurf-c9bd6fa9fce386526ea1327adea56128648f3355.tar.gz
netsurf-c9bd6fa9fce386526ea1327adea56128648f3355.tar.bz2
[project @ 2004-08-09 16:11:58 by jmb]
Rework the interface of the URL handing module to allow for multiple error types. Modify save_complete URL rewriting appropriately. svn path=/import/netsurf/; revision=1206
Diffstat (limited to 'css/ruleset.c')
-rw-r--r--css/ruleset.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/css/ruleset.c b/css/ruleset.c
index f0ab22d1c..90ca00226 100644
--- a/css/ruleset.c
+++ b/css/ruleset.c
@@ -621,6 +621,7 @@ bool parse_uri(const struct css_node *v, char **uri)
bool string = false;
const char *u;
char *t, *url;
+ url_func_result res;
switch (v->type) {
case CSS_NODE_URI:
@@ -650,11 +651,11 @@ bool parse_uri(const struct css_node *v, char **uri)
* content is the parent HTML content
*/
if (v->stylesheet->type == CONTENT_HTML)
- *uri = url_join(url, v->stylesheet->data.html.base_url);
+ res = url_join(url, v->stylesheet->data.html.base_url, uri);
else
- *uri = url_join(url, v->stylesheet->url);
+ res = url_join(url, v->stylesheet->url, uri);
free(url);
- if (!*uri)
+ if (res != URL_FUNC_OK)
return false;
break;
case CSS_NODE_STRING:
@@ -663,11 +664,11 @@ bool parse_uri(const struct css_node *v, char **uri)
return false;
if (v->stylesheet->type == CONTENT_HTML)
- *uri = url_join(url, v->stylesheet->data.html.base_url);
+ res = url_join(url, v->stylesheet->data.html.base_url, uri);
else
- *uri = url_join(url, v->stylesheet->url);
+ res = url_join(url, v->stylesheet->url, uri);
free(url);
- if (!*uri)
+ if (res != URL_FUNC_OK)
return false;
break;
default: