From e26e85deb8d18ed99f94a50fd819886673d35c6a Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 11 Oct 2020 10:33:02 +0300 Subject: Some unicode funcs belong to Font.cpp + small fix --- src/text/Text.cpp | 30 ++---------------------------- src/text/Text.h | 4 ---- 2 files changed, 2 insertions(+), 32 deletions(-) (limited to 'src/text') diff --git a/src/text/Text.cpp b/src/text/Text.cpp index a4f2af7f..f3324fd7 100644 --- a/src/text/Text.cpp +++ b/src/text/Text.cpp @@ -278,12 +278,6 @@ CData::Unload(void) numChars = 0; } -void -AsciiToUnicode(const char *src, wchar *dst) -{ - while((*dst++ = (unsigned char)*src++) != '\0'); -} - char* UnicodeToAscii(wchar *src) { @@ -307,7 +301,7 @@ UnicodeToAsciiForSaveLoad(wchar *src) { static char aStr[256]; int len; - for(len = 0; *src != '\0' && len < 256-1; len++, src++) + for(len = 0; *src != '\0' && len < 256; len++, src++) if(*src < 256) aStr[len] = *src; else @@ -321,7 +315,7 @@ UnicodeToAsciiForMemoryCard(wchar *src) { static char aStr[256]; int len; - for(len = 0; *src != '\0' && len < 256-1; len++, src++) + for(len = 0; *src != '\0' && len < 256; len++, src++) if(*src < 256) aStr[len] = *src; else @@ -330,26 +324,6 @@ UnicodeToAsciiForMemoryCard(wchar *src) return aStr; } -void -UnicodeStrcpy(wchar *dst, const wchar *src) -{ - while((*dst++ = *src++) != '\0'); -} - -void -UnicodeStrcat(wchar *dst, wchar *append) -{ - UnicodeStrcpy(&dst[UnicodeStrlen(dst)], append); -} - -int -UnicodeStrlen(const wchar *str) -{ - int len; - for(len = 0; *str != '\0'; len++, str++); - return len; -} - void TextCopy(wchar *dst, const wchar *src) { diff --git a/src/text/Text.h b/src/text/Text.h index 4be9b6e6..52c17e27 100644 --- a/src/text/Text.h +++ b/src/text/Text.h @@ -1,12 +1,8 @@ #pragma once -void AsciiToUnicode(const char *src, wchar *dst); char *UnicodeToAscii(wchar *src); char *UnicodeToAsciiForSaveLoad(wchar *src); char *UnicodeToAsciiForMemoryCard(wchar *src); -void UnicodeStrcpy(wchar *dst, const wchar *src); -void UnicodeStrcat(wchar *dst, wchar *append); -int UnicodeStrlen(const wchar *str); void TextCopy(wchar *dst, const wchar *src); struct CKeyEntry -- cgit v1.2.3