]> granicus.if.org Git - graphviz/commitdiff
Fix gc -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:30:44 +0000 (08:30 +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/gc.c

index cafe39d3f52db14abef3c0bc394e097f734aefad..70e2bd78ac9e798e6e03fefee0ca5892ba56166c 100644 (file)
@@ -123,7 +123,7 @@ static void init(int argc, char *argv[])
            gtype = UNDIRECTED;
            break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr, "gc: option -%c unrecognized\n",