This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit f44e52c62d6c8e06962805b3c0cda16ea70c4966
Author: Kim Woelders <[email protected]>
AuthorDate: Fri Mar 11 13:53:28 2022 +0100

    Introduce Imlib2_Loader.h - all that is needed by loaders
    
    Note! This changes breaks loader ABI due to reordering of elements in
    ImlibImage.
    Loader interface will be unstable until further notice.
---
 src/lib/{image.h => Imlib2_Loader.h}  | 252 +++++++++++++++++++++-------------
 src/lib/Makefile.am                   |   3 +-
 src/lib/image.h                       |  36 +++--
 src/modules/loaders/Makefile.am       |   2 -
 src/modules/loaders/decompress_load.c |   3 +-
 src/modules/loaders/loader_argb.c     |   3 +-
 src/modules/loaders/loader_bmp.c      |   3 +-
 src/modules/loaders/loader_bz2.c      |   3 +-
 src/modules/loaders/loader_common.h   |  31 -----
 src/modules/loaders/loader_ff.c       |   3 +-
 src/modules/loaders/loader_gif.c      |   3 +-
 src/modules/loaders/loader_heif.c     |   3 +-
 src/modules/loaders/loader_ico.c      |   3 +-
 src/modules/loaders/loader_id3.c      |   3 +-
 src/modules/loaders/loader_j2k.c      |   3 +-
 src/modules/loaders/loader_jpeg.c     |   3 +-
 src/modules/loaders/loader_jxl.c      |   3 +-
 src/modules/loaders/loader_lbm.c      |   3 +-
 src/modules/loaders/loader_lzma.c     |   3 +-
 src/modules/loaders/loader_png.c      |   3 +-
 src/modules/loaders/loader_pnm.c      |   3 +-
 src/modules/loaders/loader_ps.c       |   3 +-
 src/modules/loaders/loader_svg.c      |   3 +-
 src/modules/loaders/loader_tga.c      |   3 +-
 src/modules/loaders/loader_tiff.c     |   3 +-
 src/modules/loaders/loader_webp.c     |   3 +-
 src/modules/loaders/loader_xbm.c      |   3 +-
 src/modules/loaders/loader_xpm.c      |   3 +-
 src/modules/loaders/loader_zlib.c     |   3 +-
 29 files changed, 232 insertions(+), 164 deletions(-)

diff --git a/src/lib/image.h b/src/lib/Imlib2_Loader.h
similarity index 56%
copy from src/lib/image.h
copy to src/lib/Imlib2_Loader.h
index 153a680..208826e 100644
--- a/src/lib/image.h
+++ b/src/lib/Imlib2_Loader.h
@@ -1,36 +1,125 @@
-#ifndef __IMAGE
-#define __IMAGE 1
-
+#ifndef IMLIB2_LOADER_H
+#define IMLIB2_LOADER_H 1
+/**
+ * The Imlib2 loader API
+ *
+ * NB! TO BE USED BY LOADERS ONLY
+ */
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mman.h>
 
-#include "types.h"
+/* types.h */
 
-typedef struct _imlibldctx ImlibLdCtx;
+typedef struct _ImlibLoader ImlibLoader;
 
-typedef void        (*ImlibDataDestructorFunction)(ImlibImage * im, void *data);
-typedef void       *(*ImlibImageDataMemoryFunction)(void *, size_t size);
-
-enum _iflags {
-   F_NONE = 0,
-   F_HAS_ALPHA = (1 << 0),
-   F_UNCACHEABLE = (1 << 1),
-   F_ALWAYS_CHECK_DISK = (1 << 2),
-   F_INVALID = (1 << 3),
-   F_DONT_FREE_DATA = (1 << 4),
-   F_FORMAT_IRRELEVANT = (1 << 5),
-};
+typedef struct _ImlibImage ImlibImage;
+typedef unsigned int ImlibImageFlags;
 
-/* Must match the ones in Imlib2.h.in */
-#define FF_IMAGE_ANIMATED       (1 << 0)        /* Frames are an animated sequence    */
-#define FF_FRAME_BLEND          (1 << 1)        /* Blend current onto previous frame  */
-#define FF_FRAME_DISPOSE_CLEAR  (1 << 2)        /* Clear before rendering next frame  */
-#define FF_FRAME_DISPOSE_PREV   (1 << 3)        /* Revert before rendering next frame */
+typedef int         (*ImlibProgressFunction)(ImlibImage * im, char percent,
+                                             int update_x, int update_y,
+                                             int update_w, int update_h);
+
+/* common.h */
+
+#undef __EXPORT__
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define __EXPORT__ __attribute__ ((visibility("default")))
+#else
+#define __EXPORT__
+#endif
+
+#if __GNUC__
+#define __PRINTF_N__(no)  __attribute__((__format__(__printf__, (no), (no)+1)))
+#else
+#define __PRINTF_N__(no)
+#endif
+#define __PRINTF__   __PRINTF_N__(1)
+#define __PRINTF_2__ __PRINTF_N__(2)
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
+#define SWAP32(x) \
+    ((((x) & 0x000000ff ) << 24) | \
+     (((x) & 0x0000ff00 ) <<  8) | \
+     (((x) & 0x00ff0000 ) >>  8) | \
+     (((x) & 0xff000000 ) >> 24))
+
+#define SWAP16(x) \
+    ((((x) & 0x00ff ) << 8) | \
+     (((x) & 0xff00 ) >> 8))
+
+#ifdef WORDS_BIGENDIAN
+#define SWAP_LE_16(x) SWAP16(x)
+#define SWAP_LE_32(x) SWAP32(x)
+#define SWAP_LE_16_INPLACE(x) x = SWAP16(x)
+#define SWAP_LE_32_INPLACE(x) x = SWAP32(x)
+#else
+#define SWAP_LE_16(x) (x)
+#define SWAP_LE_32(x) (x)
+#define SWAP_LE_16_INPLACE(x)
+#define SWAP_LE_32_INPLACE(x)
+#endif
+
+#define PIXEL_ARGB(a, r, g, b)  ((a) << 24) | ((r) << 16) | ((g) << 8) | (b)
+
+#define PIXEL_A(argb)  (((argb) >> 24) & 0xff)
+#define PIXEL_R(argb)  (((argb) >> 16) & 0xff)
+#define PIXEL_G(argb)  (((argb) >>  8) & 0xff)
+#define PIXEL_B(argb)  (((argb)      ) & 0xff)
+
+/* debug.h */
+
+#if IMLIB2_DEBUG
+
+#define DC(M, fmt...) if (__imlib_debug & M) __imlib_printf(DBG_PFX, fmt)
+
+#define DBG_FILE	0x0001
+#define DBG_LOAD	0x0002
+#define DBG_LDR 	0x0004
+#define DBG_LDR2	0x0008
+
+#define D(fmt...)  DC(DBG_LDR, fmt)
+#define DL(fmt...) DC(DBG_LDR2, fmt)
+
+extern unsigned int __imlib_debug;
+
+__PRINTF_2__ void   __imlib_printf(const char *pfx, const char *fmt, ...);
+
+unsigned int        __imlib_time_us(void);
+
+#else
+
+#define D(fmt...)
+#define DC(fmt...)
+#define DL(fmt...)
+
+#endif /* IMLIB2_DEBUG */
+
+/* image.h */
 
