From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:28:21 +0000 (+0200) Subject: Fix edgepaint -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b79b8e722028ee8b28990a998ff3ecae4a5252c5;p=graphviz Fix edgepaint -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/edgepaint/edgepaintmain.c b/cmd/edgepaint/edgepaintmain.c index 18ab2ec58..3473faab4 100644 --- a/cmd/edgepaint/edgepaintmain.c +++ b/cmd/edgepaint/edgepaintmain.c @@ -180,7 +180,7 @@ static void init(int argc, char *argv[], real *angle, real *accuracy, char **inf outfile = openFile(optarg, "w", CmdName); break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(cmd, 0); else { fprintf(stderr, "option -%c unrecognized\n",