set defaults for cookie and url database

This commit is contained in:
Vincent Sanders 2014-10-12 20:40:40 +01:00
parent aca826ef69
commit 4dd5a9c114
2 changed files with 7 additions and 3 deletions

View File

@ -58,8 +58,8 @@ monkey_process_command(void)
char **nargv; char **nargv;
if (fgets(buffer, PATH_MAX, stdin) == NULL) { if (fgets(buffer, PATH_MAX, stdin) == NULL) {
netsurf_quit = true; /* end of input or read error so issue QUIT */
return; sprintf(buffer, "QUIT\n");
} }
/* remove newline */ /* remove newline */

View File

@ -86,7 +86,11 @@ static void quit_handler(int argc, char **argv)
*/ */
static nserror set_defaults(struct nsoption_s *defaults) static nserror set_defaults(struct nsoption_s *defaults)
{ {
/* currently no default overrides */ /* Set defaults for absent option strings */
nsoption_setnull_charp(cookie_file, strdup("~/.netsurf/Cookies"));
nsoption_setnull_charp(cookie_jar, strdup("~/.netsurf/Cookies"));
nsoption_setnull_charp(url_file, strdup("~/.netsurf/URLs"));
return NSERROR_OK; return NSERROR_OK;
} }