mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Remove unused function.
This commit is contained in:
parent
8ab9430bb4
commit
4c4e93ea54
34
utils/url.c
34
utils/url.c
@ -448,40 +448,6 @@ url_func_result url_scheme(const char *url, char **result)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the canonical root of an URL
|
||||
*
|
||||
* \param url an absolute URL
|
||||
* \param result pointer to pointer to buffer to hold canonical rool URL
|
||||
* \return URL_FUNC_OK on success
|
||||
*/
|
||||
|
||||
url_func_result url_canonical_root(const char *url, char **result)
|
||||
{
|
||||
url_func_result status;
|
||||
struct url_components components;
|
||||
|
||||
assert(url);
|
||||
|
||||
status = url_get_components(url, &components);
|
||||
if (status == URL_FUNC_OK) {
|
||||
if ((!components.scheme) || (!components.authority)) {
|
||||
status = URL_FUNC_FAILED;
|
||||
} else {
|
||||
*result = malloc(strlen(components.scheme) +
|
||||
strlen(components.authority) + 4);
|
||||
if (!(*result))
|
||||
status = URL_FUNC_NOMEM;
|
||||
else
|
||||
sprintf((*result), "%s://%s", components.scheme,
|
||||
components.authority);
|
||||
}
|
||||
}
|
||||
url_destroy_components(&components);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Extract path segment from an URL
|
||||
*
|
||||
|
@ -56,7 +56,6 @@ url_func_result url_nice(const char *url, char **result,
|
||||
url_func_result url_escape(const char *unescaped, size_t toskip,
|
||||
bool sptoplus, const char *escexceptions, char **result);
|
||||
url_func_result url_unescape(const char *str, char **result);
|
||||
url_func_result url_canonical_root(const char *url, char **result);
|
||||
url_func_result url_path(const char *url, char **result);
|
||||
|
||||
url_func_result url_get_components(const char *url,
|
||||
|
Loading…
Reference in New Issue
Block a user