From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:32:16 +0000 (+0200) Subject: Fix sccmap -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac5f5c35a7b271a29f47391b33a25500fd46ec15;p=graphviz Fix sccmap -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/sccmap.c b/cmd/tools/sccmap.c index f9a04dac8..2bd1f72d2 100644 --- a/cmd/tools/sccmap.c +++ b/cmd/tools/sccmap.c @@ -363,7 +363,7 @@ static void scanArgs(int argc, char **argv) fprintf(stderr, "%s: option -%c missing argument - ignored\n", CmdName, optopt); break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n",