From 30d2a9b605aed92cb19efce5698128d321acf89c Mon Sep 17 00:00:00 2001 From: erg Date: Mon, 30 Mar 2009 19:09:46 +0000 Subject: [PATCH] Add warnings for bad ports beginning with 'e' or 'w'. --- lib/common/shapes.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 04894ff0c..4b0bfaabc 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -1326,12 +1326,16 @@ compassPort(node_t* n, boxf* bp, port* pp, char* compass, int sides, inside_t* i if (compass && *compass) { switch (*compass++) { case 'e': - p.x = b.UR.x; - theta = 0.0; - constrain = TRUE; - defined = TRUE; - clip = FALSE; - side = sides & RIGHT; + if (*compass) + rv = 1; + else { + p.x = b.UR.x; + theta = 0.0; + constrain = TRUE; + defined = TRUE; + clip = FALSE; + side = sides & RIGHT; + } break; case 's': p.y = b.LL.y; @@ -1366,12 +1370,16 @@ compassPort(node_t* n, boxf* bp, port* pp, char* compass, int sides, inside_t* i } break; case 'w': - p.x = b.LL.x; - theta = M_PI; - constrain = TRUE; - defined = TRUE; - clip = FALSE; - side = sides & LEFT; + if (*compass) + rv = 1; + else { + p.x = b.LL.x; + theta = M_PI; + constrain = TRUE; + defined = TRUE; + clip = FALSE; + side = sides & LEFT; + } break; case 'n': p.y = b.UR.y; -- 2.40.0