mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +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
ace444c24b
commit
9dd0b22408
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>
|
||||
|
||||
* Source/NSBitmapImageRep+GIF.m
|
||||
|
|
|
@ -56,7 +56,12 @@ objective-c headers.
|
|||
#define FALSE 0
|
||||
#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
|
||||
#define DGifCloseFile(f) DGifCloseFile(f, NULL)
|
||||
#endif
|
||||
|
@ -153,11 +158,7 @@ static int gs_gif_output(GifFileType *file, const GifByteType *buffer, int len)
|
|||
}
|
||||
|
||||
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);
|
||||
#endif
|
||||
if (file == NULL)
|
||||
{
|
||||
/* 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 */
|
||||
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);
|
||||
#endif
|
||||
if (file == NULL)
|
||||
{
|
||||
/* we do not use giferror here because it doesn't
|
||||
|
|
Loading…
Reference in a new issue