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 /plugins/CmdLine/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 'plugins/CmdLine/src')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 16 | ||||
-rw-r--r-- | plugins/CmdLine/src/utils.cpp | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 6894f4c602..acf6932fbf 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -121,13 +121,13 @@ void HandleUnknownParameter(PCommand command, char *param, PReply reply) int ParseValueParam(char *param, void *&result)
{
- if (strlen(param) > 0)
+ if (mir_strlen(param) > 0)
{
switch (*param)
{
case 's':
{
- size_t len = strlen(param); //- 1 + 1
+ size_t len = mir_strlen(param); //- 1 + 1
result = (char *) malloc(len * sizeof(char));
STRNCPY((char *) result, param + 1, len);
((char *) result)[len - 1] = 0;
@@ -136,7 +136,7 @@ int ParseValueParam(char *param, void *&result) case 'w':
{
- size_t len = strlen(param);
+ size_t len = mir_strlen(param);
result = (WCHAR *) malloc(len * sizeof(WCHAR));
char *buffer = (char *) malloc(len * sizeof(WCHAR));
STRNCPY(buffer, param + 1, len);
@@ -819,9 +819,9 @@ void HandleCallServiceCommand(PCommand command, TArgument *argv, int argc, PRepl void ParseMessage(char buffer[512], const char *message) {
unsigned int j = 0;
- for (unsigned int i = 0; i < strlen(message); ++i) {
+ for (unsigned int i = 0; i < mir_strlen(message); ++i) {
char c = message[i];
- if (c == '\\' && i < (strlen(message) - 1) && message[i+1] == 'n') {
+ if (c == '\\' && i < (mir_strlen(message) - 1) && message[i+1] == 'n') {
c = '\n';
i++;
}
@@ -897,7 +897,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re e.flags = DBEF_SENT;
e.pBlob = (PBYTE) message;
- e.cbBlob = (DWORD) strlen((char *) message) + 1;
+ e.cbBlob = (DWORD) mir_strlen((char *) message) + 1;
STRNCPY(module, ack->szModule, sizeof(module));
e.szModule = module;
@@ -1462,7 +1462,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r STRNCPY(reply->message, buffer, reply->cMessage);
}
- if (strlen(reply->message) > 4096)
+ if (mir_strlen(reply->message) > 4096)
{
SetEvent(heServerBufferFull);
Sleep(750); //wait a few milliseconds for the event to be processed
@@ -1539,7 +1539,7 @@ void AddHistoryEvent(DBEVENTINFO *dbEvent, char *contact, PReply reply) STRNCPY(reply->message, buffer, reply->cMessage);
}
- if (strlen(reply->message) > (reply->cMessage / 2))
+ if (mir_strlen(reply->message) > (reply->cMessage / 2))
{
SetEvent(heServerBufferFull);
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index 9e20f665b5..f9918523c0 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -55,7 +55,7 @@ int Log(char *format, ...) }
va_end(vararg);
- if (str[strlen(str) - 1] != '\n')
+ if (str[mir_strlen(str) - 1] != '\n')
{
strcat(str, "\n");
}
@@ -132,7 +132,7 @@ int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName if (db_get(hContact, szModule, szSettingName, &dbv) == 0)
{
res = 0;
- size_t tmp = strlen(dbv.pszVal);
+ size_t tmp = mir_strlen(dbv.pszVal);
len = (tmp < size - 1) ? tmp : size - 1;
strncpy(szResult, dbv.pszVal, len);
szResult[len] = '\0';
@@ -142,7 +142,7 @@ int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName res = 1;
if (szError)
{
- size_t tmp = strlen(szError);
+ size_t tmp = mir_strlen(szError);
len = (tmp < size - 1) ? tmp : size - 1;
strncpy(szResult, szError, len);
szResult[len] = '\0';
|