From 99b0da17a4b783e69b498d44d66a8dea66b577d7 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Mon, 12 Dec 2011 11:12:35 -0500 Subject: [PATCH] Fix bug 2171: handle errors when #define DEBUG is set. --- lib/common/ns.c | 2 +- lib/dotgen/dotsplines.c | 4 ++-- lib/neatogen/multispline.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/common/ns.c b/lib/common/ns.c index bfd583f69..90c58cbab 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -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; diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 94db93657..111d370eb 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -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"); diff --git a/lib/neatogen/multispline.c b/lib/neatogen/multispline.c index 1cca25d38..bb20df879 100644 --- a/lib/neatogen/multispline.c +++ b/lib/neatogen/multispline.c @@ -278,7 +278,7 @@ raySegIntersect(pointf v, pointf w, pointf a, pointf b, pointf * p) return 0; } -#ifdef DEBUG +#ifdef DEVDBG #include #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) { -- 2.50.1