summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/401login.h4
-rw-r--r--desktop/print.c2
-rw-r--r--image/bmp.c5
-rw-r--r--image/bmp.h5
-rw-r--r--image/gif.c6
-rw-r--r--image/gif.h5
-rw-r--r--image/ico.c5
-rw-r--r--image/ico.h5
-rw-r--r--image/jpeg.c5
-rw-r--r--image/jpeg.h5
-rw-r--r--image/mng.h6
-rw-r--r--image/nssprite.c9
-rw-r--r--image/nssprite.h5
-rw-r--r--image/rsvg.h7
-rw-r--r--image/svg.c5
-rw-r--r--pdf/font_haru.c5
-rw-r--r--riscos/401login.c5
-rw-r--r--riscos/artworks.c5
-rw-r--r--riscos/draw.c5
-rw-r--r--riscos/draw.h5
-rw-r--r--riscos/gui.h2
-rw-r--r--riscos/plugin.c5
-rw-r--r--riscos/plugin.h5
-rw-r--r--riscos/print.c7
-rw-r--r--riscos/print.h5
-rw-r--r--riscos/save_complete.c5
-rw-r--r--riscos/save_complete.h5
-rw-r--r--riscos/save_pdf.c5
-rw-r--r--riscos/save_pdf.h8
-rw-r--r--riscos/search.c13
-rw-r--r--riscos/sprite.c1
-rw-r--r--riscos/sprite.h3
-rw-r--r--riscos/sslcert.c1
-rw-r--r--riscos/uri.c22
-rw-r--r--riscos/uri.h5
-rw-r--r--riscos/url_protocol.c5
-rw-r--r--riscos/url_protocol.h5
37 files changed, 144 insertions, 62 deletions
diff --git a/desktop/401login.h b/desktop/401login.h
index bb41205a1..8f7220663 100644
--- a/desktop/401login.h
+++ b/desktop/401login.h
@@ -20,11 +20,11 @@
#define NETSURF_DESKTOP_401LOGIN_H
#include "utils/config.h"
+#ifdef WITH_AUTH
+
#include "content/content.h"
#include "desktop/browser.h"
-#ifdef WITH_AUTH
-
void gui_401login_open(struct browser_window *bw, struct content *c,
const char *realm);
diff --git a/desktop/print.c b/desktop/print.c
index 0b96c852c..b13ea7d4b 100644
--- a/desktop/print.c
+++ b/desktop/print.c
@@ -20,7 +20,9 @@
* Output-in-pages implementation
*/
+#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
+
#include "desktop/print.h"
#include "desktop/printer.h"
diff --git a/image/bmp.c b/image/bmp.c
index 1025edd94..25f65bc25 100644
--- a/image/bmp.c
+++ b/image/bmp.c
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_BMP
+
#include <assert.h>
#include <string.h>
#include <stdbool.h>
@@ -30,8 +33,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
-#ifdef WITH_BMP
-
bool nsbmp_create(struct content *c, const char *params[]) {
union content_msg_data msg_data;
diff --git a/image/bmp.h b/image/bmp.h
index 24b965681..bd761eb95 100644
--- a/image/bmp.h
+++ b/image/bmp.h
@@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_BMP_H_
#define _NETSURF_IMAGE_BMP_H_
+#include "utils/config.h"
+#ifdef WITH_BMP
+
#include <stdbool.h>
#include "image/bmpread.h"
@@ -41,4 +44,6 @@ bool nsbmp_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+#endif /* WITH_BMP */
+
#endif
diff --git a/image/gif.c b/image/gif.c
index 52e057920..eff95db16 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -17,11 +17,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_GIF
+
#include <assert.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
-#include "utils/config.h"
#include "content/content.h"
#include "desktop/browser.h"
#include "desktop/options.h"
@@ -44,8 +46,6 @@
[rjw] - Sun 4th April 2004
*/
-#ifdef WITH_GIF
-
static void nsgif_invalidate(struct bitmap *bitmap, void *private_word);
static void nsgif_animate(void *p);
static void nsgif_get_frame(struct content *c);
diff --git a/image/gif.h b/image/gif.h
index f6308b856..4a1a5c4c5 100644
--- a/image/gif.h
+++ b/image/gif.h
@@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_GIF_H_
#define _NETSURF_IMAGE_GIF_H_
+#include "utils/config.h"
+#ifdef WITH_GIF
+
#include <stdbool.h>
#include "image/gifread.h"
@@ -42,4 +45,6 @@ bool nsgif_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+#endif /* WITH_GIF */
+
#endif
diff --git a/image/ico.c b/image/ico.c
index bf2647710..b7e8d923c 100644
--- a/image/ico.c
+++ b/image/ico.c
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_BMP
+
#include <assert.h>
#include <string.h>
#include <stdbool.h>
@@ -30,8 +33,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
-#ifdef WITH_BMP
-
bool nsico_create(struct content *c, const char *params[]) {
union content_msg_data msg_data;
diff --git a/image/ico.h b/image/ico.h
index 5b436c6eb..d11120015 100644
--- a/image/ico.h
+++ b/image/ico.h
@@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_ICO_H_
#define _NETSURF_IMAGE_ICO_H_
+#include "utils/config.h"
+#ifdef WITH_BMP
+
#include <stdbool.h>
#include "image/bmpread.h"
@@ -41,4 +44,6 @@ bool nsico_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+#endif /* WITH_BMP */
+
#endif
diff --git a/image/jpeg.c b/image/jpeg.c
index 10ff5736e..21d3773f7 100644
--- a/image/jpeg.c
+++ b/image/jpeg.c
@@ -23,13 +23,14 @@
* This implementation uses the IJG JPEG library.
*/
+#include "utils/config.h"
+#ifdef WITH_JPEG
+
#include <assert.h>
#include <setjmp.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include "utils/config.h"
-#ifdef WITH_JPEG
#define JPEG_INTERNAL_OPTIONS
#include "jpeglib.h"
#include "content/content.h"
diff --git a/image/jpeg.h b/image/jpeg.h
index 6760b42a6..ffe040943 100644
--- a/image/jpeg.h
+++ b/image/jpeg.h
@@ -23,6 +23,9 @@
#ifndef _NETSURF_IMAGE_JPEG_H_
#define _NETSURF_IMAGE_JPEG_H_
+#include "utils/config.h"
+#ifdef WITH_JPEG
+
#include <stdbool.h>
struct bitmap;
@@ -44,4 +47,6 @@ bool nsjpeg_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+#endif /* WITH_JPEG */
+
#endif
diff --git a/image/mng.h b/image/mng.h
index 45b0585b1..765919e36 100644
--- a/image/mng.h
+++ b/image/mng.h
@@ -23,6 +23,9 @@
#ifndef _NETSURF_IMAGE_MNG_H_
#define _NETSURF_IMAGE_MNG_H_
+#include "utils/config.h"
+#ifdef WITH_MNG
+
#include <stdbool.h>
#include <libmng.h>
@@ -51,4 +54,7 @@ bool nsmng_redraw_tiled(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+
+#endif /* WITH_MNG */
+
#endif
diff --git a/image/nssprite.c b/image/nssprite.c
index ce472fea0..950904e52 100644
--- a/image/nssprite.c
+++ b/image/nssprite.c
@@ -21,10 +21,13 @@
*
*/
+#include "utils/config.h"
+#ifdef WITH_NSSPRITE
+
#include <assert.h>
#include <string.h>
#include <stdlib.h>
-
+#include <librosprite.h>
#include "utils/config.h"
#include "desktop/plotters.h"
#include "content/content.h"
@@ -32,10 +35,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
-#ifdef WITH_NSSPRITE
-
-#include <librosprite.h>
-
#define ERRCHK(x) do { \
rosprite_error err = x; \
if (err == ROSPRITE_EOF) { \
diff --git a/image/nssprite.h b/image/nssprite.h
index 06e0a366e..47d989aa7 100644
--- a/image/nssprite.h
+++ b/image/nssprite.h
@@ -23,6 +23,9 @@
#ifndef _NETSURF_NS_SPRITE_H_
#define _NETSURF_NS_SPRITE_H_
+#include "utils/config.h"
+#ifdef WITH_NSSPRITE
+
#include <stdbool.h>
struct content;
@@ -38,4 +41,6 @@ bool nssprite_redraw(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
+#endif /* WITH_NSSPRITE */
+
#endif
diff --git a/image/rsvg.h b/image/rsvg.h
index 60da24baa..77f5dcfcb 100644
--- a/image/rsvg.h
+++ b/image/rsvg.h
@@ -23,10 +23,12 @@
#ifndef _NETSURF_IMAGE_RSVG_H_
#define _NETSURF_IMAGE_RSVG_H_
+#include "utils/config.h"
+#ifdef WITH_RSVG
+
#include <stdbool.h>
#include <librsvg/rsvg.h>
#include <cairo.h>
-
#include "image/bitmap.h"
struct content;
@@ -51,4 +53,7 @@ bool rsvg_redraw_tiled(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
+
+#endif /* WITH_RSVG */
+
#endif
diff --git a/image/svg.c b/image/svg.c
index ee33c1c46..29fb3be16 100644
--- a/image/svg.c
+++ b/image/svg.c
@@ -20,10 +20,11 @@
* Content for image/svg (implementation).
*/
-#include <assert.h>
#include "utils/config.h"
#ifdef WITH_NS_SVG
-#include <svgtiny.h>
+
+#include <assert.h>
+#include "svgtiny.h"
#include "content/content.h"
#include "css/css.h"
#include "desktop/plotters.h"
diff --git a/pdf/font_haru.c b/pdf/font_haru.c
index de89d6494..e1d576027 100644
--- a/pdf/font_haru.c
+++ b/pdf/font_haru.c
@@ -26,15 +26,14 @@
#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
-#define FONT_HARU_DEBUG
+/* #define FONT_HARU_DEBUG */
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
-
+#include "hpdf.h"
#include "css/css.h"
-#include "hpdf.h"
#include "render/font.h"
#include "pdf/font_haru.h"
#include "utils/log.h"
diff --git a/riscos/401login.c b/riscos/401login.c
index 3cbfcb575..cc75f4ba3 100644
--- a/riscos/401login.c
+++ b/riscos/401login.c
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_AUTH
+
#include <assert.h>
#include <stdbool.h>
#include <string.h>
@@ -33,8 +36,6 @@
#include "utils/url.h"
#include "utils/utils.h"
-#ifdef WITH_AUTH
-
#define ICON_401LOGIN_LOGIN 0
#define ICON_401LOGIN_CANCEL 1
#define ICON_401LOGIN_HOST 2
diff --git a/riscos/artworks.c b/riscos/artworks.c
index 5dea449c9..f9e8f4b63 100644
--- a/riscos/artworks.c
+++ b/riscos/artworks.c
@@ -22,6 +22,9 @@
* Uses the ArtworksRenderer module
*/
+#include "utils/config.h"
+#ifdef WITH_ARTWORKS
+
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
@@ -37,8 +40,6 @@
#include "utils/messages.h"
#include "utils/log.h"
-#ifdef WITH_ARTWORKS
-
#define AWRender_FileInitAddress 0x46080
#define AWRender_RenderAddress 0x46081
#define AWRender_DocBounds 0x46082
diff --git a/riscos/draw.c b/riscos/draw.c
index 0d1bf51a4..b30e98dfb 100644
--- a/riscos/draw.c
+++ b/riscos/draw.c
@@ -22,6 +22,9 @@
* The DrawFile module is used to plot the DrawFile.
*/
+#include "utils/config.h"
+#ifdef WITH_DRAW
+
#include <string.h>
#include <stdlib.h>
#include "oslib/drawfile.h"
@@ -34,8 +37,6 @@
#include "utils/messages.h"
#include "utils/log.h"
-#ifdef WITH_DRAW
-
/**
* Convert a CONTENT_DRAW for display.
*
diff --git a/riscos/draw.h b/riscos/draw.h
index 81c2a1797..a55058767 100644
--- a/riscos/draw.h
+++ b/riscos/draw.h
@@ -23,6 +23,9 @@
#ifndef _NETSURF_RISCOS_DRAW_H_
#define _NETSURF_RISCOS_DRAW_H_
+#include "utils/config.h"
+#ifdef WITH_DRAW
+
#include <stdbool.h>
struct content;
@@ -38,4 +41,6 @@ bool draw_redraw(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
+#endif /* WITH_DRAW */
+
#endif
diff --git a/riscos/gui.h b/riscos/gui.h
index f3160c8a6..2d495e948 100644
--- a/riscos/gui.h
+++ b/riscos/gui.h
@@ -199,9 +199,11 @@ extern os_t sched_time;
void ro_gui_debugwin_open(void);
/* in search.c */
+#ifdef WITH_SEARCH
void ro_gui_search_init(void);
void ro_gui_search_prepare(struct gui_window *g);
bool ro_gui_search_prepare_menu(void);
+#endif
/* in print.c */
void ro_gui_print_init(void);
diff --git a/riscos/plugin.c b/riscos/plugin.c
index 15a37d5f3..dbeb02b14 100644
--- a/riscos/plugin.c
+++ b/riscos/plugin.c
@@ -37,6 +37,9 @@
* Helpers are not supported (system variable detection is #if 0ed out)
*/
+#include "utils/config.h"
+#ifdef WITH_PLUGIN
+
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
@@ -67,8 +70,6 @@
#include "utils/utils.h"
-#ifdef WITH_PLUGIN
-
typedef enum {
PLUGIN_PARAMETER_DATA = 1,
PLUGIN_PARAMETER_URL = 2,
diff --git a/riscos/plugin.h b/riscos/plugin.h
index 5bd7b4abc..ca73fedc2 100644
--- a/riscos/plugin.h
+++ b/riscos/plugin.h
@@ -19,6 +19,9 @@
#ifndef _NETSURF_RISCOS_PLUGIN_H_
#define _NETSURF_RISCOS_PLUGIN_H_
+#include "utils/config.h"
+#ifdef WITH_PLUGIN
+
#include <stdbool.h>
#include "oslib/plugin.h"
#include "oslib/wimp.h"
@@ -73,6 +76,6 @@ void plugin_stream_new(wimp_message *message);
void plugin_stream_written(wimp_message *message);
void plugin_url_access(wimp_message *message);
-
+#endif /* WITH_PLUGIN */
#endif
diff --git a/riscos/print.c b/riscos/print.c
index e75bd1d6a..10296ebf3 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_PRINT
+
#include <assert.h>
#include <string.h>
#include "oslib/font.h"
@@ -68,12 +71,10 @@
* \todo make use of print stylesheets
*/
-struct gui_window *print_current_window = 0;
+struct gui_window *print_current_window = NULL;
bool print_text_black = false;
bool print_active = false;
-#ifdef WITH_PRINT
-
/* 1 millipoint == 1/400 OS unit == 1/800 browser units */
static int print_prev_message = 0;
diff --git a/riscos/print.h b/riscos/print.h
index 4859d305a..566eb79b9 100644
--- a/riscos/print.h
+++ b/riscos/print.h
@@ -19,6 +19,9 @@
#ifndef _NETSURF_RISCOS_PRINT_H_
#define _NETSURF_RISCOS_PRINT_H_
+#include "utils/config.h"
+#ifdef WITH_PRINT
+
#include <stdbool.h>
#include "oslib/wimp.h"
@@ -33,4 +36,6 @@ bool print_ack(wimp_message *m);
void print_dataload_bounce(wimp_message *m);
void print_cleanup(void);
+#endif /* WITH_PRINT */
+
#endif
diff --git a/riscos/save_complete.c b/riscos/save_complete.c
index 25f45409e..e0f4cc6ae 100644
--- a/riscos/save_complete.c
+++ b/riscos/save_complete.c
@@ -21,6 +21,9 @@
* Save HTML document with dependencies (implementation).
*/
+#include "utils/config.h"
+#ifdef WITH_SAVE_COMPLETE
+
#define _GNU_SOURCE /* for strndup */
#include <assert.h>
#include <ctype.h>
@@ -42,8 +45,6 @@
#include "utils/url.h"
#include "utils/utils.h"
-#ifdef WITH_SAVE_COMPLETE
-
regex_t save_complete_import_re;
/** An entry in save_complete_list. */
diff --git a/riscos/save_complete.h b/riscos/save_complete.h
index 63db0e44d..d04c4017a 100644
--- a/riscos/save_complete.h
+++ b/riscos/save_complete.h
@@ -23,10 +23,15 @@
#ifndef _NETSURF_RISCOS_SAVE_COMPLETE_H_
#define _NETSURF_RISCOS_SAVE_COMPLETE_H_
+#include "utils/config.h"
+#ifdef WITH_SAVE_COMPLETE
+
#include <stdbool.h>
struct content;
void save_complete_init(void);
bool save_complete(struct content *c, const char *path);
+#endif /* WITH_SAVE_COMPLETE */
+
#endif
diff --git a/riscos/save_pdf.c b/riscos/save_pdf.c
index a7d0903f4..90420d874 100644
--- a/riscos/save_pdf.c
+++ b/riscos/save_pdf.c
@@ -20,6 +20,9 @@
* Export a content as a PDF file (implementation).
*/
+#include "utils/config.h"
+#ifdef WITH_PDF_EXPORT
+
#include <stdbool.h>
#include "oslib/osfile.h"
#include "content/content.h"
@@ -29,8 +32,6 @@
#include "utils/log.h"
#include "utils/config.h"
-#ifdef WITH_PDF_EXPORT
-
/**
* Export a content as a PDF file.
*
diff --git a/riscos/save_pdf.h b/riscos/save_pdf.h
index ed7bae393..115abb321 100644
--- a/riscos/save_pdf.h
+++ b/riscos/save_pdf.h
@@ -20,10 +20,12 @@
#define _NETSURF_RISCOS_SAVE_PDF_H_
#include "utils/config.h"
-#include "content/content.h"
-
#ifdef WITH_PDF_EXPORT
+
+struct content;
+
bool save_as_pdf(struct content *c, const char *path);
-#endif
+
+#endif /* WITH_PDF_EXPORT */
#endif
diff --git a/riscos/search.c b/riscos/search.c
index 63678828c..ead9876d3 100644
--- a/riscos/search.c
+++ b/riscos/search.c
@@ -21,6 +21,9 @@
* Free text search (implementation)
*/
+#include "utils/config.h"
+#ifdef WITH_SEARCH
+
#include <ctype.h>
#include <string.h>
#include "oslib/hourglass.h"
@@ -40,8 +43,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
-#ifdef WITH_SEARCH
-
#ifndef NOF_ELEMENTS
#define NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array)))
#endif
@@ -59,13 +60,13 @@ struct list_entry {
struct list_entry *next;
};
-struct gui_window *search_current_window = 0;
+struct gui_window *search_current_window = NULL;
-static char *search_string = 0;
+static char *search_string = NULL;
static struct list_entry search_head = { 0, 0, NULL, NULL, NULL, NULL, NULL };
static struct list_entry *search_found = &search_head;
-static struct list_entry *search_current = 0;
-static struct content *search_content = 0;
+static struct list_entry *search_current = NULL;
+static struct content *search_content = NULL;
static bool search_prev_case_sens = false;
#define RECENT_SEARCHES 8
diff --git a/riscos/sprite.c b/riscos/sprite.c
index 685da088e..32e187087 100644
--- a/riscos/sprite.c
+++ b/riscos/sprite.c
@@ -35,6 +35,7 @@
#include "riscos/gui.h"
#include "riscos/image.h"
#include "riscos/sprite.h"
+#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
diff --git a/riscos/sprite.h b/riscos/sprite.h
index 4b3ba8db3..8bfe19b9e 100644
--- a/riscos/sprite.h
+++ b/riscos/sprite.h
@@ -25,7 +25,9 @@
#include <stdbool.h>
#include "oslib/osspriteop.h"
+#include "utils/config.h"
+#ifdef WITH_SPRITE
struct content;
struct content_sprite_data {
@@ -38,6 +40,7 @@ bool sprite_redraw(struct content *c, int x, int y,
int width, int height,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
+#endif
byte sprite_bpp(const osspriteop_header *s);
diff --git a/riscos/sslcert.c b/riscos/sslcert.c
index 2be320456..51069954c 100644
--- a/riscos/sslcert.c
+++ b/riscos/sslcert.c
@@ -21,7 +21,6 @@
*/
#include "utils/config.h"
-
#ifdef WITH_SSL
#include <assert.h>
diff --git a/riscos/uri.c b/riscos/uri.c
index 9ecd2a378..53167d305 100644
--- a/riscos/uri.c
+++ b/riscos/uri.c
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "utils/config.h"
+#ifdef WITH_URI
+
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -28,19 +31,14 @@
#include "riscos/theme.h"
#include "desktop/gui.h"
#include "riscos/gui.h"
+#include "riscos/uri.h"
#include "riscos/url_protocol.h"
#include "utils/log.h"
#include "utils/utils.h"
-#ifdef WITH_URI
-
-void ro_uri_message_received(uri_full_message_process*);
-bool ro_uri_launch(char *uri);
-void ro_uri_bounce(uri_full_message_return_result*);
-
-
-void ro_uri_message_received(uri_full_message_process* uri_message)
+void ro_uri_message_received(wimp_message *msg)
{
+ uri_full_message_process *uri_message = (uri_full_message_process *)msg;
uri_h uri_handle;
char* uri_requested;
int uri_length;
@@ -57,7 +55,6 @@ void ro_uri_message_received(uri_full_message_process* uri_message)
xuri_request_uri(0, 0, 0, uri_handle, &uri_length);
uri_requested = calloc((unsigned int)uri_length, sizeof(char));
-
if (uri_requested == NULL)
return;
@@ -85,15 +82,16 @@ bool ro_uri_launch(char *uri)
return true;
}
-void ro_uri_bounce(uri_full_message_return_result *message)
+void ro_uri_bounce(wimp_message *msg)
{
+ uri_full_message_process *message = (uri_full_message_process *)msg;
char uri_buf[512];
os_error *e;
- if ((message->flags & 1) == 0) return;
+ if ((message->flags & 1) == 0)
+ return;
e = xuri_request_uri(0, uri_buf, sizeof uri_buf, message->handle, 0);
-
if (e) {
LOG(("xuri_request_uri: %d: %s", e->errnum, e->errmess));
return;
diff --git a/riscos/uri.h b/riscos/uri.h
index 3f7c9341f..b22d36986 100644
--- a/riscos/uri.h
+++ b/riscos/uri.h
@@ -19,10 +19,15 @@
#ifndef _NETSURF_RISCOS_URI_H_
#define _NETSURF_RISCOS_URI_H_
+#include "utils/config.h"
+#ifdef WITH_URI
+
#include "oslib/wimp.h"
void ro_uri_message_received(wimp_message *message);
bool ro_uri_launch(char *uri);
void ro_uri_bounce(wimp_message *message);
+#endif /* WITH_URI */
+
#endif
diff --git a/riscos/url_protocol.c b/riscos/url_protocol.c
index 68df3c218..7831334b6 100644
--- a/riscos/url_protocol.c
+++ b/riscos/url_protocol.c
@@ -24,6 +24,9 @@
* See http://www.vigay.com/inet/inet_url.html
*/
+#include "utils/config.h"
+#ifdef WITH_URL
+
#define _GNU_SOURCE /* for strndup */
#include <ctype.h>
#include <stdio.h>
@@ -40,8 +43,6 @@
#include "utils/log.h"
#include "utils/utils.h"
-#ifdef WITH_URL
-
/**
* Handle a Message_InetSuiteOpenURL.
*/
diff --git a/riscos/url_protocol.h b/riscos/url_protocol.h
index b0b1cb781..0561d52dc 100644
--- a/riscos/url_protocol.h
+++ b/riscos/url_protocol.h
@@ -23,6 +23,9 @@
#ifndef _NETSURF_RISCOS_URL_H_
#define _NETSURF_RISCOS_URL_H_
+#include "utils/config.h"
+#ifdef WITH_URL
+
#include "oslib/wimp.h"
void ro_url_message_received(wimp_message *message);
@@ -30,4 +33,6 @@ void ro_url_broadcast(const char *url);
void ro_url_load(const char *url);
void ro_url_bounce(wimp_message *message);
+#endif /* WITH_URL */
+
#endif