View Issue Details

IDProjectCategoryView StatusLast Update
0000826Ecere SDKcompilerpublic2014-05-19 01:33
Reporterredj Assigned Tojerome  
PriorityimmediateSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.44.07 
Target Version0.44.10 64Fixed in Version0.44.10 64 
Summary0000826: stdbool.h (Nicktick's FreeBSD 9.1's libjpeg?)
Descriptionstdbool.h (Nicktick's FreeBSD 9.1's libjpeg?)
TagsNo tags attached.

Activities

2013-04-28 05:40

 

gif_lib.diff (24,685 bytes)   
--- ./deps/libungif-4.1.1/lib/gif_lib.h	2013-03-28 17:16:54.000000000 +0800
+++ /usr/local/include/gif_lib.h	2012-10-25 08:06:45.000000000 +0800
@@ -1,237 +1,217 @@
 /******************************************************************************
-* In order to make life a little bit easier when using the GIF file format,   *
-* this library was written, and which does all the dirty work...              *
-*                                                                             *
-*                                        Written by Gershon Elber,  Jun. 1989 *
-*                                        Hacks by Eric S. Raymond,  Sep. 1992 *
-*******************************************************************************
-* History:                                                                    *
-* 14 Jun 89 - Version 1.0 by Gershon Elber.                                   *
-*  3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names)  *
-* 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to suoport GIF slurp)   *
-* 26 Jun 96 - Version 3.0 by Eric S. Raymond (Full GIF89 support)             * 
-* 17 Dec 98 - Version 4.0 by Toshio Kuratomi (Fix extension writing code)     *
-******************************************************************************/
+ * In order to make life a little bit easier when using the GIF file format,   
+ * this library was written, and which does all the dirty work...              
+ *                                                                             
+ *                                        Written by Gershon Elber,  Jun. 1989 
+ *                                        Hacks by Eric S. Raymond,  Sep. 1992 
+ ******************************************************************************
+ * History:                                                                    
+ * 14 Jun 89 - Version 1.0 by Gershon Elber.                                   
+ *  3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names)  
+ * 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to support GIF slurp)   
+ * 26 Jun 96 - Version 3.0 by Eric S. Raymond (Full GIF89 support)
+ * 17 Dec 98 - Version 4.0 by Toshio Kuratomi (Fix extension writing code)     
+ *****************************************************************************/
 
-#ifndef _GIF_LIB_H
-#define _GIF_LIB_H
+#ifndef _GIF_LIB_H_
+#define _GIF_LIB_H_ 1
 
-#define GIF_LIB_VERSION	" Version 4.1, "
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
-#define	GIF_ERROR	0
-#define GIF_OK		1
+#define GIFLIB_MAJOR 4
+#define GIFLIB_MINOR 2
+#define GIFLIB_RELEASE 0
 
-#ifndef TRUE
-#define TRUE		1
-#define FALSE		0
-#endif
+#define GIF_ERROR   0
+#define GIF_OK      1
+
+#include <stdbool.h>
 
-#ifndef NULL
-#define NULL		0
-#endif /* NULL */
+/* this is a backward-compatibility hack; these will go away in 5.0 */
+#ifndef TRUE
+#define TRUE        true
+#endif /* TRUE */
+#ifndef FALSE
+#define FALSE       false
+#endif /* FALSE */
 
 #define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */
 #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
-#define GIF_VERSION_POS	3           /* Version first character in stamp. */
-#define GIF87_STAMP	"GIF87a"        /* First chars in file - GIF stamp.  */
-#define GIF89_STAMP	"GIF89a"        /* First chars in file - GIF stamp.  */
+#define GIF_VERSION_POS 3           /* Version first character in stamp. */
+#define GIF87_STAMP "GIF87a"        /* First chars in file - GIF stamp.  */
+#define GIF89_STAMP "GIF89a"        /* First chars in file - GIF stamp.  */
 
 #define GIF_FILE_BUFFER_SIZE 16384  /* Files uses bigger buffers than usual. */
 
