5a88c2df6b83b9a12cb18ccd2842b2babf595ab5
[platform/upstream/libwebsockets.git] / win32port / win32helpers / getopt.h
1 #ifndef __GETOPT_H__\r
2 #define __GETOPT_H__\r
3 \r
4 #ifdef __cplusplus\r
5 extern "C" {\r
6 #endif\r
7 \r
8 extern int opterr;              /* if error message should be printed */\r
9 extern int optind;              /* index into parent argv vector */\r
10 extern int optopt;              /* character checked for validity */\r
11 extern int optreset;            /* reset getopt */\r
12 extern char *optarg;            /* argument associated with option */\r
13 \r
14 struct option\r
15 {\r
16   const char *name;\r
17   int has_arg;\r
18   int *flag;\r
19   int val;\r
20 };\r
21 \r
22 #define no_argument       0\r
23 #define required_argument 1\r
24 #define optional_argument 2\r
25 \r
26 int getopt(int, char**, char*);\r
27 int getopt_long(int, char**, char*, struct option*, int*);\r
28 \r
29 #ifdef __cplusplus\r
30 }\r
31 #endif\r
32 \r
33 #endif /* __GETOPT_H__ */\r