From ca38f6111c6df143a6efed5879163c3050197784 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Aug 2011 10:37:19 +0200 Subject: [PATCH] getopt: indent usage() Signed-off-by: Karel Zak --- getopt/getopt.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/getopt/getopt.c b/getopt/getopt.c index 8da3178749..e66bee9bc5 100644 --- a/getopt/getopt.c +++ b/getopt/getopt.c @@ -311,22 +311,27 @@ static void set_shell(const char *new_shell) static void __attribute__ ((__noreturn__)) print_help(void) { - fprintf(stderr, _("Usage: %1$s optstring parameters\n" - " %1$s [options] [--] optstring parameters\n" - " %1$s [options] -o|--options optstring [options] [--] parameters\n", + fputs(_("\nUsage:\n"), stderr); + + fprintf(stderr, _( + " %1$s optstring parameters\n" + " %1$s [options] [--] optstring parameters\n" + " %1$s [options] -o|--options optstring [options] [--] parameters\n"), program_invocation_short_name); - fputs(_("\nOptions:\n"),stderr); - fputs(_(" -a, --alternative Allow long options starting with single -\n"),stderr); - fputs(_(" -h, --help This small usage guide\n"),stderr); - fputs(_(" -l, --longoptions=longopts Long options to be recognized\n"),stderr); - fputs(_(" -n, --name=progname The name under which errors are reported\n"),stderr); - fputs(_(" -o, --options=optstring Short options to be recognized\n"),stderr); - fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"),stderr); - fputs(_(" -Q, --quiet-output No normal output\n"),stderr); - fputs(_(" -s, --shell=shell Set shell quoting conventions\n"),stderr); - fputs(_(" -T, --test Test for getopt(1) version\n"),stderr); - fputs(_(" -u, --unquote Do not quote the output\n"),stderr); - fputs(_(" -V, --version Output version information\n"),stderr); + + fputs(_("\nOptions:\n"), stderr); + fputs(_(" -a, --alternative Allow long options starting with single -\n"), stderr); + fputs(_(" -h, --help This small usage guide\n"), stderr); + fputs(_(" -l, --longoptions=longopts Long options to be recognized\n"), stderr); + fputs(_(" -n, --name=progname The name under which errors are reported\n"), stderr); + fputs(_(" -o, --options=optstring Short options to be recognized\n"), stderr); + fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"), stderr); + fputs(_(" -Q, --quiet-output No normal output\n"), stderr); + fputs(_(" -s, --shell=shell Set shell quoting conventions\n"), stderr); + fputs(_(" -T, --test Test for getopt(1) version\n"), stderr); + fputs(_(" -u, --unquote Do not quote the output\n"), stderr); + fputs(_(" -V, --version Output version information\n"), stderr); + fputc('\n', stderr); exit(PARAMETER_EXIT_CODE); } -- 2.47.2