From c9bd6fa9fce386526ea1327adea56128648f3355 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 9 Aug 2004 16:11:58 +0000 Subject: [project @ 2004-08-09 16:11:58 by jmb] Rework the interface of the URL handing module to allow for multiple error types. Modify save_complete URL rewriting appropriately. svn path=/import/netsurf/; revision=1206 --- utils/url.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'utils/url.h') 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 -- cgit v1.2.3