summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-20 18:39:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-20 18:39:25 +0000
commit5b48d799fc3ebbf8bb0e9010f12954db24c91a32 (patch)
tree4ea9203bec7bd101fe5a2c916fb19af1e679a940 /plugins/Scriver
parentd34993c5bc29deb66cac57406af93619d27ef241 (diff)
minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@4489 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/globals.cpp11
-rw-r--r--plugins/Scriver/src/sendqueue.h26
-rw-r--r--plugins/Scriver/src/utils.cpp6
3 files changed, 21 insertions, 22 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index d9486bba85..493f55256c 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -441,18 +441,17 @@ static int ackevent(WPARAM wParam, LPARAM lParam)
return 0;
}
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.eventType = EVENTTYPE_MESSAGE;
- dbei.flags = DBEF_SENT | (( item->flags & PREF_RTL) ? DBEF_RTL : 0 );
- if ( item->flags & PREF_UTF )
+ dbei.flags = DBEF_SENT | ((item->flags & PREF_RTL) ? DBEF_RTL : 0);
+ if (item->flags & PREF_UTF)
dbei.flags |= DBEF_UTF;
dbei.szModule = GetContactProto(item->hContact);
dbei.timestamp = time(NULL);
dbei.cbBlob = lstrlenA(item->sendBuffer) + 1;
- if ( !( item->flags & PREF_UTF ))
+ if ( !( item->flags & PREF_UTF))
dbei.cbBlob *= sizeof(TCHAR) + 1;
- dbei.pBlob = (PBYTE) item->sendBuffer;
+ dbei.pBlob = (PBYTE)item->sendBuffer;
MessageWindowEvent evt = { sizeof(evt), (int)item->hSendId, item->hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h
index b2d89f5caf..b340a78362 100644
--- a/plugins/Scriver/src/sendqueue.h
+++ b/plugins/Scriver/src/sendqueue.h
@@ -24,21 +24,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef SRMM_SENDQUEUE_H
#define SRMM_SENDQUEUE_H
-typedef struct MessageSendQueueItemStruct
+struct MessageSendQueueItem
{
HWND hwndSender;
- HANDLE hContact;
- char * proto;
- HANDLE hSendId;
- int timeout;
- char * sendBuffer;
- int sendBufferSize;
- int codepage;
- int flags;
- HWND hwndErrorDlg;
- struct MessageSendQueueItemStruct *prev;
- struct MessageSendQueueItemStruct *next;
-}MessageSendQueueItem;
+ HANDLE hContact;
+ char *proto;
+ HANDLE hSendId;
+ int timeout;
+ char *sendBuffer;
+ int sendBufferSize;
+ int codepage;
+ int flags;
+ HWND hwndErrorDlg;
+
+ MessageSendQueueItem *prev, *next;
+};
void InitSendQueue();
void DestroySendQueue();
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index d445914a4f..a29c003844 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -292,8 +292,8 @@ TCHAR *GetRichTextWord(HWND hwnd, POINTL *ptl)
static DWORD CALLBACK StreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
{
- MessageSendQueueItem * msi = (MessageSendQueueItem *) dwCookie;
- msi->sendBuffer = (char *)mir_realloc(msi->sendBuffer, msi->sendBufferSize + cb + 2);
+ MessageSendQueueItem *msi = (MessageSendQueueItem *) dwCookie;
+ msi->sendBuffer = (char*)mir_realloc(msi->sendBuffer, msi->sendBufferSize + cb + 2);
memcpy (msi->sendBuffer + msi->sendBufferSize, pbBuff, cb);
msi->sendBufferSize += cb;
*((TCHAR *)(msi->sendBuffer+msi->sendBufferSize)) = '\0';
@@ -316,7 +316,7 @@ TCHAR *GetRichEditSelection(HWND hwnd)
msi.sendBuffer = NULL;
msi.sendBufferSize = 0;
SendMessage(hwnd, EM_STREAMOUT, (WPARAM)dwFlags, (LPARAM)& stream);
- return (TCHAR *)msi.sendBuffer;
+ return (TCHAR*)msi.sendBuffer;
}
return NULL;
}