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.4 2004/10/23 13:33:36 eirikn Exp $ */
9 main(int argc, char **argv)
14 optind = 2; /* Past the program name and the option letters. */
15 while ((c = getopt(argc, argv, argv[1])) != -1)
18 status = 1; /* getopt routine gave message */
22 printf(" -%c %s", c, optarg);
28 for (; optind < argc; optind++)
29 printf(" %s", argv[optind]);