[gs-cvs] rev 7869 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Sun Apr 22 13:19:02 PDT 2007


Author: leonardo
Date: 2007-04-22 13:19:02 -0700 (Sun, 22 Apr 2007)
New Revision: 7869

Modified:
   trunk/gs/src/gdevpbm.c
Log:
Fix (p*mraw devices) : Removing an incorrect debug printing.

DETAILS : 

Since revision 7795 the debug build of the old code prints "0 strings:" 
to stderr when interpreting any PDF file.
The release code doesn't do that. This printing is not controlled by any option.
Besides that, if a device parameter OutputIntent is specified,
the debug printing code accesses string parts by constant indices 
with no checking the string length, so it causes a potential crash.

Removing this code portion now because (1) we believe that
the debug and release build must generate same stderr by default,
and (2) we need a stable code with no dependence on the OutputIntent value.

Since Use.htm doesn't specify an useful -Z option to control this printing,
we believe that the device must implement anothe device parameter to control it.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gdevpbm.c
===================================================================
--- trunk/gs/src/gdevpbm.c	2007-04-22 17:55:56 UTC (rev 7868)
+++ trunk/gs/src/gdevpbm.c	2007-04-22 20:19:02 UTC (rev 7869)
@@ -447,28 +447,8 @@
     int ecode = 0;
     int code;
     long v;
-    gs_param_string_array intent;
     const char *vname;
 
-    if ((code = param_read_string_array(plist, "OutputIntent", &intent)) == 0) {
-#ifdef DEBUG
-	int i, j;
-
-	dlprintf1("%d strings:\n", intent.size);
-	for (i = 0; i < intent.size; i++) {
-	    const gs_param_string *s = &intent.data[i];
-	    dlprintf2("  %d: size %d:", i, s->size);
-	    if (i < 4) {
-		for (j = 0; j < s->size; j++)
-		    dlprintf1("%c", s->data[j]);
-	    } else {
-		for (j = 0; j < 16; j++)
-		    dlprintf1(" %02x", s->data[j]);
-	    }
-	    dlprintf("\n");
-	}
-#endif /* DEBUG */
-    }
     save_info = pdev->color_info;
     if ((code = param_read_long(plist, (vname = "GrayValues"), &v)) != 1 ||
 	(code = param_read_long(plist, (vname = "RedValues"), &v)) != 1 ||



More information about the gs-cvs mailing list