From 253e5e7161e2fb66c65204f91ceaaf8268a42777 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 18 May 2014 12:37:24 +0100 Subject: setterm: correct usage() bright color argument This has been wrong since commit 2dc8716. The bright is a prefix attribute to other colors. Signed-off-by: Sami Kerola --- term-utils/setterm.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'term-utils/setterm.c') diff --git a/term-utils/setterm.c b/term-utils/setterm.c index 01f7ab116..5e70821d4 100644 --- a/term-utils/setterm.c +++ b/term-utils/setterm.c @@ -395,18 +395,15 @@ static int parse_bfreq(char **argv, char *optarg, int *optind) return strtos32_or_err(arg, _("argument error")); } -static void __attribute__ ((__noreturn__)) -usage(FILE *out) { -/* Print error message about arguments, and the command's syntax. */ - +static void __attribute__((__noreturn__)) usage(FILE *out) +{ if (out == stderr) - warnx(_("Argument error.")); + warnx(_("argument error")); - fputs(_("\nUsage:\n"), out); + fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options]\n"), program_invocation_short_name); - - fputs(_("\nOptions:\n"), out); + fputs(USAGE_OPTIONS, out); fputs(_(" --term \n"), out); fputs(_(" --reset\n"), out); fputs(_(" --initialize\n"), out); @@ -415,12 +412,13 @@ usage(FILE *out) { fputs(_(" --appcursorkeys \n"), out); fputs(_(" --linewrap \n"), out); fputs(_(" --default\n"), out); - fputs(_(" --foreground \n"), out); - fputs(_(" --background \n"), out); - fputs(_(" --ulcolor \n"), out); - fputs(_(" --ulcolor \n"), out); - fputs(_(" --hbcolor \n"), out); - fputs(_(" --hbcolor \n"), out); + fputs(_(" --foreground \n"), out); + fputs(_(" --background \n"), out); + fputs(_(" --ulcolor \n"), out); + fputs(_(" --ulcolor \n"), out); + fputs(_(" --hbcolor \n"), out); + fputs(_(" --hbcolor \n"), out); + fputs(_(" : black blue cyan green grey magenta red white yellow\n"), out); fputs(_(" --inversescreen \n"), out); fputs(_(" --bold \n"), out); fputs(_(" --half-bright \n"), out); -- cgit v1.2.3-55-g7522