diff options
-rw-r--r-- | bin10/lib/mir_core.lib | bin | 44528 -> 44528 bytes | |||
-rw-r--r-- | bin10/lib/mir_core64.lib | bin | 40498 -> 40498 bytes | |||
-rw-r--r-- | bin11/lib/mir_core.lib | bin | 44528 -> 44528 bytes | |||
-rw-r--r-- | bin11/lib/mir_core64.lib | bin | 40498 -> 40498 bytes | |||
-rw-r--r-- | include/delphi/m_core.inc | 8 | ||||
-rw-r--r-- | include/m_core.h | 10 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/mir_string.cpp | 28 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/mir_string.h | 3 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_string.cpp | 28 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_string.h | 3 | ||||
-rw-r--r-- | src/mir_core/memory.cpp | 4 | ||||
-rw-r--r-- | src/mir_core/mir_core.def | 4 |
12 files changed, 16 insertions, 72 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib Binary files differindex a9d15b95ce..6f0a88799a 100644 --- a/bin10/lib/mir_core.lib +++ b/bin10/lib/mir_core.lib diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib Binary files differindex 0cfbd1b1a3..243e6c01ff 100644 --- a/bin10/lib/mir_core64.lib +++ b/bin10/lib/mir_core64.lib diff --git a/bin11/lib/mir_core.lib b/bin11/lib/mir_core.lib Binary files differindex c1288e866a..f4719e3372 100644 --- a/bin11/lib/mir_core.lib +++ b/bin11/lib/mir_core.lib diff --git a/bin11/lib/mir_core64.lib b/bin11/lib/mir_core64.lib Binary files differindex cfb841ed22..243e6c01ff 100644 --- a/bin11/lib/mir_core64.lib +++ b/bin11/lib/mir_core64.lib diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 921f3e64b2..94ac1a7089 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -514,12 +514,12 @@ function PathToRelativeW(const pSrc:pWideChar; pOut:pWideChar):int; stdcall; function mir_snprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar{, ...}):int; stdcall;
external CoreDLL name 'mir_snprintf';
-function mir_sntprintf(buffer:pWideChar;count:size_t;fmt:pWideChar{, ...}):int; stdcall;
- external CoreDLL name 'mir_sntprintf';
+function mir_snwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar{, ...}):int; stdcall;
+ external CoreDLL name 'mir_snwprintf';
function mir_vsnprintf(buffer:pAnsiChar;count:size_t;fmt:pAnsiChar;va:va_list):int; stdcall;
external CoreDLL name 'mir_vsnprintf';
-function mir_vsntprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):int; stdcall;
- external CoreDLL name 'mir_vsntprintf';
+function mir_vsnwprintf(buffer:pWideChar;count:size_t;fmt:pWideChar;va:va_list):int; stdcall;
+ external CoreDLL name 'mir_vsnwprintf';
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_core.h b/include/m_core.h index b0bc86a244..3167bc514b 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -588,9 +588,9 @@ MIR_CORE_DLL(int) PathToRelativeW(const WCHAR *pSrc, WCHAR *pOut); // print functions
MIR_CORE_DLL(int) mir_snprintf(char *buffer, size_t count, const char* fmt, ...);
-MIR_CORE_DLL(int) mir_sntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, ...);
+MIR_CORE_DLL(int) mir_snwprintf(WCHAR *buffer, size_t count, const WCHAR* fmt, ...);
MIR_CORE_DLL(int) mir_vsnprintf(char *buffer, size_t count, const char* fmt, va_list va);
-MIR_CORE_DLL(int) mir_vsntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, va_list va);
+MIR_CORE_DLL(int) mir_vsnwprintf(WCHAR *buffer, size_t count, const WCHAR* fmt, va_list va);
///////////////////////////////////////////////////////////////////////////////
// protocol functions
@@ -733,6 +733,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define wildcmpt wildcmpw
#define wildcmpit wildcmpiw
+
+ #define mir_sntprintf mir_snwprintf
+ #define mir_vsntprintf mir_vsnwprintf
#else
#define mir_t2a(s) mir_strdup(s)
#define mir_a2t(s) mir_strdup(s)
@@ -754,6 +757,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define wildcmpt wildcmp
#define wildcmpit wildcmpi
+
+ #define mir_sntprintf mir_snprintf
+ #define mir_vsntprintf mir_vsnprintf
#endif
MIR_CORE_DLL(WCHAR*) mir_a2u_cp(const char* src, int codepage);
diff --git a/plugins/SendScreenshotPlus/src/mir_string.cpp b/plugins/SendScreenshotPlus/src/mir_string.cpp index 362b09067f..251b5fd45e 100644 --- a/plugins/SendScreenshotPlus/src/mir_string.cpp +++ b/plugins/SendScreenshotPlus/src/mir_string.cpp @@ -103,34 +103,6 @@ char *mir_strnerase(char *pszDest, size_t sizeFrom, size_t sizeTo) { return pszDest;
}
-size_t mir_vsnwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, va_list& argList)
-{
- size_t iRet, cchMax;
-
- if (!pszDest || !pszFormat || !*pszFormat)
- return -1;
-
- cchMax = cchDest - 1;
- iRet = _vsnwprintf(pszDest, cchMax, pszFormat, argList);
- if (iRet < 0) pszDest[0] = 0;
- else if (iRet >= cchMax) {
- pszDest[cchMax] = 0;
- iRet = cchMax;
- }
- return iRet;
-}
-
-size_t mir_snwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, ...)
-{
- size_t iRet;
- va_list argList;
-
- va_start(argList, pszFormat);
- iRet = mir_vsnwprintf(pszDest, cchDest, pszFormat, argList);
- va_end(argList);
- return iRet;
-}
-
//---------------------------------------------------------------------------
void mir_stradd(char* &pszDest, const char *pszSrc)
{
diff --git a/plugins/SendScreenshotPlus/src/mir_string.h b/plugins/SendScreenshotPlus/src/mir_string.h index 00f4088056..c560048147 100644 --- a/plugins/SendScreenshotPlus/src/mir_string.h +++ b/plugins/SendScreenshotPlus/src/mir_string.h @@ -76,9 +76,6 @@ wchar_t * mir_wcsncat(wchar_t *pszDest, const wchar_t *pszSrc, const size_t cchD char * mir_strncat_c(char *pszDest, const char cSrc);
char * mir_wcsncat_c(char *pszDest, const char cSrc);
-size_t mir_vsnwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, va_list& argList);
-size_t mir_snwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, ...);
-
char * mir_strnerase(char *pszDest, size_t sizeFrom, size_t sizeTo);
void mir_stradd(char * &pszDest, const char *pszSrc);
diff --git a/plugins/UserInfoEx/src/mir_string.cpp b/plugins/UserInfoEx/src/mir_string.cpp index c538c110ad..206b16a609 100644 --- a/plugins/UserInfoEx/src/mir_string.cpp +++ b/plugins/UserInfoEx/src/mir_string.cpp @@ -98,34 +98,6 @@ char *mir_strnerase(char *pszDest, size_t sizeFrom, size_t sizeTo) { return pszDest;
}
-size_t mir_vsnwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, va_list& argList)
-{
- size_t iRet, cchMax;
-
- if (!pszDest || !pszFormat || !*pszFormat)
- return -1;
-
- cchMax = cchDest - 1;
- iRet = _vsnwprintf(pszDest, cchMax, pszFormat, argList);
- if (iRet < 0) pszDest[0] = 0;
- else if (iRet >= cchMax) {
- pszDest[cchMax] = 0;
- iRet = cchMax;
- }
- return iRet;
-}
-
-size_t mir_snwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, ...)
-{
- size_t iRet;
- va_list argList;
-
- va_start(argList, pszFormat);
- iRet = mir_vsnwprintf(pszDest, cchDest, pszFormat, argList);
- va_end(argList);
- return iRet;
-}
-
int mir_IsEmptyA(char *str)
{
if (str == NULL || str[0] == 0)
diff --git a/plugins/UserInfoEx/src/mir_string.h b/plugins/UserInfoEx/src/mir_string.h index 61a1b623a6..3282e767e2 100644 --- a/plugins/UserInfoEx/src/mir_string.h +++ b/plugins/UserInfoEx/src/mir_string.h @@ -68,9 +68,6 @@ wchar_t * mir_wcsncat(wchar_t *pszDest, const wchar_t *pszSrc, const size_t cchD char * mir_strncat_c(char *pszDest, const char cSrc);
char * mir_wcsncat_c(char *pszDest, const char cSrc);
-size_t mir_vsnwprintf(wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, va_list& argList);
-size_t mir_snwprintf (wchar_t *pszDest, const size_t cchDest, const wchar_t *pszFormat, ...);
-
char * mir_strnerase(char *pszDest, size_t sizeFrom, size_t sizeTo);
int mir_IsEmptyA(char *str);
diff --git a/src/mir_core/memory.cpp b/src/mir_core/memory.cpp index 2f7467ccc4..ef3006aad3 100644 --- a/src/mir_core/memory.cpp +++ b/src/mir_core/memory.cpp @@ -208,7 +208,7 @@ MIR_CORE_DLL(int) mir_snprintf(char *buffer, size_t count, const char* fmt, ...) /******************************************************************************/
-MIR_CORE_DLL(int) mir_sntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, ...)
+MIR_CORE_DLL(int) mir_snwprintf(WCHAR *buffer, size_t count, const WCHAR* fmt, ...)
{
va_list va;
int len;
@@ -233,7 +233,7 @@ MIR_CORE_DLL(int) mir_vsnprintf(char *buffer, size_t count, const char* fmt, va_ /******************************************************************************/
-MIR_CORE_DLL(int) mir_vsntprintf(TCHAR *buffer, size_t count, const TCHAR* fmt, va_list va)
+MIR_CORE_DLL(int) mir_vsnwprintf(WCHAR *buffer, size_t count, const WCHAR* fmt, va_list va)
{
int len = _vsntprintf(buffer, count-1, fmt, va);
buffer[count-1] = 0;
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def index 35b7af1ad1..1423a8a086 100644 --- a/src/mir_core/mir_core.def +++ b/src/mir_core/mir_core.def @@ -99,13 +99,13 @@ mir_strndup @96 mir_u2a @97
mir_u2a_cp @98
mir_vsnprintf @99
-mir_vsntprintf @100
+mir_vsnwprintf @100
mir_wstrdup @101
rtrim @102
wildcmp @103
rtrimw @104
mir_snprintf @105
-mir_sntprintf @106
+mir_snwprintf @106
db_unset @107
db_free @108
db_get @109
|