[jbig2-cvs] rev 244 - in tags: . release_0_02
giles@ghostscript.com
giles@ghostscript.com
Wed, 7 May 2003 15:28:40 -0700
Author: giles
Date: 2003-05-07 15:28:39 -0700 (Wed, 07 May 2003)
New Revision: 244
Added:
tags/release_0_02/
Modified:
tags/release_0_02/CHANGES
tags/release_0_02/Makefile.am
tags/release_0_02/jbig2.c
tags/release_0_02/jbig2dec.c
tags/release_0_02/msvc.mak
tags/release_0_02/os_types.h
Log:
tag release
Copied: tags/release_0_02 (from rev 233, trunk)
Modified: tags/release_0_02/jbig2dec.c
==============================================================================
--- trunk/jbig2dec.c (r233)
+++ tags/release_0_02/jbig2dec.c (r244)
@@ -100,8 +100,10 @@
set_output_format(jbig2dec_params_t *params, const char *format)
{
#ifdef HAVE_LIBPNG
- if (!strncasecmp(format, "png", 3)) {
- params->output_format=jbig2dec_format_png;
+ /* this should really by strncasecmp()
+ TODO: we need to provide our own for portability */
+ if (!strncmp(format, "png", 3) || !strncmp(format, "PNG", 3)) {
+ params->output_format=jbig2dec_format_png;
return 0;
}
#endif
Modified: tags/release_0_02/os_types.h
==============================================================================
--- trunk/os_types.h (r233)
+++ tags/release_0_02/os_types.h (r244)
@@ -25,6 +25,6 @@
#include "config_win32.h"
#endif
-#ifdef HAVE_STDINT_H
++#if defined(HAVE_STDINT_H) || defined(__MACOS__)
#include <stdint.h>
#endif
Modified: tags/release_0_02/CHANGES
==============================================================================
--- trunk/CHANGES (r233)
+++ tags/release_0_02/CHANGES (r244)
@@ -1,6 +1,9 @@
-Version 0.2 (not yet released)
+Version 0.2 (released 2003 April 17)
* portability fixes
+ * support for metadata extension segments (latin-1 only)
+ * decodes single-page documents from the Adobe encoder
+ * various other bugfixes
Version 0.1 (released 2002 August 6)
Modified: tags/release_0_02/msvc.mak
==============================================================================
--- trunk/msvc.mak (r233)
+++ tags/release_0_02/msvc.mak (r244)
@@ -1,5 +1,12 @@
# makefile for jbig2dec
# under Microsoft Visual C++
+#
+# To compile zlib.dll:
+# Get zlib >= 1.1.4, unzip and rename to zlib,
+# cd zlib, copy nt\zlib.dnt zlib.dnt, then nmake -f nt\makefile.nt
+# To compile libpng.lib:
+# Get libpng >= 1.2.5, unzip then rename to libpng,
+# cd libpng, nmake -f scripts\makefile.vcwin32
LIBPNGDIR=../libpng
ZLIBDIR=../zlib
@@ -11,13 +18,80 @@
CC=cl
FE=-Fe
+OBJS=getopt$(OBJ) getopt1$(OBJ) jbig2$(OBJ) jbig2_arith$(OBJ) \
+ jbig2_arith_iaid$(OBJ) jbig2_arith_int$(OBJ) jbig2_generic$(OBJ) \
+ jbig2_huffman$(OBJ) jbig2_image$(OBJ) jbig2_image_pbm$(OBJ) \
+ jbig2_image_png$(OBJ) jbig2_mmr$(OBJ) jbig2_page$(OBJ) \
+ jbig2_segment$(OBJ) jbig2_symbol_dict$(OBJ) jbig2_text$(OBJ) \
+ jbig2_metadata$(OBJ) jbig2dec$(OBJ) sha1$(OBJ)
+
+HDRS=getopt.h jbig2.h jbig2_arith.h jbig2_arith_iaid.h jbig2_arith_int.h \
+ jbig2_generic.h jbig2_huffman.h jbig2_hufftab.h jbig2_image.h \
+ jbig2_mmr.h jbig2_priv.h jbig2_symbol_dict.h jbig2_metadata.h \
+ config_win32.h sha1.h
+
all: jbig2dec$(EXE)
-jbig2dec$(EXE): $(libjbig2_OBJS) $(jbig2dec_OBJS)
- $(CC) $(CFLAGS) $(FE)jbig2dec$(EXE) $(libjbig2_OBJS) $(jbig2dec_OBJS) $(LIBPNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib
+jbig2dec$(EXE): $(OBJS)
+ $(CC) $(CFLAGS) $(FE)jbig2dec$(EXE) $(OBJS) $(LIBPNGDIR)/libpng.lib $(ZLIBDIR)/zlib.lib
-!include common.mak
+getopt$(OBJ): getopt.c getopt.h
+ $(CC) $(CFLAGS) -c getopt.c
+getopt1$(OBJ): getopt1.c getopt.h
+ $(CC) $(CFLAGS) -c getopt1.c
+
+jbig2$(OBJ): jbig2.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2.c
+
+jbig2_arith$(OBJ): jbig2_arith.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_arith.c
+
+jbig2_arith_iaid$(OBJ): jbig2_arith_iaid.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_arith_iaid.c
+
+jbig2_arith_int$(OBJ): jbig2_arith_int.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_arith_int.c
+
+jbig2_generic$(OBJ): jbig2_generic.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_generic.c
+
+jbig2_huffman$(OBJ): jbig2_huffman.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_huffman.c
+
+jbig2_image$(OBJ): jbig2_image.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_image.c
+
+jbig2_image_pbm$(OBJ): jbig2_image_pbm.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_image_pbm.c
+
+jbig2_image_png$(OBJ): jbig2_image_png.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_image_png.c
+
+jbig2_mmr$(OBJ): jbig2_mmr.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_mmr.c
+
+jbig2_page$(OBJ): jbig2_page.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_page.c
+
+jbig2_segment$(OBJ): jbig2_segment.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_segment.c
+
+jbig2_symbol_dict$(OBJ): jbig2_symbol_dict.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_symbol_dict.c
+
+jbig2_text$(OBJ): jbig2_text.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_text.c
+
+jbig2_metadata$(OBJ): jbig2_metadata.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2_metadata.c
+
+jbig2dec$(OBJ): jbig2dec.c $(HDRS)
+ $(CC) $(CFLAGS) -c jbig2dec.c
+
+sha1$(OBJ): sha1.c $(HDRS)
+ $(CC) $(CFLAGS) -c sha1.c
+
clean:
-del $(OBJS)
-del jbig2dec$(EXE)
Modified: tags/release_0_02/Makefile.am
==============================================================================
Modified: tags/release_0_02/jbig2.c
==============================================================================
--- trunk/jbig2.c (r233)
+++ tags/release_0_02/jbig2.c (r244)
@@ -86,7 +86,7 @@
}
int
-jbig2_error(Jbig2Ctx *ctx, Jbig2Severity severity, int segment_number,
+jbig2_error(Jbig2Ctx *ctx, Jbig2Severity severity, int32_t segment_number,
const char *fmt, ...)
{
char buf[1024];