summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-02-18 15:49:44 +0000
committerJakub Jelinek <jakub@redhat.com>2009-02-18 15:49:44 +0000
commitcf22c5c9b3a4a6cc81a269d49d2324b5df084d74 (patch)
treeca7e374c348baf4e6510329f3f271eca4eb5419f /locale
parent73c5dd45bc405428148ee740cac61a1279fe57d4 (diff)
Updated to fedora-glibc-20090218T1534
Diffstat (limited to 'locale')
-rw-r--r--locale/langinfo.h4
-rw-r--r--locale/programs/locale.c26
2 files changed, 24 insertions, 6 deletions
diff --git a/locale/langinfo.h b/locale/langinfo.h
index 10c4232918..84f53ef172 100644
--- a/locale/langinfo.h
+++ b/locale/langinfo.h
@@ -1,5 +1,5 @@
/* Access to locale-dependent parameters.
- Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2003,2004,2005,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -590,7 +590,7 @@ extern char *nl_langinfo (nl_item __item) __THROW;
# include <xlocale.h>
/* Just like nl_langinfo but get the information from the locale object L. */
-extern char *nl_langinfo_l (nl_item __item, __locale_t l);
+extern char *nl_langinfo_l (nl_item __item, __locale_t __l);
#endif
__END_DECLS
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 33963d5b25..77262b7d1c 100644
--- a/locale/programs/locale.c
+++ b/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\
-<http://www.gnu.org/software/libc/bugs.html>.\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,23 @@ parse_opt (int key, char *arg, struct argp_state *state)
}
+static char *
+more_help (int key, const char *text, void *input)
+{
+ switch (key)
+ {
+ case ARGP_KEY_HELP_EXTRA:
+ /* We print some extra information. */
+ return strdup (gettext ("\
+For bug reporting instructions, please see:\n\
+<http://www.gnu.org/software/libc/bugs.html>.\n"));
+ default:
+ break;
+ }
+ return (char *) text;
+}
+
+
/* Print the version information. */
static void
print_version (FILE *stream, struct argp_state *state)