summaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/posix_getopt.h
diff options
context:
space:
mode:
authornga <[email protected]>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:48:09 +0300
commit1f553f46fb4f3c5eec631352cdd900a0709016af (patch)
treea231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/getopt/small/posix_getopt.h
parentc4de7efdedc25b49cbea74bd589eecb61b55b60a (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt/small/posix_getopt.h')
-rw-r--r--library/cpp/getopt/small/posix_getopt.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/getopt/small/posix_getopt.h b/library/cpp/getopt/small/posix_getopt.h
index e6af1e0284f..d26fa966419 100644
--- a/library/cpp/getopt/small/posix_getopt.h
+++ b/library/cpp/getopt/small/posix_getopt.h
@@ -1,32 +1,32 @@
#pragma once
-
-// implementation of posix getopt using last getopt for demonstration purposes
-
-#include "last_getopt.h"
-
-namespace NLastGetopt {
- extern char* optarg;
- extern int optind;
- extern int optopt;
- extern int opterr;
- extern int optreset;
-
- enum {
- no_argument = NO_ARGUMENT,
- required_argument = REQUIRED_ARGUMENT,
- optional_argument = OPTIONAL_ARGUMENT,
- };
-
- struct option {
- const char* name;
- int has_arg;
- int* flag;
- int val;
- };
-
- int getopt(int argc, char* const* argv, const char* optstring);
+
+// implementation of posix getopt using last getopt for demonstration purposes
+
+#include "last_getopt.h"
+
+namespace NLastGetopt {
+ extern char* optarg;
+ extern int optind;
+ extern int optopt;
+ extern int opterr;
+ extern int optreset;
+
+ enum {
+ no_argument = NO_ARGUMENT,
+ required_argument = REQUIRED_ARGUMENT,
+ optional_argument = OPTIONAL_ARGUMENT,
+ };
+
+ struct option {
+ const char* name;
+ int has_arg;
+ int* flag;
+ int val;
+ };
+
+ int getopt(int argc, char* const* argv, const char* optstring);
int getopt_long(int argc, char* const* argv, const char* optstring,
const struct option* longopts, int* longindex);
- int getopt_long_only(int argc, char* const* argv, const char* optstring,
+ int getopt_long_only(int argc, char* const* argv, const char* optstring,
const struct option* longopts, int* longindex);
-}
+}