-typedef	int		GifBooleanType;
-typedef	unsigned char	GifPixelType;
-typedef unsigned char *	GifRowType;
-typedef unsigned char	GifByteType;
-
-#define GIF_MESSAGE(Msg) fprintf(stderr, "\n%s: %s\n", PROGRAM_NAME, Msg)
-#define GIF_EXIT(Msg)	{ GIF_MESSAGE(Msg); exit(-3); }
-
-#ifdef SYSV
-#define VoidPtr char *
-#else
-#define VoidPtr void *
-#endif /* SYSV */
+typedef unsigned char GifPixelType;
+typedef unsigned char *GifRowType;
+typedef unsigned char GifByteType;
+typedef unsigned int GifPrefixType;
+typedef int GifWord;
 
 typedef struct GifColorType {
     GifByteType Red, Green, Blue;
 } GifColorType;
 
-typedef struct ColorMapObject
-{
-    int	ColorCount;
+typedef struct ColorMapObject {
+    int ColorCount;
     int BitsPerPixel;
-    GifColorType *Colors;		/* on malloc(3) heap */
-}
-ColorMapObject;
+    GifColorType *Colors;    /* on malloc(3) heap */
+} ColorMapObject;
 
 typedef struct GifImageDesc {
-    int Left, Top, Width, Height,	/* Current image dimensions. */
-	Interlace;			/* Sequential/Interlaced lines. */
-    ColorMapObject *ColorMap;		/* The local color map */
+    GifWord Left, Top, Width, Height,   /* Current image dimensions. */
+      Interlace;                    /* Sequential/Interlaced lines. */
+    ColorMapObject *ColorMap;       /* The local color map */
 } GifImageDesc;
 
 typedef struct GifFileType {
-    int SWidth, SHeight,		/* Screen dimensions. */
-	SColorResolution, 		/* How many colors can we generate? */
-	SBackGroundColor;		/* I hope you understand this one... */
-    ColorMapObject *SColorMap;		/* NULL if not exists. */
-    int ImageCount;			/* Number of current image */
-    GifImageDesc Image;			/* Block describing current image */
-    struct SavedImage *SavedImages;	/* Use this to accumulate file state */
-    VoidPtr UserData;           /* hook to attach user data (TVT) */
-    VoidPtr Private;	  		/* Don't mess with this! */
+    GifWord SWidth, SHeight,        /* Screen dimensions. */
+      SColorResolution,         /* How many colors can we generate? */
+      SBackGroundColor;         /* I hope you understand this one... */
+    ColorMapObject *SColorMap;  /* NULL if not exists. */
+    int ImageCount;             /* Number of current image */
+    GifImageDesc Image;         /* Block describing current image */
+    struct SavedImage *SavedImages; /* Use this to accumulate file state */
+    void *UserData;            /* hook to attach user data (TVT) */
+    void *Private;             /* Don't mess with this! */
 } GifFileType;
 
 typedef enum {
     UNDEFINED_RECORD_TYPE,
     SCREEN_DESC_RECORD_TYPE,
-    IMAGE_DESC_RECORD_TYPE,		/* Begin with ',' */
-    EXTENSION_RECORD_TYPE,		/* Begin with '!' */
-    TERMINATE_RECORD_TYPE		/* Begin with ';' */
+    IMAGE_DESC_RECORD_TYPE, /* Begin with ',' */
+    EXTENSION_RECORD_TYPE,  /* Begin with '!' */
+    TERMINATE_RECORD_TYPE   /* Begin with ';' */
 } GifRecordType;
 
-/* DumpScreen2Gif routine constants identify type of window/screen to dump.  */
-/* Note all values below 1000 are reserved for the IBMPC different display   */
-/* devices (it has many!) and are compatible with the numbering TC2.0        */
-/* (Turbo C 2.0 compiler for IBM PC) gives to these devices.		     */
-typedef enum {
-    GIF_DUMP_SGI_WINDOW = 1000,
-    GIF_DUMP_X_WINDOW = 1001
-} GifScreenDumpType;
-
 /* func type to read gif data from arbitrary sources (TVT) */
-typedef int (*InputFunc)(GifFileType*,GifByteType*,int);
+typedef int (*InputFunc) (GifFileType *, GifByteType *, int);
 
-/* func type to write gif data ro arbitrary targets.
+/* func type to write gif data to arbitrary targets.
  * Returns count of bytes written. (MRB)
  */
-typedef int (*OutputFunc)(GifFileType *, const GifByteType *, int);
+typedef int (*OutputFunc) (GifFileType *, const GifByteType *, int);
+
 /******************************************************************************
-*  GIF89 extension function codes                                             *
+ *  GIF89 extension function codes                                             
 ******************************************************************************/
 
-#define COMMENT_EXT_FUNC_CODE		0xfe	/* comment */
-#define GRAPHICS_EXT_FUNC_CODE		0xf9	/* graphics control */
-#define PLAINTEXT_EXT_FUNC_CODE		0x01	/* plaintext */
-#define APPLICATION_EXT_FUNC_CODE	0xff	/* application block */
+#define COMMENT_EXT_FUNC_CODE     0xfe    /* comment */
+#define GRAPHICS_EXT_FUNC_CODE    0xf9    /* graphics control */
+#define PLAINTEXT_EXT_FUNC_CODE   0x01    /* plaintext */
+#define APPLICATION_EXT_FUNC_CODE 0xff    /* application block */
 
 /******************************************************************************
-* O.K., here are the routines one can access in order to encode GIF file:     *
-* (GIF_LIB file EGIF_LIB.C).						      *
+ * O.K., here are the routines one can access in order to encode GIF file:     
+ * (GIF_LIB file EGIF_LIB.C).                              
 ******************************************************************************/
 
-GifFileType *EGifOpenFileName(const char *GifFileName, int GifTestExistance);
+/* Main entry points */
+GifFileType *EGifOpenFileName(const char *GifFileName,
+                              bool GifTestExistance);
 GifFileType *EGifOpenFileHandle(int GifFileHandle);
-GifFileType *EgifOpen(void *userPtr, OutputFunc writeFunc);
-int EGifSpew(GifFileType *GifFile);
+GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc);
+int EGifSpew(GifFileType * GifFile);
 void EGifSetGifVersion(const char *Version);
-int EGifPutScreenDesc(GifFileType *GifFile,
-	int GifWidth, int GifHeight, int GifColorRes, int GifBackGround,
-	const ColorMapObject *GifColorMap);
-int EGifPutImageDesc(GifFileType *GifFile,
-	int GifLeft, int GifTop, int Width, int GifHeight, int GifInterlace,
-	const ColorMapObject *GifColorMap);
-int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);
-int EGifPutPixel(GifFileType *GifFile, GifPixelType GifPixel);
-int EGifPutComment(GifFileType *GifFile, const char *GifComment);
-int EGifPutExtensionFirst(GifFileType *GifFile, int GifExtCode, int GifExtLen,
-                           const VoidPtr GifExtension);
-int EGifPutExtensionNext(GifFileType *GifFile, int GifExtCode, int GifExtLen,
-                           const VoidPtr GifExtension);
-int EGifPutExtensionLast(GifFileType *GifFile, int GifExtCode, int GifExtLen,
-                           const VoidPtr GifExtension);
-int EGifPutExtension(GifFileType *GifFile, int GifExtCode, int GifExtLen,
-							const VoidPtr GifExtension);
-int EGifPutCode(GifFileType *GifFile, int GifCodeSize,
-					  const GifByteType *GifCodeBlock);
-int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock);
-int EGifCloseFile(GifFileType *GifFile);
-
-#define	E_GIF_ERR_OPEN_FAILED	1		/* And EGif possible errors. */
-#define	E_GIF_ERR_WRITE_FAILED	2
-#define E_GIF_ERR_HAS_SCRN_DSCR	3
-#define E_GIF_ERR_HAS_IMAG_DSCR	4
-#define E_GIF_ERR_NO_COLOR_MAP	5
-#define E_GIF_ERR_DATA_TOO_BIG	6
+int EGifCloseFile(GifFileType * GifFile);
+
+#define E_GIF_ERR_OPEN_FAILED    1    /* And EGif possible errors. */
+#define E_GIF_ERR_WRITE_FAILED   2
+#define E_GIF_ERR_HAS_SCRN_DSCR  3
+#define E_GIF_ERR_HAS_IMAG_DSCR  4
+#define E_GIF_ERR_NO_COLOR_MAP   5
+#define E_GIF_ERR_DATA_TOO_BIG   6
 #define E_GIF_ERR_NOT_ENOUGH_MEM 7
