]> granicus.if.org Git - graphviz/commitdiff
Add warnings for bad ports beginning with 'e' or 'w'.
authorerg <devnull@localhost>
Mon, 30 Mar 2009 19:09:46 +0000 (19:09 +0000)
committererg <devnull@localhost>
Mon, 30 Mar 2009 19:09:46 +0000 (19:09 +0000)
lib/common/shapes.c

index 04894ff0c67d87a36d9a46548099226469875c20..4b0bfaabcd398199eabb0cc17981d28987d6a4f1 100644 (file)
@@ -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;