home *** CD-ROM | disk | FTP | other *** search
- extern char *optarg;
- extern int optind, opterr;
-
- extern int getopt(int argc, char *argv[], char *optstring);
- /* optstring are available letters for command line options.
- if the letter is followed by a colon (:), the next string
- will be put into "optarg" instead of interpreted.
- eg.
- ./booga -a -b -c fooga -d -- this won't be parsed
-
- if a, b, c, and d are the possible command-line options,
- optstring would be "abc:d". the -- seperates what is to be
- parsed from what isn't. optarg returns the char of the
- string interpreted, or -1 if there are no more, or '?'
- if there is an unknown option. Use repeated calls to
- getopt until either -1 or ? are returned to parse the entire
- arg list.
-
- */
-