home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_06
/
9n06076a
< prev
next >
Wrap
Text File
|
1990-03-01
|
455b
|
19 lines
Listing 1: Traditional getopt(3) Command Line Processing
=========================================================
while ((option = getopt (argc, argv, optstring)) != -1) {
switch (option) {
case 'a': ... ; break ; /* Options */
case 'b': ... ; break ;
...
case '?': ... error ...
default: break ;
}
}
while (optind < argc) { /* Non-option arguments */
... process argv[optind++] ...
}