diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-08-09 16:11:58 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-08-09 16:11:58 +0000 |
commit | c9bd6fa9fce386526ea1327adea56128648f3355 (patch) | |
tree | 419a7d4fcfd1a7ae7229763f0b9ed2125be0a02c /riscos/hotlist.c | |
parent | 91e6c7c65bb496f88f6af622f558b35c436f9cd2 (diff) | |
download | netsurf-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 'riscos/hotlist.c')
-rw-r--r-- | riscos/hotlist.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 8a2a57100..de91fbad7 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -906,6 +906,7 @@ struct hotlist_entry *ro_gui_hotlist_create_entry(const char *title, const char *url, int filetype, struct hotlist_entry *folder) { struct hotlist_entry *entry; + url_func_result res; /* Check we have a title or a URL */ @@ -923,7 +924,8 @@ struct hotlist_entry *ro_gui_hotlist_create_entry(const char *title, use the URL instead */ entry->url = 0; - if ((url) && ((entry->url = url_normalize(url)) == 0)) { + if ((url) && ((res = url_normalize(url, &entry->url)) != URL_FUNC_OK)) { + /** \todo use correct error message */ warn_user("NoMemory", 0); free(entry->url); free(entry); @@ -2443,6 +2445,7 @@ void ro_gui_hotlist_dialog_click(wimp_pointer *pointer) { int close_icon, ok_icon; bool folder; bool add; + url_func_result res; /* Get our data */ @@ -2502,8 +2505,9 @@ void ro_gui_hotlist_dialog_click(wimp_pointer *pointer) { if (entry == NULL) return; if (url) { old_value = entry->url; - entry->url = url_normalize(url); - if (!entry->url) { + res = url_normalize(url, &entry->url); + if (res != URL_FUNC_OK) { + /** \todo use correct error message */ warn_user("NoMemory", 0); entry->url = old_value; return; |