From dad06c7561d6f0ca0ea8d7f104ade04ab0e051fd Mon Sep 17 00:00:00 2001 From: Bert Date: Mon, 12 Sep 2011 19:28:02 +0200 Subject: Much nicer handling of compile-time features - *_SUPPORT enabled in config.h - XLIBS helper app prints lib flags needed for current settings --- image.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index 8b4ff49..ea0e272 100644 --- a/image.c +++ b/image.c @@ -17,26 +17,27 @@ */ #define _POSIX_C_SOURCE 200112L +#define _FEATURE_CONFIG #define _IMAGE_CONFIG #include #include -#ifdef EXIF_SUPPORT +#include "image.h" +#include "options.h" +#include "util.h" +#include "config.h" + +#if EXIF_SUPPORT #include #endif -#ifdef GIF_SUPPORT +#if GIF_SUPPORT #include #include #include #endif -#include "image.h" -#include "options.h" -#include "util.h" -#include "config.h" - #define ZOOMDIFF(z1,z2) ((z1) - (z2) > 0.001 || (z1) - (z2) < -0.001) enum { MIN_GIF_DELAY = 50 }; @@ -70,7 +71,7 @@ void img_init(img_t *img, win_t *win) { } } -#ifdef EXIF_SUPPORT +#if EXIF_SUPPORT void exif_auto_orientate(const fileinfo_t *file) { ExifData *ed; ExifEntry *entry; @@ -115,7 +116,7 @@ void exif_auto_orientate(const fileinfo_t *file) { } #endif /* EXIF_SUPPORT */ -#ifdef GIF_SUPPORT +#if GIF_SUPPORT /* Originally based on, but in its current form merely inspired by Imlib2's * src/modules/loaders/loader_gif.c:load(), written by Carsten Haitzler. */ @@ -301,11 +302,11 @@ bool img_load(img_t *img, const fileinfo_t *file) { /* avoid unused-but-set-variable warning */ (void) fmt; -#ifdef EXIF_SUPPORT +#if EXIF_SUPPORT if (!strcmp(fmt, "jpeg")) exif_auto_orientate(file); #endif -#ifdef GIF_SUPPORT +#if GIF_SUPPORT if (!strcmp(fmt, "gif")) img_load_gif(img, file); #endif -- cgit v1.2.3