2023-08-15 05:22:58 +00:00
|
|
|
#ifndef COSMOPOLITAN_GETOPT_LONG2_H_
|
|
|
|
#define COSMOPOLITAN_GETOPT_LONG2_H_
|
2023-07-03 02:57:43 +00:00
|
|
|
#ifdef COSMOPOLITAN_GETOPT_H_
|
|
|
|
#error "don't mix getopt_long() with cosmo's getopt()"
|
|
|
|
#endif
|
2023-06-18 11:02:01 +00:00
|
|
|
|
|
|
|
#define no_argument 0
|
|
|
|
#define required_argument 1
|
|
|
|
#define optional_argument 2
|
|
|
|
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
|
|
|
struct option {
|
|
|
|
const char *name;
|
|
|
|
int has_arg;
|
|
|
|
int *flag;
|
|
|
|
int val;
|
|
|
|
};
|
|
|
|
|
|
|
|
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 *);
|
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
2023-08-15 05:22:58 +00:00
|
|
|
#endif /* COSMOPOLITAN_GETOPT_LONG2_H_ */
|