summaryrefslogtreecommitdiff
path: root/plugins/ContactsPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/ContactsPlus/src/utils.cpp18
-rw-r--r--plugins/ContactsPlus/src/utils.h1
3 files changed, 2 insertions, 19 deletions
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 5ec4620b46..3cfdef9d1a 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -83,7 +83,7 @@ static int HookDBEventAdded(WPARAM wParam, LPARAM lParam)
cle.pszService = MS_CONTACTS_RECEIVE;
WCHAR tmp[MAX_PATH];
- _snprintfT(caToolTip, 64, "%s %s", SRCTranslateT("Contacts received from", tmp), (TCHAR*)GetContactDisplayNameT(hContact));
+ mir_sntprintf(caToolTip, SIZEOF(caToolTip), "%s %s", SRCTranslateT("Contacts received from", tmp), (TCHAR*)GetContactDisplayNameT(hContact));
cle.ptszTooltip = caToolTip;
cle.flags |= CLEF_UNICODE;
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp
index 6c3ac3d073..6490407faf 100644
--- a/plugins/ContactsPlus/src/utils.cpp
+++ b/plugins/ContactsPlus/src/utils.cpp
@@ -189,7 +189,7 @@ void UpdateDialogTitle(HWND hwndDlg, HANDLE hContact, char* pszTitleStart)
SetDlgItemTextT(hwndDlg, IDC_NAME, uid?uid:contactName);
szStatus = MirandaStatusToStringT(szProto==NULL ? ID_STATUS_OFFLINE:db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE));
- _snprintfT(newtitle, 256, "%s %s (%s)", SRCTranslateT(pszTitleStart, str), contactName, szStatus);
+ mir_sntprintf(newtitle, 256, "%s %s (%s)", SRCTranslateT(pszTitleStart, str), contactName, szStatus);
SAFE_FREE((void**)&uid);
SAFE_FREE((void**)&oldTitle);
@@ -339,22 +339,6 @@ TCHAR* __fastcall strcatT(TCHAR* dest, const TCHAR* src)
return dest;
}
-int _snprintfT(TCHAR *buffer, size_t count, const char* fmt, ...)
-{
- va_list va;
- int len;
-
- va_start(va, fmt);
- TCHAR* wfmt = ansi_to_tchar(fmt);
-
- len = _vsnwprintf((WCHAR*)buffer, count-1, (WCHAR*)wfmt, va);
- ((WCHAR*)buffer)[count-1] = 0;
- SAFE_FREE((void**)&wfmt);
-
- va_end(va);
- return len;
-}
-
TCHAR* __fastcall SRCTranslateT(const char* src, const WCHAR* unibuf)
{ // this takes Ascii strings only!!!
char* szRes = NULL;
diff --git a/plugins/ContactsPlus/src/utils.h b/plugins/ContactsPlus/src/utils.h
index ecc0df3349..cc21980207 100644
--- a/plugins/ContactsPlus/src/utils.h
+++ b/plugins/ContactsPlus/src/utils.h
@@ -60,7 +60,6 @@ int __fastcall strcmpT(const TCHAR *string1, const TCHAR *string2);
TCHAR* __fastcall strcpyT(TCHAR* dest, const TCHAR* src);
TCHAR* __fastcall strncpyT(TCHAR* dest, const TCHAR* src, size_t len);
TCHAR* __fastcall strcatT(TCHAR* dest, const TCHAR* src);
-int _snprintfT(TCHAR *buffer, size_t count, const char* fmt, ...);
LRESULT SendMessageT(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
TCHAR* GetWindowTextT(HWND hWnd);