aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit980edcd3304699edf9d4e4d6a656e585028e2a72 (patch)
tree139f47f3911484ae9af0eb347b1a88bd6c4bb35f /library/cpp/getopt
parentb036a557f285146e5e35d4213e29a094ab907bcf (diff)
downloadydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/getopt')
-rw-r--r--library/cpp/getopt/small/opt.cpp6
-rw-r--r--library/cpp/getopt/small/opt2.cpp2
-rw-r--r--library/cpp/getopt/small/posix_getopt.cpp2
-rw-r--r--library/cpp/getopt/ut/opt2_ut.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/getopt/small/opt.cpp b/library/cpp/getopt/small/opt.cpp
index 744501765c..f54e008f79 100644
--- a/library/cpp/getopt/small/opt.cpp
+++ b/library/cpp/getopt/small/opt.cpp
@@ -63,7 +63,7 @@ int Opt::Get(int* longOptionIndex) {
try {
bool r = OptsParser_->Next();
- Ind = (int)OptsParser_->Pos_;
+ Ind = (int)OptsParser_->Pos_;
if (!r) {
return EOF;
} else {
@@ -74,7 +74,7 @@ int Opt::Get(int* longOptionIndex) {
} else {
const Ion* ion = (const Ion*)OptsParser_->CurOpt()->UserValue();
if (longOptionIndex) {
- *longOptionIndex = int(ion - Ions_);
+ *longOptionIndex = int(ion - Ions_);
}
char c = OptsParser_->CurOpt()->GetCharOr0();
return c != 0 ? c : ion->val;
@@ -93,7 +93,7 @@ void Opt::DummyHelp(IOutputStream& os) {
}
int Opt::GetArgC() const {
- return (int)OptsParser_->Argc_;
+ return (int)OptsParser_->Argc_;
}
const char** Opt::GetArgV() const {
diff --git a/library/cpp/getopt/small/opt2.cpp b/library/cpp/getopt/small/opt2.cpp
index 0cdc774e78..0f6eb6d179 100644
--- a/library/cpp/getopt/small/opt2.cpp
+++ b/library/cpp/getopt/small/opt2.cpp
@@ -45,7 +45,7 @@ void Opt2::EatArgv(const char* optspec, const char* long_alias) {
if (*s == '?' || *s == '-')
ythrow yexception() << "Opt2: Symbol '" << *s << "' can not be used in optspec because it is reserved";
Specs.push_back(Opt2Param());
- SpecsMap[(ui8)*s] = (ui8)Specs.size(); // actual index + 1
+ SpecsMap[(ui8)*s] = (ui8)Specs.size(); // actual index + 1
Specs.back().opt = *s;
if (s[1] == ':') {
Specs.back().HasArg = true;
diff --git a/library/cpp/getopt/small/posix_getopt.cpp b/library/cpp/getopt/small/posix_getopt.cpp
index bd06f3499f..c8cab678ac 100644
--- a/library/cpp/getopt/small/posix_getopt.cpp
+++ b/library/cpp/getopt/small/posix_getopt.cpp
@@ -48,7 +48,7 @@ namespace NLastGetopt {
return -1;
} else {
optarg = (char*)OptsParser->CurVal();
- optind = (int)OptsParser->Pos_;
+ optind = (int)OptsParser->Pos_;
if (longindex && OptsParser->CurOpt())
*longindex = (int)Opts->IndexOf(OptsParser->CurOpt());
return OptsParser->CurOpt() ? OptsParser->CurOpt()->GetCharOr0() : 1;
diff --git a/library/cpp/getopt/ut/opt2_ut.cpp b/library/cpp/getopt/ut/opt2_ut.cpp
index 0e7464747c..4f6ac64e29 100644
--- a/library/cpp/getopt/ut/opt2_ut.cpp
+++ b/library/cpp/getopt/ut/opt2_ut.cpp
@@ -36,9 +36,9 @@ Y_UNIT_TEST_SUITE(Opt2Test) {
UNIT_ASSERT_VALUES_EQUAL((void*)edef, e);
UNIT_ASSERT_VALUES_EQUAL(2u, opt.Pos.size());
- UNIT_ASSERT_STRINGS_EQUAL("zz", opt.Pos.at(0));
+ UNIT_ASSERT_STRINGS_EQUAL("zz", opt.Pos.at(0));
UNIT_ASSERT_VALUES_EQUAL((void*)argv[2], opt.Pos.at(0));
- UNIT_ASSERT_STRINGS_EQUAL("ww", opt.Pos.at(1));
+ UNIT_ASSERT_STRINGS_EQUAL("ww", opt.Pos.at(1));
UNIT_ASSERT_STRINGS_EQUAL("1", x.at(0));
UNIT_ASSERT_STRINGS_EQUAL("2", x.at(1));
}