From 5a17c9299e03bebf46169927abdeee34aaf8e854 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:06:32 +0000 Subject: replace strlen to mir_strlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/ICQCorp/src/corp.cpp | 6 +++--- protocols/ICQCorp/src/packet.cpp | 2 +- protocols/ICQCorp/src/protocol.cpp | 20 ++++++++++---------- protocols/ICQCorp/src/services.cpp | 6 +++--- protocols/ICQCorp/src/transfer.cpp | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'protocols/ICQCorp/src') 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; ihContact; 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; -- cgit v1.2.3