From 2f261839b60692e33d0e160344d0d636d49c90ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jul 2016 14:23:31 +0000 Subject: less TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AddContactPlus/src/addcontact.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/AddContactPlus') diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 424976f0b0..84b1ae5768 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -62,7 +62,7 @@ void AddContactDlgOpts(HWND hdlg, const char* szProto, BOOL bAuthOptsOnly = FALS if (szUniqueId) { size_t cbLen = mir_strlen(szUniqueId) + 2; wchar_t* pszUniqueId = (wchar_t*)mir_alloc(cbLen * sizeof(wchar_t)); - mir_sntprintf(pszUniqueId, cbLen, L"%S:", szUniqueId); + mir_snwprintf(pszUniqueId, cbLen, L"%S:", szUniqueId); SetDlgItemText(hdlg, IDC_IDLABEL, pszUniqueId); mir_free(pszUniqueId); } @@ -126,7 +126,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) continue; cbei.pszText = pAccounts[i]->tszAccountName; - GetTextExtentPoint32(hdc, cbei.pszText, (int)mir_tstrlen(cbei.pszText), &textSize); + GetTextExtentPoint32(hdc, cbei.pszText, (int)mir_wstrlen(cbei.pszText), &textSize); if (textSize.cx > cbWidth) cbWidth = textSize.cx; HICON hIcon = (HICON)CallProtoService(pAccounts[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0); cbei.iImage = cbei.iSelectedImage = ImageList_AddIcon(hIml, hIcon); @@ -236,7 +236,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) wchar_t szUserId[256]; GetDlgItemText(hdlg, IDC_USERID, szUserId, _countof(szUserId)); - if (*rtrimt(szUserId) == 0 || + if (*rtrimw(szUserId) == 0 || (strstr(acs->proto, "GG") && wcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol ((CallProtoService(acs->proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !wcstoul(szUserId, NULL, 10))) { @@ -264,7 +264,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) } psr->flags = PSR_TCHAR; - psr->id.w = mir_tstrdup(szUserId); + psr->id.w = mir_wstrdup(szUserId); acs->psr = psr; MCONTACT hContact = (MCONTACT)CallProtoService(acs->proto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr); -- cgit v1.2.3