-#define E_GIF_ERR_DISK_IS_FULL	8
-#define E_GIF_ERR_CLOSE_FAILED	9
-#define E_GIF_ERR_NOT_WRITEABLE	10
+#define E_GIF_ERR_DISK_IS_FULL   8
+#define E_GIF_ERR_CLOSE_FAILED   9
+#define E_GIF_ERR_NOT_WRITEABLE  10
+
+/* These are legacy.  You probably do not want to call them directly */
+int EGifPutScreenDesc(GifFileType * GifFile,
+                      int GifWidth, int GifHeight, int GifColorRes,
+                      int GifBackGround,
+                      const ColorMapObject * GifColorMap);
+int EGifPutImageDesc(GifFileType * GifFile, int GifLeft, int GifTop,
+                     int Width, int GifHeight, bool GifInterlace,
+                     const ColorMapObject * GifColorMap);
+int EGifPutLine(GifFileType * GifFile, GifPixelType * GifLine,
+                int GifLineLen);
+int EGifPutPixel(GifFileType * GifFile, GifPixelType GifPixel);
+int EGifPutComment(GifFileType * GifFile, const char *GifComment);
+int EGifPutExtensionFirst(GifFileType * GifFile, int GifExtCode,
+                          int GifExtLen, const void *GifExtension);
+int EGifPutExtensionNext(GifFileType * GifFile, int GifExtCode,
+                         int GifExtLen, const void *GifExtension);
+int EGifPutExtensionLast(GifFileType * GifFile, int GifExtCode,
+                         int GifExtLen, const void *GifExtension);
+int EGifPutExtension(GifFileType * GifFile, int GifExtCode, int GifExtLen,
+                     const void *GifExtension);
+int EGifPutCode(GifFileType * GifFile, int GifCodeSize,
+                const GifByteType * GifCodeBlock);
+int EGifPutCodeNext(GifFileType * GifFile,
+                    const GifByteType * GifCodeBlock);
 
 /******************************************************************************
-* O.K., here are the routines one can access in order to decode GIF file:     *
-* (GIF_LIB file DGIF_LIB.C).						      *
-******************************************************************************/
+ * O.K., here are the routines one can access in order to decode GIF file:     
+ * (GIF_LIB file DGIF_LIB.C).                              
+ *****************************************************************************/
 
+/* Main entry points */
 GifFileType *DGifOpenFileName(const char *GifFileName);
 GifFileType *DGifOpenFileHandle(int GifFileHandle);
-GifFileType *DGifOpen( void* userPtr, InputFunc readFunc );  /* new one (TVT) */
-int DGifSlurp(GifFileType *GifFile);
-int DGifGetScreenDesc(GifFileType *GifFile);
-int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType);
-int DGifGetImageDesc(GifFileType *GifFile);
-int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);
-int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel);
-int DGifGetComment(GifFileType *GifFile, char *GifComment);
-int DGifGetExtension(GifFileType *GifFile, int *GifExtCode,
-						GifByteType **GifExtension);
-int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension);
-int DGifGetCode(GifFileType *GifFile, int *GifCodeSize,
-						GifByteType **GifCodeBlock);
-int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock);
-int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);
-int DGifCloseFile(GifFileType *GifFile);
-
-#define	D_GIF_ERR_OPEN_FAILED	101		/* And DGif possible errors. */
-#define	D_GIF_ERR_READ_FAILED	102
-#define	D_GIF_ERR_NOT_GIF_FILE	103
-#define D_GIF_ERR_NO_SCRN_DSCR	104
-#define D_GIF_ERR_NO_IMAG_DSCR	105
-#define D_GIF_ERR_NO_COLOR_MAP	106
-#define D_GIF_ERR_WRONG_RECORD	107
-#define D_GIF_ERR_DATA_TOO_BIG	108
+int DGifSlurp(GifFileType * GifFile);
+GifFileType *DGifOpen(void *userPtr, InputFunc readFunc);    /* new one (TVT) */
+int DGifCloseFile(GifFileType * GifFile);
+
+#define D_GIF_ERR_OPEN_FAILED    101    /* And DGif possible errors. */
+#define D_GIF_ERR_READ_FAILED    102
+#define D_GIF_ERR_NOT_GIF_FILE   103
+#define D_GIF_ERR_NO_SCRN_DSCR   104
+#define D_GIF_ERR_NO_IMAG_DSCR   105
+#define D_GIF_ERR_NO_COLOR_MAP   106
+#define D_GIF_ERR_WRONG_RECORD   107
+#define D_GIF_ERR_DATA_TOO_BIG   108
 #define D_GIF_ERR_NOT_ENOUGH_MEM 109
-#define D_GIF_ERR_CLOSE_FAILED	110
-#define D_GIF_ERR_NOT_READABLE	111
-#define D_GIF_ERR_IMAGE_DEFECT	112
-#define D_GIF_ERR_EOF_TOO_SOON	113
-
-/******************************************************************************
-* O.K., here are the routines from GIF_LIB file QUANTIZE.C.		      *
-******************************************************************************/
-int QuantizeBuffer(unsigned int Width, unsigned int Height, int *ColorMapSize,
-	GifByteType *RedInput, GifByteType *GreenInput, GifByteType *BlueInput,
-	GifByteType *OutputBuffer, GifColorType *OutputColorMap);
+#define D_GIF_ERR_CLOSE_FAILED   110
+#define D_GIF_ERR_NOT_READABLE   111
+#define D_GIF_ERR_IMAGE_DEFECT   112
+#define D_GIF_ERR_EOF_TOO_SOON   113
+
+/******************************************************************************
+ * O.K., here are the routines from GIF_LIB file QUANTIZE.C.              
+******************************************************************************/
+int QuantizeBuffer(unsigned int Width, unsigned int Height,
+                   int *ColorMapSize, GifByteType * RedInput,
+                   GifByteType * GreenInput, GifByteType * BlueInput,
+                   GifByteType * OutputBuffer,
+                   GifColorType * OutputColorMap);
+
+/* These are legacy.  You probably do not want to call them directly */
+int DGifGetScreenDesc(GifFileType * GifFile);
+int DGifGetRecordType(GifFileType * GifFile, GifRecordType * GifType);
+int DGifGetImageDesc(GifFileType * GifFile);
+int DGifGetLine(GifFileType * GifFile, GifPixelType * GifLine, int GifLineLen);
+int DGifGetPixel(GifFileType * GifFile, GifPixelType GifPixel);
+int DGifGetComment(GifFileType * GifFile, char *GifComment);
+int DGifGetExtension(GifFileType * GifFile, int *GifExtCode,
+                     GifByteType ** GifExtension);
+int DGifGetExtensionNext(GifFileType * GifFile, GifByteType ** GifExtension);
+int DGifGetCode(GifFileType * GifFile, int *GifCodeSize,
+                GifByteType ** GifCodeBlock);
+int DGifGetCodeNext(GifFileType * GifFile, GifByteType ** GifCodeBlock);
+int DGifGetLZCodes(GifFileType * GifFile, int *GifCode);
 
 
 /******************************************************************************
-* O.K., here are the routines from GIF_LIB file QPRINTF.C.		      *
+ * O.K., here are the routines from GIF_LIB file GIF_ERR.C.              
 ******************************************************************************/
-extern int GifQuietPrint;
-
-#ifdef HAVE_STDARG_H
-extern void GifQprintf(char *Format, ...);
-#else
-#  ifdef HAVE_VARARGS_H
-extern void GifQprintf()
-#  endif /* HAVE_VARARGS_H */
-#endif /* HAVE_STDARG_H */
-
-/******************************************************************************
-* O.K., here are the routines from GIF_LIB file GIF_ERR.C.		      *
-******************************************************************************/
-extern void PrintGifError(void);
+extern int GifError(void);             /* new in 2012 - ESR */
+extern char *GifErrorString(void);     /* new in 2012 - ESR */
 extern int GifLastError(void);
 
