mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
Simplify help message printing.
This commit is contained in:
parent
c0154f46b7
commit
9d9ab48728
@ -85,7 +85,9 @@ static const struct argp_option options[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Short description of program. */
|
/* Short description of program. */
|
||||||
static const char doc[] = N_("Get locale-specific information.");
|
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");
|
||||||
|
|
||||||
/* Strings for arguments in help texts. */
|
/* Strings for arguments in help texts. */
|
||||||
static const char args_doc[] = N_("NAME\n[-a|-m]");
|
static const char args_doc[] = N_("NAME\n[-a|-m]");
|
||||||
@ -93,13 +95,10 @@ static const char args_doc[] = N_("NAME\n[-a|-m]");
|
|||||||
/* Prototype for option handler. */
|
/* Prototype for option handler. */
|
||||||
static error_t parse_opt (int key, char *arg, struct argp_state *state);
|
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. */
|
/* Data structure to communicate with argp functions. */
|
||||||
static struct argp argp =
|
static struct argp argp =
|
||||||
{
|
{
|
||||||
options, parse_opt, args_doc, doc, NULL, more_help
|
options, parse_opt, args_doc, doc
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -269,22 +268,6 @@ 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 xstrdup (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. */
|
/* Print the version information. */
|
||||||
static void
|
static void
|
||||||
print_version (FILE *stream, struct argp_state *state)
|
print_version (FILE *stream, struct argp_state *state)
|
||||||
|
Loading…
Reference in New Issue
Block a user