aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/getopt/small
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small')
-rw-r--r--library/cpp/getopt/small/last_getopt_parser.cpp2
-rw-r--r--library/cpp/getopt/small/modchooser.cpp2
-rw-r--r--library/cpp/getopt/small/opt.cpp2
-rw-r--r--library/cpp/getopt/small/opt.h2
-rw-r--r--library/cpp/getopt/small/opt2.cpp18
5 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/getopt/small/last_getopt_parser.cpp b/library/cpp/getopt/small/last_getopt_parser.cpp
index aec0f97252..7668b12a03 100644
--- a/library/cpp/getopt/small/last_getopt_parser.cpp
+++ b/library/cpp/getopt/small/last_getopt_parser.cpp
@@ -232,7 +232,7 @@ namespace NLastGetopt {
Pos_ = pc;
bool r = ParseOptArg(Pos_);
- Y_ASSERT(r);
+ Y_ASSERT(r);
while (Pos_ == pc) {
Y_ASSERT(Sop_ > 0);
r = ParseShortOptWithinArg(Pos_, Sop_);
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp
index 91cc88dc22..2fa5cfd070 100644
--- a/library/cpp/getopt/small/modchooser.cpp
+++ b/library/cpp/getopt/small/modchooser.cpp
@@ -290,7 +290,7 @@ void TModChooser::PrintHelp(const TString& progName) const {
}
if (ShowSeparated) {
- for (const auto& unsortedMode : UnsortedModes)
+ for (const auto& unsortedMode : UnsortedModes)
if (!unsortedMode->Hidden) {
if (unsortedMode->Name.size()) {
Cerr << " " << unsortedMode->FormatFullName(maxModeLen + 4) << unsortedMode->Description << Endl;
diff --git a/library/cpp/getopt/small/opt.cpp b/library/cpp/getopt/small/opt.cpp
index 9cc4b9c6fe..744501765c 100644
--- a/library/cpp/getopt/small/opt.cpp
+++ b/library/cpp/getopt/small/opt.cpp
@@ -88,7 +88,7 @@ int Opt::Get(int* longOptionIndex) {
}
}
-void Opt::DummyHelp(IOutputStream& os) {
+void Opt::DummyHelp(IOutputStream& os) {
Opts_->PrintUsage(GetProgramName(), os);
}
diff --git a/library/cpp/getopt/small/opt.h b/library/cpp/getopt/small/opt.h
index ad057edb67..ecb57439bc 100644
--- a/library/cpp/getopt/small/opt.h
+++ b/library/cpp/getopt/small/opt.h
@@ -106,7 +106,7 @@ public:
int GetArgC() const;
const char** GetArgV() const;
- void DummyHelp(IOutputStream& os = Cerr);
+ void DummyHelp(IOutputStream& os = Cerr);
};
// call before getopt. returns non-negative int, removing it from arguments (not found: -1)
diff --git a/library/cpp/getopt/small/opt2.cpp b/library/cpp/getopt/small/opt2.cpp
index c3316ffe04..0cdc774e78 100644
--- a/library/cpp/getopt/small/opt2.cpp
+++ b/library/cpp/getopt/small/opt2.cpp
@@ -272,16 +272,16 @@ int Opt2::AutoUsage(const char* free_arg_names) {
fprintf(where, "Usage: %s%s%s%s%s%s%s%s\n", prog, req ? " -" : "", req_str,
nreq ? " [-" : "", nreq_str, nreq ? "]" : "",
free_arg_names && *free_arg_names ? " " : "", free_arg_names);
- for (auto& spec : Specs) {
+ for (auto& spec : Specs) {
const char* hlp = !spec.HelpUsage.empty() ? spec.HelpUsage.data() : spec.HasArg ? "<arg>" : "";
- if (!spec.HasArg || spec.IsRequired)
- fprintf(where, " -%c %s\n", spec.opt, hlp);
- else if (!spec.IsNumeric)
- fprintf(where, " -%c %s [Default: %s]\n", spec.opt, hlp, spec.DefValue);
+ if (!spec.HasArg || spec.IsRequired)
+ fprintf(where, " -%c %s\n", spec.opt, hlp);
+ else if (!spec.IsNumeric)
+ fprintf(where, " -%c %s [Default: %s]\n", spec.opt, hlp, spec.DefValue);
else
- fprintf(where, " -%c %s [Def.val: %li]\n", spec.opt, hlp, (long)(uintptr_t)spec.DefValue);
- if (spec.LongOptName)
- fprintf(where, " --%s%s - same as -%c\n", spec.LongOptName, spec.HasArg ? "=<argument>" : "", spec.opt);
+ fprintf(where, " -%c %s [Def.val: %li]\n", spec.opt, hlp, (long)(uintptr_t)spec.DefValue);
+ if (spec.LongOptName)
+ fprintf(where, " --%s%s - same as -%c\n", spec.LongOptName, spec.HasArg ? "=<argument>" : "", spec.opt);
}
if (OptionMissingArg)
fprintf(where, " *** Option '%c' is missing required argument\n", OptionMissingArg);
@@ -300,7 +300,7 @@ int Opt2::AutoUsage(const char* free_arg_names) {
fprintf(where, " *** %i free argument(s) supplied, expected %i to %i\n", (int)Pos.size(), MinArgs, MaxArgs);
if (BadPosCount && MinArgs == MaxArgs)
fprintf(where, " *** %i free argument(s) supplied, expected %i\n", (int)Pos.size(), MinArgs);
- for (const auto& userErrorMessage : UserErrorMessages)
+ for (const auto& userErrorMessage : UserErrorMessages)
fprintf(where, " *** %s\n", userErrorMessage.data());
return UnknownOption == '?' ? 1 : 2;
}