summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-10-13 15:08:16 +0100
committerVincent Sanders <vince@kyllikki.org>2014-10-13 15:08:16 +0100
commit02bbaa3e8855cc632dfca42a8bf06a59a3cecf2a (patch)
tree2b6c8dbb2469cb590f1328769def03928eeea2ba
parentfa8d6900051cdbe4d2bc5e4b0b33d6fb2720f5aa (diff)
downloadnetsurf-02bbaa3e8855cc632dfca42a8bf06a59a3cecf2a.tar.gz
netsurf-02bbaa3e8855cc632dfca42a8bf06a59a3cecf2a.tar.bz2
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.
-rw-r--r--amiga/arexx.c1
-rw-r--r--amiga/gui.c1
-rw-r--r--amiga/menu.c14
-rw-r--r--atari/about.c3
-rw-r--r--atari/ctxmenu.c1
-rwxr-xr-xatari/download.c1
-rwxr-xr-xatari/rootwin.c1
-rwxr-xr-xatari/statusbar.c1
-rw-r--r--atari/toolbar.c1
-rw-r--r--beos/about.cpp2
-rw-r--r--beos/fetch_rsrc.cpp1
-rw-r--r--beos/scaffolding.cpp1
-rw-r--r--beos/window.cpp1
-rw-r--r--cocoa/gui.m1
-rw-r--r--content/fetch.c1
-rw-r--r--content/fetchers/about.c1
-rw-r--r--content/fetchers/curl.c1
-rw-r--r--content/fetchers/data.c1
-rw-r--r--content/fetchers/file.c1
-rw-r--r--desktop/netsurf.c27
-rw-r--r--desktop/netsurf.h8
-rw-r--r--desktop/version.c20
-rw-r--r--desktop/version.h43
-rw-r--r--gtk/about.c2
-rw-r--r--javascript/jsapi/navigator.bnd2
-rw-r--r--monkey/dispatch.c1
-rw-r--r--riscos/dialog.c2
-rw-r--r--riscos/download.c1
-rw-r--r--riscos/iconbar.c1
-rw-r--r--riscos/menus.c1
-rw-r--r--riscos/save.c2
-rw-r--r--test/llcache.c19
-rw-r--r--test/nsurl.c19
-rw-r--r--utils/useragent.c2
-rw-r--r--windows/about.c2
-rw-r--r--windows/gui.c1
36 files changed, 132 insertions, 56 deletions
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 3bac0c249..4130dbb6d 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -26,6 +26,7 @@
#include "utils/nsoption.h"
#include "desktop/browser_private.h"
+#include "desktop/version.h"
#include <string.h>
#include <math.h>
diff --git a/amiga/gui.c b/amiga/gui.c
index c01e29499..70b165efc 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -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"
diff --git a/amiga/menu.c b/amiga/menu.c
index 19888f75b..d3af00ee3 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -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)
diff --git a/atari/about.c b/atari/about.c
index 174e27b20..9cd64d227 100644
--- a/atari/about.c
+++ b/atari/about.c
@@ -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"
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index f782c6e19..94e12219c 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -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"
diff --git a/atari/download.c b/atari/download.c
index 7e44cda89..11a84347f 100755
--- a/atari/download.c
+++ b/atari/download.c
@@ -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"
diff --git a/atari/rootwin.c b/atari/rootwin.c
index b3eb34957..d6da2d857 100755
--- a/atari/rootwin.c
+++ b/atari/rootwin.c
@@ -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"
diff --git a/atari/statusbar.c b/atari/statusbar.c
index 121762bc4..7036c0ffe 100755
--- a/atari/statusbar.c
+++ b/atari/statusbar.c
@@ -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"
diff --git a/atari/toolbar.c b/atari/toolbar.c
index 86460918b..3e0d6d396 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -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"
diff --git a/beos/about.cpp b/beos/about.cpp
index 2483a22c1..bfa9908c7 100644
--- a/beos/about.cpp
+++ b/beos/about.cpp
@@ -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"
diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp
index f2224d1ba..67d0f3555 100644
--- a/beos/fetch_rsrc.cpp
+++ b/beos/fetch_rsrc.cpp
@@ -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"
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index b701b98f0..4881e8a41 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -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"
diff --git a/beos/window.cpp b/beos/window.cpp
index 886e20622..a8c7e8600 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -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"
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 5c8089e33..33bd6f0a3 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -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"
diff --git a/content/fetch.c b/content/fetch.c
index 9a0796294..195f61fb7 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -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"
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index d9c37127f..18528cda7 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -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"
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 51b0f9974..4bd72a20e 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -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"
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index 94ba63827..52da9a416 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -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"
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index f08be6288..acb30c07a 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -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"
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 78ec8ab4c..39cee2e2b 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -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 "javascript/js.h"
+#include "render/html.h"
+#include "render/textplain.h"
+
#include "desktop/netsurf.h"
+#include "desktop/version.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/gui_factory.h"
/** speculative pre-conversion small image size
*
diff --git a/desktop/netsurf.h b/desktop/netsurf.h
index ff098f437..45a445747 100644
--- a/desktop/netsurf.h
+++ b/desktop/netsurf.h
@@ -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
diff --git a/desktop/version.c b/desktop/version.c
index 44d58715f..03918eabe 100644
--- a/desktop/version.c
+++ b/desktop/version.c
@@ -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
diff --git a/desktop/version.h b/desktop/version.h
new file mode 100644
index 000000000..7ab8eb425
--- /dev/null
+++ b/desktop/version.h
@@ -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
diff --git a/gtk/about.c b/gtk/about.c
index 84fb067c4..27c164a10 100644
--- a/gtk/about.c
+++ b/gtk/about.c
@@ -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"
diff --git a/javascript/jsapi/navigator.bnd b/javascript/jsapi/navigator.bnd
index 94be63687..dee2cc23f 100644
--- a/javascript/jsapi/navigator.bnd
+++ b/javascript/jsapi/navigator.bnd
@@ -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"
diff --git a/monkey/dispatch.c b/monkey/dispatch.c
index 4329ca100..9d022560c 100644
--- a/monkey/dispatch.c
+++ b/monkey/dispatch.c
@@ -25,7 +25,6 @@
#include "utils/utils.h"
#include "utils/ring.h"
-#include "desktop/netsurf.h"
#include "monkey/dispatch.h"
typedef struct cmdhandler {
diff --git a/riscos/dialog.c b/riscos/dialog.c
index 0244860cc..97c4f7b68 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -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"
diff --git a/riscos/download.c b/riscos/download.c
index f52bbe88d..ab730eb36 100644
--- a/riscos/download.c
+++ b/riscos/download.c
@@ -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"
diff --git a/riscos/iconbar.c b/riscos/iconbar.c
index 6f0c7e083..9ca58c595 100644
--- a/riscos/iconbar.c
+++ b/riscos/iconbar.c
@@ -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"
diff --git a/riscos/menus.c b/riscos/menus.c
index 4158d23af..0b36c2665 100644
--- a/riscos/menus.c
+++ b/riscos/menus.c
@@ -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"
diff --git a/riscos/save.c b/riscos/save.c
index cc8612bb5..588b9df32 100644
--- a/riscos/save.c
+++ b/riscos/save.c
@@ -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"
diff --git a/test/llcache.c b/test/llcache.c
index 643ff7f87..ae162b170 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -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 */
diff --git a/test/nsurl.c b/test/nsurl.c
index 20774c41f..bd7dc80dc 100644
--- a/test/nsurl.c
+++ b/test/nsurl.c
@@ -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"
diff --git a/utils/useragent.c b/utils/useragent.c
index 91f43636c..16ed67a75 100644
--- a/utils/useragent.c
+++ b/utils/useragent.c
@@ -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"
diff --git a/windows/about.c b/windows/about.c
index 74bca0ed9..fca417ade 100644
--- a/windows/about.c
+++ b/windows/about.c
@@ -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"
diff --git a/windows/gui.c b/windows/gui.c
index 091caca2b..0d148f2cc 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -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"