From cd7accd4465ba51d3435ca90c8a474d5784747d1 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 20 Aug 2011 19:25:46 +0200 Subject: arch: start using arch as a usage() example The arch command is hijacked to be example of howto write usage as defined in Documentation/howto-usage-function.txt Signed-off-by: Sami Kerola --- include/c.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/c.h') diff --git a/include/c.h b/include/c.h index a9cd1f3f5..975cc1bf4 100644 --- a/include/c.h +++ b/include/c.h @@ -210,4 +210,17 @@ static inline int dirfd(DIR *d) #define IUTF8 0040000 #endif +/* + * Constant strings for usage() functions. For more info see + * Documentation/howto-usage-function.txt and sys-utils/arch.c + */ +#define USAGE_HEADER _("\nUsage:\n") +#define USAGE_OPTIONS _("\nOptions:\n") +#define USAGE_HELP _(" -h, --help display this help and exit\n") +#define USAGE_VERSION _(" -V, --version output version information and exit\n") +#define USAGE_BEGIN_TAIL _("\n") +#define USAGE_MAN_TAIL _("For more details see %s.\n") + +#define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING + #endif /* UTIL_LINUX_C_H */ -- cgit v1.2.3-55-g7522