From 14238615a43f3c0f57790ab4b54fd44204695179 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 24 Jan 2014 20:08:41 +0000 Subject: Use corestrings for "about", "data", and "resource". --- content/fetchers/about.c | 9 ++------- content/fetchers/data.c | 8 ++------ content/fetchers/resource.c | 9 ++------- 3 files changed, 6 insertions(+), 20 deletions(-) (limited to 'content') diff --git a/content/fetchers/about.c b/content/fetchers/about.c index cac8b2b01..8e973a9cc 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -48,6 +48,7 @@ #include "content/urldb.h" #include "desktop/netsurf.h" #include "utils/nsoption.h" +#include "utils/corestrings.h" #include "utils/log.h" #include "utils/messages.h" #include "utils/url.h" @@ -839,13 +840,7 @@ static void fetch_about_poll(lwc_string *scheme) void fetch_about_register(void) { - lwc_string *scheme; - - if (lwc_intern_string("about", SLEN("about"), - &scheme) != lwc_error_ok) { - die("Failed to initialise the fetch module " - "(couldn't intern \"about\")."); - } + lwc_string *scheme = lwc_string_ref(corestring_lwc_about); fetch_add_fetcher(scheme, fetch_about_initialise, diff --git a/content/fetchers/data.c b/content/fetchers/data.c index fbaa24780..e192812a7 100644 --- a/content/fetchers/data.c +++ b/content/fetchers/data.c @@ -34,6 +34,7 @@ #include "content/fetchers/data.h" #include "content/urldb.h" #include "desktop/netsurf.h" +#include "utils/corestrings.h" #include "utils/nsoption.h" #include "utils/log.h" #include "utils/messages.h" @@ -326,12 +327,7 @@ static void fetch_data_poll(lwc_string *scheme) void fetch_data_register(void) { - lwc_string *scheme; - - if (lwc_intern_string("data", SLEN("data"), &scheme) != lwc_error_ok) { - die("Failed to initialise the fetch module " - "(couldn't intern \"data\")."); - } + lwc_string *scheme = lwc_string_ref(corestring_lwc_data); fetch_add_fetcher(scheme, fetch_data_initialise, diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c index cce816aa5..b2791b432 100644 --- a/content/fetchers/resource.c +++ b/content/fetchers/resource.c @@ -43,6 +43,7 @@ #include "content/urldb.h" #include "desktop/gui.h" #include "desktop/gui_factory.h" +#include "utils/corestrings.h" #include "utils/nsoption.h" #include "utils/log.h" #include "utils/messages.h" @@ -356,13 +357,7 @@ static void fetch_resource_poll(lwc_string *scheme) void fetch_resource_register(void) { - lwc_string *scheme; - - if (lwc_intern_string("resource", SLEN("resource"), - &scheme) != lwc_error_ok) { - die("Failed to initialise the fetch module " - "(couldn't intern \"resource\")."); - } + lwc_string *scheme = lwc_string_ref(corestring_lwc_resource); fetch_add_fetcher(scheme, fetch_resource_initialise, -- cgit v1.2.3