diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /protocols/GTalkExt/src | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src')
-rw-r--r-- | protocols/GTalkExt/src/avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/GTalkExt/src/handlers.cpp | 8 | ||||
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 14 | ||||
-rw-r--r-- | protocols/GTalkExt/src/notifications.cpp | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index 574d865cac..4f3e848c4b 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -39,7 +39,7 @@ LPTSTR CreateAvaFile(HANDLE *hFile) if (CallService(MS_DB_GETPROFILENAMET, (WPARAM)SIZEOF(name), (LPARAM)&name))
return NULL;
- for (int i = lstrlen(name); i >= 0; i--)
+ for (int i = mir_tstrlen(name); i >= 0; i--)
if ('.' == name[i]) {
name[i] = 0;
break;
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 8c3817474f..af6f5bc8f8 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -45,18 +45,18 @@ GoogleTalkAcc* isGoogle(LPARAM lParam) void FormatMessageUrl(LPCTSTR format, LPTSTR buf, LPCTSTR mailbox, LPCTSTR tid)
{
ULARGE_INTEGER iTid; iTid.QuadPart = _tstoi64(tid);
- int l = lstrlen(buf);
+ int l = mir_tstrlen(buf);
mir_sntprintf(buf, l, format, mailbox, iTid.HighPart, iTid.LowPart);
- assert(l >= lstrlen(buf));
+ assert(l >= mir_tstrlen(buf));
}
void MakeUrlHex(LPTSTR url, LPCTSTR tid)
{
ULARGE_INTEGER iTid; iTid.QuadPart = _tstoi64(tid);
LPTSTR tidInUrl = _tcsstr(url, tid);
- LPTSTR trail = tidInUrl + lstrlen(tid);
+ LPTSTR trail = tidInUrl + mir_tstrlen(tid);
wsprintf(tidInUrl, _T("%x%08x"), iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!!
- wmemmove(tidInUrl + lstrlen(tidInUrl), trail, lstrlen(trail) + 1);
+ wmemmove(tidInUrl + mir_tstrlen(tidInUrl), trail, mir_tstrlen(trail) + 1);
}
LPTSTR ExtractJid(LPCTSTR jidWithRes)
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 51a0cf5ddd..6ac9790478 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -60,7 +60,7 @@ LPSTR HttpPost(HANDLE hUser, LPSTR reqUrl, LPSTR reqParams) nlhr.headers = (NETLIBHTTPHEADER*)&HEADER_URL_ENCODED;
nlhr.headersCount = 1;
nlhr.pData = reqParams;
- nlhr.dataLength = lstrlenA(reqParams);
+ nlhr.dataLength = mir_strlen(reqParams);
NETLIBHTTPREQUEST *pResp = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hUser, (LPARAM)&nlhr);
if (!pResp) return NULL;
@@ -78,7 +78,7 @@ LPSTR HttpPost(HANDLE hUser, LPSTR reqUrl, LPSTR reqParams) LPSTR MakeRequest(HANDLE hUser, LPSTR reqUrl, LPSTR reqParamsFormat, LPSTR p1, LPSTR p2)
{
ptrA encodedP1( mir_urlEncode(p1)), encodedP2( mir_urlEncode(p2));
- size_t size = lstrlenA(reqParamsFormat) + 1 + lstrlenA(encodedP1) + lstrlenA(encodedP2);
+ size_t size = mir_strlen(reqParamsFormat) + 1 + mir_strlen(encodedP1) + mir_strlen(encodedP2);
LPSTR reqParams = (LPSTR)alloca(size);
mir_snprintf(reqParams, size, reqParamsFormat, encodedP1, encodedP2);
return HttpPost(hUser, reqUrl, reqParams);
@@ -93,11 +93,11 @@ LPSTR FindSid(LPSTR resp, LPSTR *LSID) if (SID - 1 == *LSID) SID = strstr(SID + 1, SID_KEY_NAME);
if (!SID) return NULL;
- SID += lstrlenA(SID_KEY_NAME);
+ SID += mir_strlen(SID_KEY_NAME);
LPSTR term = strstr(SID, "\n");
if (term) term[0] = 0;
- *LSID += lstrlenA(LSID_KEY_NAME);
+ *LSID += mir_strlen(LSID_KEY_NAME);
term = strstr(*LSID, "\n");
if (term) term[0] = 0;
@@ -107,7 +107,7 @@ LPSTR FindSid(LPSTR resp, LPSTR *LSID) void DoOpenUrl(LPSTR tokenResp, LPSTR url)
{
ptrA encodedUrl( mir_urlEncode(url)), encodedToken( mir_urlEncode(tokenResp));
- size_t size = lstrlenA(TOKEN_AUTH_URL) + 1 + lstrlenA(encodedToken) + lstrlenA(encodedUrl);
+ size_t size = mir_strlen(TOKEN_AUTH_URL) + 1 + mir_strlen(encodedToken) + mir_strlen(encodedUrl);
LPSTR composedUrl = (LPSTR)alloca(size);
mir_snprintf(composedUrl, size, TOKEN_AUTH_URL, encodedToken, encodedUrl);
CallService(MS_UTILS_OPENURL, 0, (LPARAM)composedUrl);
@@ -177,8 +177,8 @@ BOOL OpenUrlWithAuth(LPCSTR acc, LPCTSTR mailbox, LPCTSTR url) int pwdLen = GetMailboxPwd(acc, mailbox, NULL, 0);
if (!pwdLen++) return FALSE;
- int urlLen = lstrlen(url) + 1;
- int mailboxLen = lstrlen(mailbox) + 1;
+ int urlLen = mir_tstrlen(url) + 1;
+ int mailboxLen = mir_tstrlen(mailbox) + 1;
OPEN_URL_HEADER *data = (OPEN_URL_HEADER*)malloc(sizeof(OPEN_URL_HEADER) + urlLen + mailboxLen + pwdLen);
data->url = (LPSTR)data + sizeof(OPEN_URL_HEADER);
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 20825d8d8f..5acef31604 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -177,7 +177,7 @@ MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTST // SetAvatar(hContact);
if (displayName == NULL) {
- TCHAR *tszTemp = (TCHAR*)alloca((lstrlen(jid) + lstrlen(unreadCount) + 3 + 1) * sizeof(TCHAR));
+ TCHAR *tszTemp = (TCHAR*)alloca((mir_tstrlen(jid) + mir_tstrlen(unreadCount) + 3 + 1) * sizeof(TCHAR));
FormatPseudocontactDisplayName(tszTemp, jid, unreadCount);
db_set_ts(hContact, CLIST_MODULE_NAME, CONTACT_DISPLAY_NAME_SETTING, tszTemp);
}
@@ -231,8 +231,8 @@ void ShowNotification(LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LP }
data->PluginWindowProc = PopupProc;
- int lurl = (lstrlen(url) + 1) * sizeof(TCHAR);
- int ljid = (lstrlen(jid) + 1) * sizeof(TCHAR);
+ int lurl = (mir_tstrlen(url) + 1) * sizeof(TCHAR);
+ int ljid = (mir_tstrlen(jid) + 1) * sizeof(TCHAR);
POPUP_DATA_HEADER *ppdh = (POPUP_DATA_HEADER*)malloc(sizeof(POPUP_DATA_HEADER) + lurl + ljid);
ppdh->MarkRead = FALSE;
@@ -272,7 +272,7 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre mir_sntprintf(currSender, SENDER_COUNT * 100, _T(" %s <%s>\n"), mtn->senders[i].name, mtn->senders[i].addr);
else
mir_sntprintf(currSender, SENDER_COUNT * 100, _T(" %s\n"), mtn->senders[i].addr);
- currSender += lstrlen(currSender);
+ currSender += mir_tstrlen(currSender);
}
if ( ReadCheckbox(0, IDC_ADDSNIP, (DWORD)TlsGetValue(itlsSettings)))
|