From 13f6e4646de7fe9ee17c8623f34d46a91912df37 Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Tue, 22 Oct 2002 11:51:47 +0000 Subject: [PATCH] * popthelp.c (poptPrintHelp): Use POPT_ for "[OPTION...]", this message is eliminated by poptSetOtherOptionHelp(). * popt.c (poptStrerror): Use _ instead of POPT_ for useful messages. --- src/ChangeLog | 8 +++++++- src/popt.c | 6 +++--- src/popthelp.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d48f19c9c..a2b833851 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2002-10-22 Andrew V. Samoilov + * popthelp.c (poptPrintHelp): Use POPT_ for "[OPTION...]", + this message is eliminated by poptSetOtherOptionHelp(). + * popt.c (poptStrerror): Use _ instead of POPT_ for useful + messages. + * utilunix.c (mc_tmpdir): Make directory only if not exists. Use strncpy() instead of g_snprintf() - there can be printf() pattern(s) in the $TMPDIR. @@ -76,7 +81,8 @@ 2002-10-09 Andrew V. Samoilov - * popt.h: Adjust poptHelpOptions[] declaration. + * popt.h: Adjust poptHelpOptions[] and poptPrintHelp() + declarations. * popthelp.c: Replace POPT_ with _ for visible strings. (singleOptionHelp): Eliminate format array. diff --git a/src/popt.c b/src/popt.c index e7a8d8b46..5260e5822 100644 --- a/src/popt.c +++ b/src/popt.c @@ -544,15 +544,15 @@ char * poptBadOption(poptContext con, int flags) { const char * poptStrerror(const int error) { switch (error) { case POPT_ERROR_NOARG: - return POPT_("missing argument"); + return _("missing argument"); case POPT_ERROR_BADOPT: - return POPT_("unknown option"); + return _("unknown option"); case POPT_ERROR_OPTSTOODEEP: return POPT_("aliases nested too deeply"); case POPT_ERROR_BADQUOTE: return POPT_("error in parameter quoting"); case POPT_ERROR_BADNUMBER: - return POPT_("invalid numeric value"); + return _("invalid numeric value"); case POPT_ERROR_OVERFLOW: return POPT_("number too large or too small"); case POPT_ERROR_ERRNO: diff --git a/src/popthelp.c b/src/popthelp.c index 6f13e41e9..7110c2a1f 100644 --- a/src/popthelp.c +++ b/src/popthelp.c @@ -194,7 +194,7 @@ int poptPrintHelp(poptContext con, FILE * f, int flags) { if (con->otherHelp) fprintf(f, " %s\n", con->otherHelp); else - fprintf(f, " %s\n", _("[OPTION...]")); + fprintf(f, " %s\n", POPT_("[OPTION...]")); leftColWidth = maxArgWidth(con->options, NULL); singleTableHelp(f, con->options, leftColWidth, NULL);