summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:06:32 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 10:06:32 +0000
commit5a17c9299e03bebf46169927abdeee34aaf8e854 (patch)
treecbd13080f33ac0b6396b9d3b8ba31a3c98de59f8 /plugins/YAMN/src
parented64312924e77707e7e5b5965c301692519f293a (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/YAMN/src')
-rw-r--r--plugins/YAMN/src/account.cpp2
-rw-r--r--plugins/YAMN/src/browser/badconnect.cpp2
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp14
-rw-r--r--plugins/YAMN/src/debug.cpp6
-rw-r--r--plugins/YAMN/src/mails/decode.cpp4
-rw-r--r--plugins/YAMN/src/mails/mails.cpp2
-rw-r--r--plugins/YAMN/src/mails/mime.cpp24
-rw-r--r--plugins/YAMN/src/proto/netlib.cpp2
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3.cpp4
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp16
10 files changed, 38 insertions, 38 deletions
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp
index f438bbf655..590c812355 100644
--- a/plugins/YAMN/src/account.cpp
+++ b/plugins/YAMN/src/account.cpp
@@ -750,7 +750,7 @@ DWORD WriteStringToFile(HANDLE File, char *Source)
DWORD Length, WrittenBytes;
char null = 0;
- if ((Source == NULL) || !(Length = (DWORD)strlen(Source))) {
+ if ((Source == NULL) || !(Length = (DWORD)mir_strlen(Source))) {
if (!WriteFile(File, &null, 1, &WrittenBytes, NULL)) {
CloseHandle(File);
return EACC_SYSTEM;
diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp
index 213779ff26..d2bd20ef05 100644
--- a/plugins/YAMN/src/browser/badconnect.cpp
+++ b/plugins/YAMN/src/browser/badconnect.cpp
@@ -103,7 +103,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
#ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"BadConnect:ActualAccountSO-read enter\n");
#endif
- int size = (int)(strlen(ActualAccount->Name) + strlen(Translate(BADCONNECTTITLE)));
+ int size = (int)(mir_strlen(ActualAccount->Name) + mir_strlen(Translate(BADCONNECTTITLE)));
TitleStrA = new char[size];
mir_snprintf(TitleStrA, size, Translate(BADCONNECTTITLE), ActualAccount->Name);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index f08a71bcf3..b1b1df711b 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -407,12 +407,12 @@ int UpdateMails(HWND hDlg, HACCOUNT ActualAccount, DWORD nflags, DWORD nnflags)
if (RunMailBrowser)
{
- size_t len = strlen(ActualAccount->Name) + strlen(Translate(MAILBROWSERTITLE)) + 10; //+10 chars for numbers
+ size_t len = mir_strlen(ActualAccount->Name) + mir_strlen(Translate(MAILBROWSERTITLE)) + 10; //+10 chars for numbers
char *TitleStrA = new char[len];
WCHAR *TitleStrW = new WCHAR[len];
mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display);
- MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)strlen(TitleStrA) + 1);
+ MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)mir_strlen(TitleStrA) + 1);
SetWindowTextW(hDlg, TitleStrW);
delete[] TitleStrA;
delete[] TitleStrW;
@@ -1088,7 +1088,7 @@ ULONGLONG MimeDateToFileTime(char *datein)
if (year) {
st.wYear = atoi(year);
- if (strlen(year) < 4) if (st.wYear < 70)st.wYear += 2000; else st.wYear += 1900;
+ if (mir_strlen(year) < 4) if (st.wYear < 70)st.wYear += 2000; else st.wYear += 1900;
};
if (month) for (int i = 0; i < 12; i++) if (strncmp(month, s_MonthNames[i], 3) == 0) { st.wMonth = i + 1; break; }
if (day) st.wDay = atoi(day);
@@ -1107,12 +1107,12 @@ ULONGLONG MimeDateToFileTime(char *datein)
else { st.wHour = st.wMinute = st.wSecond = 0; }
if (shift) {
- if (strlen(shift) < 4) {
+ if (mir_strlen(shift) < 4) {
//has only hour
wShiftSeconds = (atoi(shift)) * 3600;
}
else {
- char *smin = shift + strlen(shift) - 2;
+ char *smin = shift + mir_strlen(shift) - 2;
int ismin = atoi(smin);
smin[0] = 0;
int ishour = atoi(shift);
@@ -1444,12 +1444,12 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (!_strnicmp(contentType, "text", 4)) {
if (transEncoding) {
if (!_stricmp(transEncoding, "base64")) {
- int size = (int)strlen(body) * 3 / 4 + 5;
+ int size = (int)mir_strlen(body) * 3 / 4 + 5;
localBody = new char[size + 1];
DecodeBase64(body, localBody, size);
}
else if (!_stricmp(transEncoding, "quoted-printable")) {
- int size = (int)strlen(body) + 2;
+ int size = (int)mir_strlen(body) + 2;
localBody = new char[size + 1];
DecodeQuotedPrintable(body, localBody, size, FALSE);
}
diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp
index 2f2d3d1069..5b7d699558 100644
--- a/plugins/YAMN/src/debug.cpp
+++ b/plugins/YAMN/src/debug.cpp
@@ -97,8 +97,8 @@ void DebugLog(HANDLE File,const char *fmt,...)
str=(char *)realloc(str,strsize+=65536);
va_end(vararg);
EnterCriticalSection(&FileAccessCS);
- WriteFile(File,tids,(DWORD)strlen(tids),&Written,NULL);
- WriteFile(File,str,(DWORD)strlen(str),&Written,NULL);
+ WriteFile(File,tids,(DWORD)mir_strlen(tids),&Written,NULL);
+ WriteFile(File,str,(DWORD)mir_strlen(str),&Written,NULL);
LeaveCriticalSection(&FileAccessCS);
free(str);
}
@@ -118,7 +118,7 @@ void DebugLogW(HANDLE File,const WCHAR *fmt,...)
str=(WCHAR *)realloc(str,(strsize+=65536)*sizeof(WCHAR));
va_end(vararg);
EnterCriticalSection(&FileAccessCS);
- WriteFile(File,tids,(DWORD)strlen(tids),&Written,NULL);
+ WriteFile(File,tids,(DWORD)mir_strlen(tids),&Written,NULL);
WriteFile(File,str,(DWORD)wcslen(str)*sizeof(WCHAR),&Written,NULL);
LeaveCriticalSection(&FileAccessCS);
free(str);
diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp
index 64bbc47ad1..f2a0837e7b 100644
--- a/plugins/YAMN/src/mails/decode.cpp
+++ b/plugins/YAMN/src/mails/decode.cpp
@@ -227,7 +227,7 @@ int GetCharsetFromString(char *input,size_t size)
DebugLog(DecodeFile,"<CodePage>%s</CodePage>",pout);
#endif
for (int i=0;i<CPLENALL;i++) {
- size_t len = strlen(CodePageNamesAll[i].NameBase);
+ size_t len = mir_strlen(CodePageNamesAll[i].NameBase);
if (0==strncmp(pout,CodePageNamesAll[i].NameBase,len)) {
if (0==strcmp(pout+len,CodePageNamesAll[i].NameSub)) {
delete[] pout;
@@ -527,7 +527,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode)
finderend=pcodeend+2;
if (WS(finderend)) //if string continues and there's some whitespace, add space to string that is to be converted
{
- size_t len=strlen(DecodedResult);
+ size_t len=mir_strlen(DecodedResult);
DecodedResult[len]=' ';
DecodedResult[len+1]=0;
finderend++;
diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp
index c3e3a85130..53d7d54535 100644
--- a/plugins/YAMN/src/mails/mails.cpp
+++ b/plugins/YAMN/src/mails/mails.cpp
@@ -472,7 +472,7 @@ HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From)
Browser->Next=new YAMNMAIL;
Browser=Browser->Next;
}
- Browser->ID=new char[strlen(From->ID)+1];
+ Browser->ID=new char[mir_strlen(From->ID)+1];
strcpy(Browser->ID,From->ID);
Browser->Number=From->Number;
Browser->Flags=From->Flags;
diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp
index 0be13215dc..0c7449bf94 100644
--- a/plugins/YAMN/src/mails/mime.cpp
+++ b/plugins/YAMN/src/mails/mime.cpp
@@ -200,7 +200,7 @@ char *ExtractFromContentType(char *ContentType,char *value)
while((temp>ContentType) && WS(temp)) temp--; //now we have to find, if the word "Charset=" is located after ';' like "; Charset="
if (*temp != ';' && !ENDLINE(temp) && temp != ContentType)
return NULL;
- finder=finder+strlen(value); //jump over value string
+ finder=finder+mir_strlen(value); //jump over value string
while(WS(finder)) finder++; //jump over whitespaces
temp=finder;
@@ -301,7 +301,7 @@ void ExtractShortHeader(struct CMimeItem *items,struct CShortHeader *head)
ToLower(ContentType);
if (NULL != (CharSetStr=ExtractFromContentType(ContentType,"charset=")))
{
- head->CP=GetCharsetFromString(CharSetStr,strlen(CharSetStr));
+ head->CP=GetCharsetFromString(CharSetStr,mir_strlen(CharSetStr));
delete[] CharSetStr;
}
delete[] ContentType;
@@ -505,7 +505,7 @@ struct APartDataType
void ParseAPart(APartDataType *data)
{
- size_t len = strlen(data->Src);
+ size_t len = mir_strlen(data->Src);
try
{
char *finder=data->Src;
@@ -581,7 +581,7 @@ void ParseAPart(APartDataType *data)
{
MessageBox(NULL, TranslateT("Translate header error"), _T(""), 0);
}
- if (data->body) data->bodyLen = (int)strlen(data->body);
+ if (data->body) data->bodyLen = (int)mir_strlen(data->body);
}
//from decode.cpp
@@ -592,7 +592,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out);
WCHAR *ParseMultipartBody(char *src, char *bond)
{
char *srcback = _strdup(src);
- size_t sizebond = strlen(bond);
+ size_t sizebond = mir_strlen(bond);
int numparts = 1;
int i;
char *courbond = srcback;
@@ -618,7 +618,7 @@ WCHAR *ParseMultipartBody(char *src, char *bond)
char *CharSetStr;
if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"charset=")))
{
- partData[i].CodePage=GetCharsetFromString(CharSetStr,strlen(CharSetStr));
+ partData[i].CodePage=GetCharsetFromString(CharSetStr,mir_strlen(CharSetStr));
delete[] CharSetStr;
}
}
@@ -662,32 +662,32 @@ FailBackRaw:
if (i) { // part before first boudary should not have headers
char infoline[1024]; size_t linesize = 0;
mir_snprintf(infoline, SIZEOF(infoline), "%s %d", Translate("Part"), i);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
if (partData[i].TransEnc) {
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, "; %s", partData[i].TransEnc);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
}
if (partData[i].ContType) {
char *CharSetStr=strchr(partData[i].ContType,';');
if (CharSetStr) {
CharSetStr[0]=0;
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, "; %s", partData[i].ContType);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
partData[i].ContType=CharSetStr+1;
if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"charset="))) {
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, "; %s", CharSetStr);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
delete[] CharSetStr;
}
if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"name="))) {
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, "; \"%s\"", CharSetStr);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
delete[] CharSetStr;
}
}
else {
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, "; %s", partData[i].ContType);
- linesize = strlen(infoline);
+ linesize = mir_strlen(infoline);
}
}
mir_snprintf(infoline + linesize, SIZEOF(infoline) - linesize, ".\r\n");
diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp
index 0e1e9ab5a5..7f24b0a5db 100644
--- a/plugins/YAMN/src/proto/netlib.cpp
+++ b/plugins/YAMN/src/proto/netlib.cpp
@@ -146,7 +146,7 @@ void CNLClient::Send(const char *query) throw(DWORD)
#endif
try
{
- if ((SOCKET_ERROR==(Sent=LocalNetlib_Send(hConnection,query,(int)strlen(query),MSG_DUMPASTEXT))) || Sent != (unsigned int)strlen(query))
+ if ((SOCKET_ERROR==(Sent=LocalNetlib_Send(hConnection,query,(int)mir_strlen(query),MSG_DUMPASTEXT))) || Sent != (unsigned int)mir_strlen(query))
{
SystemError=WSAGetLastError();
throw NetworkError=(DWORD)ENL_SEND;
diff --git a/plugins/YAMN/src/proto/pop3/pop3.cpp b/plugins/YAMN/src/proto/pop3/pop3.cpp
index a66c85e7af..f03a7d8a99 100644
--- a/plugins/YAMN/src/proto/pop3/pop3.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3.cpp
@@ -243,8 +243,8 @@ char* CPop3Client::APOP(char* name, char* pw, char* timestamp)
throw POP3Error=(DWORD)EPOP3_APOP;
mir_md5_state_s ctx;
mir_md5_init(&ctx);
- mir_md5_append(&ctx,(const unsigned char *)timestamp,(unsigned int)strlen(timestamp));
- mir_md5_append(&ctx,(const unsigned char *)pw,(unsigned int)strlen(pw));
+ mir_md5_append(&ctx,(const unsigned char *)timestamp,(unsigned int)mir_strlen(timestamp));
+ mir_md5_append(&ctx,(const unsigned char *)pw,(unsigned int)mir_strlen(pw));
mir_md5_finish(&ctx, digest);
char hexdigest[40];
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index aed070df27..3941b2a270 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -976,15 +976,15 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
}
GetDlgItemTextA(hDlg, IDC_EDITAPP, Text, SIZEOF(Text));
- if (CheckApp && !(Length = strlen(Text))) {
+ if (CheckApp && !(Length = mir_strlen(Text))) {
MessageBox(hDlg,TranslateT("Please select application to run"),TranslateT("Input error"),MB_OK);
break;
}
GetDlgItemTextA(hDlg, IDC_COMBOACCOUNT, Text, SIZEOF(Text));
- if ( !( Length = strlen(Text))) {
+ if ( !( Length = mir_strlen(Text))) {
GetDlgItemTextA(hDlg,IDC_EDITNAME, Text, SIZEOF(Text));
- if ( !(Length = strlen( Text )))
+ if ( !(Length = mir_strlen( Text )))
break;
}
@@ -1037,29 +1037,29 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara
#endif
GetDlgItemTextA(hDlg, IDC_EDITNAME, Text, SIZEOF(Text));
- if ( !(Length = strlen( Text )))
+ if ( !(Length = mir_strlen( Text )))
break;
if (NULL != ActualAccount->Name)
delete[] ActualAccount->Name;
- ActualAccount->Name = new char[ strlen(Text)+1];
+ ActualAccount->Name = new char[ mir_strlen(Text)+1];
strcpy(ActualAccount->Name,Text);
GetDlgItemTextA(hDlg,IDC_EDITSERVER,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Name)
delete[] ActualAccount->Server->Name;
- ActualAccount->Server->Name=new char[ strlen(Text)+1];
+ ActualAccount->Server->Name=new char[ mir_strlen(Text)+1];
strcpy(ActualAccount->Server->Name,Text);
GetDlgItemTextA(hDlg,IDC_EDITLOGIN,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Login)
delete[] ActualAccount->Server->Login;
- ActualAccount->Server->Login=new char[ strlen(Text)+1];
+ ActualAccount->Server->Login=new char[ mir_strlen(Text)+1];
strcpy(ActualAccount->Server->Login,Text);
GetDlgItemTextA(hDlg,IDC_EDITPASS,Text,SIZEOF(Text));
if (NULL != ActualAccount->Server->Passwd)
delete[] ActualAccount->Server->Passwd;
- ActualAccount->Server->Passwd=new char[ strlen(Text)+1];
+ ActualAccount->Server->Passwd=new char[ mir_strlen(Text)+1];
strcpy(ActualAccount->Server->Passwd,Text);
GetDlgItemTextW(hDlg,IDC_EDITAPP,TextW,SIZEOF(TextW));