[packages/emacs] - updated giflib patch for giflib 5.1
baggins
baggins at pld-linux.org
Sun Jan 4 13:14:30 CET 2015
commit bbaeee7d7014a3771378aac6b383ae2fa8174ef6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jan 4 12:14:08 2015 +0000
- updated giflib patch for giflib 5.1
emacs-giflib.patch | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 77 insertions(+), 4 deletions(-)
---
diff --git a/emacs-giflib.patch b/emacs-giflib.patch
index 9b9b206..88b19bc 100644
--- a/emacs-giflib.patch
+++ b/emacs-giflib.patch
@@ -18,7 +18,7 @@ diff --git a/src/image.c b/src/image.c
index e429830..c414f5b 100644
--- a/src/image.c
+++ b/src/image.c
-@@ -7219,14 +7219,22 @@ gif_image_p (Lisp_Object object)
+@@ -7219,14 +7219,23 @@ gif_image_p (Lisp_Object object)
#endif /* HAVE_NTGUI */
@@ -29,19 +29,21 @@ index e429830..c414f5b 100644
#ifdef WINDOWSNT
/* GIF library details. */
- DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
+-DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
+#if GIFLIB_MAJOR < 5
++DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *));
+#else
++DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *, int *));
+DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *));
+DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *, int *));
+#endif
static bool
init_gif_functions (void)
-@@ -7316,7 +7324,11 @@ gif_load (struct frame *f, struct image *img)
+@@ -7206,7 +7214,11 @@ gif_load (struct frame *f, struct image *img)
}
/* Open the GIF file. */
@@ -53,7 +55,7 @@ index e429830..c414f5b 100644
if (gif == NULL)
{
image_error ("Cannot open `%s'", file, Qnil);
-@@ -7337,7 +7349,11 @@ gif_load (struct frame *f, struct image *img)
+@@ -7227,7 +7239,11 @@ gif_load (struct frame *f, struct image *img)
memsrc.len = SBYTES (specified_data);
memsrc.index = 0;
@@ -65,3 +67,74 @@ index e429830..c414f5b 100644
if (!gif)
{
image_error ("Cannot open memory source `%s'", img->spec, Qnil);
+@@ -7241,7 +7242,11 @@
+ if (!check_image_size (f, gif->SWidth, gif->SHeight))
+ {
+ image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+ return 0;
+ }
+
+@@ -7250,7 +7255,11 @@
+ if (rc == GIF_ERROR || gif->ImageCount <= 0)
+ {
+ image_error ("Error reading `%s'", img->spec, Qnil);
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+ return 0;
+ }
+
+@@ -7262,7 +7271,11 @@
+ {
+ image_error ("Invalid image number `%s' in image `%s'",
+ image_number, img->spec);
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+ return 0;
+ }
+ }
+@@ -7280,14 +7293,22 @@
+ if (!check_image_size (f, width, height))
+ {
+ image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+ return 0;
+ }
+
+ /* Create the X image and pixmap. */
+ if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
+ {
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+ return 0;
+ }
+
+@@ -7463,7 +7484,11 @@
+ Fcons (make_number (gif->ImageCount),
+ img->lisp_data));
+
++#if GIFLIB_MAJOR < 5
+ fn_DGifCloseFile (gif);
++#else
++ fn_DGifCloseFile (gif, NULL);
++#endif
+
+ /* Maybe fill in the background field while we have ximg handy. */
+ if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/emacs.git/commitdiff/b9fda8e56c2f67484298b74c59ccc3c2823bc2cb
More information about the pld-cvs-commit
mailing list