-/******************************************************************************
-* O.K., here are the routines from GIF_LIB file DEV2GIF.C.		      *
-******************************************************************************/
-extern int DumpScreen2Gif(const char *FileName,
-			  int ReqGraphDriver,
-			  int ReqGraphMode1,
-			  int ReqGraphMode2,
-			  int ReqGraphMode3);
-
 /*****************************************************************************
  *
  * Everything below this point is new after version 1.2, supporting `slurp
@@ -240,77 +220,82 @@
  *****************************************************************************/
 
 /******************************************************************************
-* Color Map handling from ALLOCGIF.C					      *
-******************************************************************************/
+ * Color Map handling from ALLOCGIF.C                          
+ *****************************************************************************/
 
-extern ColorMapObject *MakeMapObject(int ColorCount, const GifColorType *ColorMap);
-extern void FreeMapObject(ColorMapObject *Object);
-extern ColorMapObject *UnionColorMap(
-				const ColorMapObject *ColorIn1,
-				const ColorMapObject *ColorIn2,
-				GifPixelType ColorTransIn2[]);
+extern ColorMapObject *MakeMapObject(int ColorCount,
+                                     const GifColorType * ColorMap);
+extern void FreeMapObject(ColorMapObject * Object);
+extern ColorMapObject *UnionColorMap(const ColorMapObject * ColorIn1,
+                                     const ColorMapObject * ColorIn2,
+                                     GifPixelType ColorTransIn2[]);
 extern int BitSize(int n);
 
 /******************************************************************************
-* Support for the in-core structures allocation (slurp mode).		      *
-******************************************************************************/
+ * Support for the in-core structures allocation (slurp mode).              
+ *****************************************************************************/
 
 /* This is the in-core version of an extension record */
 typedef struct {
-    int		ByteCount;
-    char	*Bytes;		/* on malloc(3) heap */
-    int Function;       /* Holds the type of the Extension block. */
+    int ByteCount;
+    char *Bytes;    /* on malloc(3) heap */
+    int Function;   /* Holds the type of the Extension block. */
 } ExtensionBlock;
 
 /* This holds an image header, its unpacked raster bits, and extensions */
 typedef struct SavedImage {
-    GifImageDesc	ImageDesc;
+    GifImageDesc ImageDesc;
+    unsigned char *RasterBits;  /* on malloc(3) heap */
+    int Function;   /* DEPRECATED: Use ExtensionBlocks[x].Function instead */
+    int ExtensionBlockCount;
+    ExtensionBlock *ExtensionBlocks;    /* on malloc(3) heap */
+} SavedImage;
 
-    char		*RasterBits;		/* on malloc(3) heap */
+extern void ApplyTranslation(SavedImage * Image, GifPixelType Translation[]);
+extern void MakeExtension(SavedImage * New, int Function);
+extern int AddExtensionBlock(SavedImage * New, int Len,
+                             unsigned char ExtData[]);
+extern void FreeExtension(SavedImage * Image);
+extern SavedImage *MakeSavedImage(GifFileType * GifFile,
+                                  const SavedImage * CopyFrom);
+extern void FreeSavedImages(GifFileType * GifFile);
 
-    int			Function; /* DEPRECATED: Use ExtensionBlocks[x].Function
-                           * instead */
-    int			ExtensionBlockCount;
-    ExtensionBlock	*ExtensionBlocks;	/* on malloc(3) heap */
-} SavedImage;
+/******************************************************************************
+ * The library's internal utility font                          
+ *****************************************************************************/
 
-extern void ApplyTranslation(SavedImage *Image, GifPixelType Translation[]);
+#define GIF_FONT_WIDTH  8
+#define GIF_FONT_HEIGHT 8
+extern const unsigned char AsciiTable[][GIF_FONT_WIDTH];
 
