#if DEBUG vs #ifdef DEBUG

Ralph Giles <[email protected]> Thu, 9 Dec 2004 00:35:28 -0800
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Igor,

Is it possible to convert the '#if DEBUG' line in vdtrace.c to an
'#ifdef DEBUG'? The former is abiguous if DEBUG is not defined,
or at least causes an error on the Metrowerks CodeWarrior compiler.

As far as I can tell, this is the only occurance of a bare #if.
All other code seems to use and #ifdef, but I noticed several
of the windows-ish makefiles mention or define DEBUG=0, so I'm
not sure how this is intended to interact.

 -r

Proposed patch:

Index: src/vdtrace.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/vdtrace.c,v
retrieving revision 1.9
diff -u -r1.9 vdtrace.c
--- src/vdtrace.c       28 Oct 2004 11:58:17 -0000      1.9
+++ src/vdtrace.c       9 Dec 2004 08:27:46 -0000
@@ -50,7 +50,7 @@
 
 private void vd_flatten(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y, 
double p3x, double p3y)
 {   
-#if DEBUG
+#ifdef DEBUG
     double flat = 0.5;
     double d2x0 = (p0x - 2 * p1x + p2x), d2y0 = (p0y - 2 * p1y + p2y);
     double d2x1 = (p1x - 2 * p2x + p3x), d2y1 = (p1y - 2 * p2y + p3y);