diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 767b2a90..7776bc64 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -537,7 +537,6 @@ calmaElementPath(void) int layer, dt, width, pathtype, ciftype, savescale; int xmin, ymin, xmax, ymax, temp; CIFPath *pathheadp, *pathp, *previousp; - Rect segment; Plane *plane; int first,last; CellUse *use; diff --git a/cif/CIFrdpt.c b/cif/CIFrdpt.c index dee267d9..6ed09889 100644 --- a/cif/CIFrdpt.c +++ b/cif/CIFrdpt.c @@ -462,9 +462,22 @@ CIFPaintWirePath( /* Wire reverses direction. Break wire here, */ /* draw, and start new polygon. */ - TxError("Warning: direction reversal in path at (%d, %d).\n", - pathp->cifp_x, pathp->cifp_y); + /* Check first if last point and current point */ + /* are the same, in which case a different */ + /* message should be issued (and possibly */ + /* should be handled differently?) */ + if (previousp && previousp->cifp_x == pathp->cifp_x + && previousp->cifp_y == pathp->cifp_y) + { + TxError("Warning: duplicate point in path at (%d, %d).\n", + pathp->cifp_x / 2, pathp->cifp_y / 2); + } + else + { + TxError("Warning: direction reversal in path at (%d, %d).\n", + pathp->cifp_x / 2, pathp->cifp_y / 2); + } phi = theta; if (endcap) {