From 203b3289b8f590d25a2abf6df95bcaff741a7c2e Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sat, 26 Jul 2008 23:42:24 +0000 Subject: - Include utils/config.h before each WITH_* test entiry enabling/disabling the object file. - Add same test in corresponding header file (if there is one) - riscos/uri.c: include riscos/uri.h and have function definitions matching the declarations. - Disable PDF debug logging. svn path=/trunk/netsurf/; revision=4769 --- image/bmp.c | 5 +++-- image/bmp.h | 5 +++++ image/gif.c | 6 +++--- image/gif.h | 5 +++++ image/ico.c | 5 +++-- image/ico.h | 5 +++++ image/jpeg.c | 5 +++-- image/jpeg.h | 5 +++++ image/mng.h | 6 ++++++ image/nssprite.c | 9 ++++----- image/nssprite.h | 5 +++++ image/rsvg.h | 7 ++++++- image/svg.c | 5 +++-- 13 files changed, 56 insertions(+), 17 deletions(-) (limited to 'image') 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 . */ +#include "utils/config.h" +#ifdef WITH_BMP + #include #include #include @@ -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 #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 . */ +#include "utils/config.h" +#ifdef WITH_GIF + #include #include #include #include -#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 #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 . */ +#include "utils/config.h" +#ifdef WITH_BMP + #include #include #include @@ -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 #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 #include #include #include #include -#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 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 #include @@ -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 #include #include - +#include #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 - #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 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 #include #include - #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 #include "utils/config.h" #ifdef WITH_NS_SVG -#include + +#include +#include "svgtiny.h" #include "content/content.h" #include "css/css.h" #include "desktop/plotters.h" -- cgit v1.2.3