ladybird/Userland/Libraries/LibC/getopt.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

32 lines
581 B
C

/*
* Copyright (c) 2020, Sergey Bugaev <bugaevc@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <sys/cdefs.h>
__BEGIN_DECLS
#define no_argument 0
#define required_argument 1
#define optional_argument 2
struct option {
const char* name;
int has_arg;
int* flag;
int val;
};
extern int opterr;
extern int optopt;
extern int optind;
extern int optreset;
extern char* optarg;
int getopt_long(int argc, char* const* argv, const char* short_options, const struct option* long_options, int* out_long_option_index);
__END_DECLS