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