shithub: jbig2

Download patch

ref: 66b303cfa844f3f8afcebb5d212520cf6de77f7a
parent: ca393a748cf39ff0818a4183a6deb272ade44bfb
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Mon Jul 8 15:23:11 EDT 2002

additional debug messages


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

--- a/jbig2_priv.h
+++ b/jbig2_priv.h
@@ -8,7 +8,7 @@
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
         
-    $Id: jbig2_priv.h,v 1.12 2002/07/07 20:38:26 giles Exp $
+    $Id: jbig2_priv.h,v 1.13 2002/07/08 19:23:11 giles Exp $
     
     shared library internals
 */
@@ -49,10 +49,10 @@
   byte file_header_flags;
   int32_t n_pages;
 
-  int n_segments;
   int n_segments_max;
   Jbig2Segment **segments;
-  int segment_index;
+  int n_segments;	/* index of last segment header parsed */
+  int segment_index;    /* index of last segment body parsed */
   
   /* list of decoded pages, including the one in progress,
      currently stored as a contiguous, 0-indexed array. */
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -8,7 +8,7 @@
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    $Id: jbig2_segment.c,v 1.15 2002/07/08 14:54:01 giles Exp $
+    $Id: jbig2_segment.c,v 1.16 2002/07/08 19:23:11 giles Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -83,6 +83,8 @@
           (referred_to_segment_size == 2) ? jbig2_get_int16(buf+offset) :
             jbig2_get_int32(buf + offset);
         offset += referred_to_segment_size;
+        jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, result->number,
+            "refers to segment %d", referred_to_segments[i]);
       }
       result->referred_to_segments = referred_to_segments;
     }