diff options
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/gui.h | 5 | ||||
-rw-r--r-- | desktop/netsurf.c | 19 |
2 files changed, 10 insertions, 14 deletions
diff --git a/desktop/gui.h b/desktop/gui.h index 141e82af5..596587631 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -67,7 +67,10 @@ typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET, #include "desktop/search.h" #include "utils/errors.h" -void gui_stdout(void); +/** \todo remove these when each frontend calls nslog_init */ +#include <stdio.h> +bool nslog_ensure(FILE *fptr); + void gui_multitask(void); void gui_poll(bool active); void gui_quit(void); diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 0d6f5f809..3707b1c72 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -108,21 +108,14 @@ nserror netsurf_init(int *pargc, signal(SIGPIPE, SIG_IGN); #endif - if (((*pargc) > 1) && - ((*pargv)[1][0] == '-') && - ((*pargv)[1][1] == 'v') && - ((*pargv)[1][2] == 0)) { - int argcmv; - verbose_log = true; - for (argcmv = 2; argcmv < (*pargc); argcmv++) { - (*pargv)[argcmv - 1] = (*pargv)[argcmv]; - } - (*pargc)--; - #ifndef HAVE_STDOUT - gui_stdout(); + ret = nslog_init(nslog_ensure, pargc, *pargv); +#else + ret = nslog_init(NULL, pargc, *pargv); #endif - } + + if (ret != NSERROR_OK) + return ret; #ifdef _MEMDEBUG_H_ memdebug_memdebug("memdump"); |