about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-03-29 02:27:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-03-29 02:27:43 +0000
commit6782e15a1a451a11176871198a0d150293f15878 (patch)
tree5e55e52a1f3e201c728c90c739c01c4466d68565
parent168a4563d416bb0e805dce7daa4a89a8ec18adeb (diff)
downloadnetpbm-mirror-6782e15a1a451a11176871198a0d150293f15878.tar.gz
netpbm-mirror-6782e15a1a451a11176871198a0d150293f15878.tar.xz
netpbm-mirror-6782e15a1a451a11176871198a0d150293f15878.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2431 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/giftopnm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c
index 23433c1e..d19620aa 100644
--- a/converter/other/giftopnm.c
+++ b/converter/other/giftopnm.c
@@ -41,7 +41,6 @@
 
 #define INTERLACE      0x40
 #define LOCALCOLORMAP  0x80
-#define BitSet(byte, bit)      (((byte) & (bit)) == (bit))
 
 #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
   /* make sure (BYTE_ORDER == LITTLE_ENDIAN) is FALSE */ 
@@ -1755,7 +1754,7 @@ readGifHeader(FILE *             const gifFileP,
         pm_message("Colors = %d   Color Resolution = %d",
                    cmapSize, gifScreenP->colorResolution);
     }           
-    if (BitSet(buf[4], LOCALCOLORMAP)) {    /* Global Colormap */
+    if (buf[4] & LOCALCOLORMAP) {    /* Global Colormap */
         readColorMap(gifFileP, cmapSize, &gifScreenP->colorMap,
                      &gifScreenP->hasGray, &gifScreenP->hasColor);
         if (verbose) {
@@ -1885,13 +1884,13 @@ readImageHeader(FILE *                  const ifP,
     if (error)
         pm_error("couldn't read left/top/width/height.  %s", error);
 
-    imageHeaderP->useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP);
+    imageHeaderP->useGlobalColormap = !(buf[8] & LOCALCOLORMAP);
     imageHeaderP->localColorMapSize = 1u << ((buf[8] & 0x07) + 1);
     imageHeaderP->lpos              = LM_to_uint(buf[0], buf[1]);
     imageHeaderP->tpos              = LM_to_uint(buf[2], buf[3]);
     imageHeaderP->cols              = LM_to_uint(buf[4], buf[5]);
     imageHeaderP->rows              = LM_to_uint(buf[6], buf[7]);
-    imageHeaderP->interlaced        = !!BitSet(buf[8], INTERLACE);
+    imageHeaderP->interlaced        = !!(buf[8] & INTERLACE);
 
     if (verbose)
         reportImageHeader(*imageHeaderP);