]>
git.saurik.com Git - apple/shell_cmds.git/blob - getopt/getopt.c
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 $");
12 int main
__P((int, char **));
22 optind
= 2; /* Past the program name and the option letters. */
23 while ((c
= getopt(argc
, argv
, argv
[1])) != -1)
26 status
= 1; /* getopt routine gave message */
30 printf(" -%c %s", c
, optarg
);
36 for (; optind
< argc
; optind
++)
37 printf(" %s", argv
[optind
]);