summaryrefslogtreecommitdiff
path: root/utils/url.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/url.h')
-rw-r--r--utils/url.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/url.h b/utils/url.h
index 96aa947f5..cc373b257 100644
--- a/utils/url.h
+++ b/utils/url.h
@@ -12,10 +12,16 @@
#ifndef _NETSURF_UTILS_URL_H_
#define _NETSURF_UTILS_URL_H_
+typedef enum {
+ URL_FUNC_OK, /**< No error */
+ URL_FUNC_NOMEM, /**< Insufficient memory */
+ URL_FUNC_FAILED /**< Non fatal error (eg failed to match regex) */
+} url_func_result;
+
void url_init(void);
-char *url_normalize(const char *url);
-char *url_join(const char *rel, const char *base);
-char *url_host(const char *url);
-char *url_nice(const char *url);
+url_func_result url_normalize(const char *url, char **result);
+url_func_result url_join(const char *rel, const char *base, char **result);
+url_func_result url_host(const char *url, char **result);
+url_func_result url_nice(const char *url, char **result);
#endif