From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:31:38 +0000 (+0200) Subject: Fix gvpack -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cb1a9957a378d88bf54e4579920d5df68937bce;p=graphviz Fix gvpack -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 721625f38..42f25eae2 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -243,7 +243,7 @@ static void init(int argc, char *argv[], pack_info* pinfo) fprintf(stderr, "gvpack: option -%c missing argument - ignored\n", optopt); break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr,