diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-24 12:20:50 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-24 12:20:50 +0000 |
commit | 5aed15a8d8d8e4f913539761be496e0d1ba2c4f0 (patch) | |
tree | dd9996ff223dc09154ed3c65d51ce528a9b2f81d /plugins/YAMN | |
parent | 2cd063aa25c633f2bf4213e007bf2df5d610d8e1 (diff) |
replace wcslen to mir_wstrlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13813 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN')
-rw-r--r-- | plugins/YAMN/src/account.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/badconnect.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 18 | ||||
-rw-r--r-- | plugins/YAMN/src/debug.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/mails/decode.cpp | 6 | ||||
-rw-r--r-- | plugins/YAMN/src/mails/mime.cpp | 6 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3opt.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/services.cpp | 4 |
8 files changed, 23 insertions, 23 deletions
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index db7ce8166b..f240832bee 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -768,7 +768,7 @@ DWORD WriteStringToFileW(HANDLE File, WCHAR *Source) DWORD Length, WrittenBytes; WCHAR null = (WCHAR)0; - if ((Source == NULL) || !(Length = (DWORD)wcslen(Source))) + if ((Source == NULL) || !(Length = (DWORD)mir_wstrlen(Source))) { if (!WriteFile(File, &null, sizeof(WCHAR), &WrittenBytes, NULL)) { diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index d2bd20ef05..3de6b12064 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -33,9 +33,9 @@ LRESULT CALLBACK BadConnectPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM if (ActualAccount->BadConnectN.App != NULL) {
WCHAR *Command;
if (ActualAccount->BadConnectN.AppParam != NULL)
- Command = new WCHAR[wcslen(ActualAccount->BadConnectN.App) + wcslen(ActualAccount->BadConnectN.AppParam) + 6];
+ Command = new WCHAR[mir_wstrlen(ActualAccount->BadConnectN.App) + mir_wstrlen(ActualAccount->BadConnectN.AppParam) + 6];
else
- Command = new WCHAR[wcslen(ActualAccount->BadConnectN.App) + 6];
+ Command = new WCHAR[mir_wstrlen(ActualAccount->BadConnectN.App) + 6];
if (Command != NULL) {
mir_wstrcpy(Command, L"\"");
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index ece3465f5f..e34fe308c5 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -555,7 +555,7 @@ int AddNewMailsToListView(HWND hListView, HACCOUNT ActualAccount, struct CMailNu Extracted = TRUE; if ((UnicodeHeader.From != NULL) && (UnicodeHeader.FromNick != NULL)) { - size_t size = wcslen(UnicodeHeader.From) + wcslen(UnicodeHeader.FromNick) + 4; + size_t size = mir_wstrlen(UnicodeHeader.From) + mir_wstrlen(UnicodeHeader.FromNick) + 4; FromStr = new WCHAR[size]; mir_sntprintf(FromStr, size, L"%s <%s>", UnicodeHeader.FromNick, UnicodeHeader.From); FromStrNew = TRUE; @@ -758,9 +758,9 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D { WCHAR *Command; if (ActualAccount->NewMailN.AppParam != NULL) - Command = new WCHAR[wcslen(ActualAccount->NewMailN.App) + wcslen(ActualAccount->NewMailN.AppParam) + 6]; + Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; else - Command = new WCHAR[wcslen(ActualAccount->NewMailN.App) + 6]; + Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; if (Command != NULL) { @@ -1383,11 +1383,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR ConvertCodedStringToUnicode(Header->value, &str2, MailParam->mail->MailData->CP, 1); if (!str2) { str2 = (WCHAR *)str_nul; }// the header value may be NULL if (!From) if (!_stricmp(Header->name, "From")) { - From = new WCHAR[wcslen(str2) + 1]; + From = new WCHAR[mir_wstrlen(str2) + 1]; wcscpy(From, str2); } if (!Subj) if (!_stricmp(Header->name, "Subject")) { - Subj = new WCHAR[wcslen(str2) + 1]; + Subj = new WCHAR[mir_wstrlen(str2) + 1]; wcscpy(Subj, str2); } //if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true; @@ -1488,7 +1488,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER), (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); ShowWindow(hEdit, (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); WCHAR *title = 0; - size_t size = (From ? wcslen(From) : 0) + (Subj ? wcslen(Subj) : 0) + 4; + size_t size = (From ? mir_wstrlen(From) : 0) + (Subj ? mir_wstrlen(Subj) : 0) + 4; title = new WCHAR[size]; if (From && Subj) mir_sntprintf(title, size, L"%s (%s)", Subj, From); @@ -1741,7 +1741,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessageW(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMNW, (WPARAM)2, (LPARAM)&lvc2); SendDlgItemMessageW(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMNW, (WPARAM)3, (LPARAM)&lvc3); - if ((ActualAccount->NewMailN.App != NULL) && (wcslen(ActualAccount->NewMailN.App))) + if ((ActualAccount->NewMailN.App != NULL) && (mir_wstrlen(ActualAccount->NewMailN.App))) EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), TRUE); else EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), FALSE); @@ -2084,9 +2084,9 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR { WCHAR *Command; if (ActualAccount->NewMailN.AppParam != NULL) - Command = new WCHAR[wcslen(ActualAccount->NewMailN.App) + wcslen(ActualAccount->NewMailN.AppParam) + 6]; + Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; else - Command = new WCHAR[wcslen(ActualAccount->NewMailN.App) + 6]; + Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; if (Command != NULL) { diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp index 5b7d699558..e952e77256 100644 --- a/plugins/YAMN/src/debug.cpp +++ b/plugins/YAMN/src/debug.cpp @@ -119,7 +119,7 @@ void DebugLogW(HANDLE File,const WCHAR *fmt,...) va_end(vararg);
EnterCriticalSection(&FileAccessCS);
WriteFile(File,tids,(DWORD)mir_strlen(tids),&Written,NULL);
- WriteFile(File,str,(DWORD)wcslen(str)*sizeof(WCHAR),&Written,NULL);
+ WriteFile(File,str,(DWORD)mir_wstrlen(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 6ca2a0238b..320cda63ff 100644 --- a/plugins/YAMN/src/mails/decode.cpp +++ b/plugins/YAMN/src/mails/decode.cpp @@ -410,7 +410,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) streamlen=MultiByteToWideChar(cp,MB_USEGLYPHCHARS,stream,-1,NULL,0);
if (*out != NULL)
- outlen=wcslen(*out);
+ outlen=mir_wstrlen(*out);
else
outlen=0;
temp=new WCHAR[streamlen+outlen+1];
@@ -452,7 +452,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) WCHAR *tempstore=0;
if (!ConvertStringToUnicode(stream,cp,&tempstore))return;
- size_t tempstoreLength = wcslen(tempstore);
+ size_t tempstoreLength = mir_wstrlen(tempstore);
size_t outind = 0;
while(*start != 0) {
@@ -534,7 +534,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) }
WCHAR *oneWord=0;
if (ConvertStringToUnicode(DecodedResult,cp,&oneWord)) {
- size_t len = wcslen(oneWord);
+ size_t len = mir_wstrlen(oneWord);
memcpy(&tempstore[outind],oneWord,len*sizeof(WCHAR));
outind += len;
}
diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp index 0c7449bf94..582db8d5a2 100644 --- a/plugins/YAMN/src/mails/mime.cpp +++ b/plugins/YAMN/src/mails/mime.cpp @@ -652,7 +652,7 @@ WCHAR *ParseMultipartBody(char *src, char *bond) FailBackRaw:
ConvertStringToUnicode(partData[i].body,partData[i].CodePage,&partData[i].wBody);
}
- resultSize += wcslen(partData[i].wBody);
+ resultSize += mir_wstrlen(partData[i].wBody);
}// if (partData[i].body)
resultSize += 100+4+3; //cr+nl+100+ 3*bullet
}
@@ -696,7 +696,7 @@ FailBackRaw: dest[destpos] = dest[destpos+1] = dest[destpos+2] = 0x2022; // bullet;
destpos += 3;
ConvertStringToUnicode(infoline,CP_ACP,&temp);
- size_t wsize = wcslen(temp);
+ size_t wsize = mir_wstrlen(temp);
wcscpy(&dest[destpos],temp);
destpos += wsize;
delete[] temp;
@@ -704,7 +704,7 @@ FailBackRaw: } // if (i)
if (partData[i].wBody) {
- size_t wsize = wcslen(partData[i].wBody);
+ size_t wsize = mir_wstrlen(partData[i].wBody);
wcscpy(&dest[destpos],partData[i].wBody);
destpos += wsize;
delete[] partData[i].wBody;
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 30e60b8625..f4bb745659 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -1065,13 +1065,13 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara GetDlgItemTextW(hDlg,IDC_EDITAPP,TextW,SIZEOF(TextW));
if (NULL != ActualAccount->NewMailN.App)
delete[] ActualAccount->NewMailN.App;
- ActualAccount->NewMailN.App=new WCHAR[wcslen(TextW)+1];
+ ActualAccount->NewMailN.App=new WCHAR[mir_wstrlen(TextW)+1];
wcscpy(ActualAccount->NewMailN.App,TextW);
GetDlgItemTextW(hDlg,IDC_EDITAPPPARAM,TextW,SIZEOF(TextW));
if (NULL != ActualAccount->NewMailN.AppParam)
delete[] ActualAccount->NewMailN.AppParam;
- ActualAccount->NewMailN.AppParam=new WCHAR[wcslen(TextW)+1];
+ ActualAccount->NewMailN.AppParam=new WCHAR[mir_wstrlen(TextW)+1];
wcscpy(ActualAccount->NewMailN.AppParam,TextW);
ActualAccount->Server->Port=Port;
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 84a5915b4f..209e26ce5f 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -88,9 +88,9 @@ static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam) if (ActualAccount->NewMailN.App != NULL) {
WCHAR *Command;
if (ActualAccount->NewMailN.AppParam != NULL)
- Command = new WCHAR[wcslen(ActualAccount->NewMailN.App)+wcslen(ActualAccount->NewMailN.AppParam)+6];
+ Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App)+mir_wstrlen(ActualAccount->NewMailN.AppParam)+6];
else
- Command = new WCHAR[wcslen(ActualAccount->NewMailN.App)+6];
+ Command = new WCHAR[mir_wstrlen(ActualAccount->NewMailN.App)+6];
if (Command != NULL) {
mir_wstrcpy(Command, L"\"");
|