[jbig2-cvs] rev 240 - trunk

giles@ghostscript.com giles@ghostscript.com
Wed, 7 May 2003 09:07:31 -0700


Author: giles
Date: 2003-05-07 09:07:31 -0700 (Wed, 07 May 2003)
New Revision: 240

Modified:
   trunk/jbig2dec.c
Log:
strncasecmp() isn't portable. work around until we can provide our own.

(recommitted after repository became corrupt. original change dated Wed Apr 16 18:44:11 2003)


Modified: trunk/jbig2dec.c
==============================================================================
--- trunk/jbig2dec.c	(r239)
+++ trunk/jbig2dec.c	(r240)
@@ -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