[gs-cvs] rev 8320 - trunk/gs/jbig2dec

giles at ghostscript.com giles at ghostscript.com
Thu Oct 25 15:14:23 PDT 2007


Author: giles
Date: 2007-10-25 15:14:22 -0700 (Thu, 25 Oct 2007)
New Revision: 8320

Added:
   trunk/gs/jbig2dec/config.h
Modified:
   trunk/gs/jbig2dec/jbig2_generic.c
   trunk/gs/jbig2dec/jbig2_image.h
   trunk/gs/jbig2dec/jbig2_page.c
   trunk/gs/jbig2dec/jbig2_refinement.c
   trunk/gs/jbig2dec/jbig2_symbol_dict.c
   trunk/gs/jbig2dec/jbig2_text.c
Log:
Correct some gcc warnings.


Added: trunk/gs/jbig2dec/config.h
===================================================================
--- trunk/gs/jbig2dec/config.h	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/config.h	2007-10-25 22:14:22 UTC (rev 8320)
@@ -0,0 +1,102 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if the local libc includes getopt_long() */
+#define HAVE_GETOPT_LONG 
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#define HAVE_LIBINTL_H 1
+
+/* Define if libpng is available (-lpng) */
+#define HAVE_LIBPNG 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* set by configure if an alternate header with the stdint.h types is found */
+/* #undef JBIG2_REPLACE_STDINT_H */
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "jbig2dec"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "jbig2-dev at ghostscript.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "jbig2dec"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "jbig2dec 0.9pre"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "jbig2dec"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.9pre"
+
+/* The size of `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+/* The size of `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "0.9pre"
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */

Modified: trunk/gs/jbig2dec/jbig2_generic.c
===================================================================
--- trunk/gs/jbig2dec/jbig2_generic.c	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_generic.c	2007-10-25 22:14:22 UTC (rev 8320)
@@ -37,6 +37,7 @@
 
 #include "jbig2.h"
 #include "jbig2_priv.h"
+#include "jbig2_image.h"
 #include "jbig2_arith.h"
 #include "jbig2_generic.h"
 #include "jbig2_mmr.h"

Modified: trunk/gs/jbig2dec/jbig2_image.h
===================================================================
--- trunk/gs/jbig2dec/jbig2_image.h	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_image.h	2007-10-25 22:14:22 UTC (rev 8320)
@@ -20,9 +20,14 @@
 #ifndef _JBIG2_IMAGE_H
 #define _JBIG2_IMAGE_H
 
+int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
+int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, int value);
+
 /* routines for dumping the image data in various formats */
 /* FIXME: should these be in the client instead? */
 
+#include <stdio.h>
+
 int jbig2_image_write_pbm_file(Jbig2Image *image, char *filename);
 int jbig2_image_write_pbm(Jbig2Image *image, FILE *out);
 Jbig2Image *jbig2_image_read_pbm_file(Jbig2Ctx *ctx, char *filename);
@@ -33,8 +38,4 @@
 int jbig2_image_write_png(Jbig2Image *image, FILE *out);
 #endif
 
-int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
-int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, int value);
-
-
 #endif /* _JBIG2_IMAGE_H */

Modified: trunk/gs/jbig2dec/jbig2_page.c
===================================================================
--- trunk/gs/jbig2dec/jbig2_page.c	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_page.c	2007-10-25 22:14:22 UTC (rev 8320)
@@ -243,7 +243,6 @@
 {
     /* grow the page to accomodate a new stripe if necessary */
     if (page->striped) {
-	int old_height = page->image->height;
 	int new_height = y + image->height + page->end_row;
 	if (page->image->height < new_height) {
 	    jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1,

Modified: trunk/gs/jbig2dec/jbig2_refinement.c
===================================================================
--- trunk/gs/jbig2dec/jbig2_refinement.c	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_refinement.c	2007-10-25 22:14:22 UTC (rev 8320)
@@ -169,7 +169,6 @@
   const int GRH = image->height;
   const int stride = image->stride;
   const int refstride = params->reference->stride;
-  const int dx = params->DX;
   const int dy = params->DY;
   byte *grreg_line = (byte *)image->data;
   byte *grref_line = (byte *)params->reference->data;

Modified: trunk/gs/jbig2dec/jbig2_symbol_dict.c
===================================================================
--- trunk/gs/jbig2dec/jbig2_symbol_dict.c	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_symbol_dict.c	2007-10-25 22:14:22 UTC (rev 8320)
@@ -397,7 +397,7 @@
 		      /* todo: multiple symbols are like a text region */
 		  } else {
 		      /* 6.5.8.2.2 */
-		      bool SBHUFF = params->SDHUFF;
+		      /* bool SBHUFF = params->SDHUFF; */
 		      Jbig2RefinementRegionParams rparams;
 		      Jbig2Image *image;
 		      uint32_t ID;

Modified: trunk/gs/jbig2dec/jbig2_text.c
===================================================================
--- trunk/gs/jbig2dec/jbig2_text.c	2007-10-25 00:30:18 UTC (rev 8319)
+++ trunk/gs/jbig2dec/jbig2_text.c	2007-10-25 22:14:22 UTC (rev 8320)
@@ -112,7 +112,7 @@
     Jbig2Image *IB;
     Jbig2WordStream *ws = NULL;
     Jbig2HuffmanState *hs = NULL;
-    Jbig2HuffmanTable *SBSYMCODES;
+    Jbig2HuffmanTable *SBSYMCODES = NULL;
     Jbig2ArithState *as = NULL;
     Jbig2ArithIntCtx *IADT = NULL;
     Jbig2ArithIntCtx *IAFS = NULL;



More information about the gs-cvs mailing list