1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 int getopt(int, char* const[], const char*);
8 extern char* optarg;
9 extern int optind, opterr, optopt, optreset;
10 
11 struct option {
12     const char* name;
13     int has_arg;
14     int* flag;
15     int val;
16 };
17 
18 int getopt_long(int, char* const*, const char*, const struct option*, int*);
19 int getopt_long_only(int, char* const*, const char*, const struct option*, int*);
20 
21 #define no_argument 0
22 #define required_argument 1
23 #define optional_argument 2
24 
25 #ifdef __cplusplus
26 }
27 #endif
28