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/Variables | |
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/Variables')
-rw-r--r-- | plugins/Variables/src/contact.cpp | 4 | ||||
-rw-r--r-- | plugins/Variables/src/help.cpp | 6 | ||||
-rw-r--r-- | plugins/Variables/src/parse_alias.cpp | 4 | ||||
-rw-r--r-- | plugins/Variables/src/parse_inet.cpp | 18 | ||||
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/src/variables.cpp | 4 |
6 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index da723406ce..5ccc20cea5 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -255,7 +255,7 @@ int getContactFromString(CONTACTSINFO *ci) TCHAR *cInfo = getContactInfoT(CNF_UNIQUEID, hContact);
if (cInfo)
{
- size_t size = _tcslen(cInfo) + strlen(szProto) + 4;
+ size_t size = _tcslen(cInfo) + mir_strlen(szProto) + 4;
szFind = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (szFind != NULL) {
mir_sntprintf(szFind, size, _T("<%S:%s>"), szProto, cInfo);
@@ -416,7 +416,7 @@ TCHAR* encodeContactToString(MCONTACT hContact) if (szProto == NULL || tszUniqueId == NULL)
return NULL;
- size_t size = _tcslen(tszUniqueId) + strlen(szProto) + 4;
+ size_t size = _tcslen(tszUniqueId) + mir_strlen(szProto) + 4;
TCHAR *tszResult = (TCHAR *)mir_calloc(size * sizeof(TCHAR));
if (tszResult)
mir_sntprintf(tszResult, size, _T("<%S:%s>"), szProto, tszUniqueId);
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index e19b39e297..a76a3a15e9 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -246,7 +246,7 @@ static TCHAR *getTokenCategory(TOKENREGISTEREX *tr) { while (*cur != 0) { if (*cur == '\t') { *cur = 0; - helpText = ( char* )mir_realloc(helpText, strlen(helpText)+1); + helpText = ( char* )mir_realloc(helpText, mir_strlen(helpText)+1); TCHAR *res = mir_a2t(helpText); mir_free(helpText); @@ -266,7 +266,7 @@ static TCHAR *getHelpDescription(TOKENREGISTEREX *tr) if (tr == NULL) return NULL; - char *cur = tr->szHelpText + strlen(tr->szHelpText); + char *cur = tr->szHelpText + mir_strlen(tr->szHelpText); while (cur > tr->szHelpText) { if (*cur == '\t') { @@ -314,7 +314,7 @@ static TCHAR *getTokenDescription(TOKENREGISTEREX *tr) } else args = NULL; - size_t len = _tcslen(tr->tszTokenString) + (args!=NULL?strlen(args):0) + 3; + size_t len = _tcslen(tr->tszTokenString) + (args!=NULL?mir_strlen(args):0) + 3; TCHAR *desc = (TCHAR*)mir_calloc(len * sizeof(TCHAR)); if (desc == NULL) { mir_free(helpText); diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index a28f0d844c..557f5be2eb 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -168,9 +168,9 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) if (szArgs != NULL && argc > 0) {
szArgsA = mir_t2a(szArgs);
- size_t size = 32 + strlen(szArgsA);
+ size_t size = 32 + mir_strlen(szArgsA);
szHelp = (char *)mir_alloc(size);
- memset(szHelp, '\0', 32 + strlen(szArgsA));
+ memset(szHelp, '\0', 32 + mir_strlen(szArgsA));
mir_snprintf(szHelp, size, LPGEN("Alias")"\t(%s)\t"LPGEN("user defined"), szArgsA);
res = registerIntToken(alias, parseTranslateAlias, TRF_FUNCTION | TRF_UNPARSEDARGS, szHelp);
mir_free(szArgsA);
diff --git a/plugins/Variables/src/parse_inet.cpp b/plugins/Variables/src/parse_inet.cpp index 4843b6557f..c1c6f405ac 100644 --- a/plugins/Variables/src/parse_inet.cpp +++ b/plugins/Variables/src/parse_inet.cpp @@ -29,20 +29,20 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) return NULL;
size_t cur = 0;
- while (cur < strlen(res)) {
+ while (cur < mir_strlen(res)) {
if (((*(res + cur) >= '0') && (*(res + cur) <= '9')) || ((*(res + cur) >= 'a') && (*(res + cur) <= 'z')) || ((*(res + cur) >= 'A') && (*(res + cur) <= 'Z'))) {
cur++;
continue;
}
- res = (char*)mir_realloc(res, strlen(res) + 4);
+ res = (char*)mir_realloc(res, mir_strlen(res) + 4);
if (res == NULL)
return NULL;
char hex[8];
- memmove(res + cur + 3, res + cur + 1, strlen(res + cur + 1) + 1);
+ memmove(res + cur + 3, res + cur + 1, mir_strlen(res + cur + 1) + 1);
mir_snprintf(hex, SIZEOF(hex), "%%%x", *(res + cur));
- strncpy(res + cur, hex, strlen(hex));
- cur += strlen(hex);
+ strncpy(res + cur, hex, mir_strlen(hex));
+ cur += mir_strlen(hex);
}
TCHAR *tres = mir_a2t(res);
@@ -60,18 +60,18 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) return NULL;
unsigned int cur = 0;
- while (cur < strlen(res)) {
- if ((*(res + cur) == '%') && (strlen(res + cur) >= 3)) {
+ while (cur < mir_strlen(res)) {
+ if ((*(res + cur) == '%') && (mir_strlen(res + cur) >= 3)) {
char hex[8];
memset(hex, '\0', sizeof(hex));
strncpy(hex, res + cur + 1, 2);
*(res + cur) = (char)strtol(hex, NULL, 16);
- memmove(res + cur + 1, res + cur + 3, strlen(res + cur + 3) + 1);
+ memmove(res + cur + 1, res + cur + 3, mir_strlen(res + cur + 3) + 1);
}
cur++;
}
- res = (char*)mir_realloc(res, strlen(res) + 1);
+ res = (char*)mir_realloc(res, mir_strlen(res) + 1);
TCHAR *tres = mir_a2t(res);
mir_free(res);
return tres;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index f6dec5c4d0..a60aa9871a 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -475,7 +475,7 @@ static TCHAR* parseSpecialContact(ARGUMENTSINFO *ai) if (szUniqueID == NULL)
return NULL;
- size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4;
+ size_t size = mir_strlen(szProto) + _tcslen(szUniqueID) + 4;
TCHAR *res = (TCHAR*)mir_alloc(size * sizeof(TCHAR));
if (res == NULL)
return NULL;
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 421e0616c3..fc92c323bc 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -329,12 +329,12 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) // if the var contains the escape character, this character must be doubled, we don't want it to act as an esacpe char /*for (tcur=parsedToken;*tcur != '\0';tcur++) { if (*tcur == DONTPARSE_CHAR) {//|| (*(var+pos) == ')')) { - parsedToken = mir_realloc(parsedToken, strlen(parsedToken) + 2); + parsedToken = mir_realloc(parsedToken, mir_strlen(parsedToken) + 2); if (parsedToken == NULL) { fi->err = EMEM; return NULL; } - memcpy(tcur+1, tcur, strlen(tcur)+1); + memcpy(tcur+1, tcur, mir_strlen(tcur)+1); tcur++; } }*/ |