summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-01-19 21:15:08 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2017-01-19 21:15:08 (GMT)
commit70d700b26c13e04b601c4ac3db09514db473d01c (patch)
tree27daebf66a8b037fdd36619efe02785c839f9a9f
parenta99c7a5c44fdd3f6ee1a0ec2b9beb5a1d6a32501 (diff)
downloadnetsurf-70d700b26c13e04b601c4ac3db09514db473d01c.tar.gz
netsurf-70d700b26c13e04b601c4ac3db09514db473d01c.tar.bz2
rationalise use of utils/utils.h header
-rw-r--r--content/content.c1
-rw-r--r--content/fetch.c1
-rw-r--r--desktop/textarea.h1
-rw-r--r--desktop/treeview.c1
-rw-r--r--frontends/atari/redrawslots.h4
-rw-r--r--frontends/gtk/corewindow.c1
-rw-r--r--frontends/gtk/plotters.c1
-rw-r--r--frontends/gtk/toolbar.c1
-rw-r--r--frontends/gtk/window.c1
-rw-r--r--frontends/riscos/corewindow.c2
-rw-r--r--frontends/riscos/gui/url_bar.c1
-rw-r--r--frontends/riscos/plotters.c1
-rw-r--r--frontends/riscos/print.c1
-rw-r--r--frontends/riscos/save_draw.c1
-rw-r--r--frontends/windows/about.c1
-rw-r--r--frontends/windows/corewindow.c2
-rw-r--r--frontends/windows/drawable.c1
-rw-r--r--frontends/windows/filetype.c1
-rw-r--r--frontends/windows/gui.c1
-rw-r--r--frontends/windows/localhistory.c1
-rw-r--r--frontends/windows/plot.c1
-rw-r--r--frontends/windows/pointers.c1
-rw-r--r--frontends/windows/prefs.c1
-rw-r--r--frontends/windows/schedule.c1
-rw-r--r--include/netsurf/types.h8
-rw-r--r--render/box.c6
-rw-r--r--render/box_construct.c1
-rw-r--r--render/form.c4
-rw-r--r--render/html.c1
-rw-r--r--render/html_css_fetcher.c1
-rw-r--r--render/imagemap.c6
-rw-r--r--render/search.c3
-rw-r--r--utils/utils.h8
33 files changed, 23 insertions, 44 deletions
diff --git a/content/content.c b/content/content.c
index f650af2..51c40d7 100644
--- a/content/content.c
+++ b/content/content.c
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <nsutils/time.h>
-#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/browser_window.h"
diff --git a/content/fetch.c b/content/fetch.c
index 93c7de2..7324c30 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -46,7 +46,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
-#include "utils/utils.h"
#include "utils/ring.h"
#include "netsurf/misc.h"
#include "desktop/gui_internal.h"
diff --git a/desktop/textarea.h b/desktop/textarea.h
index 19162ff..65e2594 100644
--- a/desktop/textarea.h
+++ b/desktop/textarea.h
@@ -27,7 +27,6 @@
#include <stdint.h>
#include <stdbool.h>
-#include "utils/utils.h"
#include "netsurf/plot_style.h"
#include "netsurf/mouse.h"
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 1d0ac52..4d8fbaa 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -22,6 +22,7 @@
* Treeview handling implementation.
*/
+#include "utils/utils.h"
#include "utils/log.h"
#include "utils/nsurl.h"
#include "utils/nsoption.h"
diff --git a/frontends/atari/redrawslots.h b/frontends/atari/redrawslots.h
index ca72a01..8ea46c4 100644
--- a/frontends/atari/redrawslots.h
+++ b/frontends/atari/redrawslots.h
@@ -22,7 +22,7 @@
#include <mt_gem.h>
-#include "utils/utils.h"
+#include "netsurf/types.h"
/**
* This is the number of redraw requests that the slotlist can store.
@@ -31,8 +31,6 @@
*/
#define MAX_REDRW_SLOTS 32
-struct rect;
-
/**
* This struct holds scheduled redraw requests.
*/
diff --git a/frontends/gtk/corewindow.c b/frontends/gtk/corewindow.c
index 8af1958..70c3ad1 100644
--- a/frontends/gtk/corewindow.c
+++ b/frontends/gtk/corewindow.c
@@ -39,7 +39,6 @@
#include <gtk/gtk.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/utf8.h"
#include "netsurf/types.h"
diff --git a/frontends/gtk/plotters.c b/frontends/gtk/plotters.c
index 1cebf58..817b728 100644
--- a/frontends/gtk/plotters.c
+++ b/frontends/gtk/plotters.c
@@ -31,7 +31,6 @@
#include <gtk/gtk.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "netsurf/plotters.h"
#include "utils/nsoption.h"
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index e1aeb47..ac24a78 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -25,7 +25,6 @@
#include "desktop/searchweb.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utils.h"
#include "utils/nsoption.h"
#include "gtk/gui.h"
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index ce2644e..abfda93 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -34,7 +34,6 @@
#include "utils/log.h"
#include "utils/utf8.h"
-#include "utils/utils.h"
#include "utils/nsoption.h"
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index 9896069..3219be9 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -34,8 +34,8 @@
#include <stdint.h>
#include <oslib/wimp.h>
-#include "utils/utils.h"
#include "utils/log.h"
+#include "netsurf/types.h"
#include "netsurf/mouse.h"
#include "netsurf/keypress.h"
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index 40c5c6f..a5ec3f8 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -38,7 +38,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utf8.h"
-#include "utils/utils.h"
#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
diff --git a/frontends/riscos/plotters.c b/frontends/riscos/plotters.c
index 9c98138..06e732d 100644
--- a/frontends/riscos/plotters.c
+++ b/frontends/riscos/plotters.c
@@ -27,7 +27,6 @@
#include "oslib/os.h"
#include "utils/log.h"
-#include "utils/utils.h"
#include "netsurf/plotters.h"
#include "riscos/bitmap.h"
diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index dfdd24c..465627e 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -34,7 +34,6 @@
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utils.h"
#include "utils/nsoption.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
diff --git a/frontends/riscos/save_draw.c b/frontends/riscos/save_draw.c
index 705551f..7e6c946 100644
--- a/frontends/riscos/save_draw.c
+++ b/frontends/riscos/save_draw.c
@@ -31,7 +31,6 @@
#include <pencil.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
diff --git a/frontends/windows/about.c b/frontends/windows/about.c
index 4716a5c..65c81cd 100644
--- a/frontends/windows/about.c
+++ b/frontends/windows/about.c
@@ -28,7 +28,6 @@
#include <windows.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/messages.h"
#include "desktop/version.h"
diff --git a/frontends/windows/corewindow.c b/frontends/windows/corewindow.c
index ff89d92..754e0e5 100644
--- a/frontends/windows/corewindow.c
+++ b/frontends/windows/corewindow.c
@@ -38,9 +38,9 @@
#include <windowsx.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/utf8.h"
+#include "netsurf/types.h"
#include "netsurf/keypress.h"
#include "netsurf/mouse.h"
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index ee1c695..cb94291 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -26,7 +26,6 @@
#include "utils/errors.h"
#include "utils/log.h"
-#include "utils/utils.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
#include "netsurf/keypress.h"
diff --git a/frontends/windows/filetype.c b/frontends/windows/filetype.c
index aab27ea..ed07dd5 100644
--- a/frontends/windows/filetype.c
+++ b/frontends/windows/filetype.c
@@ -20,7 +20,6 @@
#include <string.h>
#include "utils/log.h"
-#include "utils/utils.h"
#include "content/fetch.h"
#include "netsurf/fetch.h"
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index 043a93d..f5808de 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -26,7 +26,6 @@
#include "utils/errors.h"
#include "utils/nsurl.h"
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/corestrings.h"
#include "utils/url.h"
#include "utils/file.h"
diff --git a/frontends/windows/localhistory.c b/frontends/windows/localhistory.c
index 15705d1..ae3b7f5 100644
--- a/frontends/windows/localhistory.c
+++ b/frontends/windows/localhistory.c
@@ -24,7 +24,6 @@
#include "desktop/browser_history.h"
#include "netsurf/plotters.h"
-#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/windows/plot.c b/frontends/windows/plot.c
index 941ec41..fd29619 100644
--- a/frontends/windows/plot.c
+++ b/frontends/windows/plot.c
@@ -27,7 +27,6 @@
#include "utils/log.h"
#include "utils/utf8.h"
-#include "utils/utils.h"
#include "netsurf/mouse.h"
#include "netsurf/window.h"
#include "netsurf/plotters.h"
diff --git a/frontends/windows/pointers.c b/frontends/windows/pointers.c
index b796a30..a730e4b 100644
--- a/frontends/windows/pointers.c
+++ b/frontends/windows/pointers.c
@@ -25,7 +25,6 @@
#include "utils/errors.h"
#include "utils/nsurl.h"
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/corestrings.h"
#include "utils/url.h"
#include "utils/file.h"
diff --git a/frontends/windows/prefs.c b/frontends/windows/prefs.c
index 286bfb0..03414ee 100644
--- a/frontends/windows/prefs.c
+++ b/frontends/windows/prefs.c
@@ -24,7 +24,6 @@
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utils.h"
#include "utils/file.h"
#include "windows/gui.h"
diff --git a/frontends/windows/schedule.c b/frontends/windows/schedule.c
index 5366add..eae6c1d 100644
--- a/frontends/windows/schedule.c
+++ b/frontends/windows/schedule.c
@@ -21,7 +21,6 @@
#include "utils/sys_time.h"
#include "utils/log.h"
-#include "utils/utils.h"
#include "utils/errors.h"
#include "windows/schedule.h"
diff --git a/include/netsurf/types.h b/include/netsurf/types.h
index 27f2e8f..5c9501b 100644
--- a/include/netsurf/types.h
+++ b/include/netsurf/types.h
@@ -34,4 +34,12 @@
*/
typedef uint32_t colour;
+/**
+ * Rectangle coordinates
+ */
+typedef struct rect {
+ int x0, y0; /**< Top left */
+ int x1, y1; /**< Bottom right */
+} rect;
+
#endif
diff --git a/render/box.c b/render/box.c
index f83bbb2..11a24e7 100644
--- a/render/box.c
+++ b/render/box.c
@@ -19,8 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Box tree manipulation (implementation).
+/**
+ * \file
+ * implementation of box tree manipulation.
*/
#include <assert.h>
@@ -32,7 +33,6 @@
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/talloc.h"
-#include "utils/utils.h"
#include "netsurf/misc.h"
#include "netsurf/content.h"
#include "netsurf/mouse.h"
diff --git a/render/box_construct.c b/render/box_construct.c
index d7de68c..f2d0413 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -38,7 +38,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/talloc.h"
-#include "utils/utils.h"
#include "utils/string.h"
#include "utils/ascii.h"
#include "netsurf/css.h"
diff --git a/render/form.c b/render/form.c
index 093b11f..6eb1b80 100644
--- a/render/form.c
+++ b/render/form.c
@@ -21,7 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Form handling functions (implementation).
*/
@@ -38,7 +39,6 @@
#include "utils/talloc.h"
#include "utils/url.h"
#include "utils/utf8.h"
-#include "utils/utils.h"
#include "utils/ascii.h"
#include "netsurf/browser_window.h"
#include "netsurf/mouse.h"
diff --git a/render/html.c b/render/html.c
index 3ddcdc3..6f7ad62 100644
--- a/render/html.c
+++ b/render/html.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <nsutils/time.h>
+#include "utils/utils.h"
#include "utils/config.h"
#include "utils/corestrings.h"
#include "utils/http.h"
diff --git a/render/html_css_fetcher.c b/render/html_css_fetcher.c
index 05aef02..b9d79a7 100644
--- a/render/html_css_fetcher.c
+++ b/render/html_css_fetcher.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <dom/dom.h>
-
#include <libwapcaplet/libwapcaplet.h>
#include "utils/config.h"
diff --git a/render/imagemap.c b/render/imagemap.c
index 10b48f1..6e2504b 100644
--- a/render/imagemap.c
+++ b/render/imagemap.c
@@ -27,14 +27,14 @@
#include <dom/dom.h>
+#include "utils/log.h"
+#include "utils/corestrings.h"
#include "content/content_protected.h"
#include "content/hlcache.h"
+
#include "render/box.h"
#include "render/html_internal.h"
#include "render/imagemap.h"
-#include "utils/corestrings.h"
-#include "utils/log.h"
-#include "utils/utils.h"
#define HASH_SIZE 31 /* fixed size hash table */
diff --git a/render/search.c b/render/search.c
index 523f8fb..4af6706 100644
--- a/render/search.c
+++ b/render/search.c
@@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
- /** \file
+/**
+ * \file
* Free text search (core)
*/
diff --git a/utils/utils.h b/utils/utils.h
index 855ef7f..6f2ee45 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -29,14 +29,6 @@
#include <inttypes.h>
#include <stdbool.h>
-/** Rectangle coordinates */
-struct rect {
- int x0, y0; /**< Top left */
- int x1, y1; /**< Bottom right */
-};
-
-struct dirent;
-
#ifndef NOF_ELEMENTS
#define NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array)))
#endif