* main.c (print_mc_usage): Partly revert previous patch -

poptPrintHelp() has side effects and should not be called
inside fprintf(), which can be a macro.
This commit is contained in:
Pavel Roskin 2002-10-21 23:28:33 +00:00
parent 1e080baf7a
commit 1c099a21ec
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2002-10-21 Pavel Roskin <proski@gnu.org>
* main.c (print_mc_usage): Partly revert previous patch -
poptPrintHelp() has side effects and should not be called
inside fprintf(), which can be a macro.
* main.c (print_mc_usage): Use poptSetOtherOptionHelp()
From Andrew V. Samoilov <sav@bcs.zp.ua>

View File

@ -2070,14 +2070,16 @@ init_sigchld (void)
#endif /* NATIVE_WIN32, UNIX */
static void
print_mc_usage (poptContext ctx, FILE * stream)
print_mc_usage (poptContext ctx, FILE *stream)
{
int leftColWidth;
poptSetOtherOptionHelp (ctx,
_("[flags] [this_dir] [other_panel_dir]\n\n"));
/* print help for options */
fprintf (stream, " %-*s %s\n", poptPrintHelp (ctx, stream, 0),
_("+number"),
leftColWidth = poptPrintHelp (ctx, stream, 0);
fprintf (stream, " %-*s %s\n", leftColWidth, _("+number"),
_("Set initial line number for the internal editor"));
fprintf (stream,
_("\n"