From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:14:00 +0000 (+0200) Subject: Explicitly specify -? as an option in mm2gv X-Git-Tag: 2.46.0~20^2^2~47^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e35f920c70feb24152082bdb448c9037560dde5b;p=graphviz Explicitly specify -? as an option in mm2gv --- diff --git a/cmd/tools/mm2gv.c b/cmd/tools/mm2gv.c index 0bf67c189..73a1f6a97 100644 --- a/cmd/tools/mm2gv.c +++ b/cmd/tools/mm2gv.c @@ -391,7 +391,7 @@ static void init(int argc, char **argv, parms_t * p) cmd = argv[0]; opterr = 0; - while ((c = getopt(argc, argv, ":o:uvclU:")) != -1) { + while ((c = getopt(argc, argv, ":o:uvclU:?")) != -1) { switch (c) { case 'o': p->outf = openF(optarg, "w"); @@ -421,7 +421,7 @@ static void init(int argc, char **argv, parms_t * p) fprintf(stderr, "%s: option -%c missing argument - ignored\n", cmd, optopt); break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr,