diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
commit | 5a17c9299e03bebf46169927abdeee34aaf8e854 (patch) | |
tree | cbd13080f33ac0b6396b9d3b8ba31a3c98de59f8 /protocols/ICQCorp/src | |
parent | ed64312924e77707e7e5b5965c301692519f293a (diff) |
replace strlen to mir_strlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/ICQCorp/src')
-rw-r--r-- | protocols/ICQCorp/src/corp.cpp | 6 | ||||
-rw-r--r-- | protocols/ICQCorp/src/packet.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQCorp/src/protocol.cpp | 20 | ||||
-rw-r--r-- | protocols/ICQCorp/src/services.cpp | 6 | ||||
-rw-r--r-- | protocols/ICQCorp/src/transfer.cpp | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/protocols/ICQCorp/src/corp.cpp b/protocols/ICQCorp/src/corp.cpp index ef8bff0dd8..a1dd243c59 100644 --- a/protocols/ICQCorp/src/corp.cpp +++ b/protocols/ICQCorp/src/corp.cpp @@ -70,7 +70,7 @@ extern "C" __declspec(dllexport) int Load() GetModuleFileName(hInstance, fileName, MAX_PATH);
FindClose(FindFirstFile(fileName, &findData));
- findData.cFileName[strlen(findData.cFileName) - 4] = 0;
+ findData.cFileName[mir_strlen(findData.cFileName) - 4] = 0;
strcpy(protoName, findData.cFileName);
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
@@ -110,8 +110,8 @@ void T(char *format, ...) hFile = CreateFile("ICQ Corp.log", GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, 0, NULL);
SetFilePointer(hFile, 0, 0, FILE_END);
}
- WriteFile(hFile, bufferTime, (DWORD)strlen(bufferTime), &result, NULL);
- WriteFile(hFile, buffer, (DWORD)strlen(buffer), &result, NULL);
+ WriteFile(hFile, bufferTime, (DWORD)mir_strlen(bufferTime), &result, NULL);
+ WriteFile(hFile, buffer, (DWORD)mir_strlen(buffer), &result, NULL);
}
#endif
diff --git a/protocols/ICQCorp/src/packet.cpp b/protocols/ICQCorp/src/packet.cpp index 0baebee9a7..45f753ef41 100644 --- a/protocols/ICQCorp/src/packet.cpp +++ b/protocols/ICQCorp/src/packet.cpp @@ -109,7 +109,7 @@ Packet &Packet::operator << (unsigned char data) Packet &Packet::operator << (char *data)
{
- unsigned int s = (unsigned int)strlen(data) + 1;
+ unsigned int s = (unsigned int)mir_strlen(data) + 1;
operator << ((unsigned short)s);
memcpy(nextData, data, s);
sizeVal += s;
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 25967327d5..439add0b1e 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -913,7 +913,7 @@ void ICQ::processSystemMessage(Packet &packet, unsigned long checkUin, unsigned case ICQ_CMDxRCV_SYSxBROADCAST:
T("broadcast message from %d\n", checkUin);
- messageLen = (unsigned int)strlen(message);
+ messageLen = (unsigned int)mir_strlen(message);
for (i=0; i<messageLen; i++) if (message[i] == (char)0xFE) message[i] = '\n';
addMessage(u, message, ICQ_CMDxRCV_SYSxMSGxONLINE, ICQ_CMDxTCP_MSG, 0, timeSent);
@@ -1567,9 +1567,9 @@ ICQEvent *ICQ::sendUrl(ICQUser *u, char *url) char *m, *description;
ICQEvent *result;
- nameLen = (unsigned int)strlen(url);
+ nameLen = (unsigned int)mir_strlen(url);
description = (char*)url + nameLen + 1;
- descriptionLen = (unsigned int)strlen(description);
+ descriptionLen = (unsigned int)mir_strlen(description);
m = new char[nameLen + descriptionLen + 2];
strcpy(m, description);
@@ -2261,13 +2261,13 @@ void ICQ::addAdded(ICQUser *u, char *m, unsigned short theCmd, unsigned short th dbei.timestamp=TimestampLocalToGMT(YMDHMSToTime(year,month,day,hour,minute,0));
dbei.flags=0;
dbei.eventType=EVENTTYPE_ADDED;
- dbei.cbBlob=sizeof(DWORD)+strlen(nick)+strlen(first)+strlen(last)+strlen(email)+4;
+ dbei.cbBlob=sizeof(DWORD)+mir_strlen(nick)+mir_strlen(first)+mir_strlen(last)+mir_strlen(email)+4;
pCurBlob=dbei.pBlob=(PBYTE)malloc(dbei.cbBlob);
CopyMemory(pCurBlob,&uin,sizeof(DWORD)); pCurBlob+=sizeof(DWORD);
- CopyMemory(pCurBlob,nick,strlen(nick)+1); pCurBlob+=strlen(nick)+1;
- CopyMemory(pCurBlob,first,strlen(first)+1); pCurBlob+=strlen(first)+1;
- CopyMemory(pCurBlob,last,strlen(last)+1); pCurBlob+=strlen(last)+1;
- CopyMemory(pCurBlob,email,strlen(email)+1); pCurBlob+=strlen(email)+1;
+ CopyMemory(pCurBlob,nick,mir_strlen(nick)+1); pCurBlob+=mir_strlen(nick)+1;
+ CopyMemory(pCurBlob,first,mir_strlen(first)+1); pCurBlob+=mir_strlen(first)+1;
+ CopyMemory(pCurBlob,last,mir_strlen(last)+1); pCurBlob+=mir_strlen(last)+1;
+ CopyMemory(pCurBlob,email,mir_strlen(email)+1); pCurBlob+=mir_strlen(email)+1;
CallService(MS_DB_EVENT_ADD,(WPARAM)(HANDLE)NULL,(LPARAM)&dbei);
}
*/
@@ -2304,11 +2304,11 @@ void ICQ::addFileReq(ICQUser *u, char *m, char *filename, unsigned long size, un // Send chain event
- szBlob = new char[sizeof(DWORD) + strlen(filename) + strlen(m) + 2];
+ szBlob = new char[sizeof(DWORD) + mir_strlen(filename) + mir_strlen(m) + 2];
*(PDWORD)szBlob = (DWORD)transfer;
strcpy(szBlob + sizeof(DWORD), filename);
- strcpy(szBlob + sizeof(DWORD) + strlen(filename) + 1, m);
+ strcpy(szBlob + sizeof(DWORD) + mir_strlen(filename) + 1, m);
ccs.hContact = u->hContact;
ccs.szProtoService = PSR_FILE;
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index a94fa5450c..20796a0efb 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -275,7 +275,7 @@ static INT_PTR icqSetAwayMsg(WPARAM wParam, LPARAM lParam) if (lParam == NULL) return 0;
if (icq.awayMessage) delete [] icq.awayMessage;
- icq.awayMessage = new char[strlen((char*)lParam) + 1];
+ icq.awayMessage = new char[mir_strlen((char*)lParam) + 1];
strcpy(icq.awayMessage, (char*)lParam);
return 0;
@@ -446,7 +446,7 @@ static INT_PTR icqRecvFile(WPARAM wParam, LPARAM lParam) db_unset(ccs->hContact, "CList", "Hidden");
szFile = pre->szMessage + sizeof(DWORD);
- szDesc = szFile + strlen(szFile) + 1;
+ szDesc = szFile + mir_strlen(szFile) + 1;
ZeroMemory(&dbei, sizeof(dbei));
dbei.cbSize = sizeof(dbei);
@@ -454,7 +454,7 @@ static INT_PTR icqRecvFile(WPARAM wParam, LPARAM lParam) dbei.timestamp = pre->timestamp;
dbei.flags = pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0);
dbei.eventType = EVENTTYPE_FILE;
- dbei.cbBlob = sizeof(DWORD)+(DWORD)strlen(szFile) + (DWORD)strlen(szDesc) + 2;
+ dbei.cbBlob = sizeof(DWORD)+(DWORD)mir_strlen(szFile) + (DWORD)mir_strlen(szDesc) + 2;
dbei.pBlob = (PBYTE)pre->szMessage;
db_event_add(ccs->hContact, &dbei);
diff --git a/protocols/ICQCorp/src/transfer.cpp b/protocols/ICQCorp/src/transfer.cpp index eb1a8dbf7b..a16369bd67 100644 --- a/protocols/ICQCorp/src/transfer.cpp +++ b/protocols/ICQCorp/src/transfer.cpp @@ -110,7 +110,7 @@ void ICQTransfer::processTcpPacket(Packet &packet) if (directoryName[0])
{
- char *fullName = new char[strlen(directoryName) + strlen(files[current]) + 2];
+ char *fullName = new char[mir_strlen(directoryName) + mir_strlen(files[current]) + 2];
sprintf(fullName, "%s\\%s", directoryName, files[current]);
delete [] files[current];
files[current] = fullName;
@@ -234,7 +234,7 @@ void ICQTransfer::sendPacket0x02() packet << (unsigned char)0x02
<< directory
<< (strrchr(fileName, '\\') + 1)
- << (directoryName + strlen(path) + 1)
+ << (directoryName + mir_strlen(path) + 1)
<< fileSize
<< fileDate
<< speed;
@@ -396,7 +396,7 @@ void ICQTransfer::resume(int action, const char *newName) case FILERESUME_RENAME:
T("[ ] rename file\n");
delete [] fileName;
- fileName = new char[strlen(newName) + 1];
+ fileName = new char[mir_strlen(newName) + 1];
strcpy(fileName, newName);
files[current] = fileName;
|