aboutsummaryrefslogtreecommitdiff
path: root/src/_usage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/_usage.h')
-rw-r--r--src/_usage.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/_usage.h b/src/_usage.h
new file mode 100644
index 00000000..56ea8f6e
--- /dev/null
+++ b/src/_usage.h
@@ -0,0 +1,18 @@
+/*
+ * @file _usage.h
+ * @brief standardize help/usage output across all our programs
+ * @internal
+ *
+ * Copyright 2007 Gentoo Foundation
+ * Released under the GPLv2
+ */
+
+#define getoptstring_COMMON "Ch"
+#define longopts_COMMON \
+ { "help", 0, NULL, 'h'}, \
+ { "nocolor", 0, NULL, 'C'},
+
+#define case_RC_COMMON_GETOPT \
+ case 'C': setenv ("RC_NOCOLOR", "yes", 1); break; \
+ case 'h': usage (EXIT_SUCCESS); \
+ default: usage (EXIT_FAILURE);