diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-06-29 23:06:53 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-06-29 23:06:53 +0100 |
commit | c313524998377db92e5387d209e1ea79fbc30ba6 (patch) | |
tree | 2d227e6d617fc98fbc4b0ad36a7870a63cc3f900 /frontends/riscos | |
parent | c523bb47a0c884f58ab267eb9ad699ccbed907d5 (diff) | |
download | netsurf-c313524998377db92e5387d209e1ea79fbc30ba6.tar.gz netsurf-c313524998377db92e5387d209e1ea79fbc30ba6.tar.bz2 |
reduce curl usage to fetcher, url unescaping and time parsing
Diffstat (limited to 'frontends/riscos')
-rw-r--r-- | frontends/riscos/download.c | 10 | ||||
-rw-r--r-- | frontends/riscos/gui.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c index 7dd61b7b4..1a0249e20 100644 --- a/frontends/riscos/download.c +++ b/frontends/riscos/download.c @@ -33,7 +33,6 @@ #include <assert.h> #include <string.h> #include <time.h> -#include <curl/curl.h> #include <libwapcaplet/libwapcaplet.h> #include "oslib/mimemap.h" @@ -53,6 +52,7 @@ #include "utils/utf8.h" #include "utils/utils.h" #include "utils/string.h" +#include "utils/url.h" #include "utils/corestrings.h" #include "netsurf/download.h" #include "desktop/download.h" @@ -239,11 +239,11 @@ static nserror download_ro_filetype(download_context *ctx, bits *ftype_out) lwc_string *path = nsurl_get_component(url, NSURL_PATH); if (path != NULL && lwc_string_length(path) != 0) { char *raw_path; - raw_path = curl_unescape(lwc_string_data(path), - lwc_string_length(path)); - if (raw_path != NULL) { + if (url_unescape(lwc_string_data(path), + lwc_string_length(path), + &raw_path) == NSERROR_OK) { ftype = ro_filetype_from_unix_path(raw_path); - curl_free(raw_path); + free(raw_path); } } } diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c index 2b369ec8c..f55392f99 100644 --- a/frontends/riscos/gui.c +++ b/frontends/riscos/gui.c @@ -1513,7 +1513,9 @@ static nserror ro_nsurl_to_path(struct nsurl *url, char **path_out) return NSERROR_BAD_PARAMETER; } - res = url_unescape(lwc_string_data(urlpath), &unpath); + res = url_unescape(lwc_string_data(urlpath), + lwc_string_length(urlpath), + &unpath); lwc_string_unref(urlpath); if (res != NSERROR_OK) { return res; |