summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/netsurf.c27
-rw-r--r--desktop/netsurf.h8
-rw-r--r--desktop/version.c20
-rw-r--r--desktop/version.h43
4 files changed, 77 insertions, 21 deletions
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