source: trunk/src/emx/include/getopt.h@ 18

Last change on this file since 18 was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 977 bytes
Line 
1/* getopt (emx+gcc) */
2
3#ifndef _GETOPT_H
4#define _GETOPT_H
5
6#if defined (__cplusplus)
7extern "C" {
8#endif
9
10extern char *optarg; /* argument of current option */
11extern int optind; /* index of next argument; default=0: initialize */
12extern int opterr; /* 0=disable error messages; default=1: enable */
13extern int optopt; /* option character which caused the error */
14extern char *optswchar; /* characters introducing options; default="-" */
15
16extern enum _optmode
17{
18 GETOPT_UNIX, /* options at start of argument list (default) */
19 GETOPT_ANY, /* move non-options to the end */
20 GETOPT_KEEP /* return options in order */
21} optmode;
22
23
24/* Note: The 2nd argument is not const as GETOPT_ANY reorders the
25 array pointed to. */
26
27int getopt (int, char **, __const__ char *);
28
29#if defined (__cplusplus)
30}
31#endif
32
33#endif /* not _GETOPT_H */
Note: See TracBrowser for help on using the repository browser.