diff options
author | melkov <[email protected]> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:14 +0300 |
commit | 2c532b38e6aeb4fd88531027c7335690fd34c4e5 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/charset | |
parent | 438546c8737d5c1fdeb31157dcf999717d930eec (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r-- | library/cpp/charset/codepage.cpp | 22 | ||||
-rw-r--r-- | library/cpp/charset/codepage.h | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp index 537a4f9f796..0431bef31bc 100644 --- a/library/cpp/charset/codepage.cpp +++ b/library/cpp/charset/codepage.cpp @@ -72,7 +72,7 @@ int CodePage::stricmp(const char* dst, const char* src) const { return f - l; } -int CodePage::strnicmp(const char* dst, const char* src, size_t len) const { +int CodePage::strnicmp(const char* dst, const char* src, size_t len) const { unsigned char f, l; if (len) { do { @@ -258,8 +258,8 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) { for (TxChar* s = str; s < e; s++) { if (Hi8(Lo16(*s)) == 0xF0) *s = (TxChar)cp->unicode[Lo8(Lo16(*s))]; // NOT mb compliant - } - } else if (enc == CODES_UTF8) { + } + } else if (enc == CODES_UTF8) { TxChar* s; TxChar* d; @@ -272,13 +272,13 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) { *d++ = BROKEN_RUNE; ++s; } - } - e = d; + } + e = d; } else if (enc == CODES_UNKNOWN) { for (TxChar* s = str; s < e; s++) { if (Hi8(Lo16(*s)) == 0xF0) *s = Lo8(Lo16(*s)); - } + } } else { Y_ASSERT(!SingleByteCodepage(enc)); @@ -307,13 +307,13 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) { *d++ = *s; } } - } - ee = e; -} - + } + ee = e; +} + void DecodeUnknownPlane(wchar16* str, wchar16*& ee, const ECharset enc) { DoDecodeUnknownPlane(str, ee, enc); -} +} void DecodeUnknownPlane(wchar32* str, wchar32*& ee, const ECharset enc) { DoDecodeUnknownPlane(str, ee, enc); } diff --git a/library/cpp/charset/codepage.h b/library/cpp/charset/codepage.h index 7b7d4ee48ce..30a02a46106 100644 --- a/library/cpp/charset/codepage.h +++ b/library/cpp/charset/codepage.h @@ -215,8 +215,8 @@ struct Encoder { void Tr(const wchar32* in, char* out, size_t len) const; void Tr(const wchar32* in, char* out) const; char* DefaultPlane; -}; - +}; + /*****************************************************************\ * struct Recoder * \*****************************************************************/ @@ -287,10 +287,10 @@ inline unsigned char CodePage::ToTitle(unsigned char ch) const { extern const CodePage& csYandex; /// these functions change (lowers) [end] position in case of utf-8 -/// null character is NOT assumed or written at [*end] +/// null character is NOT assumed or written at [*end] void DecodeUnknownPlane(wchar16* start, wchar16*& end, const ECharset enc4unk); void DecodeUnknownPlane(wchar32* start, wchar32*& end, const ECharset enc4unk); - + inline void ToLower(char* s, size_t n, const CodePage& cp = csYandex) { char* const e = s + n; for (; s != e; ++s) |