[gs-cvs] rev 8415 - trunk/gs/src
lpd at ghostscript.com
lpd at ghostscript.com
Wed Nov 28 17:42:17 PST 2007
Author: lpd
Date: 2007-11-28 17:42:16 -0800 (Wed, 28 Nov 2007)
New Revision: 8415
Modified:
trunk/gs/src/gdebug.h
trunk/gs/src/igcstr.c
trunk/gs/src/interp.c
Log:
Remove obsolete variables dstderr and estderr; repair tracing code in
igcstr.c that would cause a crash if -Z5 was used.
Modified: trunk/gs/src/gdebug.h
===================================================================
--- trunk/gs/src/gdebug.h 2007-11-28 20:04:34 UTC (rev 8414)
+++ trunk/gs/src/gdebug.h 2007-11-29 01:42:16 UTC (rev 8415)
@@ -59,13 +59,6 @@
/* If debugging, direct all error output to gs_debug_out. */
extern FILE *gs_debug_out;
-#ifdef DEBUG
-#undef dstderr
-#define dstderr gs_debug_out
-#undef estderr
-#define estderr gs_debug_out
-#endif
-
/* Debugging printout macros. */
#ifdef DEBUG
# define if_debug0(c,s)\
Modified: trunk/gs/src/igcstr.c
===================================================================
--- trunk/gs/src/igcstr.c 2007-11-28 20:04:34 UTC (rev 8414)
+++ trunk/gs/src/igcstr.c 2007-11-29 01:42:16 UTC (rev 8415)
@@ -110,6 +110,17 @@
return marks != 0;
}
+/* Print a string for debugging. We need this because there is no d---
+ * equivalent of fwrite.
+ */
+static void
+dfwrite(const byte *ptr, uint count)
+{
+ uint i;
+ for (i = 0; i < count; ++i)
+ dputc(ptr[i]);
+}
+
/* Mark a string. Return true if any new marks. */
bool
gc_string_mark(const byte * ptr, uint size, bool set, gc_state_t * gcst)
@@ -120,7 +131,7 @@
if (size == 0)
return false;
#define dprintstr()\
- dputc('('); fwrite(ptr, 1, min(size, 20), dstderr);\
+ dputc('('); dfwrite(ptr, min(size, 20));\
dputs((size <= 20 ? ")" : "...)"))
if (!(cp = gc_locate(ptr, gcst))) { /* not in a chunk */
#ifdef DEBUG
Modified: trunk/gs/src/interp.c
===================================================================
--- trunk/gs/src/interp.c 2007-11-28 20:04:34 UTC (rev 8414)
+++ trunk/gs/src/interp.c 2007-11-29 01:42:16 UTC (rev 8415)
@@ -918,7 +918,7 @@
dputc('\n');
osp = save_osp;
esp = save_esp;
- fflush(dstderr);
+ dflush();
}
#endif
/* Objects that have attributes (arrays, dictionaries, files, and strings) */
More information about the gs-cvs
mailing list