From 1502b08925c227152c3064b221af7a5659ac00cc Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 27 May 2013 00:32:08 +0100 Subject: move option init out of netsurf_init --- content/fetchers/about.c | 7 ++++--- desktop/netsurf.c | 15 +++------------ desktop/netsurf.h | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/content/fetchers/about.c b/content/fetchers/about.c index 85723e86a..ee2ea5477 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -334,9 +334,10 @@ static bool fetch_about_config_handler(struct fetch_about_context *ctx) "\n"); do { - res = nsoption_snoptionf(buffer + slen, sizeof buffer - slen, - opt_loop, - "%k%t%V\n"); + res = nsoption_snoptionf(buffer + slen, + sizeof buffer - slen, + opt_loop, + "%k%t%V\n"); if (res <= 0) break; /* last option */ diff --git a/desktop/netsurf.c b/desktop/netsurf.c index f63969b76..fa026dc6a 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -115,10 +115,7 @@ static nserror netsurf_llcache_query_handler(const llcache_query *query, * Initialise components used by gui NetSurf. */ -nserror netsurf_init(int *pargc, - char ***pargv, - const char *options, - const char *messages) +nserror netsurf_init(const char *messages) { nserror error; struct utsname utsname; @@ -143,7 +140,7 @@ nserror netsurf_init(int *pargc, signal(SIGPIPE, SIG_IGN); #endif - LOG(("version '%s'", netsurf_version)); + LOG(("NetSurf version '%s'", netsurf_version)); if (uname(&utsname) < 0) LOG(("Failed to extract machine information")); else @@ -152,10 +149,6 @@ nserror netsurf_init(int *pargc, utsname.nodename, utsname.release, utsname.version, utsname.machine)); - LOG(("Using '%s' for Options file", options)); - nsoption_read(options); - gui_options_init_defaults(); - messages_load(messages); /* corestrings init */ @@ -175,7 +168,7 @@ nserror netsurf_init(int *pargc, /* image cache is 25% of total memory cache size */ image_cache_parameters.limit = (hlcache_parameters.limit * 25) / 100; - /* image cache hysteresis is 20% of teh image cache size */ + /* image cache hysteresis is 20% of the image cache size */ image_cache_parameters.hysteresis = (image_cache_parameters.limit * 20) / 100; /* account for image cache use from total */ @@ -220,8 +213,6 @@ nserror netsurf_init(int *pargc, /* Initialize system colours */ gui_system_colour_init(); - nsoption_commandline(pargc, *pargv); - js_initialise(); return ret; diff --git a/desktop/netsurf.h b/desktop/netsurf.h index 10c1e00e3..bfdb647ff 100644 --- a/desktop/netsurf.h +++ b/desktop/netsurf.h @@ -28,7 +28,7 @@ extern const char * const netsurf_version; extern const int netsurf_version_major; extern const int netsurf_version_minor; -nserror netsurf_init(int *argc, char ***argv, const char *options, const char *messages); +nserror netsurf_init(const char *messages); extern void netsurf_exit(void); extern int netsurf_main_loop(void); -- cgit v1.2.3