From: Brian May <> Date: Sat, 27 Jun 2009 22:47:52 +0000 (-0700) Subject: verbose_error_message_about_recognized_options (tiny change from Debian patches) X-Git-Tag: v4.4.0.alpha8~9 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f8687cd1d6737cb79cd31fc6c6d92971e499792d;p=xboard.git verbose_error_message_about_recognized_options (tiny change from Debian patches) --- diff --git a/xboard.c b/xboard.c index d47a15d..489ef64 100644 --- a/xboard.c +++ b/xboard.c @@ -2329,6 +2329,20 @@ main(argc, argv) if (argc > 1) { fprintf(stderr, _("%s: unrecognized argument %s\n"), programName, argv[1]); + fprintf(stderr, "Recognized options:\n"); + for(i = 0; i < XtNumber(shellOptions); i++) { + j = fprintf(stderr, " %s%s", shellOptions[i].option, + (shellOptions[i].argKind == XrmoptionSepArg + ? " ARG" : "")); + if (i++ < XtNumber(shellOptions)) { + fprintf(stderr, "%*c%s%s\n", 40 - j, ' ', + shellOptions[i].option, + (shellOptions[i].argKind == XrmoptionSepArg + ? " ARG" : "")); + } else { + fprintf(stderr, "\n"); + } + } exit(2); }