ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
getopt.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef _WIN32
4
72// Simple getopt implementation for Windows
73// Based on public domain implementation
74
75#ifdef __cplusplus
76extern "C" {
77#endif
78
86extern char *optarg;
87
89extern int optind;
90
92extern int opterr;
93
95extern int optopt;
96
106struct option {
107 const char *name;
108 int has_arg;
109 int *flag;
110 int val;
111};
112
120#define no_argument 0
121
123#define required_argument 1
124
126#define optional_argument 2
127
155int getopt(int argc, char *const argv[], const char *optstring);
156
187int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex);
188
189#ifdef __cplusplus
190}
191#endif
192
193#endif // _WIN32