From 2ad5305d32e3e85d511ce81a7273b9de7c05d4ed Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:27:55 +0000 Subject: replace lstrlenA to mir_strlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13750 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ExternalAPI/m_assocmgr.h | 2 +- plugins/ShellExt/src/shlcom.cpp | 6 +++--- plugins/ShellExt/src/shlext.cpp | 6 +++--- plugins/ShellExt/src/utils.cpp | 2 +- protocols/Steam/src/steam_contacts.cpp | 10 +++++----- protocols/Steam/src/steam_proto.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/plugins/ExternalAPI/m_assocmgr.h b/plugins/ExternalAPI/m_assocmgr.h index 1f7162f256..94e590dc86 100644 --- a/plugins/ExternalAPI/m_assocmgr.h +++ b/plugins/ExternalAPI/m_assocmgr.h @@ -259,7 +259,7 @@ static __inline char *Netlib_UrlDecode(char *str) MoveMemory(psz,&psz[1],2); psz[2]=0; *psz=(char)strtol(psz,NULL,16); - MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1); + MoveMemory(&psz[1],&psz[3],mir_strlen(&psz[3])+1); break; } return str; diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 5f77e9b231..bcd6a75378 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -310,9 +310,9 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode) if (bGroupMode) { rc = db_get_s(pContacts[i].hContact, "CList", "Group", &dbv); if (!rc) - n = lstrlenA(dbv.pszVal) + 1; + n = mir_strlen(dbv.pszVal) + 1; } - int cch = lstrlenA(szContact) + 1; + int cch = mir_strlen(szContact) + 1; TSlotIPC *pct = ipcAlloc(ipch, cch + 1 + n); if (pct == NULL) { db_free(&dbv); @@ -444,7 +444,7 @@ void __stdcall ipcService(ULONG_PTR dwParam) _itoa(iSlot, szGroupStr, 10); if ( db_get_s(0, "CListGroups", szGroupStr, &dbv) != 0) break; - pct = ipcAlloc(pMMT, lstrlenA(dbv.pszVal + 1) + 1); + pct = ipcAlloc(pMMT, mir_strlen(dbv.pszVal + 1) + 1); // first byte has flags, need null term if (pct != NULL) { if (pMMT->GroupsBegin == NULL) diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 7b30f1bb73..94369413f6 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -370,7 +370,7 @@ static void BuildMenus(TEnumData *lParam) // since it maybe Miranda\Blah\Blah and we have created the first node // which maybe Miranda, thus giving the wrong hash // since "Miranda" can be a group of it's own and a full path - q->cchGroup = lstrlenA(Token); + q->cchGroup = mir_strlen(Token); q->szGroup = (LPSTR)HeapAlloc(hDllHeap, 0, q->cchGroup + 1); lstrcpyA(q->szGroup, Token); q->dwItems = 0; @@ -862,7 +862,7 @@ HRESULT TShellExt::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESU GetTextExtentPoint32A(dwi->hDC, psd->szText, psd->cch, &tS); dwi->rcItem.left += tS.cx + 8; SetTextColor(dwi->hDC, GetSysColor(COLOR_GRAYTEXT)); - DrawTextA(dwi->hDC, psd->szProfile, lstrlenA(psd->szProfile), &dwi->rcItem, DT_NOCLIP | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); + DrawTextA(dwi->hDC, psd->szProfile, mir_strlen(psd->szProfile), &dwi->rcItem, DT_NOCLIP | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER); } } else { @@ -908,7 +908,7 @@ HRESULT TShellExt::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESU dx += tS.cx; // main menu item? if (psd->szProfile != NULL) { - GetTextExtentPoint32A(hMemDC, psd->szProfile, lstrlenA(psd->szProfile), &tS); + GetTextExtentPoint32A(hMemDC, psd->szProfile, mir_strlen(psd->szProfile), &tS); dx += tS.cx; } // store it diff --git a/plugins/ShellExt/src/utils.cpp b/plugins/ShellExt/src/utils.cpp index 22e033fb42..1a71ca3fe8 100644 --- a/plugins/ShellExt/src/utils.cpp +++ b/plugins/ShellExt/src/utils.cpp @@ -20,7 +20,7 @@ void logA(const char *format, ...) UINT murmur_hash(const char *str) { - size_t len = lstrlenA(str); + size_t len = mir_strlen(str); // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 8f8455b710..313e765b41 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -628,7 +628,7 @@ void CSteamProto::OnAuthRequested(const NETLIBHTTPREQUEST *response, void *arg) mir_snprintf(reason, SIZEOF(reason), Translate("%s has added you to his or her Friend List"), nickName); // blob is: 0(DWORD), hContact(DWORD), nick(ASCIIZ), firstName(ASCIIZ), lastName(ASCIIZ), sid(ASCIIZ), reason(ASCIIZ) - DWORD cbBlob = (DWORD)(sizeof(DWORD)* 2 + lstrlenA(nickName) + lstrlenA(firstName) + lstrlenA(lastName) + lstrlenA(steamId) + lstrlenA(reason) + 5); + DWORD cbBlob = (DWORD)(sizeof(DWORD)* 2 + mir_strlen(nickName) + mir_strlen(firstName) + mir_strlen(lastName) + mir_strlen(steamId) + mir_strlen(reason) + 5); PBYTE pBlob, pCurBlob; pCurBlob = pBlob = (PBYTE)mir_alloc(cbBlob); @@ -638,13 +638,13 @@ void CSteamProto::OnAuthRequested(const NETLIBHTTPREQUEST *response, void *arg) *((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD); strcpy((char*)pCurBlob, nickName); - pCurBlob += lstrlenA(nickName) + 1; + pCurBlob += mir_strlen(nickName) + 1; strcpy((char*)pCurBlob, firstName); - pCurBlob += lstrlenA(firstName) + 1; + pCurBlob += mir_strlen(firstName) + 1; strcpy((char*)pCurBlob, lastName); - pCurBlob += lstrlenA(lastName) + 1; + pCurBlob += mir_strlen(lastName) + 1; strcpy((char*)pCurBlob, steamId); - pCurBlob += lstrlenA(steamId) + 1; + pCurBlob += mir_strlen(steamId) + 1; strcpy((char*)pCurBlob, reason); AddDBEvent(hContact, EVENTTYPE_AUTHREQUEST, time(NULL), DBEF_UTF, cbBlob, pBlob); diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 9196e03aa5..2844492aa6 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -237,7 +237,7 @@ HANDLE __cdecl CSteamProto::SearchBasic(const TCHAR* id) int __cdecl CSteamProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) { - return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, lstrlenA(pre->szMessage), (BYTE*)pre->szMessage); + return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, mir_strlen(pre->szMessage), (BYTE*)pre->szMessage); } int __cdecl CSteamProto::SendMsg(MCONTACT hContact, int, const char *msg) -- cgit v1.2.3