diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-20 13:25:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-20 13:25:21 +0300 |
commit | 509fbd91ed545d05cc266a80ec19fe7b9c9d28db (patch) | |
tree | 09c2d97d212c0820f6d5e85d7e583b8a56b26ef8 /src/mir_core | |
parent | c90b4443c10b08eeae9466428255fe8ff7b48d6d (diff) |
we don't need two name sets for the same array of functions
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/langpack.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 14 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 14 | ||||
-rw-r--r-- | src/mir_core/src/utf.cpp | 32 |
4 files changed, 31 insertions, 31 deletions
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 5e6f4ad62b..d924f13f6d 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -366,7 +366,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start lpinfo.szAuthors = szAuthors;
- ptrW buf(Utf8DecodeW(szLanguage));
+ ptrW buf(mir_utf8decodeW(szLanguage));
if (buf)
wcsncpy_s(lpinfo.tszLanguage, buf, _TRUNCATE);
else if (lpinfo.Locale != 0)
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 5fafb02730..7e9b81dd67 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -60,14 +60,14 @@ TranslateA_LP @63 TranslateDialog_LP @64
TranslateMenu_LP @65
TranslateW_LP @66
-Ucs2toUtf8Len @67
+mir_utf8lenW @67
UnhookEvent @68
-Utf8Decode @70
-Utf8DecodeCP @71
-Utf8DecodeW @72
-Utf8Encode @73
-Utf8EncodeCP @74
-Utf8EncodeW @75
+mir_utf8decode @70
+mir_utf8decodecp @71
+mir_utf8decodeW @72
+mir_utf8encode @73
+mir_utf8encodecp @74
+mir_utf8encodeW @75
mir_forkthread @76
mir_forkthreadex @77
ltrim @78
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 8b92b73dec..0a3759fa9f 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -60,14 +60,14 @@ TranslateA_LP @63 TranslateDialog_LP @64
TranslateMenu_LP @65
TranslateW_LP @66
-Ucs2toUtf8Len @67
+mir_utf8lenW @67
UnhookEvent @68
-Utf8Decode @70
-Utf8DecodeCP @71
-Utf8DecodeW @72
-Utf8Encode @73
-Utf8EncodeCP @74
-Utf8EncodeW @75
+mir_utf8decode @70
+mir_utf8decodecp @71
+mir_utf8decodeW @72
+mir_utf8encode @73
+mir_utf8encodecp @74
+mir_utf8encodeW @75
mir_forkthread @76
mir_forkthreadex @77
ltrim @78
diff --git a/src/mir_core/src/utf.cpp b/src/mir_core/src/utf.cpp index a5c1f8cca0..580bf35db9 100644 --- a/src/mir_core/src/utf.cpp +++ b/src/mir_core/src/utf.cpp @@ -60,7 +60,7 @@ static unsigned int getSurrogateValue(const wchar_t *src, unsigned int srclen) }
/* query necessary dst length for src string */
-static int Ucs2toUtf8Len(const wchar_t *src, unsigned int srclen)
+static int mir_utf8len(const wchar_t *src, unsigned int srclen)
{
int len;
unsigned int val;
@@ -88,12 +88,12 @@ static int Ucs2toUtf8Len(const wchar_t *src, unsigned int srclen) return len;
}
-MIR_CORE_DLL(int) Ucs2toUtf8Len(const wchar_t *src)
+MIR_CORE_DLL(int) mir_utf8lenW(const wchar_t *src)
{
if (src == nullptr)
return 0;
- return Ucs2toUtf8Len(src, (int)wcslen(src));
+ return mir_utf8len(src, (int)wcslen(src));
}
/* wide char to UTF-8 string conversion */
@@ -236,9 +236,9 @@ MIR_CORE_DLL(int) Utf8toUcs2(const char *src, size_t srclen, wchar_t *dst, size_ }
/////////////////////////////////////////////////////////////////////////////////////////
-// Utf8Decode - converts UTF8-encoded string to the UCS2/MBCS format
+// mir_utf8decode - converts UTF8-encoded string to the UCS2/MBCS format
-MIR_CORE_DLL(char*) Utf8DecodeCP(char *str, int codepage, wchar_t **ucs2)
+MIR_CORE_DLL(char*) mir_utf8decodecp(char *str, int codepage, wchar_t **ucs2)
{
bool needs_free = false;
wchar_t* tempBuf = nullptr;
@@ -291,12 +291,12 @@ MIR_CORE_DLL(char*) Utf8DecodeCP(char *str, int codepage, wchar_t **ucs2) return str;
}
-MIR_CORE_DLL(char*) Utf8Decode(char *str, wchar_t **ucs2)
+MIR_CORE_DLL(char*) mir_utf8decode(char *str, wchar_t **ucs2)
{
- return Utf8DecodeCP(str, Langpack_GetDefaultCodePage(), ucs2);
+ return mir_utf8decodecp(str, Langpack_GetDefaultCodePage(), ucs2);
}
-MIR_CORE_DLL(wchar_t*) Utf8DecodeW(const char *str)
+MIR_CORE_DLL(wchar_t*) mir_utf8decodeW(const char *str)
{
if (str == nullptr)
return nullptr;
@@ -322,9 +322,9 @@ MIR_CORE_DLL(wchar_t*) Utf8DecodeW(const char *str) }
/////////////////////////////////////////////////////////////////////////////////////////
-// Utf8Encode - converts MBCS string to the UTF8-encoded format
+// mir_utf8encode - converts MBCS string to the UTF8-encoded format
-MIR_CORE_DLL(char*) Utf8EncodeCP(const char* src, int codepage)
+MIR_CORE_DLL(char*) mir_utf8encodecp(const char* src, int codepage)
{
int len;
bool needs_free = false;
@@ -348,7 +348,7 @@ MIR_CORE_DLL(char*) Utf8EncodeCP(const char* src, int codepage) len = MultiByteToWideChar(codepage, 0, src, -1, tempBuf, len + 1);
- int destlen = Ucs2toUtf8Len(tempBuf, len);
+ int destlen = mir_utf8len(tempBuf, len);
if (destlen >= 0) {
result = (char*)mir_alloc(destlen + 1);
if (result) {
@@ -363,22 +363,22 @@ MIR_CORE_DLL(char*) Utf8EncodeCP(const char* src, int codepage) return result;
}
-MIR_CORE_DLL(char*) Utf8Encode(const char* src)
+MIR_CORE_DLL(char*) mir_utf8encode(const char* src)
{
- return Utf8EncodeCP(src, Langpack_GetDefaultCodePage());
+ return mir_utf8encodecp(src, Langpack_GetDefaultCodePage());
}
/////////////////////////////////////////////////////////////////////////////////////////
-// Utf8Encode - converts UCS2 string to the UTF8-encoded format
+// mir_utf8encode - converts UCS2 string to the UTF8-encoded format
-MIR_CORE_DLL(char*) Utf8EncodeW(const wchar_t* src)
+MIR_CORE_DLL(char*) mir_utf8encodeW(const wchar_t* src)
{
if (src == nullptr)
return nullptr;
int len = (int)wcslen(src);
- int destlen = Ucs2toUtf8Len(src, len);
+ int destlen = mir_utf8len(src, len);
if (destlen < 0) return nullptr;
char* result = (char*)mir_alloc(destlen + 1);
|