2020-01-18 11:38:21 +03:00
|
|
|
/*
|
2020-05-29 22:15:08 +03:00
|
|
|
* Copyright (c) 2020, Sergey Bugaev <bugaevc@serenityos.org>
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2018-10-31 19:50:43 +03:00
|
|
|
#pragma once
|
|
|
|
|
2020-09-09 10:20:00 +03:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
2020-05-29 22:15:08 +03:00
|
|
|
__BEGIN_DECLS
|
|
|
|
|
2020-05-28 15:27:20 +03:00
|
|
|
#define no_argument 0
|
|
|
|
#define required_argument 1
|
|
|
|
#define optional_argument 2
|
2019-09-06 21:03:16 +03:00
|
|
|
|
|
|
|
struct option {
|
2020-05-28 15:27:20 +03:00
|
|
|
const char* name;
|
2019-09-06 21:03:16 +03:00
|
|
|
int has_arg;
|
|
|
|
int* flag;
|
|
|
|
int val;
|
|
|
|
};
|
|
|
|
|
2021-01-29 17:10:41 +03:00
|
|
|
extern int opterr;
|
|
|
|
extern int optopt;
|
|
|
|
extern int optind;
|
|
|
|
extern int optreset;
|
|
|
|
extern char* optarg;
|
2021-04-11 07:47:47 +03:00
|
|
|
int getopt_long(int argc, char* const* argv, const char* short_options, const struct option* long_options, int* out_long_option_index);
|
2018-10-31 19:50:43 +03:00
|
|
|
|
|
|
|
__END_DECLS
|