mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
* textconf.c (version): Write to stdout.
* main.c (print_mc_usage): Add "stream" parameter to specify file stream. (process_args): Use print_mc_usage() with stdout as stream. (handle_args): Use print_mc_usage() with stderr as stream. (print_color_usage): Write to stdout.
This commit is contained in:
parent
9e5818f696
commit
fae9735bb9
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-20 Andrew V. Samoilov <kai@cmail.ru>
|
||||||
|
|
||||||
|
* textconf.c (version): Write to stdout.
|
||||||
|
* main.c (print_mc_usage): Add "stream" parameter to specify
|
||||||
|
file stream.
|
||||||
|
(process_args): Use print_mc_usage() with stdout as stream.
|
||||||
|
(handle_args): Use print_mc_usage() with stderr as stream.
|
||||||
|
(print_color_usage): Write to stdout.
|
||||||
|
|
||||||
2002-03-18 Pavel Roskin <proski@gnu.org>
|
2002-03-18 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* eregex.h: Update from glibc-2.2.5.
|
* eregex.h: Update from glibc-2.2.5.
|
||||||
|
12
src/main.c
12
src/main.c
@ -2209,7 +2209,7 @@ init_sigchld (void)
|
|||||||
#endif /* _OS_NT, UNIX */
|
#endif /* _OS_NT, UNIX */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_mc_usage (void)
|
print_mc_usage (FILE *stream)
|
||||||
{
|
{
|
||||||
const char * const * ptr;
|
const char * const * ptr;
|
||||||
const char * const usage [] = {
|
const char * const usage [] = {
|
||||||
@ -2265,7 +2265,7 @@ print_mc_usage (void)
|
|||||||
version (0);
|
version (0);
|
||||||
|
|
||||||
for (ptr = usage; *ptr; ptr++)
|
for (ptr = usage; *ptr; ptr++)
|
||||||
fputs (_(*ptr), stderr);
|
fputs (_(*ptr), stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2285,7 +2285,7 @@ print_color_usage (void)
|
|||||||
"Colors:\n"
|
"Colors:\n"
|
||||||
" black, gray, red, brightred, green, brightgreen, brown,\n"
|
" black, gray, red, brightred, green, brightgreen, brown,\n"
|
||||||
" yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
|
" yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
|
||||||
" brightcyan, lightgray and white\n\n"), stderr);
|
" brightcyan, lightgray and white\n\n"), stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2334,7 +2334,7 @@ process_args (int c, const char *option_arg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
fprintf (stderr, _("Option -m is obsolete. Please look at Display Bits... in the Option's menu\n"));
|
fputs (_("Option -m is obsolete. Please look at Display Bits... in the Option's menu\n"), stderr);
|
||||||
finish_program = 1;
|
finish_program = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2367,7 +2367,7 @@ process_args (int c, const char *option_arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
print_mc_usage ();
|
print_mc_usage (stdout);
|
||||||
finish_program = 1;
|
finish_program = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2462,7 +2462,7 @@ handle_args (int argc, char *argv [])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c < -1){
|
if (c < -1){
|
||||||
print_mc_usage ();
|
print_mc_usage (stderr);
|
||||||
fprintf(stderr, "%s: %s\n",
|
fprintf(stderr, "%s: %s\n",
|
||||||
poptBadOption (ctx, POPT_BADOPTION_NOALIAS),
|
poptBadOption (ctx, POPT_BADOPTION_NOALIAS),
|
||||||
poptStrerror (c));
|
poptStrerror (c));
|
||||||
|
@ -96,10 +96,10 @@ version (int verbose)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
fprintf (stderr, _("GNU Midnight Commander %s\n"), VERSION);
|
fprintf (stdout, _("GNU Midnight Commander %s\n"), VERSION);
|
||||||
if (!verbose)
|
if (!verbose)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; features [i]; i++)
|
for (i = 0; features [i]; i++)
|
||||||
fputs (_(features [i]), stderr);
|
fputs (_(features [i]), stdout);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user