]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
getopt: indent usage()
authorKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2011 08:37:19 +0000 (10:37 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2011 08:37:19 +0000 (10:37 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
getopt/getopt.c

index 8da31787494503610be755d0f8ee57333b981689..e66bee9bc50cc221be4861c77548e7ebcead41ad 100644 (file)
@@ -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);
 }