Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
graphics
img2eps
img2eps-giflib.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File img2eps-giflib.patch of Package img2eps
Index: src/im_gif.c =================================================================== --- src/im_gif.c.orig +++ src/im_gif.c @@ -79,8 +79,16 @@ gif_close(image_gif *im) { free(im->pal); +#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5) || (GIFLIB_MAJOR == 5 && GIFIB_MINOR >= 1) + if (DGifCloseFile(im->gif, NULL) != GIF_OK) +#else if (DGifCloseFile(im->gif) != GIF_OK) - throwf(EIO, "error closing: %s", _errstr(GifLastError())); +#endif +#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5) + throwf(EIO, "error closing: %s", GifErrorString(im->gif->Error)); +#else + throwf(EIO, "error closing: %s", _errstr(GifLastError())); +#endif image_free((image *)im); } @@ -115,8 +123,11 @@ gif_open(char *fname) image_gif *im; GifFileType *gif; exception ex; - +#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >=5) + if ((gif=DGifOpenFileName(fname, NULL)) == NULL) +#else if ((gif=DGifOpenFileName(fname)) == NULL) +#endif return NULL; if (catch(&ex) == 0) { @@ -124,7 +135,11 @@ gif_open(char *fname) drop(); } else { +#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5) || (GIFLIB_MAJOR == 5 && GIFIB_MINOR >= 1) + DGifCloseFile(im->gif, NULL); +#else DGifCloseFile(im->gif); +#endif throw(&ex); } @@ -195,9 +210,12 @@ gif_read_start(image_gif *im) */ if (DGifSlurp(im->gif) != GIF_OK) +#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR >= 5) + throwf(EIO, "error reading image: %s", GifErrorString(im->gif->Error)); +#else throwf(EIO, "error reading image: %s", _errstr(GifLastError())); - +#endif if (im->gif->ImageCount != 1) throws(EOPNOTSUPP, "multi-image GIFs not supported"); Index: src/exceptions.c =================================================================== --- src/exceptions.c.orig +++ src/exceptions.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <errno.h> #include <setjmp.h> #include <stdarg.h> Index: src/getopt_long.c =================================================================== --- src/getopt_long.c.orig +++ src/getopt_long.c @@ -37,6 +37,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <errno.h> #include <stdio.h> #include <stdlib.h> Index: src/st_ascii85.c =================================================================== --- src/st_ascii85.c.orig +++ src/st_ascii85.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "exceptions.h" #include "stream.h" #include "stream_types.h" Index: src/st_asciihex.c =================================================================== --- src/st_asciihex.c.orig +++ src/st_asciihex.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "exceptions.h" #include "stream.h" #include "stream_types.h" Index: src/st_file.c =================================================================== --- src/st_file.c.orig +++ src/st_file.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <errno.h> #include <stdio.h> #include <string.h> Index: src/st_line.c =================================================================== --- src/st_line.c.orig +++ src/st_line.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "stream.h" #include "stream_types.h" Index: src/st_runlength.c =================================================================== --- src/st_runlength.c.orig +++ src/st_runlength.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "stream.h" #include "stream_types.h" Index: src/stream.c =================================================================== --- src/stream.c.orig +++ src/stream.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <errno.h> #include <stdarg.h> #include <stdio.h> Index: src/util.c =================================================================== --- src/util.c.orig +++ src/util.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <string.h> #include "util.h" Index: src/xmalloc.c =================================================================== --- src/xmalloc.c.orig +++ src/xmalloc.c @@ -35,6 +35,10 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <errno.h> #include <stdio.h> #include <stdlib.h>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor