summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-03-31 13:59:57 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-03-31 13:59:57 +0000
commit95e4a737de53dc2f02a2db95b26151d9d494bc0c (patch)
treea9dcb06c696a463f824d61865fb46d6a7bfa755b /riscos
parent9f575c590b3c304ab02707ee3378bd2e4f4c9094 (diff)
downloadnetsurf-95e4a737de53dc2f02a2db95b26151d9d494bc0c.tar.gz
netsurf-95e4a737de53dc2f02a2db95b26151d9d494bc0c.tar.bz2
rationalise the usage of the file scheme
svn path=/trunk/netsurf/; revision=10221
Diffstat (limited to 'riscos')
-rw-r--r--riscos/gui.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 007466f55..24723a87c 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -2074,10 +2074,10 @@ char *path_to_url(const char *path)
return NULL;
}
- memcpy(url, "file://", SLEN("file://"));
+ memcpy(url, FILE_SCHEME_PREFIX, FILE_SCHEME_PREFIX_LEN);
if (__unixify(buffer, __RISCOSIFY_NO_REVERSE_SUFFIX,
- url + SLEN("file://"),
- 1 - spare + 10 - SLEN("file://"),
+ url + FILE_SCHEME_PREFIX_LEN,
+ 1 - spare + 10 - FILE_SCHEME_PREFIX_LEN,
0) == NULL) {
LOG(("__unixify failed: %s", buffer));
free(buffer);
@@ -2087,7 +2087,7 @@ char *path_to_url(const char *path)
free(buffer); buffer = NULL;
/* We don't want '/' to be escaped. */
- url_err = url_escape(url, SLEN("file://"), false, "/", &escurl);
+ url_err = url_escape(url, FILE_SCHEME_PREFIX_LEN, false, "/", &escurl);
free(url); url = NULL;
if (url_err != URL_FUNC_OK) {
LOG(("url_escape failed: %s", url));
@@ -2110,7 +2110,7 @@ char *url_to_path(const char *url)
char *temp_name, *r;
char *filename;
- if (strncmp(url, "file:///", 8))
+ if (strncmp(url, FILE_SCHEME_PREFIX, FILE_SCHEME_PREFIX_LEN))
return NULL;
temp_name = curl_unescape(url + 7, strlen(url) - 7);