]> granicus.if.org Git - graphviz/commitdiff
Fix gvmap -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:29:49 +0000 (08:29 +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/gvmap/gvmap.c

index 5fa4c934e3e6b3f5f19243ea8af998a01db2d167..8de13a610fbeae9461b04602adbfc375332512f3 100644 (file)
@@ -389,7 +389,7 @@ init(int argc, char **argv, params_t* pm)
       fprintf(stderr, "gvpack: option -%c missing argument - ignored\n", optopt);
       break;
     case '?':
-      if (optopt == '\0')
+      if (optopt == '\0' || optopt == '?')
         usage(cmd, 0);
       else {
         fprintf(stderr, " option -%c unrecognized\n", optopt);