Fix bug 2171: handle errors when #define DEBUG is set.
authorEmden Gansner <erg@research.att.com>
Mon, 12 Dec 2011 16:12:35 +0000 (11:12 -0500)
committerEmden Gansner <erg@research.att.com>
Mon, 12 Dec 2011 16:12:35 +0000 (11:12 -0500)
lib/common/ns.c
lib/dotgen/dotsplines.c
lib/neatogen/multispline.c

index bfd583f69ddccaf483c54b6292caf33756047963..90c58cbab68a7c9a1f426935dacf790c9d920a8e 100644 (file)
@@ -932,7 +932,7 @@ void check_cycles(graph_t * g)
        ND_mark(n) = ND_onstack(n) = FALSE;
     for (n = agfstnode(g); n; n = agnxtnode(g, n))
        checkdfs(g, n);
-    for (n = agfstnode(g); n; n = agnxtnode(g, n))
+    for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
        if (ND_mark(n) == FALSE) {
            fprintf (stderr, "graph is unconnected\n");
            break;
index 94db936571dca9f93ac0e78558736f8bbff4240d..111d370eb13573779732c7818c14f86c75d027cc 100644 (file)
@@ -2554,14 +2554,14 @@ edge_t *ie1, *oe1;
 void showpath(path * p)
 {
     int i;
-    point LL, UR;
+    pointf LL, UR;
 
     fprintf(stderr, "%%!PS\n");
     for (i = 0; i < p->nbox; i++) {
        LL = p->boxes[i].LL;
        UR = p->boxes[i].UR;
        fprintf(stderr,
-               "newpath %d %d moveto %d %d lineto %d %d lineto %d %d lineto closepath stroke\n",
+               "newpath %.04f %.04f moveto %.04f %.04f lineto %.04f %.04f lineto %.04f %.04f lineto closepath stroke\n",
                LL.x, LL.y, UR.x, LL.y, UR.x, UR.y, LL.x, UR.y);
     }
     fprintf(stderr, "showpage\n");
index 1cca25d38b84dc20d0c1d084681fcdc9e51c1a06..bb20df87914f86fe2296a74f18dd86dd3c647c09 100644 (file)
@@ -278,7 +278,7 @@ raySegIntersect(pointf v, pointf w, pointf a, pointf b, pointf * p)
        return 0;
 }
 
-#ifdef DEBUG
+#ifdef DEVDBG
 #include <psdbg.c>
 #endif
 
@@ -299,7 +299,7 @@ triPoint(tripoly_t * trip, int vx, pointf v, pointf w, pointf * ip)
            (v, w, trip->poly.ps[tp->v.i], trip->poly.ps[tp->v.j], ip))
            return 0;
     }
-#ifdef DEBUG
+#ifdef DEVDBG
     psInit();
     psComment ("Failure in triPoint");
     psColor("0 0 1");
@@ -645,7 +645,7 @@ void freeRouter(router_t * rtr)
     free(rtr);
 }
 
-#ifdef DEBUG
+#ifdef DEVDBG
 static void
 prTriPoly (tripoly_t *poly, int si, int ei)
 {