summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 10:52:12 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 10:52:12 +0000
commit5a19f89d6c8eb148e6bb7b450f702b666f685ed1 (patch)
tree2214a02a6785d5f4716ee53d191674746b34790c /plugins/TabSRMM
parent518e10779e770eac62fcedc96e750e538fa395ba (diff)
MoveMemory -> memmove
git-svn-id: http://svn.miranda-ng.org/main/trunk@11365 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/chat/message.cpp4
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp14
-rw-r--r--plugins/TabSRMM/src/utils.cpp2
6 files changed, 16 insertions, 16 deletions
diff --git a/plugins/TabSRMM/src/chat/message.cpp b/plugins/TabSRMM/src/chat/message.cpp
index c108f97281..afc1503f53 100644
--- a/plugins/TabSRMM/src/chat/message.cpp
+++ b/plugins/TabSRMM/src/chat/message.cpp
@@ -110,7 +110,7 @@ TCHAR* Chat_DoRtfToTags(char* pszText, SESSION_INFO *si)
}
else p1 += 7;
- MoveMemory(pszText, p1, mir_strlen(p1) + 1);
+ memmove(pszText, p1, mir_strlen(p1) + 1);
p1 = pszText;
// iterate through all characters, if rtf control character found then take action
@@ -298,7 +298,7 @@ TCHAR* Chat_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 + mir_strlen(InsertThis) , p1 + iRemoveChars, mir_strlen(p1) - iRemoveChars + 1);
+ memmove(p1 + mir_strlen(InsertThis) , p1 + iRemoveChars, mir_strlen(p1) - iRemoveChars + 1);
memcpy(p1, InsertThis, mir_strlen(InsertThis));
p1 += mir_strlen(InsertThis);
}
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 6e06dd7f50..54d1a93446 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -296,7 +296,7 @@ void CContactCache::saveHistory(WPARAM wParam, LPARAM lParam)
if ((m_iHistoryTop == m_iHistorySize) && oldTop == 0) { // shift the stack down...
TInputHistory ihTemp = m_history[0];
m_iHistoryTop--;
- ::MoveMemory((void*)&m_history[0], (void*)&m_history[1], (m_iHistorySize - 1) * sizeof(TInputHistory));
+ ::memmove((void*)&m_history[0], (void*)&m_history[1], (m_iHistorySize - 1) * sizeof(TInputHistory));
m_history[m_iHistoryTop] = ihTemp;
}
if (iLength > m_history[m_iHistoryTop].lLen) {
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 913f0a1f2a..2dfbe714ec 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2081,7 +2081,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
tr.lpstrText = (TCHAR*)_alloca(sizeof(TCHAR)*(tr.chrg.cpMax - tr.chrg.cpMin + 8));
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) {
- MoveMemory(tr.lpstrText + 7, tr.lpstrText, tr.chrg.cpMax - tr.chrg.cpMin + 1);
+ memmove(tr.lpstrText + 7, tr.lpstrText, tr.chrg.cpMax - tr.chrg.cpMin + 1);
memcpy(tr.lpstrText, _T("mailto:"), 7);
}
if (!IsStringValidLink(tr.lpstrText))
@@ -2898,8 +2898,8 @@ quote_from_last:
}
if (dbei.eventType == EVENTTYPE_FILE) {
size_t iDescr = mir_strlen((char *)(szText + sizeof(DWORD)));
- MoveMemory(szText, szText + sizeof(DWORD), iDescr);
- MoveMemory(szText + iDescr + 2, szText + sizeof(DWORD)+iDescr, dbei.cbBlob - iDescr - sizeof(DWORD)-1);
+ memmove(szText, szText + sizeof(DWORD), iDescr);
+ memmove(szText + iDescr + 2, szText + sizeof(DWORD)+iDescr, dbei.cbBlob - iDescr - sizeof(DWORD)-1);
szText[iDescr] = '\r';
szText[iDescr + 1] = '\n';
szConverted = (TCHAR*)mir_alloc(sizeof(TCHAR)* (1 + mir_strlen((char *)szText)));
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 1b3f647bb4..e35708465f 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -883,7 +883,7 @@ BOOL TSAPI DoRtfToTags(TCHAR *pszText, const TWindowData *dat)
TCHAR InsertThis[50];
p1 += 5;
- MoveMemory(pszText, p1, (mir_tstrlen(p1) + 1) * sizeof(TCHAR));
+ memmove(pszText, p1, (mir_tstrlen(p1) + 1) * sizeof(TCHAR));
p1 = pszText;
// iterate through all characters, if rtf control character found then take action
while (*p1 != '\0') {
@@ -1075,7 +1075,7 @@ BOOL TSAPI DoRtfToTags(TCHAR *pszText, const TWindowData *dat)
// move the memory and paste in new commands instead of the old RTF
if (InsertThis[0] || iRemoveChars) {
size_t cbLen = _tcslen(InsertThis);
- MoveMemory(p1 + cbLen, p1 + iRemoveChars, (mir_tstrlen(p1) - iRemoveChars + 1) * sizeof(TCHAR));
+ memmove(p1 + cbLen, p1 + iRemoveChars, (mir_tstrlen(p1) - iRemoveChars + 1) * sizeof(TCHAR));
memcpy(p1, InsertThis, cbLen * sizeof(TCHAR));
p1 += cbLen;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index ea502d8c7e..1e89d91879 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -347,14 +347,14 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int
memcpy(*buffer + i, begin ? "\\i1 " : "\\i0 ", 4);
continue;
case 'u':
- MoveMemory(*buffer + i + 2, *buffer + i + 1, *cbBufferEnd - i);
+ memmove(*buffer + i + 2, *buffer + i + 1, *cbBufferEnd - i);
memcpy(*buffer + i, begin ? "\\ul1 " : "\\ul0 ", 5);
*cbBufferEnd += 1;
continue;
case 's':
*cbBufferAlloced += 20;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
- MoveMemory(*buffer + i + 6, *buffer + i + 1, (*cbBufferEnd - i) + 1);
+ memmove(*buffer + i + 6, *buffer + i + 1, (*cbBufferEnd - i) + 1);
memcpy(*buffer + i, begin ? "\\strike1 " : "\\strike0 ", begin ? 9 : 9);
*cbBufferEnd += 5;
continue;
@@ -379,7 +379,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int
*cbBufferAlloced += 1024;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
- MoveMemory(*buffer + i + 6, *buffer + i + 2, *cbBufferEnd - i - 1);
+ memmove(*buffer + i + 6, *buffer + i + 2, *cbBufferEnd - i - 1);
memcpy(*buffer + i, "\\line ", 6);
*cbBufferEnd += 4;
}
@@ -388,7 +388,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int
*cbBufferAlloced += 1024;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
- MoveMemory(*buffer + i + 6, *buffer + i + 1, *cbBufferEnd - i);
+ memmove(*buffer + i + 6, *buffer + i + 1, *cbBufferEnd - i);
memcpy(*buffer + i, "\\line ", 6);
*cbBufferEnd += 5;
}
@@ -397,7 +397,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int
*cbBufferAlloced += 1024;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
- MoveMemory(*buffer + i + 5, *buffer + i + 1, *cbBufferEnd - i);
+ memmove(*buffer + i + 5, *buffer + i + 1, *cbBufferEnd - i);
memcpy(*buffer + i, "\\tab ", 5);
*cbBufferEnd += 4;
}
@@ -406,7 +406,7 @@ static int AppendToBufferWithRTF(int mode, char **buffer, int *cbBufferEnd, int
*cbBufferAlloced += 1024;
*buffer = (char *)mir_realloc(*buffer, *cbBufferAlloced);
}
- MoveMemory(*buffer + i + 1, *buffer + i, *cbBufferEnd - i + 1);
+ memmove(*buffer + i + 1, *buffer + i, *cbBufferEnd - i + 1);
(*buffer)[i] = '\\';
++*cbBufferEnd;
i++;
@@ -683,7 +683,7 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
if (dat->hHistoryEvents) {
if (dat->curHistory == dat->maxHistory) {
- MoveMemory(dat->hHistoryEvents, &dat->hHistoryEvents[1], sizeof(HANDLE)* (dat->maxHistory - 1));
+ memmove(dat->hHistoryEvents, &dat->hHistoryEvents[1], sizeof(HANDLE)* (dat->maxHistory - 1));
dat->curHistory--;
}
dat->hHistoryEvents[dat->curHistory++] = hDbEvent;
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index f7a3739098..87e95357e9 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -976,7 +976,7 @@ const wchar_t* Utils::extractURLFromRichEdit(const ENLINK* _e, const HWND hwndRi
tr.lpstrText = (wchar_t *)mir_alloc(2 * (tr.chrg.cpMax - tr.chrg.cpMin + 8));
::SendMessageW(hwndRich, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (wcschr(tr.lpstrText, '@') != NULL && wcschr(tr.lpstrText, ':') == NULL && wcschr(tr.lpstrText, '/') == NULL) {
- ::MoveMemory(tr.lpstrText + 7, tr.lpstrText, sizeof(wchar_t) * (tr.chrg.cpMax - tr.chrg.cpMin + 1));
+ ::memmove(tr.lpstrText + 7, tr.lpstrText, sizeof(wchar_t) * (tr.chrg.cpMax - tr.chrg.cpMin + 1));
::memcpy(tr.lpstrText, L"mailto:", 7 * sizeof(wchar_t));
}
return(tr.lpstrText);