diff options
author | heretic <heretic@yandex-team.ru> | 2022-02-10 16:45:43 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:43 +0300 |
commit | 397cbe258b9e064f49c4ca575279f02f39fef76e (patch) | |
tree | a0b0eb3cca6a14e4e8ea715393637672fa651284 /tools/rorescompiler | |
parent | 43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff) | |
download | ydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz |
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'tools/rorescompiler')
-rw-r--r-- | tools/rorescompiler/main.cpp | 52 | ||||
-rw-r--r-- | tools/rorescompiler/ya.make | 6 |
2 files changed, 29 insertions, 29 deletions
diff --git a/tools/rorescompiler/main.cpp b/tools/rorescompiler/main.cpp index 7ca5346e4c..8eb756cac1 100644 --- a/tools/rorescompiler/main.cpp +++ b/tools/rorescompiler/main.cpp @@ -1,15 +1,15 @@ #include <library/cpp/resource/registry.h> - -#include <util/digest/city.h> -#include <util/stream/output.h> -#include <util/stream/file.h> + +#include <util/digest/city.h> +#include <util/stream/output.h> +#include <util/stream/file.h> #include <util/string/escape.h> -#include <util/string/vector.h> +#include <util/string/vector.h> #include <util/string/split.h> - -using namespace NResource; - -void GenOne(const TString& raw, const TString& key, IOutputStream& out) { + +using namespace NResource; + +void GenOne(const TString& raw, const TString& key, IOutputStream& out) { TString size = raw + "Size"; TString name = ToString(CityHash64(key.data(), key.size())); out << "extern \"C\" const char " << raw << "[];\n" @@ -17,23 +17,23 @@ void GenOne(const TString& raw, const TString& key, IOutputStream& out) { << "static const NResource::TRegHelper REG_name" << name << "(\"" << EscapeC(key) << "\", TStringBuf(" << raw << ", " << size << "));\n" << "\n"; -}; - -int main(int argc, char** argv) { - if (argc < 3) { - Cerr << "usage: " << argv[0] << " outfile [key=value]+" << Endl; - - return 1; - } - +}; + +int main(int argc, char** argv) { + if (argc < 3) { + Cerr << "usage: " << argv[0] << " outfile [key=value]+" << Endl; + + return 1; + } + TFixedBufferFileOutput out(argv[1]); - - argv = argv + 2; + + argv = argv + 2; out << "#include <library/cpp/resource/registry.h>\n\n"; - - while (*argv) { + + while (*argv) { TVector<TString> items = StringSplitter(TString(*(argv))).Split('=').Limit(2).ToList<TString>(); - GenOne(items[0], items[1], out); - argv++; - } -} + GenOne(items[0], items[1], out); + argv++; + } +} diff --git a/tools/rorescompiler/ya.make b/tools/rorescompiler/ya.make index 7e372666f9..55640d731a 100644 --- a/tools/rorescompiler/ya.make +++ b/tools/rorescompiler/ya.make @@ -1,13 +1,13 @@ OWNER(heretic g:ymake) - + IF (USE_PREBUILT_TOOLS) INCLUDE(${ARCADIA_ROOT}/build/prebuilt/tools/rorescompiler/ya.make.prebuilt) ENDIF() - + IF (NOT PREBUILT) INCLUDE(${ARCADIA_ROOT}/tools/rorescompiler/bin/ya.make) ENDIF() - + RECURSE( bin ) |