"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/plugins/gif_extractor.c" between
libextractor-1.10.tar.gz and libextractor-1.11.tar.gz

About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.

gif_extractor.c  (libextractor-1.10):gif_extractor.c  (libextractor-1.11)
skipping to change at line 38 skipping to change at line 38
/** /**
* Callback invoked by libgif to read data. * Callback invoked by libgif to read data.
* *
* @param ft the file handle, including our extract context * @param ft the file handle, including our extract context
* @param bt where to write the data * @param bt where to write the data
* @param arg number of bytes to read * @param arg number of bytes to read
* @return -1 on error, otherwise number of bytes read * @return -1 on error, otherwise number of bytes read
*/ */
static int static int
gif_read_func (GifFileType *ft, gif_READ_func (GifFileType *ft,
GifByteType *bt, GifByteType *bt,
int arg) int arg)
{ {
struct EXTRACTOR_ExtractContext *ec = ft->UserData; struct EXTRACTOR_ExtractContext *ec = ft->UserData;
void *data; void *data;
ssize_t ret; ssize_t ret;
ret = ec->read (ec->cls, ret = ec->read (ec->cls,
&data, &data,
arg); arg);
skipping to change at line 69 skipping to change at line 69
*/ */
void void
EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec) EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
{ {
GifFileType *gif_file; GifFileType *gif_file;
GifRecordType gif_type; GifRecordType gif_type;
GifByteType *ext; GifByteType *ext;
int et; int et;
char dims[128]; char dims[128];
#if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4 #if defined (GIF_LIB_VERSION) || GIFLIB_MAJOR <= 4
if (NULL == (gif_file = DGifOpen (ec, &gif_read_func))) if (NULL == (gif_file = DGifOpen (ec, &gif_READ_func)))
return; /* not a GIF */ return; /* not a GIF */
#else #else
int gif_error; int gif_error;
gif_error = 0; gif_error = 0;
gif_file = DGifOpen (ec, &gif_read_func, &gif_error); gif_file = DGifOpen (ec, &gif_READ_func, &gif_error);
if ((gif_file == NULL) || (gif_error != 0)) if ((gif_file == NULL) || (gif_error != 0))
{ {
if (gif_file != NULL) if (gif_file != NULL)
#if GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1 #if GIFLIB_MAJOR < 5 || GIFLIB_MINOR < 1
EGifCloseFile (gif_file); EGifCloseFile (gif_file);
#else #else
EGifCloseFile (gif_file, NULL); EGifCloseFile (gif_file, NULL);
#endif #endif
return; /* not a GIF */ return; /* not a GIF */
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)