-extern void MakeExtension(SavedImage *New, int Function);
-extern int AddExtensionBlock(SavedImage *New, int Len, char ExtData[]);
-extern void FreeExtension(SavedImage *Image);
+#ifdef _WIN32
+    extern void DrawGifText(SavedImage * Image,
+#else
+    extern void DrawText(SavedImage * Image,
+#endif
+                     const int x, const int y,
+                     const char *legend, const int color);
 
-extern SavedImage *MakeSavedImage(GifFileType *GifFile, const SavedImage *CopyFrom);
-extern void FreeSavedImages(GifFileType *GifFile);
+extern void DrawBox(SavedImage * Image,
+                    const int x, const int y,
+                    const int w, const int d, const int color);
 
-/******************************************************************************
-* The library's internal utility font					      *
-******************************************************************************/
+void DrawRectangle(SavedImage * Image,
+                   const int x, const int y,
+                   const int w, const int d, const int color);
 
-#define GIF_FONT_WIDTH	8
-#define GIF_FONT_HEIGHT	8
-extern unsigned char AsciiTable[][GIF_FONT_WIDTH];
-
-extern void DrawText(SavedImage *Image,
-		     const int x, const int y,
-		     const char *legend,
-		     const int color);
-
-extern void DrawBox(SavedImage *Image,
-		     const int x, const int y,
-		     const int w, const int d,
-		     const int color);
-
-void DrawRectangle(SavedImage *Image,
-		     const int x, const int y,
-		     const int w, const int d,
-		     const int color);
-
-extern void DrawBoxedText(SavedImage *Image,
-		     const int x, const int y,
-		     const char *legend,
-		     const int border,
-		     const int bg,
-		     const int fg);
+extern void DrawBoxedText(SavedImage * Image,
+                          const int x, const int y,
+                          const char *legend,
+                          const int border, const int bg, const int fg);
 
+/******************************************************************************
+ * These are deprecated, for backward compatibility in the API.
+ *****************************************************************************/
+#define VoidPtr void *
+typedef int GifBooleanType;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
 #endif /* _GIF_LIB_H */
gif_lib.diff (24,685 bytes)   

nicktick

2013-04-28 05:40

reporter   ~0000767

I think it's the version different problem.

+/* this is a backward-compatibility hack; these will go away in 5.0 */
+#ifndef TRUE
+#define TRUE true
+#endif /* TRUE */
+#ifndef FALSE
+#define FALSE false
+#endif /* FALSE */

2013-04-28 06:11

 

ecere.Makefile.diff (814 bytes)   
diff --git a/ecere/Makefile b/ecere/Makefile
index f7880ef..46bf5cd 100644
--- a/ecere/Makefile
+++ b/ecere/Makefile
@@ -401,6 +401,7 @@ PRJ_CFLAGS += \
 			 -I../deps/freetype-2.3.12/include,) \
 	 $(if $(LINUX_TARGET), \
 			 -I/usr/include/freetype2,) \
+			 -I../deps/libungif-4.1.1/lib \
 	 $(if $(OSX_TARGET), \
 			 -I/usr/include/freetype2 \
 			 -I$(SYSROOT)/usr/X11/include/freetype2 \
@@ -459,14 +460,15 @@ ifdef LINUX_TARGET
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += \
-	 -L/usr/X11R6/lib
+	 -L/usr/X11R6/lib \
+	 -L../deps/libungif-4.1.1/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)
 LIBS += \
 	$(call _L,ncurses) \
 	$(call _L,pthread) \
 	$(call _L,m) \
 	$(call _L,dl) \
 	$(call _L,fontconfig) \
-	$(call _L,gif) \
+	$(call _L,ungif) \
 	$(call _L,X11) \
 	$(call _L,Xext) \
 	$(call _L,Xrender) \
ecere.Makefile.diff (814 bytes)   

2013-04-28 06:25

 

ecere.Makefile2.diff (1,099 bytes)   
diff --git a/ecere/Makefile b/ecere/Makefile
index f7880ef..af975e5 100644
--- a/ecere/Makefile
+++ b/ecere/Makefile
@@ -401,6 +401,7 @@ PRJ_CFLAGS += \
 			 -I../deps/freetype-2.3.12/include,) \
 	 $(if $(LINUX_TARGET), \
 			 -I/usr/include/freetype2,) \
