diff options
author | Michael Forney <mforney@mforney.org> | 2019-06-29 16:09:45 -0700 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-06-30 09:52:06 +0100 |
commit | 6a53b447e5726bc7d7b8405b1b1dd958c701b007 (patch) | |
tree | 661c6efe74f6edd53842a1b6a079eafd9ab69fd9 /frontends/riscos | |
parent | 1c3ce67c62cccd8a32090e770f0cba62e9945f28 (diff) | |
download | netsurf-6a53b447e5726bc7d7b8405b1b1dd958c701b007.tar.gz netsurf-6a53b447e5726bc7d7b8405b1b1dd958c701b007.tar.bz2 |
Declare global variables as extern in headers
Otherwise, each source file that includes the header will create a
new definition, which are usually merged together by the linker.
Multiple definitions of an object is not allowed in ISO C.
Diffstat (limited to 'frontends/riscos')
-rw-r--r-- | frontends/riscos/bitmap.h | 2 | ||||
-rw-r--r-- | frontends/riscos/font.h | 2 | ||||
-rw-r--r-- | frontends/riscos/gui.h | 2 | ||||
-rw-r--r-- | frontends/riscos/textselection.h | 2 | ||||
-rw-r--r-- | frontends/riscos/ucstables.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/frontends/riscos/bitmap.h b/frontends/riscos/bitmap.h index 3aca30de6..f66ebb317 100644 --- a/frontends/riscos/bitmap.h +++ b/frontends/riscos/bitmap.h @@ -25,7 +25,7 @@ struct hlcache_handle; struct bitmap; /** bitmap operations table */ -struct gui_bitmap_table *riscos_bitmap_table; +extern struct gui_bitmap_table *riscos_bitmap_table; /** save with full alpha channel (if not opaque) */ #define BITMAP_SAVE_FULL_ALPHA (1 << 0) diff --git a/frontends/riscos/font.h b/frontends/riscos/font.h index a29bad83a..5a82f63ee 100644 --- a/frontends/riscos/font.h +++ b/frontends/riscos/font.h @@ -26,7 +26,7 @@ #include <rufl.h> struct plot_font_style; -struct gui_layout_table *riscos_layout_table; +extern struct gui_layout_table *riscos_layout_table; /** desktop font, size and style being used */ extern char ro_gui_desktop_font_family[]; diff --git a/frontends/riscos/gui.h b/frontends/riscos/gui.h index 65c85f92a..d4ff9ce62 100644 --- a/frontends/riscos/gui.h +++ b/frontends/riscos/gui.h @@ -167,7 +167,7 @@ nserror riscos_schedule(int t, void (*callback)(void *p), void *p); /* in search.c */ void ro_gui_search_init(void); void ro_gui_search_prepare(struct browser_window *g); -struct gui_search_table *riscos_search_table; +extern struct gui_search_table *riscos_search_table; /* in print.c */ void ro_gui_print_init(void); diff --git a/frontends/riscos/textselection.h b/frontends/riscos/textselection.h index 400e3dd26..0d7cc169b 100644 --- a/frontends/riscos/textselection.h +++ b/frontends/riscos/textselection.h @@ -25,7 +25,7 @@ #include "oslib/wimp.h" -struct gui_clipboard_table *riscos_clipboard_table; +extern struct gui_clipboard_table *riscos_clipboard_table; void gui_start_selection(struct gui_window *g); diff --git a/frontends/riscos/ucstables.h b/frontends/riscos/ucstables.h index e5d838249..31db5d882 100644 --- a/frontends/riscos/ucstables.h +++ b/frontends/riscos/ucstables.h @@ -21,7 +21,7 @@ * This is only used if nothing claims Service_International,8 */ -struct gui_utf8_table *riscos_utf8_table; +extern struct gui_utf8_table *riscos_utf8_table; nserror utf8_to_local_encoding(const char *string, size_t len, char **result); nserror utf8_from_local_encoding(const char *string, size_t len, char **result); |