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

index 721625f38b9aad61525964013601cf3ccf715629..42f25eae204bbd6e7a098320599228685f9197d9 100644 (file)
@@ -243,7 +243,7 @@ static void init(int argc, char *argv[], pack_info* pinfo)
            fprintf(stderr, "gvpack: option -%c missing argument - ignored\n", optopt);
            break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr,