mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
remove unused url_init function
This commit is contained in:
parent
ce3d991918
commit
02ff3920ce
@ -217,8 +217,6 @@ nserror netsurf_init(const char *messages, const char *store_path)
|
||||
if (ret != NSERROR_OK)
|
||||
return ret;
|
||||
|
||||
url_init();
|
||||
|
||||
setlocale(LC_ALL, "C");
|
||||
|
||||
/* initialise the fetchers */
|
||||
|
@ -163,7 +163,6 @@ int main(void)
|
||||
char *path_query;
|
||||
|
||||
corestrings_init();
|
||||
url_init();
|
||||
|
||||
h = urldb_add_host("127.0.0.1");
|
||||
if (!h) {
|
||||
|
29
utils/url.c
29
utils/url.c
@ -32,35 +32,6 @@
|
||||
#include "utils/url.h"
|
||||
|
||||
|
||||
regex_t url_re, url_up_re;
|
||||
|
||||
/* exported interface documented in utils/url.h */
|
||||
nserror url_init(void)
|
||||
{
|
||||
nserror ret;
|
||||
|
||||
/* regex from RFC 2396 */
|
||||
ret = regcomp_wrapper(&url_re, "^[[:space:]]*"
|
||||
#define URL_RE_SCHEME 2
|
||||
"(([a-zA-Z][-a-zA-Z0-9+.]*):)?"
|
||||
#define URL_RE_AUTHORITY 4
|
||||
"(//([^/?#[:space:]]*))?"
|
||||
#define URL_RE_PATH 5
|
||||
"([^?#[:space:]]*)"
|
||||
#define URL_RE_QUERY 7
|
||||
"(\\?([^#[:space:]]*))?"
|
||||
#define URL_RE_FRAGMENT 9
|
||||
"(#([^[:space:]]*))?"
|
||||
"[[:space:]]*$", REG_EXTENDED);
|
||||
if (ret != NSERROR_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return regcomp_wrapper(&url_up_re,
|
||||
"/([^/]?|[.][^./]|[^./][.]|[^./][^./]|[^/][^/][^/]+)"
|
||||
"/[.][.](/|$)",
|
||||
REG_EXTENDED);
|
||||
}
|
||||
|
||||
/* exported interface documented in utils/url.h */
|
||||
bool url_host_is_ip_address(const char *host)
|
||||
|
@ -34,14 +34,6 @@
|
||||
#define FILE_SCHEME_PREFIX_LEN 8
|
||||
|
||||
|
||||
/**
|
||||
* Initialise URL routines.
|
||||
*
|
||||
* Compiles regular expressions required by the url_ functions.
|
||||
*/
|
||||
nserror url_init(void);
|
||||
|
||||
|
||||
/**
|
||||
* Check whether a host string is an IP address.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user