Add --nocolor to more programs

This commit is contained in:
Roy Marples 2007-06-28 15:44:38 +00:00
parent 0fdc53d54d
commit afaa27fd65

18
src/_usage.h Normal file
View File

@ -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);