summaryrefslogtreecommitdiff
path: root/libc/locale
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-02-13 18:31:14 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-02-13 18:31:14 +0000
commit90b6943f0a77fe847ccc8037447ee56a796a1915 (patch)
tree5991cf54ea093cb5af534d3acdf7e012ac219b81 /libc/locale
parent75b72fe085a17b1448190cb9d5cd31124320f3a3 (diff)
Merge changes between r7867 and r7922 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@7923 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/locale')
-rw-r--r--libc/locale/programs/locale.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/libc/locale/programs/locale.c b/libc/locale/programs/locale.c
index 5b9fbb3f5..74924e5ec 100644
--- a/libc/locale/programs/locale.c
+++ b/libc/locale/programs/locale.c
@@ -84,9 +84,7 @@ static const struct argp_option options[] =
};
/* Short description of program. */
-static const char doc[] = N_("Get locale-specific information.\v\
-For bug reporting instructions, please see:\n\
-"REPORT_BUGS_TO".\n");
+static const char doc[] = N_("Get locale-specific information.");
/* Strings for arguments in help texts. */
static const char args_doc[] = N_("NAME\n[-a|-m]");
@@ -94,10 +92,13 @@ static const char args_doc[] = N_("NAME\n[-a|-m]");
/* Prototype for option handler. */
static error_t parse_opt (int key, char *arg, struct argp_state *state);
+/* Function to print some extra text in the help message. */
+static char *more_help (int key, const char *text, void *input);
+
/* Data structure to communicate with argp functions. */
static struct argp argp =
{
- options, parse_opt, args_doc, doc
+ options, parse_opt, args_doc, doc, NULL, more_help
};
@@ -267,6 +268,26 @@ parse_opt (int key, char *arg, struct argp_state *state)
}
+static char *
+more_help (int key, const char *text, void *input)
+{
+ char *tp = NULL;
+ switch (key)
+ {
+ case ARGP_KEY_HELP_EXTRA:
+ /* We print some extra information. */
+ if (asprintf (&tp, gettext ("\
+For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ return tp;
+ default:
+ break;
+ }
+ return (char *) text;
+}
+
+
/* Print the version information. */
static void
print_version (FILE *stream, struct argp_state *state)