summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
Diffstat (limited to 'image')
-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
13 files changed, 56 insertions, 17 deletions
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"