+			 -I../deps/libungif-4.1.1/lib \
 	 $(if $(OSX_TARGET), \
 			 -I/usr/include/freetype2 \
 			 -I$(SYSROOT)/usr/X11/include/freetype2 \
@@ -458,8 +459,16 @@ else
 ifdef LINUX_TARGET
 
 ifndef STATIC_LIBRARY_TARGET
+ifndef BSD_HOST 
+OFLAGS += \
+	 -L/usr/X11R6/lib
+else
 OFLAGS += \
+	 -L../deps/libungif-4.1.1/obj/release.$(PLATFORM)$(COMPILER_SUFFIX) \
 	 -L/usr/X11R6/lib
+endif
+
+ifndef BSD_HOST 
 LIBS += \
 	$(call _L,ncurses) \
 	$(call _L,pthread) \
@@ -471,6 +480,20 @@ LIBS += \
 	$(call _L,Xext) \
 	$(call _L,Xrender) \
 	$(if $(DISABLE_GL),,$(call _L,GL))
+else
+LIBS += \
+	$(call _L,ncurses) \
+	$(call _L,pthread) \
+	$(call _L,m) \
+	$(call _L,dl) \
+	$(call _L,fontconfig) \
+	$(call _L,ungif) \
+	$(call _L,X11) \
+	$(call _L,Xext) \
+	$(call _L,Xrender) \
+	$(if $(DISABLE_GL),,$(call _L,GL))
+endif
+
 endif
 
 else
ecere.Makefile2.diff (1,099 bytes)   

nicktick

2013-04-28 06:27

reporter   ~0000768

useing ecere.Makefile2.diff to solve the problem of including header file and link library of libungif.a under FreeBSD.

jerome

2013-05-19 20:52

administrator   ~0000836

This was also a problem on Arch Linux.

jerome

2013-10-19 23:41

administrator   ~0001138

Also on Arch it seems DGifOpen added a parameter:

Building 2nd stage ecere...
/home/snyp/ecere/ecere-ecere-sdk-65ac2e8/ecere/src/gfx/bitmaps/GIFFormat.ec:33:31: warning: not enough arguments for function DGifOpen (2 given, expected 3)
obj/release.linux/GIFFormat.c: In function ‘__ecereMethod___ecereNameSpace__ecere__gfx__bitmaps__GIFFormat_Load’:
obj/release.linux/GIFFormat.c:901:1: error: too few arguments to function ‘DGifOpen’
 GifFileType * gifFile = DGifOpen(f, __ecereNameSpace__ecere__gfx__bitmaps__ReadData);
 ^
obj/release.linux/GIFFormat.c:785:15: note: declared here
 GifFileType * DGifOpen(void * userPtr, InputFunc readFunc, int * Error);
               ^
make[1]: *** [obj/release.linux/GIFFormat.o] Error 1
make: *** [ecere] Error 2

jerome

2014-02-04 23:08

administrator   ~0001165

The Giflib issues were originally addressed by:
https://github.com/ecere/ecere-sdk/commit/fbaf41b302944d0d4022a46a80b649255e88b6ca

With a temporary fix for stdbool.h, and a fix for the modified DGifOpen based on checking GIFLIB_MAJOR > 5.

jerome

2014-02-05 21:45

administrator   ~0001166

Fixed by:
https://github.com/ecere/ecere-sdk/commit/d6b10c363a61ab5232e701d3a68f03f47e44568b

Issue History

Date Modified Username Field Change
2013-04-24 13:31 redj New Issue
2013-04-24 20:19 jerome Priority normal => immediate
2013-04-28 05:40 nicktick File Added: gif_lib.diff
2013-04-28 05:40 nicktick Note Added: 0000767
2013-04-28 06:11 nicktick File Added: ecere.Makefile.diff
2013-04-28 06:25 nicktick File Added: ecere.Makefile2.diff
2013-04-28 06:27 nicktick Note Added: 0000768
2013-05-19 20:52 jerome Note Added: 0000836
2013-05-22 21:03 jerome Status new => assigned
2013-05-22 21:03 jerome Assigned To => jerome
2013-10-19 23:36 jerome Target Version 0.44.12 Fixes => 0.44.10 64
2013-10-19 23:41 jerome Note Added: 0001138
2014-02-04 23:08 jerome Note Added: 0001165
2014-02-05 21:45 jerome Status assigned => resolved
2014-02-05 21:45 jerome Fixed in Version => 0.44.10 64
2014-02-05 21:45 jerome Resolution open => fixed
2014-02-05 21:45 jerome Note Added: 0001166
2014-05-19 01:33 jerome Status resolved => closed