mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
move option init out of netsurf_init
This commit is contained in:
parent
ea0f541309
commit
1502b08925
@ -334,9 +334,10 @@ static bool fetch_about_config_handler(struct fetch_about_context *ctx)
|
||||
"<tr><th></th><th></th><th></th></tr>\n");
|
||||
|
||||
do {
|
||||
res = nsoption_snoptionf(buffer + slen, sizeof buffer - slen,
|
||||
opt_loop,
|
||||
"<tr><th>%k</th><td>%t</td><td>%V</td></tr>\n");
|
||||
res = nsoption_snoptionf(buffer + slen,
|
||||
sizeof buffer - slen,
|
||||
opt_loop,
|
||||
"<tr><th>%k</th><td>%t</td><td>%V</td></tr>\n");
|
||||
if (res <= 0)
|
||||
break; /* last option */
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user