From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:29:49 +0000 (+0200) Subject: Fix gvmap -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eb96aa329c3e58ac15d16aec3cdbaadc4101a19;p=graphviz Fix gvmap -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/gvmap/gvmap.c b/cmd/gvmap/gvmap.c index 5fa4c934e..8de13a610 100644 --- a/cmd/gvmap/gvmap.c +++ b/cmd/gvmap/gvmap.c @@ -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);