1 /* $FreeBSD: src/usr.bin/getopt/getopt.c,v 1.4.2.2 2001/07/30 10:16:38 dd Exp $ */
2 /* $DragonFly: src/usr.bin/getopt/getopt.c,v 1.3 2003/10/04 20:36:45 hmp Exp $ */
8 main(int argc, char **argv)
13 optind = 2; /* Past the program name and the option letters. */
14 while ((c = getopt(argc, argv, argv[1])) != -1)
17 status = 1; /* getopt routine gave message */
21 printf(" -%c %s", c, optarg);
27 for (; optind < argc; optind++)
28 printf(" %s", argv[optind]);