-typedef struct {
-   int                 left, right, top, bottom;
-} ImlibBorder;
+/* 32767 is the maximum pixmap dimension and ensures that
+ * (w * h * sizeof(uint32_t)) won't exceed ULONG_MAX */
+#define X_MAX_DIM 32767
+/* NB! The image dimensions are sometimes used in (dim << 16) like expressions
+ * so great care must be taken if ever it is attempted to change this
+ * condition */
+
+#define IMAGE_DIMENSIONS_OK(w, h) \
+   ( ((w) > 0) && ((h) > 0) && ((w) <= X_MAX_DIM) && ((h) <= X_MAX_DIM) )
+
+#define LOAD_BREAK       2      /* Break signaled by progress callback */
+#define LOAD_SUCCESS     1      /* Image loaded successfully           */
+#define LOAD_FAIL        0      /* Image was not recognized by loader  */
+#define LOAD_OOM        -1      /* Could not allocate memory           */
+#define LOAD_BADFILE    -2      /* File could not be accessed          */
+#define LOAD_BADIMAGE   -3      /* Image is corrupt                    */
+#define LOAD_BADFRAME   -4      /* Requested frame not found           */
+
+typedef struct _imlibldctx ImlibLdCtx;
 
 typedef struct _ImlibImageTag {
    char               *key;
@@ -41,23 +130,16 @@ typedef struct _ImlibImageTag {
 } ImlibImageTag;
 
 struct _ImlibImage {
-   char               *file;
-   int                 w, h;
-   uint32_t           *data;
-   ImlibImageFlags     flags;
-   time_t              moddate;
-   ImlibBorder         border;
-   int                 references;
-   ImlibLoader        *loader;
-   char               *format;
-   ImlibImage         *next;
-   ImlibImageTag      *tags;
    char               *real_file;
-   char               *key;
-   ImlibImageDataMemoryFunction data_memory_func;
-   ImlibLdCtx         *lc;
    FILE               *fp;
    off_t               fsize;
+
+   ImlibLdCtx         *lc;
+
+   int                 w, h;
+   uint32_t           *data;
+   ImlibImageFlags     flags;
+
    int                 canvas_w;        /* Canvas size      */
    int                 canvas_h;
    int                 frame_count;     /* Number of frames */
@@ -68,45 +150,33 @@ struct _ImlibImage {
    int                 frame_delay;     /* Frame delay (ms) */
 };
 
-typedef struct {
-   FILE               *fp;
-   ImlibProgressFunction pfunc;
-   int                 pgran;
-   char                immed;
-   char                nocache;
-   int                 err;
-   int                 frame;
-} ImlibLoadArgs;
+#define F_HAS_ALPHA (1 << 0)
 
-ImlibLoader        *__imlib_FindBestLoader(const char *file, const char *format,
-                                           int for_save);
+#define IM_FLAG_SET(im, f)      ((im)->flags |= (f))
+#define IM_FLAG_CLR(im, f)      ((im)->flags &= ~(f))
+#define IM_FLAG_UPDATE(im, f, set) \
+   do { if (set) IM_FLAG_SET(im, f); else IM_FLAG_CLR(im, f); } while(0)
+#define IM_FLAG_ISSET(im, f)    (((im)->flags & (f)) != 0)
+
+/* Must match the ones in Imlib2.h.in */
+#define FF_IMAGE_ANIMATED       (1 << 0)        /* Frames are an animated sequence    */
+#define FF_FRAME_BLEND          (1 << 1)        /* Blend current onto previous frame  */
+#define FF_FRAME_DISPOSE_CLEAR  (1 << 2)        /* Clear before rendering next frame  */
+#define FF_FRAME_DISPOSE_PREV   (1 << 3)        /* Revert before rendering next frame */
 
 void                __imlib_LoaderSetFormats(ImlibLoader * l,
                                              const char *const *fmt,
                                              unsigned int num);
 
-ImlibImage         *__imlib_CreateImage(int w, int h, uint32_t * data);
-ImlibImage         *__imlib_LoadImage(const char *file, ImlibLoadArgs * ila);
+ImlibLoader        *__imlib_FindBestLoader(const char *file, const char *format,
+                                           int for_save);
 int                 __imlib_LoadEmbedded(ImlibLoader * l, ImlibImage * im,
                                          const char *file, int load_data);
-int                 __imlib_LoadImageData(ImlibImage * im);
-void                __imlib_DirtyImage(ImlibImage * im);
-void                __imlib_FreeImage(ImlibImage * im);
-void                __imlib_SaveImage(ImlibImage * im, const char *file,
-                                      ImlibLoadArgs * ila);
 
 uint32_t           *__imlib_AllocateData(ImlibImage * im);
 void                __imlib_FreeData(ImlibImage * im);
-void                __imlib_ReplaceData(ImlibImage * im, uint32_t * new_data);
-
-void                __imlib_LoadProgressSetPass(ImlibImage * im,
-                                                int pass, int n_pass);
-int                 __imlib_LoadProgress(ImlibImage * im,
-                                         int x, int y, int w, int h);
-int                 __imlib_LoadProgressRows(ImlibImage * im,
-                                             int row, int nrows);
 
-const char         *__imlib_GetKey(const ImlibImage * im);
+typedef void        (*ImlibDataDestructorFunction)(ImlibImage * im, void *data);
 
 void                __imlib_AttachTag(ImlibImage * im, const char *key,
                                       int val, void *data,
@@ -114,34 +184,32 @@ void                __imlib_AttachTag(ImlibImage * im, const char *key,
 ImlibImageTag      *__imlib_GetTag(const ImlibImage * im, const char *key);
 ImlibImageTag      *__imlib_RemoveTag(ImlibImage * im, const char *key);
 void                __imlib_FreeTag(ImlibImage * im, ImlibImageTag * t);
-void                __imlib_FreeAllTags(ImlibImage * im);
 
-void                __imlib_SetCacheSize(int size);
-int                 __imlib_GetCacheSize(void);
-int                 __imlib_CurrentCacheSize(void);
+const char         *__imlib_GetKey(const ImlibImage * im);
 
-#define IM_FLAG_SET(im, f)      ((im)->flags |= (f))
-#define IM_FLAG_CLR(im, f)      ((im)->flags &= ~(f))
-#define IM_FLAG_UPDATE(im, f, set) \
-   do { if (set) IM_FLAG_SET(im, f); else IM_FLAG_CLR(im, f); } while(0)
-#define IM_FLAG_ISSET(im, f)    (((im)->flags & (f)) != 0)
+void                __imlib_LoadProgressSetPass(ImlibImage * im,
+                                                int pass, int n_pass);
+int                 __imlib_LoadProgress(ImlibImage * im,
+                                         int x, int y, int w, int h);
+int                 __imlib_LoadProgressRows(ImlibImage * im,
+                                             int row, int nrows);
 
-#define LOAD_BREAK       2      /* Break signaled by progress callback */
-#define LOAD_SUCCESS     1      /* Image loaded successfully           */
-#define LOAD_FAIL        0      /* Image was not recognized by loader  */
-#define LOAD_OOM        -1      /* Could not allocate memory           */
-#define LOAD_BADFILE    -2      /* File could not be accessed          */
-#define LOAD_BADIMAGE   -3      /* Image is corrupt                    */
-#define LOAD_BADFRAME   -4      /* Requested frame not found           */
+/* Imlib2_Loader.h */
 
-/* 32767 is the maximum pixmap dimension and ensures that
- * (w * h * sizeof(uint32_t)) won't exceed ULONG_MAX */
-#define X_MAX_DIM 32767
-/* NB! The image dimensions are sometimes used in (dim << 16) like expressions
- * so great care must be taken if ever it is attempted to change this
- * condition */
+__EXPORT__ char     load(ImlibImage * im, ImlibProgressFunction progress,
+                         char progress_granularity, char load_data);
+__EXPORT__ int      load2(ImlibImage * im, int load_data);
+__EXPORT__ char     save(ImlibImage * im, ImlibProgressFunction progress,
+                         char progress_granularity);
+__EXPORT__ void     formats(ImlibLoader * l);
 
-#define IMAGE_DIMENSIONS_OK(w, h) \
-   ( ((w) > 0) && ((h) > 0) && ((w) <= X_MAX_DIM) && ((h) <= X_MAX_DIM) )
+typedef int         (imlib_decompress_load_f) (const void *fdata,
+                                               unsigned int fsize, int dest);
 
-#endif
+int                 decompress_load(ImlibImage * im, int load_data,
+                                    const char *const *pext, int next,
+                                    imlib_decompress_load_f * fdec);
+
+#define QUIT_WITH_RC(_err) { rc = _err; goto quit; }
+
+#endif /* IMLIB2_LOADER_H */
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index f126723..e68ba86 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -9,7 +9,8 @@ AM_CPPFLAGS          = -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 AM_CCASFLAGS = -I$(top_builddir)
 
 lib_LTLIBRARIES      = libImlib2.la
-include_HEADERS      = Imlib2.h
+include_HEADERS      = Imlib2.h Imlib2_Loader.h
+
 libImlib2_la_SOURCES = \
 api.c 		api_obsolete.c	\
 asm.h \
diff --git a/src/lib/image.h b/src/lib/image.h
index 153a680..78872be 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -41,23 +41,16 @@ typedef struct _ImlibImageTag {
 } ImlibImageTag;
 
 struct _ImlibImage {
-   char               *file;
-   int                 w, h;
-   uint32_t           *data;
-   ImlibImageFlags     flags;
-   time_t              moddate;
-   ImlibBorder         border;
-   int                 references;
-   ImlibLoader        *loader;
-   char               *format;
-   ImlibImage         *next;
-   ImlibImageTag      *tags;
    char               *real_file;
-   char               *key;
-   ImlibImageDataMemoryFunction data_memory_func;
-   ImlibLdCtx         *lc;
    FILE               *fp;
    off_t               fsize;
+
+   ImlibLdCtx         *lc;
+
+   int                 w, h;
+   uint32_t           *data;
+   ImlibImageFlags     flags;
+
    int                 canvas_w;        /* Canvas size      */
    int                 canvas_h;
    int                 frame_count;     /* Number of frames */
@@ -66,6 +59,21 @@ struct _ImlibImage {
    int                 frame_y;
    int                 frame_flags;     /* Frame flags      */
    int                 frame_delay;     /* Frame delay (ms) */
+
+   /* vvv Private vvv */
+   ImlibLoader        *loader;
+   ImlibImage         *next;
+
+   char               *file;
+   char               *key;
+   time_t              moddate;
+   int                 references;
+   char               *format;
+
+   ImlibBorder         border;
+   ImlibImageTag      *tags;
+   ImlibImageDataMemoryFunction data_memory_func;
+   /* ^^^ Private ^^^ */
 };
 
 typedef struct {
diff --git a/src/modules/loaders/Makefile.am b/src/modules/loaders/Makefile.am
index 82031fa..9f4c44d 100644
--- a/src/modules/loaders/Makefile.am
+++ b/src/modules/loaders/Makefile.am
@@ -59,8 +59,6 @@ if BUILD_ID3_LOADER
 pkg_LTLIBRARIES += id3.la
 endif
 
-EXTRA_DIST = loader_common.h
-
 argb_la_SOURCES      = loader_argb.c
 argb_la_LDFLAGS      = -module -avoid-version
 argb_la_LIBADD       = $(top_builddir)/src/lib/libImlib2.la
diff --git a/src/modules/loaders/decompress_load.c b/src/modules/loaders/decompress_load.c
index 1337401..aeca4a9 100644
--- a/src/modules/loaders/decompress_load.c
+++ b/src/modules/loaders/decompress_load.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 int
 decompress_load(ImlibImage * im, int load_data, const char *const *pext,
diff --git a/src/modules/loaders/loader_argb.c b/src/modules/loaders/loader_argb.c
index 58046de..a6ad320 100644
--- a/src/modules/loaders/loader_argb.c
+++ b/src/modules/loaders/loader_argb.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 static struct {
    const unsigned char *data, *dptr;
diff --git a/src/modules/loaders/loader_bmp.c b/src/modules/loaders/loader_bmp.c
index c0ee30c..25885bb 100644
--- a/src/modules/loaders/loader_bmp.c
+++ b/src/modules/loaders/loader_bmp.c
@@ -7,7 +7,8 @@
  * - Simplify and make secure RLE encoding
  * - Fix 16 and 32 bit depth (old code was incorrect and it's commented)
  */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #define DBG_PFX "LDR-bmp"
 #define Dx(fmt...)
diff --git a/src/modules/loaders/loader_bz2.c b/src/modules/loaders/loader_bz2.c
index 6d9b0f2..19b4309 100644
--- a/src/modules/loaders/loader_bz2.c
+++ b/src/modules/loaders/loader_bz2.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <bzlib.h>
 
diff --git a/src/modules/loaders/loader_common.h b/src/modules/loaders/loader_common.h
deleted file mode 100644
index 5afbac1..0000000
--- a/src/modules/loaders/loader_common.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __LOADER_COMMON_H
-#define __LOADER_COMMON_H 1
-
-#include "common.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-
-#include "debug.h"
-#include "image.h"
-
-__EXPORT__ char     load(ImlibImage * im, ImlibProgressFunction progress,
-                         char progress_granularity, char load_data);
-__EXPORT__ int      load2(ImlibImage * im, int load_data);
-__EXPORT__ char     save(ImlibImage * im, ImlibProgressFunction progress,
-                         char progress_granularity);
-__EXPORT__ void     formats(ImlibLoader * l);
-
-typedef int         (imlib_decompress_load_f) (const void *fdata,
-                                               unsigned int fsize, int dest);
-
-int                 decompress_load(ImlibImage * im, int load_data,
-                                    const char *const *pext, int next,
-                                    imlib_decompress_load_f * fdec);
-
-#define QUIT_WITH_RC(_err) { rc = _err; goto quit; }
-#define QUITx_WITH_RC(_err, _lbl) { rc = _err; goto _lbl; }
-
-#endif /* __LOADER_COMMON_H */
diff --git a/src/modules/loaders/loader_ff.c b/src/modules/loaders/loader_ff.c
index 541d57d..38d0e80 100644
--- a/src/modules/loaders/loader_ff.c
+++ b/src/modules/loaders/loader_ff.c
@@ -1,5 +1,6 @@
 /* Farbfeld (http://tools.suckless.org/farbfeld) */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <arpa/inet.h>
 
diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
index 3808afc..1c691d4 100644
--- a/src/modules/loaders/loader_gif.c
+++ b/src/modules/loaders/loader_gif.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <gif_lib.h>
 
diff --git a/src/modules/loaders/loader_heif.c b/src/modules/loaders/loader_heif.c
index 44a32bb..e027f4d 100644
--- a/src/modules/loaders/loader_heif.c
+++ b/src/modules/loaders/loader_heif.c
@@ -4,7 +4,8 @@
  * Only loads the primary image for any file, whether it be a still image or an
  * image sequence.
  */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <libheif/heif.h>
 
diff --git a/src/modules/loaders/loader_ico.c b/src/modules/loaders/loader_ico.c
index 66a2255..903a6e6 100644
--- a/src/modules/loaders/loader_ico.c
+++ b/src/modules/loaders/loader_ico.c
@@ -5,7 +5,8 @@
  * https://en.wikipedia.org/wiki/ICO_(file_format)
  * https://en.wikipedia.org/wiki/BMP_file_format
  */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <limits.h>
 
diff --git a/src/modules/loaders/loader_id3.c b/src/modules/loaders/loader_id3.c
index 3804be5..c08e864 100644
--- a/src/modules/loaders/loader_id3.c
+++ b/src/modules/loaders/loader_id3.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <errno.h>
 #include <limits.h>
diff --git a/src/modules/loaders/loader_j2k.c b/src/modules/loaders/loader_j2k.c
index 00ed490..3bfdee7 100644
--- a/src/modules/loaders/loader_j2k.c
+++ b/src/modules/loaders/loader_j2k.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <openjpeg.h>
 
diff --git a/src/modules/loaders/loader_jpeg.c b/src/modules/loaders/loader_jpeg.c
index e0abf1f..63fb4ff 100644
--- a/src/modules/loaders/loader_jpeg.c
+++ b/src/modules/loaders/loader_jpeg.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <jpeglib.h>
 #include <setjmp.h>
diff --git a/src/modules/loaders/loader_jxl.c b/src/modules/loaders/loader_jxl.c
index b7c6b3e..22ea2f9 100644
--- a/src/modules/loaders/loader_jxl.c
+++ b/src/modules/loaders/loader_jxl.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #define MAX_RUNNERS 4           /* Maybe set to Ncpu/2? */
 
diff --git a/src/modules/loaders/loader_lbm.c b/src/modules/loaders/loader_lbm.c
index 74db298..d632bec 100644
--- a/src/modules/loaders/loader_lbm.c
+++ b/src/modules/loaders/loader_lbm.c
@@ -11,7 +11,8 @@
  * Version: 2004-08-28
  *------------------------------------------------------------------------------*/
 
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #define DBG_PFX "LDR-lbm"
 
diff --git a/src/modules/loaders/loader_lzma.c b/src/modules/loaders/loader_lzma.c
index 37a43e5..a879507 100644
--- a/src/modules/loaders/loader_lzma.c
+++ b/src/modules/loaders/loader_lzma.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <lzma.h>
 
diff --git a/src/modules/loaders/loader_png.c b/src/modules/loaders/loader_png.c
index 2492d97..1b7ab3b 100644
--- a/src/modules/loaders/loader_png.c
+++ b/src/modules/loaders/loader_png.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <png.h>
 #include <arpa/inet.h>
diff --git a/src/modules/loaders/loader_pnm.c b/src/modules/loaders/loader_pnm.c
index 02689af..8a2009a 100644
--- a/src/modules/loaders/loader_pnm.c
+++ b/src/modules/loaders/loader_pnm.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <ctype.h>
 #include <stdbool.h>
diff --git a/src/modules/loaders/loader_ps.c b/src/modules/loaders/loader_ps.c
index 717220f..3001ce7 100644
--- a/src/modules/loaders/loader_ps.c
+++ b/src/modules/loaders/loader_ps.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <libspectre/spectre.h>
 
diff --git a/src/modules/loaders/loader_svg.c b/src/modules/loaders/loader_svg.c
index fb5b403..3696530 100644
--- a/src/modules/loaders/loader_svg.c
+++ b/src/modules/loaders/loader_svg.c
@@ -1,5 +1,6 @@
 #define _GNU_SOURCE             /* memmem() */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <math.h>
 #pragma GCC diagnostic push
diff --git a/src/modules/loaders/loader_tga.c b/src/modules/loaders/loader_tga.c
index f80c547..636665f 100644
--- a/src/modules/loaders/loader_tga.c
+++ b/src/modules/loaders/loader_tga.c
@@ -9,7 +9,8 @@
  *
  * header/footer structures courtesy of the GIMP Targa plugin
  */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #define DBG_PFX "LDR-tga"
 
diff --git a/src/modules/loaders/loader_tiff.c b/src/modules/loaders/loader_tiff.c
index e77dff3..1a700f3 100644
--- a/src/modules/loaders/loader_tiff.c
+++ b/src/modules/loaders/loader_tiff.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <setjmp.h>
 #include <tiffio.h>
diff --git a/src/modules/loaders/loader_webp.c b/src/modules/loaders/loader_webp.c
index a5afd4f..31e0a24 100644
--- a/src/modules/loaders/loader_webp.c
+++ b/src/modules/loaders/loader_webp.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <webp/decode.h>
 #include <webp/demux.h>
diff --git a/src/modules/loaders/loader_xbm.c b/src/modules/loaders/loader_xbm.c
index 45c9bd4..ea213a5 100644
--- a/src/modules/loaders/loader_xbm.c
+++ b/src/modules/loaders/loader_xbm.c
@@ -2,7 +2,8 @@
  * XBM loader
  */
 #define _GNU_SOURCE             /* memmem() */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #define DBG_PFX "LDR-xbm"
 
diff --git a/src/modules/loaders/loader_xpm.c b/src/modules/loaders/loader_xpm.c
index ae608e2..a2d732c 100644
--- a/src/modules/loaders/loader_xpm.c
+++ b/src/modules/loaders/loader_xpm.c
@@ -1,5 +1,6 @@
 #define _GNU_SOURCE             /* memmem() */
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 static struct {
    const char         *data, *dptr;
diff --git a/src/modules/loaders/loader_zlib.c b/src/modules/loaders/loader_zlib.c
index f584064..244419d 100644
--- a/src/modules/loaders/loader_zlib.c
+++ b/src/modules/loaders/loader_zlib.c
@@ -1,4 +1,5 @@
-#include "loader_common.h"
+#include "config.h"
+#include "Imlib2_Loader.h"
 
 #include <zlib.h>
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to