[project @ 2005-02-14 21:20:26 by jmb]
Make regex work with latest unixlib. Fix incorrect return value svn path=/import/netsurf/; revision=1512
This commit is contained in:
parent
5785f6bcac
commit
0c7b9496ef
|
@ -37,7 +37,7 @@ void url_init(void)
|
|||
"(\\?([^#[:space:]]*))?(#([^[:space:]]*))?"
|
||||
"[[:space:]]*$", REG_EXTENDED);
|
||||
regcomp_wrapper(&url_up_re,
|
||||
"/(|[^/]|[.][^./]|[^./][.]|[^/][^/][^/]+)/[.][.](/|$)",
|
||||
"/([^/]|[.][^./]|[^./][.]|[^/][^/][^/]+)/[.][.](/|$)",
|
||||
REG_EXTENDED);
|
||||
regcomp_wrapper(&url_nice_re,
|
||||
"^([^.]{0,4}[.])?([^.][^.][.])?([^/?&;.=]*)"
|
||||
|
@ -92,8 +92,8 @@ url_func_result url_normalize(const char *url, char **result)
|
|||
len += sizeof("http://")-1;
|
||||
} else {
|
||||
if ((*result = malloc(len + 6)) == NULL) {
|
||||
LOG(("strdup failed"));
|
||||
return URL_FUNC_FAILED;
|
||||
LOG(("malloc failed"));
|
||||
return URL_FUNC_NOMEM;
|
||||
}
|
||||
strcpy(*result, url);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue