From 1bb7d295bb6c59c0a21b0eedf69f939ebd2a7ed9 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 25 Oct 2015 09:03:20 +0000 Subject: Make nsurl utf8 string conversion function consistent with nsurl API. --- amiga/gui.c | 2 +- gtk/scaffolding.c | 2 +- render/html_interaction.c | 2 +- riscos/window.c | 2 +- utils/nsurl.c | 2 +- utils/nsurl.h | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index cfd6b44b2..a24942b60 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -4900,7 +4900,7 @@ static nserror gui_window_set_url(struct gui_window *g, nsurl *url) if(g == g->shared->gw) { if(nsoption_bool(display_decoded_idn) == true) { - if (nsurl_access_utf8(url, &idn_url_s, &idn_url_l) == NSERROR_OK) { + if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) == NSERROR_OK) { url_lc = ami_utf8_easy(idn_url_s); } } diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c index a9904debf..19d5b2e15 100644 --- a/gtk/scaffolding.c +++ b/gtk/scaffolding.c @@ -2349,7 +2349,7 @@ nserror gui_window_set_url(struct gui_window *gw, nsurl *url) g = nsgtk_get_scaffold(gw); if (g->top_level == gw) { if (nsoption_bool(display_decoded_idn) == true) { - if (nsurl_access_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK) + if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK) idn_url_s = NULL; } diff --git a/render/html_interaction.c b/render/html_interaction.c index 1b2e5b9c9..361278cbf 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -817,7 +817,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw, } } else if (url) { if (nsoption_bool(display_decoded_idn) == true) { - if (nsurl_access_utf8(url, &url_s, &url_l) != NSERROR_OK) { + if (nsurl_get_utf8(url, &url_s, &url_l) != NSERROR_OK) { /* Unable to obtain a decoded IDN. This is not a fatal error. * Ensure the string pointer is NULL so we use the encoded version. */ url_s = NULL; diff --git a/riscos/window.c b/riscos/window.c index 59c24ac8a..aa2cc1600 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1043,7 +1043,7 @@ nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url) if (g->toolbar) { if (nsoption_bool(display_decoded_idn) == true) { - if (nsurl_access_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK) + if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK) idn_url_s = NULL; } diff --git a/utils/nsurl.c b/utils/nsurl.c index ed6d896b6..4ae65ecb6 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -1700,7 +1700,7 @@ const char *nsurl_access(const nsurl *url) /* exported interface, documented in nsurl.h */ -nserror nsurl_access_utf8(const nsurl *url, char **url_s, size_t *url_l) +nserror nsurl_get_utf8(const nsurl *url, char **url_s, size_t *url_l) { nserror err; lwc_string *host; diff --git a/utils/nsurl.h b/utils/nsurl.h index 85e46dfd6..f97562bf0 100644 --- a/utils/nsurl.h +++ b/utils/nsurl.h @@ -181,7 +181,7 @@ const char *nsurl_access(const nsurl *url); /** - * Access a NetSurf URL object as a UTF-8 string (for human readable IDNs) + * Get a UTF-8 string (for human readable IDNs) from a NetSurf URL object * * \param url NetSurf URL object * \param url_s Returns a url string @@ -195,7 +195,7 @@ const char *nsurl_access(const nsurl *url); * * The length returned in url_l excludes the trailing '\0'. */ -nserror nsurl_access_utf8(const nsurl *url, char **url_s, size_t *url_l); +nserror nsurl_get_utf8(const nsurl *url, char **url_s, size_t *url_l); /** -- cgit v1.2.3