diff options
author | Miles Bader <miles@gnu.org> | 1995-10-20 00:00:37 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-10-20 00:00:37 +0000 |
commit | 1532f4f28fe5ec893c6e4980d1d73c99010b336f (patch) | |
tree | 23b7c6027ba6fc6b2145a136a78f055f14639ce5 | |
parent | 0dc05b5e1f96a0031221729d1ef5776889fc3e66 (diff) |
(argp_usage, argp_error): New declarations.
(argp_usage): New inline function.
-rw-r--r-- | libshouldbeinlibc/argp.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libshouldbeinlibc/argp.h b/libshouldbeinlibc/argp.h index dfd6303c..138e0533 100644 --- a/libshouldbeinlibc/argp.h +++ b/libshouldbeinlibc/argp.h @@ -230,6 +230,19 @@ error_t argp_parse (struct argp *argp, int argc, char **argv, unsigned flags, ARGP_HELP_*. */ void argp_help (struct argp *argp, FILE *stream, unsigned flags); +/* Output the standard usage message for ARGP to stderr and exit (1). */ +void argp_usage (struct argp *argp) __attribute__ ((noreturn)); +extern inline void argp_usage (struct argp *argp) +{ + argp_help (argp, stderr, ARGP_HELP_STD_USAGE); +} + +/* Print the printf string FMT and following args, preceded by the program + name and `:', to stderr, and followed by a `Try ... --help' message. Then + exit (1). */ +extern void argp_error (struct argp *argp, char *fmt, ...) + __attribute__ ((noreturn, format (printf, 2, 3))); + /* Returns true if the option OPT is a valid short option. */ extern inline int _option_is_short (struct argp_option *opt) |