2007-09-25 21:08:21 +05:30
|
|
|
/*!
|
2007-04-17 18:14:32 +05:30
|
|
|
* @file _usage.c
|
|
|
|
* @brief standardize help/usage output across all our programs
|
|
|
|
* @internal
|
|
|
|
*
|
|
|
|
* Copyright 2007 Gentoo Foundation
|
|
|
|
* Released under the GPLv2
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void usage (int exit_status)
|
|
|
|
{
|
|
|
|
int i;
|
2007-09-21 17:22:37 +05:30
|
|
|
printf ("Usage: " APPLET " [options] ");
|
|
|
|
#ifdef extraopts
|
|
|
|
printf (extraopts);
|
|
|
|
#endif
|
|
|
|
printf ("\n\nOptions: [" getoptstring "]\n");
|
2007-04-17 18:14:32 +05:30
|
|
|
for (i = 0; longopts[i].name; ++i)
|
|
|
|
printf (" -%c, --%s\n", longopts[i].val, longopts[i].name);
|
|
|
|
exit (exit_status);
|
|
|
|
}
|
|
|
|
|