]> granicus.if.org Git - graphviz/commitdiff
Fix edgepaint -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:28:21 +0000 (08:28 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 24 Oct 2020 05:46:24 +0000 (07:46 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1852.

cmd/edgepaint/edgepaintmain.c

index 18ab2ec58e7d63713a7c700dcf49f266a20ef2e2..3473faab4c9cfd439267a1ac6b50e8954d2d5576 100644 (file)
@@ -180,7 +180,7 @@ static void init(int argc, char *argv[], real *angle, real *accuracy, char **inf
       outfile = openFile(optarg, "w", CmdName);
       break;
     case '?':
-      if (optopt == '\0')
+      if (optopt == '\0' || optopt == '?')
        usage(cmd, 0);
       else {
        fprintf(stderr, "option -%c unrecognized\n",