summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/chat')
-rw-r--r--plugins/Scriver/src/chat/log.cpp2
-rw-r--r--plugins/Scriver/src/chat/message.cpp8
-rw-r--r--plugins/Scriver/src/chat/options.cpp6
-rw-r--r--plugins/Scriver/src/chat/tools.cpp6
-rw-r--r--plugins/Scriver/src/chat/window.cpp18
5 files changed, 20 insertions, 20 deletions
diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp
index bb8274587b..e743e82bc6 100644
--- a/plugins/Scriver/src/chat/log.cpp
+++ b/plugins/Scriver/src/chat/log.cpp
@@ -33,7 +33,7 @@ static DWORD CALLBACK Log_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
if (lstrdat->buffer == NULL) {
lstrdat->bufferOffset = 0;
lstrdat->buffer = pci->Log_CreateRTF(lstrdat);
- lstrdat->bufferLen = lstrlenA(lstrdat->buffer);
+ lstrdat->bufferLen = mir_strlen(lstrdat->buffer);
}
// give the RTF to the RE control
diff --git a/plugins/Scriver/src/chat/message.cpp b/plugins/Scriver/src/chat/message.cpp
index 1bcc285f79..fa228ab895 100644
--- a/plugins/Scriver/src/chat/message.cpp
+++ b/plugins/Scriver/src/chat/message.cpp
@@ -95,7 +95,7 @@ TCHAR* DoRtfToTags(char *pszText, SESSION_INFO *si)
p1 += 5;
- MoveMemory(pszText, p1, lstrlenA(p1) + 1);
+ MoveMemory(pszText, p1, mir_strlen(p1) + 1);
p1 = pszText;
// iterate through all characters, if rtf control character found then take action
@@ -287,9 +287,9 @@ TCHAR* DoRtfToTags(char *pszText, SESSION_INFO *si)
// move the memory and paste in new commands instead of the old RTF
if (InsertThis[0] || iRemoveChars) {
- MoveMemory(p1 + lstrlenA(InsertThis), p1 + iRemoveChars, lstrlenA(p1) - iRemoveChars + 1);
- CopyMemory(p1, InsertThis, lstrlenA(InsertThis));
- p1 += lstrlenA(InsertThis);
+ MoveMemory(p1 + mir_strlen(InsertThis), p1 + iRemoveChars, mir_strlen(p1) - iRemoveChars + 1);
+ CopyMemory(p1, InsertThis, mir_strlen(InsertThis));
+ p1 += mir_strlen(InsertThis);
}
else p1++;
}
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 938130031d..d06a6a8c50 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -465,9 +465,9 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
LPITEMIDLIST idList = SHBrowseForFolder(&bi);
if (idList) {
SHGetPathFromIDList(idList, tszDirectory);
- lstrcat(tszDirectory, _T("\\"));
+ mir_tstrcat(tszDirectory, _T("\\"));
PathToRelativeT(tszDirectory, tszTemp);
- SetWindowText(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), lstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
+ SetWindowText(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), mir_tstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
}
psMalloc->Free(idList);
psMalloc->Release();
@@ -544,7 +544,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
free(pszText1);
}
else {
- lstrcpyn(g_Settings.pszLogDir, DEFLOGFILENAME, MAX_PATH);
+ mir_tstrncpy(g_Settings.pszLogDir, DEFLOGFILENAME, MAX_PATH);
db_unset(NULL, CHAT_MODULE, "LogDirectory");
}
pci->SM_InvalidateLogDirectories();
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 5053c2b5d7..7af2a95929 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -78,10 +78,10 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
if (pszWordText)
mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("&Message %s"), pszWordText);
else
- lstrcpyn(szTemp, TranslateT("&Message"), SIZEOF(szTemp) - 1);
+ mir_tstrncpy(szTemp, TranslateT("&Message"), SIZEOF(szTemp) - 1);
- if (lstrlen(szTemp) > 40)
- lstrcpyn(szTemp + 40, _T("..."), 4);
+ if (mir_tstrlen(szTemp) > 40)
+ mir_tstrncpy(szTemp + 40, _T("..."), 4);
ModifyMenu(*hMenu, ID_MESS, MF_STRING | MF_BYCOMMAND, ID_MESS, szTemp);
gcmi.Type = MENU_ON_NICKLIST;
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index a383b869f3..0fa3c1485d 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -256,7 +256,7 @@ LBL_SkipEnd:
if (dat->szSearchQuery == NULL) {
dat->szSearchQuery = (TCHAR*)mir_alloc(sizeof(TCHAR)*(end - start + 1));
- lstrcpyn(dat->szSearchQuery, pszText + start, end - start + 1);
+ mir_tstrncpy(dat->szSearchQuery, pszText + start, end - start + 1);
dat->szSearchResult = mir_tstrdup(dat->szSearchQuery);
dat->lastSession = NULL;
}
@@ -969,14 +969,14 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
}
else if (wParam == '\b' && si->szSearch[0]) // backspace
- si->szSearch[lstrlen(si->szSearch) - 1] = '\0';
+ si->szSearch[mir_tstrlen(si->szSearch) - 1] = '\0';
else if (wParam < ' ')
break;
else {
TCHAR szNew[2];
szNew[0] = (TCHAR)wParam;
szNew[1] = '\0';
- if (lstrlen(si->szSearch) >= SIZEOF(si->szSearch) - 2) {
+ if (mir_tstrlen(si->szSearch) >= SIZEOF(si->szSearch) - 2) {
MessageBeep(MB_OK);
break;
}
@@ -991,7 +991,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
for (int i = 0; i < iItems; i++) {
USERINFO *ui = pci->UM_FindUserFromIndex(si->pUsers, i);
if (ui) {
- if (!_tcsnicmp(ui->pszNick, si->szSearch, lstrlen(si->szSearch))) {
+ if (!_tcsnicmp(ui->pszNick, si->szSearch, mir_tstrlen(si->szSearch))) {
SendMessage(hwnd, LB_SETCURSEL, i, 0);
InvalidateRect(hwnd, NULL, FALSE);
return 0;
@@ -1000,7 +1000,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
}
MessageBeep(MB_OK);
- si->szSearch[lstrlen(si->szSearch) - 1] = '\0';
+ si->szSearch[mir_tstrlen(si->szSearch) - 1] = '\0';
return 0;
}
break;
@@ -1441,7 +1441,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
}
SetTextColor(dis->hDC, ui->iStatusEx == 0 ? g_Settings.crUserListColor : g_Settings.crUserListHeadingsColor);
- TextOut(dis->hDC, dis->rcItem.left + x_offset, dis->rcItem.top, ui->pszNick, lstrlen(ui->pszNick));
+ TextOut(dis->hDC, dis->rcItem.left + x_offset, dis->rcItem.top, ui->pszNick, mir_tstrlen(ui->pszNick));
SelectObject(dis->hDC, hOldFont);
}
return TRUE;
@@ -1715,11 +1715,11 @@ LABEL_SHOWWINDOW:
if (GetKeyState(VK_SHIFT) & 0x8000) {
LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
- TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR)*(lstrlen(ui->pszUID) + 3));
+ TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR)*(mir_tstrlen(ui->pszUID) + 3));
if (start == 0)
- mir_sntprintf(pszName, lstrlen(ui->pszUID) + 3, _T("%s: "), ui->pszUID);
+ mir_sntprintf(pszName, mir_tstrlen(ui->pszUID) + 3, _T("%s: "), ui->pszUID);
else
- mir_sntprintf(pszName, lstrlen(ui->pszUID) + 2, _T("%s "), ui->pszUID);
+ mir_sntprintf(pszName, mir_tstrlen(ui->pszUID) + 2, _T("%s "), ui->pszUID);
SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM)pszName);
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);