From 7fb579af50cd41e1bb50a12af4d59003f90f0bbb Mon Sep 17 00:00:00 2001 From: Peter Clifton Date: Wed, 11 Nov 2009 23:28:09 +0000 Subject: [PATCH] polygon1.c: Tidy up poly_Valid debug print routines to match pline_dump Avoids a superfluous line: %d %d 10 10 ""] at the beginning of each output block. --- src/polygon1.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/polygon1.c b/src/polygon1.c index 44b3ae7a..30b6c345 100644 --- a/src/polygon1.c +++ b/src/polygon1.c @@ -2386,7 +2386,7 @@ poly_Valid (POLYAREA * p) if (p->contours->Flags.orient == PLF_INV || poly_ChkContour (p->contours)) { #ifndef NDEBUG - VNODE *v; + VNODE *v, *n; DEBUGP ("Invalid Outer PLINE\n"); if (p->contours->Flags.orient == PLF_INV) DEBUGP ("failed orient\n"); @@ -2395,8 +2395,9 @@ poly_Valid (POLYAREA * p) v = &p->contours->head; do { - fprintf (stderr, "%d %d 100 100 \"\"]\n", v->point[0], v->point[1]); - fprintf (stderr, "Line [%d %d ", v->point[0], v->point[1]); + n = v->next; + fprintf (stderr, "Line [%d %d %d %d 100 100 \"\"]\n", + v->point[0], v->point[1], n->point[0], n->point[1]); } while ((v = v->next) != &p->contours->head); #endif @@ -2408,7 +2409,7 @@ poly_Valid (POLYAREA * p) poly_ChkContour (c) || !poly_ContourInContour (p->contours, c)) { #ifndef NDEBUG - VNODE *v; + VNODE *v, *n; DEBUGP ("Invalid Inner PLINE orient = %d\n", c->Flags.orient); if (c->Flags.orient == PLF_DIR) DEBUGP ("failed orient\n"); @@ -2419,9 +2420,9 @@ poly_Valid (POLYAREA * p) v = &c->head; do { - fprintf (stderr, "%d %d 100 100 \"\"]\n", v->point[0], - v->point[1]); - fprintf (stderr, "Line [%d %d ", v->point[0], v->point[1]); + n = v->next; + fprintf (stderr, "Line [%d %d %d %d 100 100 \"\"]\n", + v->point[0], v->point[1], n->point[0], n->point[1]); } while ((v = v->next) != &c->head); #endif -- 2.11.4.GIT