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/Weather | |
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/Weather')
-rw-r--r-- | plugins/Weather/src/weather_conv.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_data.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_ini.cpp | 6 | ||||
-rw-r--r-- | plugins/Weather/src/weather_update.cpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index a29a666ce7..c3e1774746 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -432,7 +432,7 @@ void TrimString(char *str) {
size_t len, start;
- len = strlen(str);
+ len = mir_strlen(str);
while(len && (unsigned char)str[len-1] <= ' ') str[--len] = 0;
for(start=0; (unsigned char)str[start] <= ' ' && str[start]; start++);
memmove(str, str+start, len-start+1);
@@ -458,7 +458,7 @@ void ConvertBackslashes(char *str) case 't': *pstr = '\t'; break;
default: *pstr = pstr[1]; break;
}
- memmove(pstr+1, pstr+2, strlen(pstr+2)+1);
+ memmove(pstr+1, pstr+2, mir_strlen(pstr+2)+1);
} } }
// replace spaces with _T("%20"
@@ -467,7 +467,7 @@ void ConvertBackslashes(char *str) char *GetSearchStr(char *dis)
{
char *pstr = dis;
- size_t len = strlen(dis);
+ size_t len = mir_strlen(dis);
while (*pstr != 0)
{
if (*pstr == ' ')
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index fd33528024..e49019e489 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -89,7 +89,7 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact) int DBGetData(MCONTACT hContact, char *setting, DBVARIANT *dbv)
{
if ( db_get_ts(hContact, WEATHERCONDITION, setting, dbv)) {
- size_t len = strlen(setting) + 1;
+ size_t len = mir_strlen(setting) + 1;
char *set = (char*)alloca(len + 1);
*set = '#';
memcpy(set + 1, setting, len);
@@ -371,7 +371,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData) void wSetData(char **Data, const char *Value)
{
if (Value[0] != 0) {
- char *newData = (char*)mir_alloc(strlen(Value) + 3);
+ char *newData = (char*)mir_alloc(mir_strlen(Value) + 3);
strcpy(newData, Value);
*Data = newData;
}
@@ -398,7 +398,7 @@ void wSetData(WCHAR **Data, const WCHAR *Value) // Data = the string occuping the data to be freed
void wfree(char **Data)
{
- if (*Data && strlen(*Data) > 0)
+ if (*Data && mir_strlen(*Data) > 0)
mir_free(*Data);
*Data = NULL;
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 930d2ea828..4fcb96d091 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -350,7 +350,7 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) if (Line[1] != '/') { // if it is not a footer (for old ini)
// save the group name
- Temp = (char *)mir_alloc(strlen(Line)+10);
+ Temp = (char *)mir_alloc(mir_strlen(Line)+10);
strncpy(Temp, Line+1, chop-Line-1);
Temp[chop-Line-1] = 0;
wfree(&Group);
@@ -380,7 +380,7 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) if (Value == NULL) continue;
// get the string before '=' (ValName) and after '=' (Value)
- ValName = (char *)mir_alloc(strlen(Line)+1);
+ ValName = (char *)mir_alloc(mir_strlen(Line)+1);
strncpy(ValName, Line, Value-Line);
ValName[Value-Line] = 0;
Value++;
@@ -470,7 +470,7 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) }
}
// recalculate memory used
- Data->MemUsed += (strlen(Value) + 10);
+ Data->MemUsed += (mir_strlen(Value) + 10);
wfree(&ValName);
}
// calcualate memory used for the ini and close the file
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index b202fcd56b..c16649a62a 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -195,7 +195,7 @@ int UpdateWeather(MCONTACT hContact) dbei.flags = DBEF_READ|DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.pBlob = (PBYTE)mir_utf8encodeT(str2);
- dbei.cbBlob = (DWORD)strlen((char*)dbei.pBlob)+1;
+ dbei.cbBlob = (DWORD)mir_strlen((char*)dbei.pBlob)+1;
db_event_add(hContact, &dbei);
}
|