mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 09:44:24 +03:00
Remove unused url_scheme function.
This commit is contained in:
parent
f7781a8778
commit
d732b0c769
23
utils/url.c
23
utils/url.c
@ -287,29 +287,6 @@ static void url_destroy_components(const struct url_components *components)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* exported interface documented in utils/url.h */
|
|
||||||
nserror url_scheme(const char *url, char **result)
|
|
||||||
{
|
|
||||||
nserror status;
|
|
||||||
struct url_components components;
|
|
||||||
|
|
||||||
assert(url);
|
|
||||||
|
|
||||||
status = url_get_components(url, &components);
|
|
||||||
if (status == NSERROR_OK) {
|
|
||||||
if (!components.scheme) {
|
|
||||||
status = NSERROR_NOT_FOUND;
|
|
||||||
} else {
|
|
||||||
*result = strdup(components.scheme);
|
|
||||||
if (!(*result))
|
|
||||||
status = NSERROR_NOMEM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
url_destroy_components(&components);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* exported interface documented in utils/url.h */
|
/* exported interface documented in utils/url.h */
|
||||||
nserror url_path(const char *url, char **result)
|
nserror url_path(const char *url, char **result)
|
||||||
{
|
{
|
||||||
|
12
utils/url.h
12
utils/url.h
@ -65,18 +65,6 @@ nserror url_init(void);
|
|||||||
bool url_host_is_ip_address(const char *host);
|
bool url_host_is_ip_address(const char *host);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the scheme name from an URL.
|
|
||||||
*
|
|
||||||
* See RFC 3986, 3.1 for reference.
|
|
||||||
*
|
|
||||||
* \param url an absolute URL
|
|
||||||
* \param result pointer to pointer to buffer to hold scheme name
|
|
||||||
* \return NSERROR_OK on success
|
|
||||||
*/
|
|
||||||
nserror url_scheme(const char *url, char **result);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to find a nice filename for a URL.
|
* Attempt to find a nice filename for a URL.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user