1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

Moved declaration of format-specific image Load functions to dedicated header

The functions are declared in different files but they were called
in another file which re-declared the prototypes. This is dangerous
as it can lead to misaligned prototypes when functions changes.

They are now grouped in the library internal header 'imgformat.h'
This commit is contained in:
Christophe CURIS
2013-05-01 20:26:29 +02:00
committed by Carlos R. Mafra
parent cacc04d4a2
commit 883cda48e3
10 changed files with 79 additions and 27 deletions

View File

@@ -38,6 +38,7 @@
#endif
#include "wraster.h"
#include "imgformat.h"
#define RETRY( x ) do { \
x; \
@@ -66,36 +67,9 @@ static int RImageCacheMaxImage = -1; /* 0 = any size */
static RCachedImage *RImageCache;
#define IM_ERROR -1
#define IM_UNKNOWN 0
#define IM_XPM 1
#define IM_TIFF 2
#define IM_PNG 3
#define IM_PPM 4
#define IM_JPEG 5
#define IM_GIF 6
/* How many image types do we have. */
/* Increase this when adding new image types! */
#define IM_TYPES 6
static int identFile(char *path);
extern RImage *RLoadPPM(char *file_name);
extern RImage *RLoadXPM(RContext * context, char *file);
#ifdef USE_TIFF
extern RImage *RLoadTIFF(char *file, int index);
#endif
#ifdef USE_PNG
extern RImage *RLoadPNG(RContext * context, char *file);
#endif
#ifdef USE_JPEG
extern RImage *RLoadJPEG(RContext * context, char *file_name);
#endif
#ifdef USE_GIF
extern RImage *RLoadGIF(char *file_name, int index);
#endif
char **RSupportedFileFormats(void)
{