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

cmd/tools/sccmap.c

index f9a04dac8b0646d03b84118472482854fbb411c9..2bd1f72d26643038a852c32447b3e1d1c80b99da 100644 (file)
@@ -363,7 +363,7 @@ static void scanArgs(int argc, char **argv)
            fprintf(stderr, "%s: option -%c missing argument - ignored\n", CmdName, optopt);
            break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr, "%s: option -%c unrecognized\n",