From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:49:56 +0000 (+0200) Subject: Explicitly specify -? as an option in cluster X-Git-Tag: 2.46.0~20^2^2~47^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=393d2ed5091f77c162ca7b893d59080fe56422d1;p=graphviz Explicitly specify -? as an option in cluster --- diff --git a/cmd/gvmap/cluster.c b/cmd/gvmap/cluster.c index bf97ace4b..e5232bac9 100644 --- a/cmd/gvmap/cluster.c +++ b/cmd/gvmap/cluster.c @@ -99,7 +99,7 @@ static void init(int argc, char *argv[], opts_t* opts) { Verbose = 0; opts->clustering_method = CLUSTERING_MODULARITY; - while ((c = getopt(argc, argv, ":vC:c:o:")) != -1) { + while ((c = getopt(argc, argv, ":vC:c:o:?")) != -1) { switch (c) { case 'c': if ((sscanf(optarg,"%d", &v) == 0) || (v < 0)) { @@ -120,7 +120,7 @@ static void init(int argc, char *argv[], opts_t* opts) { Verbose = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(cmd, 0); else { fprintf(stderr, " option -%c unrecognized\n",