/[baselayout]/trunk/src/_usage.c
Gentoo

Contents of /trunk/src/_usage.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2619 - (show annotations) (download) (as text)
Tue Apr 17 13:00:05 2007 UTC (7 years, 2 months ago) by vapier
File MIME type: text/x-csrc
File size: 527 byte(s)
remove APPLET check so we can create .depend
1 /*
2 * @file _usage.c
3 * @brief standardize help/usage output across all our programs
4 * @internal
5 *
6 * Copyright 2007 Gentoo Foundation
7 * Released under the GPLv2
8 */
9
10 static void usage (int exit_status)
11 {
12 int i;
13 printf ("Usage: " APPLET " [options]\n\n");
14 printf ("Options: [" getoptstring "]\n");
15 for (i = 0; longopts[i].name; ++i)
16 printf (" -%c, --%s\n", longopts[i].val, longopts[i].name);
17 exit (exit_status);
18 }
19
20 #define case_RC_COMMON_GETOPT \
21 case 'h': usage (EXIT_SUCCESS); \
22 default: usage (EXIT_FAILURE);

  ViewVC Help
Powered by ViewVC 1.1.20