From f8687cd1d6737cb79cd31fc6c6d92971e499792d Mon Sep 17 00:00:00 2001 From: Brian May <> Date: Sat, 27 Jun 2009 15:47:52 -0700 Subject: [PATCH] verbose_error_message_about_recognized_options (tiny change from Debian patches) --- xboard.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) 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); } -- 1.7.0.4