diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-04-25 23:11:55 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-04-25 23:11:55 +0100 |
commit | bf3ee089cb57765c48065423027eb4fffbe297f1 (patch) | |
tree | 2432a7705866c0773bc70ea3287f45534ec085e1 /monkey | |
parent | 638e07f026d85de0c01630217570d4148aaaced5 (diff) | |
download | netsurf-bf3ee089cb57765c48065423027eb4fffbe297f1.tar.gz netsurf-bf3ee089cb57765c48065423027eb4fffbe297f1.tar.bz2 |
use the miscellaneous table warning entry
change all the frontends to provide the warning callback in the
miscelaneous table instead of using the warn_user function.
Changing all the warn_user callsites still requires completion.
Diffstat (limited to 'monkey')
-rw-r--r-- | monkey/Makefile.target | 2 | ||||
-rw-r--r-- | monkey/main.c | 8 | ||||
-rw-r--r-- | monkey/utils.c | 30 |
3 files changed, 9 insertions, 31 deletions
diff --git a/monkey/Makefile.target b/monkey/Makefile.target index f03290d22..5813573c8 100644 --- a/monkey/Makefile.target +++ b/monkey/Makefile.target @@ -56,7 +56,7 @@ endif # ---------------------------------------------------------------------------- # S_MONKEY are sources purely for the MONKEY build -S_MONKEY := main.c utils.c filetype.c schedule.c bitmap.c plot.c browser.c \ +S_MONKEY := main.c filetype.c schedule.c bitmap.c plot.c browser.c \ download.c 401login.c cert.c layout.c dispatch.c fetch.c S_MONKEY := $(addprefix monkey/,$(S_MONKEY)) diff --git a/monkey/main.c b/monkey/main.c index f7d6609c5..7b38a3880 100644 --- a/monkey/main.c +++ b/monkey/main.c @@ -223,6 +223,13 @@ static nserror set_defaults(struct nsoption_s *defaults) return NSERROR_OK; } +static nserror monkey_warn_user(const char *warning, const char *detail) +{ + fprintf(stderr, "WARN %s %s\n", warning, detail); + return NSERROR_OK; +} + + /** * Ensures output logging stream is correctly configured */ @@ -236,6 +243,7 @@ static bool nslog_stream_configure(FILE *fptr) static struct gui_misc_table monkey_misc_table = { .schedule = monkey_schedule, + .warning = monkey_warn_user, .quit = monkey_quit, .launch_url = gui_launch_url, diff --git a/monkey/utils.c b/monkey/utils.c deleted file mode 100644 index 102f8ac01..000000000 --- a/monkey/utils.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2011 Daniel Silverstone <dsilvers@digital-scurf.org> - * - * This file is part of NetSurf, http://www.netsurf-browser.org/ - * - * NetSurf is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * NetSurf is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "utils/config.h" -#include "utils/utils.h" - -void warn_user(const char *warning, const char *detail) -{ - fprintf(stderr, "WARN %s %s\n", warning, detail); -} - |