From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:04:22 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in sccmap X-Git-Tag: 2.46.0~20^2^2~47^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6035c8f6c98cbdbd4305a3ab70fe1a4034325bd;p=graphviz Show usage and exit non-zero for unsupported option in sccmap Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/doc/libgraph/sccmap.c b/doc/libgraph/sccmap.c index 6808462b6..0c37efc2e 100644 --- a/doc/libgraph/sccmap.c +++ b/doc/libgraph/sccmap.c @@ -313,9 +313,11 @@ static void scanArgs(int argc, char **argv) case '?': if (optopt == '?') usage(0); - else - fprintf(stderr, "%s: option -%c unrecognized - ignored\n", + else { + fprintf(stderr, "%s: option -%c unrecognized\n", CmdName, optopt); + usage(1); + } break; } }