summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-11 23:42:50 +0000
committerMiles Bader <miles@gnu.org>1995-10-11 23:42:50 +0000
commit201324becb0f2660708bbda5d47f0af6cce4dfa4 (patch)
tree65a0e7c06fc17e0704d2f23057f035f28f6ca86e /libshouldbeinlibc
parentdfaec01ca9968aa6dc427a6be59ced2abee5fdc4 (diff)
(ARGP_HELP_*, argp_help): Renamed from ARGP_USAGE_* &c.
(ARGP_HELP_STD_HELP): Use ARGP_HELP_SHORT_USAGE instead of ARGP_HELP_USAGE.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/argp.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/libshouldbeinlibc/argp.h b/libshouldbeinlibc/argp.h
index 239b39e1..4c9ad1da 100644
--- a/libshouldbeinlibc/argp.h
+++ b/libshouldbeinlibc/argp.h
@@ -201,23 +201,29 @@ struct argp_state
error_t argp_parse (struct argp *argp, int argc, char **argv, unsigned flags,
int *arg_index);
-/* Flags for argp_usage: */
-#define ARGP_USAGE_USAGE 0x01 /* Print a Usage: message. */
-#define ARGP_USAGE_SEE 0x02 /* Print a `for more help...' message. */
-#define ARGP_USAGE_HELP 0x04 /* Print a long help message. */
-#define ARGP_USAGE_EXIT_ERR 0x08 /* Call exit(1) instead of returning. */
-#define ARGP_USAGE_EXIT_OK 0x10 /* Call exit(0) instead of returning. */
+/* Flags for argp_help: */
+#define ARGP_HELP_USAGE 0x01 /* Print a Usage: message. */
+#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
+#define ARGP_HELP_SEE 0x04 /* Print a `for more help...' message. */
+#define ARGP_HELP_LONG 0x08 /* Print a long help message. */
+#define ARGP_HELP_EXIT_ERR 0x10 /* Call exit(1) instead of returning. */
+#define ARGP_HELP_EXIT_OK 0x20 /* Call exit(0) instead of returning. */
+
+/* If used as a flag to argp_help, this has the same effect as
+ ARGP_HELP_EXIT_ERR. However it can be used to clear both types of exit
+ flags at once. */
+#define ARGP_HELP_EXIT (ARGP_HELP_EXIT_ERR | ARGP_HELP_EXIT_OK)
/* The standard thing to do after a program command line parsing error. */
-#define ARGP_USAGE_STD \
- (ARGP_USAGE_USAGE | ARGP_USAGE_SEE | ARGP_USAGE_EXIT_ERR)
+#define ARGP_HELP_STD_ERR \
+ (ARGP_HELP_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
/* The standard thing to do in response to a --help option. */
-#define ARGP_USAGE_STD_HELP \
- (ARGP_USAGE_USAGE | ARGP_USAGE_HELP | ARGP_USAGE_EXIT_OK)
+#define ARGP_HELP_STD_HELP \
+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK)
/* Output a usage message for ARGP to STREAM. FLAGS are from the set
- ARGP_USAGE_*. */
-void argp_usage (struct argp *argp, FILE *stream, unsigned flags);
+ ARGP_HELP_*. */
+void argp_help (struct argp *argp, FILE *stream, unsigned flags);
/* Returns true if the option OPT is a valid short option. */
extern inline int