diff options
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r-- | plugins/YAMN/src/account.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/badconnect.cpp | 16 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 26 | ||||
-rw-r--r-- | plugins/YAMN/src/mails/mails.cpp | 6 | ||||
-rw-r--r-- | plugins/YAMN/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3opt.cpp | 18 | ||||
-rw-r--r-- | plugins/YAMN/src/services.cpp | 10 |
7 files changed, 41 insertions, 41 deletions
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index 7470a1b969..32b44dcd33 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -1250,7 +1250,7 @@ void WINAPI GetStatusFcn(HACCOUNT Which,TCHAR *Value) #ifdef DEBUG_SYNCHRO DebugLog(SynchroFile,"\tGetStatus:AccountStatusCS-cs enter\n"); #endif - lstrcpy(Value,Which->Status); + mir_tstrcpy(Value,Which->Status); #ifdef DEBUG_SYNCHRO DebugLog(SynchroFile,"\tGetStatus:AccountStatusCS-cs done\n"); #endif @@ -1270,7 +1270,7 @@ void WINAPI SetStatusFcn(HACCOUNT Which,TCHAR *Value) #ifdef DEBUG_SYNCHRO DebugLog(SynchroFile,"\tSetStatus:AccountStatusCS-cs enter\n"); #endif - lstrcpy(Which->Status,Value); + mir_tstrcpy(Which->Status,Value); WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUS,(WPARAM)Which,0); #ifdef DEBUG_SYNCHRO DebugLog(SynchroFile,"\tSetStatus:AccountStatusCS-cs done\n"); diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index f113392917..3387028fc8 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -38,11 +38,11 @@ LRESULT CALLBACK BadConnectPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPa Command = new WCHAR[wcslen(ActualAccount->BadConnectN.App)+6];
if (Command != NULL) {
- lstrcpyW(Command,L"\"");
- lstrcatW(Command,ActualAccount->BadConnectN.App);
- lstrcatW(Command,L"\" ");
+ mir_wstrcpy(Command,L"\"");
+ mir_wstrcat(Command,ActualAccount->BadConnectN.App);
+ mir_wstrcat(Command,L"\" ");
if (ActualAccount->BadConnectN.AppParam != NULL)
- lstrcatW(Command,ActualAccount->BadConnectN.AppParam);
+ mir_wstrcat(Command,ActualAccount->BadConnectN.AppParam);
CreateProcessW(NULL,Command,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi);
delete[] Command;
}
@@ -119,13 +119,13 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA BadConnectPopup.PluginWindowProc = BadConnectPopupProc;
BadConnectPopup.PluginData = ActualAccount;
- lstrcpyn(BadConnectPopup.lptzContactName, _A2T(ActualAccount->Name), SIZEOF(BadConnectPopup.lptzContactName));
+ mir_tstrncpy(BadConnectPopup.lptzContactName, _A2T(ActualAccount->Name), SIZEOF(BadConnectPopup.lptzContactName));
}
if (ActualAccount->Plugin->Fcn != NULL && ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr != NULL) {
Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode);
SetDlgItemText(hDlg,IDC_STATICMSG,Message1W);
- lstrcpyn(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
+ mir_tstrncpy(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
@@ -133,7 +133,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA {
Message1W=ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode);
SetDlgItemText(hDlg,IDC_STATICMSG,Message1W);
- lstrcpyn(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
+ mir_tstrncpy(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
@@ -141,7 +141,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA {
Message1W=TranslateT("Unknown error");
SetDlgItemText(hDlg,IDC_STATICMSG,Message1W);
- lstrcpyn(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
+ mir_tstrncpy(BadConnectPopup.lptzText,Message1W,sizeof(BadConnectPopup.lptzText));
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index cda180d5ac..c983eadddf 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -601,8 +601,8 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb } if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW)) { - lstrcpyn(NewMailPopup.lptzContactName, FromStr, SIZEOF(NewMailPopup.lptzContactName)); - lstrcpyn(NewMailPopup.lptzText, UnicodeHeader.Subject, SIZEOF(NewMailPopup.lptzText)); + mir_tstrncpy(NewMailPopup.lptzContactName, FromStr, SIZEOF(NewMailPopup.lptzContactName)); + mir_tstrncpy(NewMailPopup.lptzText, UnicodeHeader.Subject, SIZEOF(NewMailPopup.lptzText)); PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)malloc(sizeof(YAMN_MAILSHOWPARAM)); if (MailParam) { @@ -690,7 +690,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR NewMailPopup.PluginWindowProc = NewMailPopupProc; NewMailPopup.PluginData = (void *)0; //multiple popups - lstrcpyn(NewMailPopup.lptzContactName, _A2T(ActualAccount->Name), SIZEOF(NewMailPopup.lptzContactName)); + mir_tstrncpy(NewMailPopup.lptzContactName, _A2T(ActualAccount->Name), SIZEOF(NewMailPopup.lptzContactName)); mir_sntprintf(NewMailPopup.lptzText, SIZEOF(NewMailPopup.lptzText), TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); PUAddPopupT(&NewMailPopup); } @@ -764,11 +764,11 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR if (Command != NULL) { - lstrcpyW(Command,L"\""); - lstrcatW(Command,ActualAccount->NewMailN.App); - lstrcatW(Command,L"\" "); + mir_wstrcpy(Command,L"\""); + mir_wstrcat(Command,ActualAccount->NewMailN.App); + mir_wstrcat(Command,L"\" "); if (ActualAccount->NewMailN.AppParam != NULL) - lstrcatW(Command,ActualAccount->NewMailN.AppParam); + mir_wstrcat(Command,ActualAccount->NewMailN.AppParam); CreateProcessW(NULL,Command,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi); delete[] Command; } @@ -793,11 +793,11 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR NoNewMailPopup.PluginWindowProc=NoNewMailPopupProc; NoNewMailPopup.PluginData=(void *)0; //it's not new mail popup - lstrcpyn(NoNewMailPopup.lptzContactName,_A2T(ActualAccount->Name),SIZEOF(NoNewMailPopup.lptzContactName)); + mir_tstrncpy(NoNewMailPopup.lptzContactName,_A2T(ActualAccount->Name),SIZEOF(NoNewMailPopup.lptzContactName)); if (MN->Real.PopupSL2NC+MN->Virtual.PopupSL2NC) mir_sntprintf(NoNewMailPopup.lptzText, SIZEOF(NoNewMailPopup.lptzText), TranslateT("No new mail message, %d spam(s)"), MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC); else - lstrcpyn(NoNewMailPopup.lptzText,TranslateT("No new mail message"),SIZEOF(NoNewMailPopup.lptzText)); + mir_tstrncpy(NoNewMailPopup.lptzText,TranslateT("No new mail message"),SIZEOF(NoNewMailPopup.lptzText)); PUAddPopupT(&NoNewMailPopup); } @@ -2077,11 +2077,11 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM if (Command != NULL) { - lstrcpyW(Command,L"\""); - lstrcatW(Command,ActualAccount->NewMailN.App); - lstrcatW(Command,L"\" "); + mir_wstrcpy(Command,L"\""); + mir_wstrcat(Command,ActualAccount->NewMailN.App); + mir_wstrcat(Command,L"\" "); if (ActualAccount->NewMailN.AppParam != NULL) - lstrcatW(Command,ActualAccount->NewMailN.AppParam); + mir_wstrcat(Command,ActualAccount->NewMailN.AppParam); CreateProcessW(NULL,Command,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi); delete[] Command; } diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 716d1905f0..70fa4f8321 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -417,9 +417,9 @@ void WINAPI TranslateHeaderFcn(char *stream,int len,struct CMimeItem **head) Item->Next=NULL;
Item->name=new char [prev2-prev1+1];
- lstrcpynA(Item->name,prev1,prev2-prev1+1);
+ mir_strncpy(Item->name,prev1,prev2-prev1+1);
Item->value=new char [finder-prev3+1];
- lstrcpynA(Item->value,prev3,finder-prev3+1);
+ mir_strncpy(Item->value,prev3,finder-prev3+1);
if (EOS(finder))
break;
@@ -440,7 +440,7 @@ void WINAPI TranslateHeaderFcn(char *stream,int len,struct CMimeItem **head) Item->Next=NULL;//just in case;
Item->name=new char[5]; strncpy(Item->name,"Body",5);
Item->value=new char [prev2-prev1];
- lstrcpynA(Item->value,prev1,prev2-prev1-1);
+ mir_strncpy(Item->value,prev1,prev2-prev1-1);
}
break; // there is nothing else
}
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 14b1a8af9c..369940ae67 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -220,7 +220,7 @@ static void LoadPlugins() continue; // we have a dot - int len = lstrlen(fd.cFileName); // find the length of the string + int len = mir_tstrlen(fd.cFileName); // find the length of the string TCHAR* end = fd.cFileName+len; // get a pointer to the NULL int safe = (end-dot)-1; // figure out how many chars after the dot are "safe", not including NULL diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 7dbdaff8ee..455a981ca0 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -684,7 +684,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara SendDlgItemMessage(hDlg, IDC_COMBOCP, CB_ADDSTRING, 0, (LPARAM)TranslateT("Default"));
for (i=1; i < CPLENSUPP; i++) {
CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[i].CP,0,&info);
- size_t len = lstrlen(info.CodePageName+7);
+ size_t len = mir_tstrlen(info.CodePageName+7);
info.CodePageName[len+6]=0;
SendDlgItemMessage(hDlg,IDC_COMBOCP,CB_ADDSTRING,0,(LPARAM)(info.CodePageName+7));
}
@@ -745,7 +745,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara if (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput))) {
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
- if (lstrlenA(DlgInput))
+ if (mir_strlen(DlgInput))
DlgEnableAccount(hDlg,TRUE,TRUE);
else
DlgEnableAccount(hDlg,FALSE,FALSE);
@@ -1262,7 +1262,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa if (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput)))
{
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
- if (lstrlenA(DlgInput))
+ if (mir_strlen(DlgInput))
DlgEnableAccountPopup(hDlg,TRUE,TRUE);
else
DlgEnableAccountPopup(hDlg,FALSE,FALSE);
@@ -1339,12 +1339,12 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa TesterF.lchIcon=g_LoadIconEx(3);
TesterN.lchIcon=g_LoadIconEx(1);
- lstrcpyn(Tester.lptzContactName,TranslateT("Account Test"),MAX_CONTACTNAME);
- lstrcpyn(TesterF.lptzContactName,TranslateT("Account Test (failed)"),MAX_CONTACTNAME);
- lstrcpyn(TesterN.lptzContactName,TranslateT("Account Test"),MAX_CONTACTNAME);
- lstrcpyn(Tester.lptzText,TranslateT("You have N new mail messages"),MAX_SECONDLINE);
- lstrcpyn(TesterF.lptzText,TranslateT("Connection failed message"),MAX_SECONDLINE);
- lstrcpyn(TesterN.lptzText,TranslateT("No new mail message"),MAX_SECONDLINE);
+ mir_tstrncpy(Tester.lptzContactName,TranslateT("Account Test"),MAX_CONTACTNAME);
+ mir_tstrncpy(TesterF.lptzContactName,TranslateT("Account Test (failed)"),MAX_CONTACTNAME);
+ mir_tstrncpy(TesterN.lptzContactName,TranslateT("Account Test"),MAX_CONTACTNAME);
+ mir_tstrncpy(Tester.lptzText,TranslateT("You have N new mail messages"),MAX_SECONDLINE);
+ mir_tstrncpy(TesterF.lptzText,TranslateT("Connection failed message"),MAX_SECONDLINE);
+ mir_tstrncpy(TesterN.lptzText,TranslateT("No new mail message"),MAX_SECONDLINE);
if (TesterC)
{
Tester.colorBack=SendDlgItemMessage(hDlg,IDC_CPB,CPM_GETCOLOUR,0,0);
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 399424fd0f..cb158fdc9e 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -39,7 +39,7 @@ static INT_PTR Service_SetStatus(WPARAM wParam, LPARAM lParam) static INT_PTR Service_GetName(WPARAM wParam, LPARAM lParam)
{
- lstrcpynA((char *) lParam, YAMN_DBMODULE, wParam);
+ mir_strncpy((char *) lParam, YAMN_DBMODULE, wParam);
return 0;
}
@@ -93,11 +93,11 @@ static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam) Command = new WCHAR[wcslen(ActualAccount->NewMailN.App)+6];
if (Command != NULL) {
- lstrcpyW(Command, L"\"");
- lstrcatW(Command, ActualAccount->NewMailN.App);
- lstrcatW(Command, L"\" ");
+ mir_wstrcpy(Command, L"\"");
+ mir_wstrcat(Command, ActualAccount->NewMailN.App);
+ mir_wstrcat(Command, L"\" ");
if (ActualAccount->NewMailN.AppParam != NULL)
- lstrcatW(Command, ActualAccount->NewMailN.AppParam);
+ mir_wstrcat(Command, ActualAccount->NewMailN.AppParam);
PROCESS_INFORMATION pi;
CreateProcessW(NULL, Command, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi);
|