[ming] 07/13: Imported Upstream version 0.4.7

Gabriele Giacone gg0-guest at moszumanska.debian.org
Fri May 15 11:53:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

gg0-guest pushed a commit to branch master
in repository ming.

commit 67d846274e08bae45800dcba40de4e18007dd566
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date:   Fri May 15 12:08:28 2015 +0200

    Imported Upstream version 0.4.7
---
 NEWS            |  4 ++++
 configure.in    | 10 +++++-----
 src/libming.h   | 36 ++++++------------------------------
 util/gif2dbl.c  |  6 +++---
 util/gif2mask.c |  4 ++--
 5 files changed, 20 insertions(+), 40 deletions(-)

diff --git a/NEWS b/NEWS
index 3b9c21c..5294036 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.4.7 - 2015-05-15
+
+	* Restore support for giflib 4.1.x
+
 0.4.6 - 2015-05-14
 
 	* Add support for building against giflib 5.1.1+ (PR #47).
diff --git a/configure.in b/configure.in
index 56eaafb..1b53c9e 100644
--- a/configure.in
+++ b/configure.in
@@ -1,10 +1,10 @@
 dnl -- Release version, to bump up right after official releases 
-dnl -- last release was 0.4.5
+dnl -- last release was 0.4.6
 dnl --
-AC_INIT(ming, 0.4.6)
+AC_INIT(ming, 0.4.7)
 MAJOR_VERSION=0
 MINOR_VERSION=4
-MICRO_VERSION=6
+MICRO_VERSION=7
 
 MING_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
 
@@ -18,11 +18,11 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AM_MAINTAINER_MODE
 
 dnl -- Version info for libtool, to bump right after official releases
-dnl -- last release was 5:4:4
+dnl -- last release was 5:4:5
 dnl --
 INTERFACE_CURRENT=5
 INTERFACE_AGE=4
-INTERFACE_REVISION=5
+INTERFACE_REVISION=6
 
 AC_SUBST(INTERFACE_CURRENT)
 AC_SUBST(INTERFACE_REVISION)
diff --git a/src/libming.h b/src/libming.h
index b26041f..db22bd0 100644
--- a/src/libming.h
+++ b/src/libming.h
@@ -75,38 +75,14 @@ typedef unsigned char BOOL;
   #include <unistd.h>
 #endif
 
-#ifdef HAVE_GIF_LIB_H
-#include <gif_lib.h>
-#endif
-
-#ifndef __has_attribute
-#define __has_attribute(x) 0
-#endif
-
-#if (defined(__GNUC__)) || __has_attribute(unused)
-#define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-#else
-#define UNUSED(x) UNUSED_ ## x
-#endif
-
-#if GIFLIB_MAJOR < 5
-#define GIFLIB5_ONLY(x) UNUSED(x)
-#else
-#define GIFLIB5_ONLY(x) x
-#endif
-
-static void
-PrintGifError(int GIFLIB5_ONLY(errorCode))
-{
 #if GIFLIB_GIFERRORSTRING
-#if GIFLIB_MAJOR < 5
-	fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString());
-#else
-	fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString(errorCode));
-#endif
+# if GIFLIB_MAJOR < 5
+#  define PrintGifError(x) fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString())
+# else
+#  define PrintGifError(x) fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString(x))
+# endif
 #else
-	fprintf(stderr, "\nGIF-LIB error but no GifErrorString support.\n");
+# define PrintGifError(x) PrintGifError()
 #endif
-}
 
 #endif /* SWF_LIBMING_H_INCLUDED */
diff --git a/util/gif2dbl.c b/util/gif2dbl.c
index c89152f..9a9aa08 100644
--- a/util/gif2dbl.c
+++ b/util/gif2dbl.c
@@ -59,12 +59,12 @@ unsigned char *readGif(char *fileName, int *length, int *bytesPerColor)
   unsigned char *p;
   int i, nColors, size, alpha, bgColor, alignedWidth;
 
+  int errorCode = 0;
+
 #if GIFLIB_MAJOR < 5
   if((file = DGifOpenFileName(fileName)) == NULL)
-    error("Error opening file");
+    error("Error opening file", errorCode);
 #else
-  int errorCode = 0;
-
   if((file = DGifOpenFileName(fileName, &errorCode)) == NULL)
     error("Error opening file", errorCode);
 #endif
diff --git a/util/gif2mask.c b/util/gif2mask.c
index e101b60..f46e882 100644
--- a/util/gif2mask.c
+++ b/util/gif2mask.c
@@ -11,7 +11,7 @@
 
 #include "libming.h"
 
-#define max(a,b,c) (((a)>(b))?(((c)>(a))?(c):(a)):(((c)>(b))?(c):(b)))
+#define max3(a,b,c) (((a)>(b))?(((c)>(a))?(c):(a)):(((c)>(b))?(c):(b)))
 
 void error(char *msg, int errorCode)
 {
@@ -53,7 +53,7 @@ unsigned char *readGif(char *fileName, int *length)
   {
     GifColorType c = file->SColorMap->Colors[i];
 
-    colorMap[i] = max(c.Blue, c.Red, c.Green);
+    colorMap[i] = max3(c.Blue, c.Red, c.Green);
   }
 
   bits = file->SavedImages[0].RasterBits;

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-flash/ming.git



More information about the pkg-flash-devel mailing list