ba4f8f1d86fbf5c9c826e724cb4842730cf1bffd
[unix-history] / usr / src / admin / style / getopt
/*
* Main/getopt(3) fragment.
*
* @(#)getopt 5.3 (Berkeley) %G%
*/
#include <sys/types.h>
#include <stdlib.h>
void usage __P((void));
int
main(argc, argv)
int argc;
char *argv[];
{
int ch;
while ((ch = getopt(argc, argv, "")) != EOF)
switch (ch) {
case '':
break;
case '?':
default:
usage();
}
argc -= optind;
argv += optind;
}
void
usage()
{
(void)fprintf(stderr, "usage: program [-abc] [-f file]\n");
exit(1);
}