]>
git.saurik.com Git - apple/shell_cmds.git/blob - getopt/getopt.c
7a977ea6052e134818a529c8d9066bbadef996d2
1 /* $NetBSD: getopt.c,v 1.5 1998/02/03 03:44:22 perry Exp $ */
5 __RCSID("$NetBSD: getopt.c,v 1.5 1998/02/03 03:44:22 perry Exp $");
13 int main
__P((int, char **));
23 optind
= 2; /* Past the program name and the option letters. */
24 while ((c
= getopt(argc
, argv
, argv
[1])) != -1)
27 status
= 1; /* getopt routine gave message */
31 printf(" -%c %s", c
, optarg
);
37 for (; optind
< argc
; optind
++)
38 printf(" %s", argv
[optind
]);