mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 17:10:58 +00:00
Rewrite Open compatibility with a more readable macro
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37936 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83380d80e5
commit
872adb97f2
2 changed files with 11 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-06-03 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSBitmapImageRep+GIF.m
|
||||||
|
Rewrite Open compatibility with a more readable macro.
|
||||||
|
|
||||||
2014-06-03 Riccardo Mottola <rm@gnu.org>
|
2014-06-03 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
* Source/NSBitmapImageRep+GIF.m
|
* Source/NSBitmapImageRep+GIF.m
|
||||||
|
|
|
@ -56,7 +56,12 @@ objective-c headers.
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif /* FALSE */
|
#endif /* FALSE */
|
||||||
|
|
||||||
// GIF 5.1
|
// GIF > 5.0
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
#define DGifOpen(s, i) DGifOpen(s, i, NULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// GIF> 5.1
|
||||||
#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
||||||
#define DGifCloseFile(f) DGifCloseFile(f, NULL)
|
#define DGifCloseFile(f) DGifCloseFile(f, NULL)
|
||||||
#endif
|
#endif
|
||||||
|
@ -153,11 +158,7 @@ static int gs_gif_output(GifFileType *file, const GifByteType *buffer, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
gs_gif_init_input_source(&src, imageData);
|
gs_gif_init_input_source(&src, imageData);
|
||||||
#if GIFLIB_MAJOR >= 5
|
|
||||||
file = DGifOpen(&src, gs_gif_input, NULL);
|
|
||||||
#else
|
|
||||||
file = DGifOpen(&src, gs_gif_input);
|
file = DGifOpen(&src, gs_gif_input);
|
||||||
#endif
|
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
/* we do not use giferror here because it doesn't
|
/* we do not use giferror here because it doesn't
|
||||||
|
@ -231,11 +232,7 @@ static int gs_gif_output(GifFileType *file, const GifByteType *buffer, int len)
|
||||||
|
|
||||||
/* open the image */
|
/* open the image */
|
||||||
gs_gif_init_input_source(&src, imageData);
|
gs_gif_init_input_source(&src, imageData);
|
||||||
#if GIFLIB_MAJOR >= 5
|
|
||||||
file = DGifOpen(&src, gs_gif_input, NULL);
|
|
||||||
#else
|
|
||||||
file = DGifOpen(&src, gs_gif_input);
|
file = DGifOpen(&src, gs_gif_input);
|
||||||
#endif
|
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
/* we do not use giferror here because it doesn't
|
/* we do not use giferror here because it doesn't
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue