]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in edgepaint
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 2 Oct 2020 12:56:10 +0000 (14:56 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:24 +0000 (21:10 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1843.

cmd/edgepaint/edgepaintmain.c

index af63bb9943a5c8771e0ba457dfd95b67199a90ca..18ab2ec58e7d63713a7c700dcf49f266a20ef2e2 100644 (file)
@@ -182,9 +182,11 @@ static void init(int argc, char *argv[], real *angle, real *accuracy, char **inf
     case '?':
       if (optopt == '\0')
        usage(cmd, 0);
-      else
-       fprintf(stderr, "option -%c unrecognized - ignored\n",
+      else {
+       fprintf(stderr, "option -%c unrecognized\n",
                optopt);
+       usage(cmd, 1);
+      }
       break;
     }
   }