shithub: jbig2

Download patch

ref: 12ab5048f182dda7a778b678781e604e6d3abbe6
parent: 8d833614a9cdc49e405d72bbf1658859e4468df1
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Mon Dec 1 12:54:07 EST 2003

Prefer uint8_t to byte in some internal functions.


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

--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -372,7 +372,7 @@
 
 int
 jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
-			       const uint8_t *segment_data)
+			       const byte *segment_data)
 {
   Jbig2RegionSegmentInfo rsi;
   byte seg_flags;
--- a/jbig2_page.c
+++ b/jbig2_page.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_page.c,v 1.15 2002/08/15 14:54:45 giles Exp $
+    $Id$
 */
 
 #ifdef HAVE_CONFIG_H
@@ -63,7 +63,7 @@
  * buffer for the page (or the first stripe)
  **/
 int
-jbig2_parse_page_info (Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
+jbig2_parse_page_info (Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
 {
     Jbig2Page *page;
 
@@ -178,7 +178,7 @@
  * jbig2_parse_end_of_page: parse an end of page segment
  **/
 int
-jbig2_parse_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data)
+jbig2_parse_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
 {
     uint32_t page_number = ctx->pages[ctx->current_page].number;
 
--- a/jbig2_priv.h
+++ b/jbig2_priv.h
@@ -55,7 +55,7 @@
 
   Jbig2FileState state;
 
-  byte file_header_flags;
+  uint8_t file_header_flags;
   int32_t n_pages;
 
   int n_segments_max;
@@ -119,9 +119,9 @@
     Jbig2Image *image;
 };
 
-int jbig2_parse_page_info (Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);
-int jbig2_parse_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);
-int jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);
+int jbig2_parse_page_info (Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
+int jbig2_parse_end_of_page(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
+int jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
 
 typedef enum {
     JBIG2_COMPOSE_OR = 0,
@@ -139,11 +139,11 @@
   int32_t height;
   int32_t x;
   int32_t y;
-  byte flags;
+  uint8_t flags;
 } Jbig2RegionSegmentInfo;
 
-void jbig2_get_region_segment_info(Jbig2RegionSegmentInfo *info, const byte *segment_data);
-int jbig2_parse_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const byte *segment_data);
+void jbig2_get_region_segment_info(Jbig2RegionSegmentInfo *info, const uint8_t *segment_data);
+int jbig2_parse_text_region(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data);
 
 /* 7.4 */
 int jbig2_immediate_generic_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -157,7 +157,7 @@
 /* parse the generic portion of a region segment data header */
 void
 jbig2_get_region_segment_info(Jbig2RegionSegmentInfo *info,
-			      const byte *segment_data)
+			      const uint8_t *segment_data)
 {
   /* 7.4.1 */
   info->width = jbig2_get_int32(segment_data);