split version info into its own header and remove unnecessary nesurf.h includes

The netsurf.h header should *only* contain the registration, core
initialisation and finalisation methods. Version information is best
placed in its own header.

Also remove any unneeded inclusion of this header limiting it to
solely the places the relevant API is required.
This commit is contained in:
Vincent Sanders 2014-10-13 15:08:16 +01:00
parent fa8d690005
commit 02bbaa3e88
36 changed files with 133 additions and 57 deletions

View File

@ -26,6 +26,7 @@
#include "utils/nsoption.h"
#include "desktop/browser_private.h"
#include "desktop/version.h"
#include <string.h>
#include <math.h>

View File

@ -27,6 +27,7 @@
#include "desktop/hotlist.h"
#include "desktop/mouse.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "desktop/save_complete.h"
#include "desktop/scrollbar.h"
#include "desktop/searchweb.h"

View File

@ -38,6 +38,14 @@
#include <reaction/reaction_macros.h>
#include "utils/nsoption.h"
#include "desktop/hotlist.h"
#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/textinput.h"
#include "desktop/version.h"
#include "utils/messages.h"
#include "amiga/arexx.h"
#include "amiga/bitmap.h"
#include "amiga/clipboard.h"
@ -50,18 +58,12 @@
#include "amiga/history_local.h"
#include "amiga/hotlist.h"
#include "amiga/menu.h"
#include "utils/nsoption.h"
#include "amiga/print.h"
#include "amiga/search.h"
#include "amiga/theme.h"
#include "amiga/tree.h"
#include "amiga/utf8.h"
#include "amiga/schedule.h"
#include "desktop/hotlist.h"
#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/textinput.h"
#include "utils/messages.h"
/* This is here temporarily until we get a new SDK */
#define LABEL_MenuMode (LABEL_Dummy+12)

View File

@ -32,11 +32,10 @@
#include "testament.h"
#include "utils/useragent.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "utils/nsurl.h"
#include "utils/messages.h"
#include "curl/curlver.h"

View File

@ -29,7 +29,6 @@
#include <cflib.h>
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "desktop/browser_private.h"
#include "desktop/mouse.h"

View File

@ -28,7 +28,6 @@
#include "content/urldb.h"
#include "content/fetch.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "utils/nsoption.h"
#include "desktop/save_complete.h"
#include "desktop/textinput.h"

View File

@ -38,7 +38,6 @@
#include "utils/log.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "desktop/browser_private.h"
#include "desktop/mouse.h"

View File

@ -29,7 +29,6 @@
#include "utils/log.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "desktop/mouse.h"
#include "desktop/plotters.h"

View File

@ -29,7 +29,6 @@
#include "utils/log.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "desktop/browser_history.h"
#include "desktop/browser_private.h"

View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
extern "C" {
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "utils/log.h"
#include "testament.h"
#include "utils/useragent.h"

View File

@ -35,7 +35,6 @@ extern "C" {
#include "content/fetch.h"
#include "content/fetchers.h"
#include "content/urldb.h"
#include "desktop/netsurf.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"

View File

@ -56,6 +56,7 @@ extern "C" {
#include "desktop/browser_private.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "desktop/plotters.h"
#include "utils/nsoption.h"
#include "desktop/textinput.h"

View File

@ -27,7 +27,6 @@ extern "C" {
#include "desktop/browser_private.h"
#include "desktop/mouse.h"
#include "utils/nsoption.h"
#include "desktop/netsurf.h"
#include "desktop/textinput.h"
#include "desktop/font.h"
#include "utils/log.h"

View File

@ -28,7 +28,6 @@
#import "cocoa/schedule.h"
#import "desktop/gui.h"
#import "desktop/netsurf.h"
#import "desktop/browser_private.h"
#import "utils/nsoption.h"
#import "desktop/textinput.h"

View File

@ -40,7 +40,6 @@
#include <curl/curl.h>
#include "utils/config.h"
#include "desktop/netsurf.h"
#include "desktop/gui_factory.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"

View File

@ -50,7 +50,6 @@
#include "content/fetchers.h"
#include "content/fetchers/about.h"
#include "content/urldb.h"
#include "desktop/netsurf.h"
#include "utils/nsoption.h"
#include "utils/corestrings.h"
#include "utils/log.h"

View File

@ -41,7 +41,6 @@
#include <libwapcaplet/libwapcaplet.h>
#include "utils/config.h"
#include "desktop/netsurf.h"
#include "desktop/gui_factory.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"

View File

@ -34,7 +34,6 @@
#include "content/fetchers.h"
#include "content/fetchers/data.h"
#include "content/urldb.h"
#include "desktop/netsurf.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"
#include "utils/log.h"

View File

@ -42,7 +42,6 @@
#include <libwapcaplet/libwapcaplet.h>
#include "desktop/netsurf.h"
#include "desktop/gui_factory.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"

View File

@ -23,11 +23,17 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <libwapcaplet/libwapcaplet.h>
#include "utils/config.h"
#include "utils/utsname.h"
#include "utils/nsoption.h"
#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/url.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "content/content_factory.h"
#include "content/fetchers.h"
#include "content/hlcache.h"
@ -36,23 +42,16 @@
#include "css/css.h"
#include "image/image.h"
#include "image/image_cache.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "desktop/system_colour.h"
#include "desktop/gui_factory.h"
#include "utils/nsoption.h"
#include "desktop/searchweb.h"
#include "javascript/js.h"
#include "render/html.h"
#include "render/textplain.h"
#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/url.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "desktop/browser.h"
#include "desktop/system_colour.h"
#include "desktop/searchweb.h"
#include "desktop/gui_factory.h"
/** speculative pre-conversion small image size
*

View File

@ -1,5 +1,5 @@
/*
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
* Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@ -19,13 +19,8 @@
#ifndef _NETSURF_DESKTOP_NETSURF_H_
#define _NETSURF_DESKTOP_NETSURF_H_
#include <stdbool.h>
#include "utils/errors.h"
extern const char * const netsurf_version;
extern const int netsurf_version_major;
extern const int netsurf_version_minor;
struct netsurf_table;
/**
@ -49,5 +44,4 @@ nserror netsurf_init(const char *messages, const char *store_path);
*/
extern void netsurf_exit(void);
#endif

View File

@ -1,5 +1,25 @@
/*
* Copyright 2014 Vincent Sanders <vince@netsurf-browser.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 "testament.h"
#include "desktop/version.h"
const char * const netsurf_version = "3.3 (Dev"
#if defined(CI_BUILD)
" CI #" CI_BUILD

43
desktop/version.h Normal file
View File

@ -0,0 +1,43 @@
/*
* Copyright 2014 Vincent Sanders <vince@netsurf-browser.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/>.
*/
/**
* \file
*
* Version information interface.
*/
#ifndef _NETSURF_DESKTOP_VERSION_H_
#define _NETSURF_DESKTOP_VERSION_H_
/**
* User friendly version string.
*/
extern const char * const netsurf_version;
/**
* NetSuf browser major version number.
*/
extern const int netsurf_version_major;
/**
* NetSuf browser minor version number.
*/
extern const int netsurf_version_minor;
#endif

View File

@ -28,7 +28,7 @@
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "desktop/browser.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "gtk/compat.h"
#include "gtk/gui.h"

View File

@ -21,7 +21,7 @@ preamble %{
#include <assert.h>
#include <stdlib.h>
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "utils/config.h"
#include "utils/nsoption.h"
#include "utils/useragent.h"

View File

@ -25,7 +25,6 @@
#include "utils/utils.h"
#include "utils/ring.h"
#include "desktop/netsurf.h"
#include "monkey/dispatch.h"
typedef struct cmdhandler {

View File

@ -40,7 +40,7 @@
#include "utils/nsurl.h"
#include "utils/url.h"
#include "utils/utils.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "desktop/browser.h"
#include "riscos/configure.h"

View File

@ -45,7 +45,6 @@
#include "oslib/wimpspriteop.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/download.h"
#include "utils/nsoption.h"
#include "utils/log.h"

View File

@ -37,7 +37,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsurl.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "riscos/gui.h"

View File

@ -42,7 +42,6 @@
#include "desktop/cookie_manager.h"
#include "desktop/browser.h"
#include "desktop/gui.h"
#include "desktop/netsurf.h"
#include "desktop/textinput.h"
#include "riscos/dialog.h"

View File

@ -46,7 +46,7 @@
#include "content/hlcache.h"
#include "desktop/hotlist.h"
#include "desktop/global_history.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "desktop/save_complete.h"
#include "desktop/save_text.h"
#include "desktop/thumbnail.h"

View File

@ -1,3 +1,21 @@
/*
* Copyright 2011 John Mark Bell <jmb@netsurf-browser.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>
@ -16,7 +34,6 @@
* Things that we'd reasonably expect to have to implement *
******************************************************************************/
/* desktop/netsurf.h */
bool verbose_log;
/* utils/utils.h */

View File

@ -1,3 +1,21 @@
/*
* Copyright 2011 John Mark Bell <jmb@netsurf-browser.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 <assert.h>
#include <stdio.h>
#include <stdlib.h>
@ -5,7 +23,6 @@
#include <libwapcaplet/libwapcaplet.h>
#include "desktop/netsurf.h"
#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/nsurl.h"

View File

@ -22,7 +22,7 @@
#include "utils/config.h"
#include "utils/utsname.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "utils/log.h"
#include "utils/useragent.h"

View File

@ -24,7 +24,7 @@
#include "utils/utils.h"
#include "utils/messages.h"
#include "desktop/netsurf.h"
#include "desktop/version.h"
#include "utils/log.h"
#include "windows/gui.h"

View File

@ -35,7 +35,6 @@
#include "desktop/browser_history.h"
#include "desktop/browser.h"
#include "desktop/mouse.h"
#include "desktop/netsurf.h"
#include "utils/nsoption.h"
#include "desktop/plotters.h"
#include "desktop/textinput.h"