From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:32:44 +0000 (+0200) Subject: Fix tred -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4af536eca31c000f4f673b24db9ddaed775544c3;p=graphviz Fix tred -? to actually print usage instead of error on macOS Final commit that fixes https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/tred.c b/cmd/tools/tred.c index 4fec5e874..84b3e3086 100644 --- a/cmd/tools/tred.c +++ b/cmd/tools/tred.c @@ -257,7 +257,7 @@ static void init(int argc, char *argv[]) PrintRemovedEdges = 1; break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n",