blob: 5b24cc8c0ab9f7d0a7e0e6bfc22225342638d368 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef _GETOPT_H
#define _GETOPT_H
#include <mlibc-config.h>
#ifdef __cplusplus
extern "C" {
#endif
struct option {
const char *name;
int has_arg;
int *flag;
int val;
};
#ifndef __MLIBC_ABI_ONLY
extern char **environ;
extern char *optarg;
extern int optind;
extern int opterr;
extern int optopt;
#if __MLIBC_BSD_OPTION
extern int optreset;
#endif //__MLIBC_BSD_OPTION
int getopt(int, char *const [], const char *);
int getopt_long(int, char *const[], const char *, const struct option *, int *);
int getopt_long_only(int, char *const[], const char *, const struct option *, int *);
#endif /* !__MLIBC_ABI_ONLY */
#define no_argument 0
#define required_argument 1
#define optional_argument 2
#ifdef __cplusplus
}
#endif
#endif // _GETOPT_H
|