]> granicus.if.org Git - graphviz/commitdiff
Explicitly specify -? as an option in mingle
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 4 Oct 2020 18:55:09 +0000 (20:55 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:25 +0000 (21:10 +0200)
cmd/mingle/minglemain.c

index c2403dd219def3af87392e9c4a64bc267b88de43..4683c0bb207d42fdba4a11793eac65332122566c 100644 (file)
@@ -128,7 +128,7 @@ static void init(int argc, char *argv[], opts_t* opts)
        opts->angle_param = -1;
        opts->angle = 40.0/180.0*M_PI;
 
-       while ((c = getopt(argc, argv, ":a:c:i:k:K:m:o:p:r:T:v:")) != -1) {
+       while ((c = getopt(argc, argv, ":a:c:i:k:K:m:o:p:r:T:v:?")) != -1) {
                switch (c) {
                case 'a':
                        if ((sscanf(optarg,"%lf",&s) > 0) && (s >= 0))
@@ -205,7 +205,7 @@ static void init(int argc, char *argv[], opts_t* opts)
                        }
                        break;
                case '?':
-                       if (optopt == '?')
+                       if (optopt == '\0')
                                usage(0);
                        else {
                                fprintf(stderr, "%s: option -%c unrecognized\n", cmd, optopt);