From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:17:01 +0000 (+0200) Subject: Explicitly specify -? as an option in lib/spine/spine.c X-Git-Tag: 2.46.0~20^2^2~47^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=421c1fa2c01fe9255b47dd414a22099f9f082377;p=graphviz Explicitly specify -? as an option in lib/spine/spine.c --- diff --git a/lib/spine/spine.c b/lib/spine/spine.c index 791dc4580..4bdab515b 100644 --- a/lib/spine/spine.c +++ b/lib/spine/spine.c @@ -610,7 +610,7 @@ static void doOpts(int argc, char *argv[], opts_t * op) op->sparse_ratio = 0.5; opterr = 0; - while ((c = getopt(argc, argv, "o:r:v::")) != -1) { + while ((c = getopt(argc, argv, "o:r:v::?")) != -1) { switch (c) { case 'o': op->outfp = openFile(cmd, optarg, "w"); @@ -632,7 +632,7 @@ static void doOpts(int argc, char *argv[], opts_t * op) } break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(cmd, 0); else { fprintf(stderr, "%s: option -%c unrecognized\n",