mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
Remove unused url_path function.
This commit is contained in:
parent
b16038cb1e
commit
1ccfcfe953
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_path(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.path) {
|
||||
status = NSERROR_NOT_FOUND;
|
||||
} else {
|
||||
*result = strdup(components.path);
|
||||
if (!(*result))
|
||||
status = NSERROR_NOMEM;
|
||||
}
|
||||
}
|
||||
url_destroy_components(&components);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/* exported interface documented in utils/url.h */
|
||||
nserror url_nice(const char *url, char **result,
|
||||
bool remove_extensions)
|
||||
|
10
utils/url.h
10
utils/url.h
@ -95,14 +95,4 @@ nserror url_escape(const char *unescaped, size_t toskip, bool sptoplus, const ch
|
||||
*/
|
||||
nserror url_unescape(const char *str, char **result);
|
||||
|
||||
|
||||
/**
|
||||
* Extract path segment from an URL
|
||||
*
|
||||
* \param url an absolute URL
|
||||
* \param result pointer to pointer to buffer to hold result
|
||||
* \return NSERROR_OK on success
|
||||
*/
|
||||
nserror url_path(const char *url, char **result);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user