shithub: jbig2

Download patch

ref: 231a82bff53bdc53098672af60c6436ca99faca4
parent: 69366cad35ef4da5c3c030a4e34c667df2fe900a
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Tue Jul 15 20:40:34 EDT 2003

Use JBIG2_DEBUG instead of plain DEBUG for compile-conditional debugging 
output. This reduces unnecessary output when we're compiled with our 
client's CFLAGS. Request from Ray Johnston.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@265 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/jbig2_arith.c
+++ b/jbig2_arith.c
@@ -16,7 +16,7 @@
     Artifex Software, Inc.,  101 Lucas Valley Road #110,
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
-    $Id: jbig2_arith.c,v 1.13 2002/08/14 10:25:59 giles Exp $
+    $Id$
 */
 
 #ifdef HAVE_CONFIG_H
@@ -31,7 +31,7 @@
 #include "jbig2_priv.h"
 #include "jbig2_arith.h"
 
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 #include <stdio.h>
 #endif
 
@@ -84,7 +84,7 @@
 	  B1 = (byte)((as->next_word >> 24) & 0xFF);
 	  if (B1 > 0x8F)
 	    {
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	      printf ("read %02x (aa)\n", B);
 #endif
 #ifndef SOFTWARE_CONVENTION
@@ -96,7 +96,7 @@
 	    }
 	  else
 	    {
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	      printf ("read %02x (a)\n", B);
 #endif
 #ifdef SOFTWARE_CONVENTION
@@ -113,7 +113,7 @@
 	  B1 = (byte)((as->next_word >> 16) & 0xFF);
 	  if (B1 > 0x8F)
 	    {
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	      printf ("read %02x (ba)\n", B);
 #endif
 #ifndef SOFTWARE_CONVENTION
@@ -125,7 +125,7 @@
 	    {
 	      as->next_word_bytes--;
 	      as->next_word <<= 8;
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	      printf ("read %02x (b)\n", B);
 #endif
 
@@ -140,7 +140,7 @@
     }
   else
     {
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
       printf ("read %02x\n", B);
 #endif
       as->CT = 8;
@@ -163,7 +163,7 @@
     }
 }
 
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 #include <stdio.h>
 
 static void
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -13,7 +13,7 @@
     Artifex Software, Inc.,  101 Lucas Valley Road #110,
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
-    $Id: jbig2_image.c,v 1.21 2003/02/07 05:06:46 raph Exp $
+    $Id$
 */
 
 #ifdef HAVE_CONFIG_H
@@ -93,7 +93,7 @@
     if (y < 0) { h += y; y = 0; } 
     w = (x + w < dst->width) ? w : dst->width - x;
     h = (y + h < dst->height) ? h : dst->height - y;
-#ifdef DEBUG    
+#ifdef JBIG2_DEBUG    
     fprintf(stderr, "composting %dx%d at (%d, %d) afer clipping\n",
         w, h, x, y);
 #endif
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -13,7 +13,7 @@
     Artifex Software, Inc.,  101 Lucas Valley Road #110,
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
-    $Id: jbig2_symbol_dict.c,v 1.20 2003/03/05 12:25:54 giles Exp $
+    $Id$
     
     symbol dictionary segment decode and support
 */
@@ -135,7 +135,7 @@
 			   "Invalid HCHEIGHT value");
           return NULL;
         }
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
       jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
         "HCHEIGHT = %d", HCHEIGHT);
 #endif        
@@ -161,7 +161,7 @@
                 "Invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED+1);
               return NULL;
             }
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	  jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
             "SYMWIDTH = %d", SYMWIDTH);
 #endif
@@ -199,7 +199,7 @@
 
 	  /* 6.5.5 (4c.iv) */
 	  NSYMSDECODED = NSYMSDECODED + 1;
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	  jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
             "%d of %d decoded", NSYMSDECODED, params->SDNUMNEWSYMS);
 #endif
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -13,7 +13,7 @@
     Artifex Software, Inc.,  101 Lucas Valley Road #110,
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
-    $Id: jbig2_text.c,v 1.22 2003/03/05 14:29:35 giles Exp $
+    $Id$
 */
 
 #ifdef HAVE_CONFIG_H
@@ -254,7 +254,7 @@
 	    }
         
 	    /* (3c.ix) */
-#ifdef DEBUG
+#ifdef JBIG2_DEBUG
 	    jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
 			"composing glyph id %d: %dx%d @ (%d,%d) symbol %d/%d", 
 			ID, IB->width, IB->height, x, y, NINSTANCES + 1,