diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:18:21 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:18:21 +0000 |
commit | b499ebc740aa5480be013d40e0d8097066800642 (patch) | |
tree | ed410ee863f4afc0c579599741bf38b4e3ffb706 /plugins/QuickMessages/src | |
parent | 5a17c9299e03bebf46169927abdeee34aaf8e854 (diff) |
replace _tcslen to mir_tstrlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13748 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickMessages/src')
-rw-r--r-- | plugins/QuickMessages/src/Utils.cpp | 10 | ||||
-rw-r--r-- | plugins/QuickMessages/src/main.cpp | 12 | ||||
-rw-r--r-- | plugins/QuickMessages/src/options.cpp | 16 |
3 files changed, 19 insertions, 19 deletions
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 2e2d8ec2b7..ad5517938b 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -365,7 +365,7 @@ TCHAR* getMenuEntry(int buttonnum, int entrynum, BYTE mode) } if (!db_get_ts(NULL, PLGNAME, szMEntry, &dbv)) { - if (_tcslen(dbv.ptszVal)) + if (mir_tstrlen(dbv.ptszVal)) buffer = mir_tstrdup(dbv.ptszVal); db_free(&dbv); } @@ -463,7 +463,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt break; case 'P': ptszName = mir_a2u(GetContactProto(hContact)); - NameLenght = (int)_tcslen(ptszName); + NameLenght = (int)mir_tstrlen(ptszName); p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR)); if (!p) { mir_free(ptszName); @@ -488,7 +488,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt case 'n': ptszName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR); - NameLenght = (int)_tcslen(ptszName); + NameLenght = (int)mir_tstrlen(ptszName); p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR)); if (!p) break; @@ -516,7 +516,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) break; - NameLenght = (int)_tcslen(ci.pszVal); + NameLenght = (int)mir_tstrlen(ci.pszVal); ptszName = ci.pszVal; p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR)); if (!p) { @@ -548,7 +548,7 @@ TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* pt if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) break; - NameLenght = (int)_tcslen(ci.pszVal); + NameLenght = (int)mir_tstrlen(ci.pszVal); ptszName = ci.pszVal; p = (TCHAR *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(TCHAR)); if (!p) { diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp index 4c3e63473c..c3ee162400 100644 --- a/plugins/QuickMessages/src/main.cpp +++ b/plugins/QuickMessages/src/main.cpp @@ -98,7 +98,7 @@ static int InputMenuPopup(WPARAM wParam,LPARAM lParam) hData= GetClipboardData(CF_UNICODETEXT);
chBuffer= (TCHAR*)GlobalLock(hData);
- textLength=(int)_tcslen(chBuffer);
+ textLength=(int)mir_tstrlen(chBuffer);
pszCBText=mir_tstrdup(chBuffer);
GlobalUnlock(hData);
CloseClipboard();
@@ -115,7 +115,7 @@ static int InputMenuPopup(WPARAM wParam,LPARAM lParam) SendMessage(mwpd->hwnd,EM_GETSELTEXT, 0, (LPARAM)pszText);
}
if(qd->ptszValue){
- ptszQValue=ParseString(mwpd->hContact,qd->ptszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(qd->ptszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
+ ptszQValue=ParseString(mwpd->hContact,qd->ptszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)mir_tstrlen(qd->ptszValue),textlenght,pszCBText?(int)mir_tstrlen(pszCBText):0);
if ((bIsService=qd->bIsService)&&ptszQValue)
CallService(mir_u2a(ptszQValue),(WPARAM)mwpd->hContact,0);
@@ -173,7 +173,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) hData= GetClipboardData(CF_UNICODETEXT);
chBuffer= (TCHAR*)GlobalLock(hData);
- textLength=(int)_tcslen(chBuffer);
+ textLength=(int)mir_tstrlen(chBuffer);
pszCBText=mir_tstrdup(chBuffer);
GlobalUnlock(hData);
CloseClipboard();
@@ -206,7 +206,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) switch(state) {
case 1:
if(ButtonsList[cbcd->dwButtonId]->ptszQValue)
- ptszQValue = ParseString(cbcd->hContact,ButtonsList[cbcd->dwButtonId]->ptszQValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(ButtonsList[cbcd->dwButtonId]->ptszQValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
+ ptszQValue = ParseString(cbcd->hContact,ButtonsList[cbcd->dwButtonId]->ptszQValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)mir_tstrlen(ButtonsList[cbcd->dwButtonId]->ptszQValue),textlenght,pszCBText?(int)mir_tstrlen(pszCBText):0);
if ((bIsService = ButtonsList[cbcd->dwButtonId]->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
break;
@@ -215,7 +215,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) {
ButtonData *bd = (ButtonData *)sl->items[0];
if(bd && bd->pszValue){
- ptszQValue = ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(bd->pszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
+ ptszQValue = ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)mir_tstrlen(bd->pszValue),textlenght,pszCBText?(int)mir_tstrlen(pszCBText):0);
if ((bIsService = bd->bIsServName)&&ptszQValue)
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
}
@@ -263,7 +263,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) bd= (ButtonData *)sl->items[res-1];
bCTRL=(GetKeyState(VK_CONTROL)&0x8000)?1:0;
if(bd->pszValue){
- ptszQValue=ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(bd->pszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
+ ptszQValue=ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)mir_tstrlen(bd->pszValue),textlenght,pszCBText?(int)mir_tstrlen(pszCBText):0);
if ((bIsService=bd->bIsServName)&&ptszQValue)
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
}
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp index b1c66f66ad..103d0fe923 100644 --- a/plugins/QuickMessages/src/options.cpp +++ b/plugins/QuickMessages/src/options.cpp @@ -124,7 +124,7 @@ void SetMenuEntryProperties(HWND hdlg) ListData* ld = ( ListData* )tvi.lParam;
TCHAR szValue[256];
GetDlgItemText(hdlg, IDC_RCLICKVALUE, szValue, SIZEOF(szValue));
- if(_tcslen(szValue))
+ if(mir_tstrlen(szValue))
{
if(ld->ptszOPQValue&&(ld->ptszOPQValue!=ld->ptszQValue))
mir_free(ld->ptszOPQValue);
@@ -145,9 +145,9 @@ void SetMenuEntryProperties(HWND hdlg) ButtonData* bd = ( ButtonData* )tvi.lParam;
TCHAR szValue[256];
GetDlgItemText(hdlg, IDC_MENUVALUE, szValue, SIZEOF(szValue));
- if(_tcslen(szValue))
+ if(mir_tstrlen(szValue))
{
- if(_tcslen(bd->pszOpValue)&&(bd->pszOpValue!=bd->pszValue))
+ if(mir_tstrlen(bd->pszOpValue)&&(bd->pszOpValue!=bd->pszValue))
mir_free(bd->pszOpValue);
bd->pszOpValue=mir_tstrdup(szValue);
}
@@ -773,7 +773,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetWindowText(hwndEdit, szLabel, SIZEOF(szLabel));
hwndEdit=NULL;
- if (!_tcslen(szLabel)) break;
+ if (!mir_tstrlen(szLabel)) break;
if (bd = (ButtonData*)tvi.lParam){
if (!_tcscmp(szLabel,_T("---"))) {
if(TreeView_GetChild(hMenuTree,tvi.hItem))
@@ -829,7 +829,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (bd) {
TCHAR szValue[256];
GetDlgItemText(hdlg, IDC_MENUVALUE, szValue, SIZEOF(szValue));
- if(_tcslen(szValue))
+ if(mir_tstrlen(szValue))
{
if(bd->pszOpValue&&(bd->pszOpValue!=bd->pszValue))
mir_free(bd->pszOpValue);
@@ -905,7 +905,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetWindowText(hwndEdit, szLabel, SIZEOF(szLabel));
hwndEdit=NULL;
- if (!_tcslen(szLabel)) break;
+ if (!mir_tstrlen(szLabel)) break;
tvi.pszText=szLabel;
((ListData*)tvi.lParam)->dwOPFlags|=QMF_RENAMED;
@@ -992,7 +992,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetDlgItemText(hdlg, IDC_BUTTONNAME, namebuff, SIZEOF(namebuff));
tvis.item.mask=TVIF_PARAM|TVIF_TEXT;
- tvis.item.pszText=(_tcslen(namebuff))?namebuff:TranslateT("New Button");
+ tvis.item.pszText=(mir_tstrlen(namebuff))?namebuff:TranslateT("New Button");
tvis.item.lParam=(LPARAM)ld;
TreeView_SelectItem(hButtonsList,TreeView_InsertItem(hButtonsList,&tvis));
}break;
@@ -1042,7 +1042,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetDlgItemText(hdlg, IDC_MENUNAME, namebuff, SIZEOF(namebuff));
bd->dwOPPos=TreeView_GetCount(hMenuTree)-1;
- bd->pszOpName=_tcslen(namebuff)?mir_tstrdup(namebuff):mir_tstrdup(TranslateT("New Menu Entry"));
+ bd->pszOpName=mir_tstrlen(namebuff)?mir_tstrdup(namebuff):mir_tstrdup(TranslateT("New Menu Entry"));
bd->pszOpValue=mir_tstrdup(bd->pszOpName);
bd->fEntryOpType=!_tcscmp(namebuff,_T("---"))?QMF_EX_SEPARATOR:0;
bd->dwOPFlags=QMF_NEW;
|