]> granicus.if.org Git - graphviz/commitdiff
Fix bcomps -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:08:51 +0000 (08:08 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 24 Oct 2020 05:46:23 +0000 (07:46 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1852.

cmd/tools/bcomps.c

index a48b73adc3710d8eba3fac7bbcbfeb0e2c6653f5..141b354afd5031985acec1e7c3802e4661d30718 100644 (file)
@@ -358,7 +358,7 @@ static void init(int argc, char *argv[])
            fprintf(stderr, "bcomps: option -%c missing argument - ignored\n", optopt);
            break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr,