summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
commitb2fad485cd5b41744ef0cc4a02722c021afd926c (patch)
treeaa19403cd699066600e8306be8ad33e4a17fba6f /plugins/Scriver
parentfc62f1f1e1f8af40a1f7efe0ba3afc358fb66ef3 (diff)
ZeroMemory -> memset, few bugs fised
git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat/log.cpp2
-rw-r--r--plugins/Scriver/src/globals.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp10
-rw-r--r--plugins/Scriver/src/msglog.cpp4
-rw-r--r--plugins/Scriver/src/msgoptions.cpp2
-rw-r--r--plugins/Scriver/src/utils.cpp6
6 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp
index e743e82bc6..225945e3d7 100644
--- a/plugins/Scriver/src/chat/log.cpp
+++ b/plugins/Scriver/src/chat/log.cpp
@@ -59,7 +59,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra
HWND hwndRich = GetDlgItem(hwndDlg, IDC_CHAT_LOG);
LOGSTREAMDATA streamData;
- ZeroMemory(&streamData, sizeof(streamData));
+ memset(&streamData, 0, sizeof(streamData));
streamData.hwnd = hwndRich;
streamData.si = si;
streamData.lin = lin;
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index f36a1d24f6..719d5a5b69 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -303,7 +303,7 @@ void InitGlobals()
{
HDC hdc = GetDC(NULL);
- ZeroMemory(&g_dat, sizeof(struct GlobalMessageData));
+ memset(&g_dat, 0, sizeof(struct GlobalMessageData));
g_dat.hMessageWindowList = WindowList_Create();
g_dat.hParentWindowList = WindowList_Create();
@@ -349,7 +349,7 @@ void FreeGlobals()
WindowList_Destroy(g_dat.hMessageWindowList);
WindowList_Destroy(g_dat.hParentWindowList);
- ZeroMemory(&g_dat, sizeof(g_dat));
+ memset(&g_dat, 0, sizeof(g_dat));
}
void ReloadGlobals()
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 475188e03b..10f588a8a8 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -176,7 +176,7 @@ int RTL_Detect(WCHAR *pszwText)
infoTypeC2 = (WORD *)mir_alloc(sizeof(WORD) * (iLen + 2));
if (infoTypeC2) {
- ZeroMemory(infoTypeC2, sizeof(WORD) * (iLen + 2));
+ memset(infoTypeC2, 0, (sizeof(WORD) * (iLen + 2)));
GetStringTypeW(CT_CTYPE2, pszwText, iLen, infoTypeC2);
@@ -759,7 +759,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->flags |= g_dat.ieviewInstalled ? g_dat.flags & SMF_USEIEVIEW : 0;
{
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
if (!(dat->flags & SMF_RTL)) {
@@ -772,7 +772,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
/* Workaround to make Richedit display RTL messages correctly */
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA | PFM_OFFSETINDENT | PFM_RIGHTINDENT;
pf2.wEffects = PFE_RTLPARA;
@@ -1210,7 +1210,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_SWITCHRTL:
{
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
dat->flags ^= SMF_RTL;
@@ -1660,7 +1660,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int bufSize = ansiBufSize + GetRichTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE), 1200, TRUE) + 2;
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_GETPARAFORMAT, 0, (LPARAM)&pf2);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index aa99c773d1..afd2b0f479 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -852,7 +852,7 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
if (dat->windowData.hwndLog != NULL) {
IEVIEWEVENT evt;
IEVIEWWINDOW ieWindow;
- ZeroMemory(&evt, sizeof(evt));
+ memset(&evt, 0, sizeof(evt));
evt.cbSize = sizeof(evt);
evt.dwFlags = ((dat->flags & SMF_RTL) ? IEEF_RTL : 0);
evt.hwnd = dat->windowData.hwndLog;
@@ -869,7 +869,7 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt);
dat->hDbEventLast = evt.hDbEventFirst != NULL ? evt.hDbEventFirst : dat->hDbEventLast;
- ZeroMemory(&ieWindow, sizeof(ieWindow));
+ memset(&ieWindow, 0, sizeof(ieWindow));
ieWindow.cbSize = sizeof(ieWindow);
ieWindow.iType = IEW_SCROLLBOTTOM;
ieWindow.hwnd = dat->windowData.hwndLog;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index b0773914c3..54b39dc590 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -698,7 +698,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
{
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_OFFSETINDENT | PFM_RIGHTINDENT;
pf2.dxStartIndent = 30;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 07f033524c..2d17cbef67 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -221,7 +221,7 @@ TCHAR *GetRichTextWord(HWND hwnd, POINTL *ptl)
{
TEXTRANGE tr;
CHARRANGE cr;
- ZeroMemory(&tr, sizeof(TEXTRANGE));
+ memset(&tr, 0, sizeof(TEXTRANGE));
pszWord = (TCHAR *)mir_alloc(sizeof(TCHAR) * (end - start + 1));
cr.cpMin = start;
cr.cpMax = end;
@@ -262,7 +262,7 @@ TCHAR *GetRichEditSelection(HWND hwnd)
MessageSendQueueItem msi;
EDITSTREAM stream;
DWORD dwFlags = 0;
- ZeroMemory(&stream, sizeof(stream));
+ memset(&stream, 0, sizeof(stream));
stream.pfnCallback = StreamOutCallback;
stream.dwCookie = (DWORD_PTR) &msi;
dwFlags = SF_TEXT|SF_UNICODE|SFF_SELECTION;
@@ -432,7 +432,7 @@ void SetSearchEngineIcons(HMENU hMenu, HIMAGELIST hImageList)
void GetContactUniqueId(SrmmWindowData *dat, char *buf, int maxlen)
{
CONTACTINFO ci;
- ZeroMemory(&ci, sizeof(ci));
+ memset(&ci, 0, sizeof(ci));
ci.cbSize = sizeof(ci);
ci.hContact = dat->windowData.hContact;
ci.szProto = dat->szProto;