mesg: sync usage() with howto-usage-function.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2013-08-18 00:50:08 +01:00
parent bbeae1cef1
commit 1e6f6cdb84
1 changed files with 7 additions and 8 deletions

View File

@ -68,16 +68,16 @@
static void __attribute__ ((__noreturn__)) usage(FILE * out) static void __attribute__ ((__noreturn__)) usage(FILE * out)
{ {
fputs(_("\nUsage:\n"), out); fputs(USAGE_HEADER, out);
/* TRANSLATORS: this program uses for y and n rpmatch(3), /* TRANSLATORS: this program uses for y and n rpmatch(3),
* which means they can be translated. */ * which means they can be translated. */
fprintf(out, fprintf(out,
_(" %s [options] [y | n]\n"), program_invocation_short_name); _(" %s [options] [y | n]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_("\nOptions:\n"), out); fputs(_(" -v, --verbose explain what is being done\n"), out);
fputs(_(" -v, --verbose explain what is being done\n" fputs(USAGE_HELP, out);
" -V, --version output version information and exit\n" fputs(USAGE_VERSION, out);
" -h, --help output help screen and exit\n\n"), out); fprintf(out, USAGE_MAN_TAIL("mesg(1)"));
exit(out == stderr ? MESG_EXIT_FAILURE : EXIT_SUCCESS); exit(out == stderr ? MESG_EXIT_FAILURE : EXIT_SUCCESS);
} }
@ -106,8 +106,7 @@ int main(int argc, char *argv[])
verbose = TRUE; verbose = TRUE;
break; break;
case 'V': case 'V':
printf(_("%s from %s\n"), program_invocation_short_name, printf(UTIL_LINUX_VERSION);
PACKAGE_STRING);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
case 'h': case 'h':
usage(stdout); usage(stdout);