From 874cdbe42cfe376f0e72fd5fe6bad0d2f75f4ee3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Jul 2013 11:11:48 +0000 Subject: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@5427 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber.cpp | 2 +- protocols/JabberG/src/jabber.h | 6 ++-- protocols/JabberG/src/jabber_bookmarks.cpp | 34 ++++++++++----------- protocols/JabberG/src/jabber_byte.cpp | 2 +- protocols/JabberG/src/jabber_caps.h | 2 +- protocols/JabberG/src/jabber_chat.cpp | 10 +++---- protocols/JabberG/src/jabber_console.cpp | 2 +- protocols/JabberG/src/jabber_events.cpp | 20 ++++++------- protocols/JabberG/src/jabber_file.cpp | 2 +- protocols/JabberG/src/jabber_form.cpp | 2 +- protocols/JabberG/src/jabber_groupchat.cpp | 20 ++++++------- protocols/JabberG/src/jabber_iq.h | 2 +- protocols/JabberG/src/jabber_iqid.cpp | 12 ++++---- protocols/JabberG/src/jabber_iqid_muc.cpp | 4 +-- protocols/JabberG/src/jabber_list.cpp | 22 +++++++------- protocols/JabberG/src/jabber_menu.cpp | 36 +++++++++++------------ protocols/JabberG/src/jabber_message_handlers.cpp | 2 +- protocols/JabberG/src/jabber_message_manager.h | 2 +- protocols/JabberG/src/jabber_opt.cpp | 4 +-- protocols/JabberG/src/jabber_password.cpp | 2 +- protocols/JabberG/src/jabber_presence_manager.h | 2 +- protocols/JabberG/src/jabber_privacy.h | 6 ++-- protocols/JabberG/src/jabber_proto.h | 10 +++---- protocols/JabberG/src/jabber_rc.h | 2 +- protocols/JabberG/src/jabber_search.h | 2 +- protocols/JabberG/src/jabber_send_manager.h | 2 +- protocols/JabberG/src/jabber_svc.cpp | 4 +-- protocols/JabberG/src/jabber_thread.cpp | 4 +-- protocols/JabberG/src/jabber_userinfo.cpp | 10 +++---- protocols/JabberG/src/jabber_util.cpp | 6 ++-- protocols/JabberG/src/jabber_vcard.cpp | 16 +++++----- 31 files changed, 125 insertions(+), 127 deletions(-) diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 020029e1f2..c2575a619b 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -183,7 +183,7 @@ static CJabberProto* jabberProtoInit(const char* pszProtoName, const TCHAR *tszU return ppro; } -static int jabberProtoUninit(CJabberProto* ppro) +static int jabberProtoUninit(CJabberProto *ppro) { g_Instances.remove(ppro); delete ppro; diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 47f0b4deb1..32a47f8b44 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -445,9 +445,9 @@ struct filetransfer // Used by file sending only HANDLE hFileEvent; unsigned __int64 *fileSize; - TCHAR* szDescription; + TCHAR *szDescription; - CJabberProto* ppro; + CJabberProto *ppro; }; struct JABBER_SEARCH_RESULT @@ -488,7 +488,7 @@ struct JABBER_MUC_JIDLIST_INFO JABBER_MUC_JIDLIST_TYPE type; TCHAR* roomJid; // filled-in by the WM_JABBER_REFRESH code HXML iqNode; - CJabberProto* ppro; + CJabberProto *ppro; TCHAR* type2str(void) const; }; diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 6fae8422bc..2f7045cc6e 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Bookmarks editor window struct JabberAddBookmarkDlgParam { - CJabberProto* ppro; + CJabberProto *ppro; JABBER_LIST_ITEM* m_item; }; @@ -83,21 +83,21 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM case WM_COMMAND: switch (HIWORD(wParam)) { - case BN_CLICKED: - switch (LOWORD (wParam)) { - case IDC_ROOM_RADIO: - EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), TRUE); - break; - case IDC_AGENT_RADIO: - case IDC_URL_RADIO: - EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); - SendDlgItemMessage(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BM_SETCHECK, BST_UNCHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), FALSE); - break; - } + case BN_CLICKED: + switch (LOWORD (wParam)) { + case IDC_ROOM_RADIO: + EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), TRUE); + break; + case IDC_AGENT_RADIO: + case IDC_URL_RADIO: + EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); + SendDlgItemMessage(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BM_SETCHECK, BST_UNCHECKED, 0); + EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), FALSE); + break; + } } switch (LOWORD(wParam)) { @@ -457,7 +457,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleBookmarks(WPARAM, LPARAM) ///////////////////////////////////////////////////////////////////////////////////////// // Launches the Bookmark details window, lParam is JABBER_BOOKMARK_ITEM* -int CJabberProto::AddEditBookmark(JABBER_LIST_ITEM* item) +int CJabberProto::AddEditBookmark(JABBER_LIST_ITEM *item) { if (m_bJabberOnline) { JabberAddBookmarkDlgParam param; diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 8970a5b657..79624317de 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -81,7 +81,7 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo* pInfo) void JabberByteSendConnection(HANDLE hConn, DWORD /*dwRemoteIP*/, void* extra) { - CJabberProto* ppro = (CJabberProto*)extra; + CJabberProto *ppro = (CJabberProto*)extra; TCHAR szPort[8]; JABBER_BYTE_TRANSFER *jbt; int recvResult, bytesParsed; diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index b7466cfd91..de3d64525c 100644 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -260,7 +260,7 @@ class CJabberClientCapsManager protected: CRITICAL_SECTION m_cs; CJabberClientCaps *m_pClients; - CJabberProto* ppro; + CJabberProto *ppro; protected: CJabberClientCaps *FindClient(const TCHAR *szNode); diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index acc0ec2ab5..043dc37382 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -124,15 +124,14 @@ int JabberGcGetStatus(JABBER_RESOURCE_STATUS *r) int CJabberProto::GcInit(JABBER_LIST_ITEM* item) { int i; - GCSESSION gcw = {0}; - GCEVENT gce = {0}; // translate string for menus (this can't be done in initializer) for (i = 0; i < SIZEOF(sttAffiliationItems); i++) sttAffiliationItems[i].translate(); for (i = 0; i < SIZEOF(sttRoleItems); i++) sttRoleItems[i].translate(); TCHAR* szNick = JabberNickFromJID(item->jid); - gcw.cbSize = sizeof(GCSESSION); + + GCSESSION gcw = { sizeof(GCSESSION) }; gcw.iType = GCW_CHATROOM; gcw.pszModule = m_szModuleName; gcw.ptszName = szNick; @@ -143,7 +142,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM* item) HANDLE hContact = HContactFromJID(item->jid); if (hContact != NULL) { DBVARIANT dbv; - if (JABBER_LIST_ITEM* bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid)) + if (JABBER_LIST_ITEM *bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid)) if (bookmark->name) { if ( !db_get_ts(hContact, "CList", "MyHandle", &dbv)) db_free(&dbv); @@ -175,7 +174,8 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM* item) GCDEST gcd = { m_szModuleName, NULL, GC_EVENT_ADDGROUP }; gcd.ptszID = item->jid; - gce.cbSize = sizeof(GCEVENT); + + GCEVENT gce = { sizeof(GCEVENT) }; gce.pDest = &gcd; gce.dwFlags = GC_TCHAR; for (i = SIZEOF(sttStatuses)-1; i >= 0; i--) { diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 9fb244cd23..93168b7186 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -304,7 +304,7 @@ DWORD CALLBACK sttStreamInCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, L return 0; } -static void sttJabberConsoleRebuildStrings(CJabberProto* ppro, HWND hwndCombo) +static void sttJabberConsoleRebuildStrings(CJabberProto *ppro, HWND hwndCombo) { int i; JABBER_LIST_ITEM *item = NULL; diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index b0484c638b..46412d2798 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -88,7 +88,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING* cws, HANDLE hCon if (getTString(hContact, "jid", &jid)) return; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); db_free(&jid); if (item == NULL) return; @@ -130,7 +130,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING* cws, HANDLE hC if (getTString(hContact, "jid", &jid)) return; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); db_free(&jid); if (item == NULL) return; @@ -142,16 +142,14 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING* cws, HANDLE hC return; } - TCHAR* newNick = sttSettingToTchar(cws); - if (newNick) { - if (lstrcmp(item->nick, newNick)) { - Log("Renaming contact %S: %S -> %S", item->jid, item->nick, newNick); - AddContactToRoster(item->jid, newNick, item->group); - } - mir_free(newNick); -} } + ptrT newNick( sttSettingToTchar(cws)); + if (newNick && lstrcmp(item->nick, newNick)) { + Log("Renaming contact %S: %S -> %S", item->jid, item->nick, newNick); + AddContactToRoster(item->jid, newNick, item->group); + } +} -void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING* cws, HANDLE hContact) +void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, HANDLE hContact) { if (cws->value.type != DBVT_DELETED && !(cws->value.type==DBVT_BYTE && cws->value.bVal==0)) return; diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 42d3ba57d0..69c55e3703 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -192,7 +192,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) void JabberFileServerConnection(JABBER_SOCKET hConnection, DWORD /*dwRemoteIP*/, void* extra) { - CJabberProto* ppro = (CJabberProto*)extra; + CJabberProto *ppro = (CJabberProto*)extra; NETLIBCONNINFO connInfo = { sizeof(connInfo) }; CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConnection, (LPARAM)&connInfo); diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index b7b60a7c0e..a24f0da353 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -715,7 +715,7 @@ struct JABBER_FORM_INFO { ~JABBER_FORM_INFO(); - CJabberProto* ppro; + CJabberProto *ppro; HXML xNode; TCHAR defTitle[128]; // Default title if no in xNode RECT frameRect; // Clipping region of the frame to scroll diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 858535b3ab..301af8caf8 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -33,7 +33,7 @@ int JabberGcGetStatus(JABBER_RESOURCE_STATUS *r); struct JabberGcRecentInfo { TCHAR *room, *server, *nick, *password; - CJabberProto* ppro; + CJabberProto *ppro; JabberGcRecentInfo(CJabberProto* proto) { @@ -259,7 +259,7 @@ INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM) return 0; if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) { - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, jid.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid.ptszVal); if (item != NULL) GcQuit(item, 0, NULL); } @@ -301,7 +301,7 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con TCHAR text[JABBER_MAX_JID_LEN + 1]; mir_sntprintf(text, SIZEOF(text), _T("%s@%s/%s"), room, server, nick); - JABBER_LIST_ITEM* item = ListAdd(LIST_CHATROOM, text); + JABBER_LIST_ITEM *item = ListAdd(LIST_CHATROOM, text); item->bAutoJoin = autojoin; replaceStrT(item->nick, nick); replaceStrT(item->password, info.password); @@ -824,7 +824,7 @@ struct JabberGroupchatChangeNicknameParam { mir_free(jid); } - CJabberProto* ppro; + CJabberProto *ppro; TCHAR* jid; }; @@ -834,7 +834,7 @@ static VOID CALLBACK JabberGroupchatChangeNickname(void* arg) if (param == NULL) return; - JABBER_LIST_ITEM* item = param->ppro->ListGetItemPtr(LIST_CHATROOM, param->jid); + JABBER_LIST_ITEM *item = param->ppro->ListGetItemPtr(LIST_CHATROOM, param->jid); if (item != NULL) { TCHAR szBuffer[ 1024 ]; TCHAR szCaption[ 1024 ]; @@ -868,7 +868,7 @@ static int sttGetStatusCode(HXML node) return _ttol(statusCode); } -void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM* item, const TCHAR *oldNick, HXML itemNode) +void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *oldNick, HXML itemNode) { const TCHAR *newNick = xmlGetAttrValue(itemNode, _T("nick")); const TCHAR *jid = xmlGetAttrValue(itemNode, _T("jid")); @@ -925,11 +925,11 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (resource == NULL || *++resource == '\0') return; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, from); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, from); if (item == NULL) return; - JABBER_RESOURCE_STATUS* r = GcFindResource(item, resource); + JABBER_RESOURCE_STATUS *r = GcFindResource(item, resource); HXML nNode = xmlGetChildByTag(node, "nick", "xmlns", _T(JABBER_FEAT_NICK)); if (nNode == NULL) @@ -1226,7 +1226,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) msgTime = now; if (resource != NULL) { - JABBER_RESOURCE_STATUS* r = GcFindResource(item, resource); + JABBER_RESOURCE_STATUS *r = GcFindResource(item, resource); nick = r && r->nick ? r->nick : resource; } else @@ -1271,7 +1271,7 @@ class CGroupchatInviteAcceptDlg : public CJabberDlgBase JABBER_GROUPCHAT_INVITE_INFO* m_info; public: - CGroupchatInviteAcceptDlg(CJabberProto* ppro, JABBER_GROUPCHAT_INVITE_INFO* pInfo) : + CGroupchatInviteAcceptDlg(CJabberProto *ppro, JABBER_GROUPCHAT_INVITE_INFO* pInfo) : CSuper(ppro, IDD_GROUPCHAT_INVITE_ACCEPT, NULL), m_info(pInfo), m_accept(this, IDC_ACCEPT) diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h index 24077444ab..5b82e9afb1 100644 --- a/protocols/JabberG/src/jabber_iq.h +++ b/protocols/JabberG/src/jabber_iq.h @@ -208,7 +208,7 @@ public: class CJabberIqManager { protected: - CJabberProto* ppro; + CJabberProto *ppro; CRITICAL_SECTION m_cs; DWORD m_dwLastUsedHandle; CJabberIqInfo* m_pIqs; // list of iqs ordered by priority diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 1bc26f178f..38a944eeb9 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -141,13 +141,13 @@ void CJabberProto::OnProcessLoginRq(ThreadData* info, DWORD rq) LIST<JABBER_LIST_ITEM> ll(10); LISTFOREACH(i, this, LIST_BOOKMARK) { - JABBER_LIST_ITEM* item = ListGetItemPtrFromIndex(i); + JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); if (item != NULL && !lstrcmp(item->type, _T("conference")) && item->bAutoJoin) ll.insert(item); } for (int j=0; j < ll.getCount(); j++) { - JABBER_LIST_ITEM* item = ll[j]; + JABBER_LIST_ITEM *item = ll[j]; TCHAR room[256], *server, *p; TCHAR text[128]; @@ -421,7 +421,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo* pInfo) if (nick == NULL) continue; - JABBER_LIST_ITEM* item = ListAdd(LIST_ROSTER, jid); + JABBER_LIST_ITEM *item = ListAdd(LIST_ROSTER, jid); item->subscription = sub; mir_free(item->nick); item->nick = nick; @@ -1556,7 +1556,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode) for (int i = 0; itemNode = xmlGetChild(storageNode, i); i++) { if (name = xmlGetName(itemNode)) { if ( !_tcscmp(name, _T("conference")) && (jid = xmlGetAttrValue(itemNode, _T("jid")))) { - JABBER_LIST_ITEM* item = ListAdd(LIST_BOOKMARK, jid); + JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid); item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name"))); item->type = mir_tstrdup(_T("conference")); item->bUseResource = TRUE; @@ -1568,7 +1568,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode) item->bAutoJoin = (!lstrcmp(autoJ, _T("true")) || !lstrcmp(autoJ, _T("1"))) ? true : false; } else if ( !_tcscmp(name, _T("url")) && (jid = xmlGetAttrValue(itemNode, _T("url") ))) { - JABBER_LIST_ITEM* item = ListAdd(LIST_BOOKMARK, jid); + JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid); item->bUseResource = TRUE; item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name"))); item->type = mir_tstrdup(_T("url")); @@ -1597,7 +1597,7 @@ void CJabberProto::SetBookmarkRequest (XmlNodeIq& iq) LISTFOREACH(i, this, LIST_BOOKMARK) { - JABBER_LIST_ITEM* item = ListGetItemPtrFromIndex(i); + JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i); if (item == NULL) continue; diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 91ff9c8bc9..3d6d817ffc 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -403,7 +403,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w } ListView_DeleteAllItems(hwndList); - CJabberProto* ppro = dat->ppro; + CJabberProto *ppro = dat->ppro; switch (dat->type) { case MUC_VOICELIST: ppro->m_hwndMucVoiceList = NULL; @@ -452,7 +452,7 @@ static void CALLBACK JabberMucJidListCreateDialogApcProc(void* param) if ((from = xmlGetAttrValue(iqNode, _T("from"))) == NULL) return; if ((queryNode = xmlGetChild(iqNode , "query")) == NULL) return; - CJabberProto* ppro = jidListInfo->ppro; + CJabberProto *ppro = jidListInfo->ppro; switch (jidListInfo->type) { case MUC_VOICELIST: pHwndJidList = &ppro->m_hwndMucVoiceList; diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 4b21ffdd3f..3c12848bb3 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -137,7 +137,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd(JABBER_LIST list, const TCHAR *jid) void CJabberProto::ListRemove(JABBER_LIST list, const TCHAR *jid) { mir_cslock lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(list, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(list, jid); if (LI != NULL) { JabberListFreeItemInternal(LI); m_lstRoster.remove(LI); @@ -208,7 +208,7 @@ int CJabberProto::ListFindNext(JABBER_LIST list, int fromOffset) JABBER_RESOURCE_STATUS* CJabberProto::ListFindResource(JABBER_LIST list, const TCHAR *jid) { mir_cslock lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(list, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(list, jid); if (LI == NULL) return NULL; @@ -229,7 +229,7 @@ JABBER_RESOURCE_STATUS* CJabberProto::ListFindResource(JABBER_LIST list, const T int CJabberProto::ListAddResource(JABBER_LIST list, const TCHAR *jid, int status, const TCHAR *statusMessage, char priority, const TCHAR *nick) { mir_cslockfull lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(list, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(list, jid); if (LI == NULL) return NULL; @@ -240,7 +240,7 @@ int CJabberProto::ListAddResource(JABBER_LIST list, const TCHAR *jid, int status if (q) { const TCHAR *resource = q+1; if (resource[0]) { - JABBER_RESOURCE_STATUS* r = LI->pResources; + JABBER_RESOURCE_STATUS *r = LI->pResources; for (j=0; j < LI->resourceCount; j++, r++) { if ( !_tcscmp(r->resourceName, resource)) { // Already exist, update status and statusMessage @@ -281,7 +281,7 @@ int CJabberProto::ListAddResource(JABBER_LIST list, const TCHAR *jid, int status void CJabberProto::ListRemoveResource(JABBER_LIST list, const TCHAR *jid) { mir_cslockfull lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(list, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(list, jid); if (LI == NULL) return; @@ -336,11 +336,11 @@ void CJabberProto::ListRemoveResource(JABBER_LIST list, const TCHAR *jid) TCHAR* CJabberProto::ListGetBestResourceNamePtr(const TCHAR *jid) { mir_cslock lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(LIST_ROSTER, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid); if (LI == NULL) return NULL; - TCHAR* res = NULL; + TCHAR *res = NULL; if (LI->resourceCount > 1) { if (LI->resourceMode == RSMODE_LASTSEEN && LI->pLastSeenResource) @@ -348,8 +348,8 @@ TCHAR* CJabberProto::ListGetBestResourceNamePtr(const TCHAR *jid) else if (LI->resourceMode == RSMODE_MANUAL && LI->pManualResource) res = LI->pManualResource->resourceName; else { - int nBestPos = -1, nBestPri = -200, j; - for (j = 0; j < LI->resourceCount; j++) { + int nBestPos = -1, nBestPri = -200; + for (int j = 0; j < LI->resourceCount; j++) { if (LI->pResources[ j ].priority > nBestPri) { nBestPri = LI->pResources[ j ].priority; nBestPos = j; @@ -369,11 +369,11 @@ TCHAR* CJabberProto::ListGetBestResourceNamePtr(const TCHAR *jid) TCHAR* CJabberProto::ListGetBestClientResourceNamePtr(const TCHAR *jid) { mir_cslock lck(m_csLists); - JABBER_LIST_ITEM* LI = ListGetItemPtr(LIST_ROSTER, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid); if (LI == NULL) return NULL; - TCHAR* res = ListGetBestResourceNamePtr(jid); + TCHAR *res = ListGetBestResourceNamePtr(jid); if (res != NULL) return res; diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index e1c49fde40..9390b7317e 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -92,73 +92,73 @@ static CJabberProto* JabberGetInstanceByHContact(HANDLE hContact) static INT_PTR JabberMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuHandleRequestAuth(wParam, lParam) : 0; } static INT_PTR JabberMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuHandleGrantAuth(wParam, lParam) : 0; } static INT_PTR JabberMenuRevokeAuth(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuRevokeAuth(wParam, lParam) : 0; } static INT_PTR JabberMenuConvertChatContact(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuConvertChatContact(wParam, lParam) : 0; } static INT_PTR JabberMenuRosterAdd(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuRosterAdd(wParam, lParam) : 0; } static INT_PTR JabberMenuBookmarkAdd(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuBookmarkAdd(wParam, lParam) : 0; } static INT_PTR JabberMenuTransportLogin(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuTransportLogin(wParam, lParam) : 0; } static INT_PTR JabberMenuTransportResolve(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuTransportResolve(wParam, lParam) : 0; } static INT_PTR JabberContactMenuRunCommands(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->ContactMenuRunCommands(wParam, lParam) : 0; } static INT_PTR JabberMenuSendNote(WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuSendNote(wParam, lParam) : 0; } static INT_PTR JabberMenuHandleResource(WPARAM wParam, LPARAM lParam, LPARAM lRes) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuHandleResource(wParam, lParam, lRes) : 0; } static INT_PTR JabberMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM lRes) { - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnMenuHandleDirectPresence(wParam, lParam, lRes) : 0; } @@ -177,7 +177,7 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(g_hMenuResourcesRoot, FALSE); Menu_ShowItem(g_hMenuDirectPresence[0], FALSE); - CJabberProto* ppro = JabberGetInstanceByHContact((HANDLE)wParam); + CJabberProto *ppro = JabberGetInstanceByHContact((HANDLE)wParam); return(ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0; } @@ -403,7 +403,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) if ( !getTString(hContact, "jid", &dbv)) { JabberCapsBits jcb = GetTotalJidCapabilites(dbv.ptszVal); - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, dbv.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, dbv.ptszVal); db_free(&dbv); if (item != NULL) { BOOL bCtrlPressed = (GetKeyState(VK_CONTROL)&0x8000) != 0; @@ -518,7 +518,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM) } AddContactToRoster(roomID, nick, group); if (m_options.AddRoster2Bookmarks == TRUE) { - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_BOOKMARK, roomID); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_BOOKMARK, roomID); if (item == NULL) { item = (JABBER_LIST_ITEM*)mir_calloc(sizeof(JABBER_LIST_ITEM)); item->jid = mir_tstrdup(roomID); @@ -589,7 +589,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM) if (getTString(hContact, "jid", &jid)) return 0; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid.ptszVal); if (item != NULL) { XmlNode p(_T("presence")); xmlAddAttr(p, _T("to"), item->jid); if (item->itemResource.status == ID_STATUS_ONLINE) @@ -1185,7 +1185,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM l result = getTString(hContact, "ChatRoomID", &dbv); if (result) return 0; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, dbv.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, dbv.ptszVal); if ( !item) return 0; mir_sntprintf(text, SIZEOF(text), _T("%s/%s"), item->jid, item->nick); @@ -1227,7 +1227,7 @@ CJabberProto *JabberChooseInstance(bool bIsLink) for (int i = 0; i < g_Instances.getCount(); i++) { clmi.flags = CMIM_FLAGS; - CJabberProto* ppro = g_Instances[i]; + CJabberProto *ppro = g_Instances[i]; if (ppro->m_iStatus != ID_STATUS_OFFLINE && ppro->m_iStatus != ID_STATUS_CONNECTING) { ++nItems; lastItemId = i+1; diff --git a/protocols/JabberG/src/jabber_message_handlers.cpp b/protocols/JabberG/src/jabber_message_handlers.cpp index ddcf44d60b..9542e54817 100644 --- a/protocols/JabberG/src/jabber_message_handlers.cpp +++ b/protocols/JabberG/src/jabber_message_handlers.cpp @@ -30,7 +30,7 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData *pThreadData, CJabberMes { // we check if is message delivery failure int id = JabberGetPacketID(node); - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, pInfo->GetFrom()); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, pInfo->GetFrom()); if (item == NULL) item = ListGetItemPtr(LIST_CHATROOM, pInfo->GetFrom()); if (item != NULL) { // yes, it is diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index 5f4b6f6412..3af7fe9af3 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -134,7 +134,7 @@ public: class CJabberMessageManager { protected: - CJabberProto* ppro; + CJabberProto *ppro; CRITICAL_SECTION m_cs; CJabberMessagePermanentInfo* m_pPermanentHandlers; diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index ba28a6d4ee..69479e1f41 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -863,7 +863,7 @@ public: BOOL bChecked = m_proto->m_options.ShowTransport; LISTFOREACH(index, m_proto, LIST_ROSTER) { - JABBER_LIST_ITEM* item = m_proto->ListGetItemPtrFromIndex(index); + JABBER_LIST_ITEM *item = m_proto->ListGetItemPtrFromIndex(index); if (item != NULL) { if (_tcschr(item->jid, '@') == NULL) { HANDLE hContact = m_proto->HContactFromJID(item->jid); @@ -1466,7 +1466,7 @@ static int sttRosterEditorResizer(HWND /*hwndDlg*/, LPARAM, UTILRESIZECONTROL *u static INT_PTR CALLBACK JabberRosterOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case JM_STATUSCHANGED: diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp index e0da9c6fd3..f3871b1fa0 100644 --- a/protocols/JabberG/src/jabber_password.cpp +++ b/protocols/JabberG/src/jabber_password.cpp @@ -39,7 +39,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleChangePassword(WPARAM, LPARAM) static INT_PTR CALLBACK JabberChangePasswordDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: ppro = (CJabberProto*)lParam; diff --git a/protocols/JabberG/src/jabber_presence_manager.h b/protocols/JabberG/src/jabber_presence_manager.h index 888426cf5b..bc061205fc 100644 --- a/protocols/JabberG/src/jabber_presence_manager.h +++ b/protocols/JabberG/src/jabber_presence_manager.h @@ -84,7 +84,7 @@ public: class CJabberPresenceManager { protected: - CJabberProto* ppro; + CJabberProto *ppro; CRITICAL_SECTION m_cs; CJabberPresencePermanentInfo* m_pPermanentHandlers; diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index 4a1ed9e32e..aafc779bc9 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -57,7 +57,7 @@ class CPrivacyListRule protected: friend class CPrivacyList; public: - CPrivacyListRule(CJabberProto* ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = _T(""), BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0) + CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = _T(""), BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0) { m_proto = ppro; m_szValue = mir_tstrdup(szValue); @@ -154,7 +154,7 @@ protected: public: CJabberProto* m_proto; - CPrivacyList(CJabberProto* ppro, TCHAR *szListName) + CPrivacyList(CJabberProto *ppro, TCHAR *szListName) { m_proto = ppro; m_szListName = mir_tstrdup(szListName); @@ -330,7 +330,7 @@ protected: public: CJabberProto* m_proto; - CPrivacyListManager(CJabberProto* ppro) + CPrivacyListManager(CJabberProto *ppro) { m_proto = ppro; m_szActiveListName = NULL; diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 92bf19327b..319a2a4b32 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -404,7 +404,7 @@ struct CJabberProto : public PROTO<CJabberProto> INT_PTR __cdecl OnMenuHandleBookmarks(WPARAM wParam, LPARAM lParam); - int AddEditBookmark(JABBER_LIST_ITEM* item); + int AddEditBookmark(JABBER_LIST_ITEM *item); //---- jabber_notes.c ----------------------------------------------------------------- @@ -443,9 +443,9 @@ struct CJabberProto : public PROTO<CJabberProto> //---- jabber_chat.cpp --------------------------------------------------------------- - int GcInit(JABBER_LIST_ITEM* item); - void GcLogCreate(JABBER_LIST_ITEM* item); - void GcLogUpdateMemberStatus(JABBER_LIST_ITEM* item, const TCHAR *resource, const TCHAR *nick, const TCHAR *jid, int action, HXML reason, int nStatusCode = -1); + int GcInit(JABBER_LIST_ITEM *item); + void GcLogCreate(JABBER_LIST_ITEM *item); + void GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR *resource, const TCHAR *nick, const TCHAR *jid, int action, HXML reason, int nStatusCode = -1); void GcLogShowInformation(JABBER_LIST_ITEM *item, JABBER_RESOURCE_STATUS *user, TJabberGcLogInfoType type); void GcQuit(JABBER_LIST_ITEM* jid, int code, HXML reason); @@ -508,7 +508,7 @@ struct CJabberProto : public PROTO<CJabberProto> void GroupchatJoinRoomByJid(HWND hwndParent, TCHAR *jid); - void RenameParticipantNick(JABBER_LIST_ITEM* item, const TCHAR *oldNick, HXML itemNode); + void RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *oldNick, HXML itemNode); void AcceptGroupchatInvite(const TCHAR *roomJid, const TCHAR *reason, const TCHAR *password); //---- jabber_form.c ----------------------------------------------------------------- diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h index a06b633457..b8f928c5f6 100644 --- a/protocols/JabberG/src/jabber_rc.h +++ b/protocols/JabberG/src/jabber_rc.h @@ -50,7 +50,7 @@ protected: DWORD m_dwStage; public: - CJabberProto* ppro; + CJabberProto *ppro; CJabberAdhocSession(CJabberProto* global); ~CJabberAdhocSession() { diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index dd2aaf7465..1c1cc0af69 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -35,7 +35,7 @@ typedef struct _tagJabberSearchFieldsInfo typedef struct _tagJabberSearchData { - struct CJabberProto* ppro; + struct CJabberProto *ppro; JabberSearchFieldsInfo * pJSInf; HXML xNode; int nJSInfCount; diff --git a/protocols/JabberG/src/jabber_send_manager.h b/protocols/JabberG/src/jabber_send_manager.h index d3ad28c668..dfda635fdc 100644 --- a/protocols/JabberG/src/jabber_send_manager.h +++ b/protocols/JabberG/src/jabber_send_manager.h @@ -84,7 +84,7 @@ public: class CJabberSendManager { protected: - CJabberProto* ppro; + CJabberProto *ppro; CRITICAL_SECTION m_cs; CJabberSendPermanentInfo* m_pPermanentHandlers; diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 9d77a9addc..b220aaafe5 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -152,7 +152,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if ((wParam & GAIF_FORCE) != 0 && AI->hContact != NULL && m_bJabberOnline) { DBVARIANT dbv; if ( !getTString(AI->hContact, "jid", &dbv)) { - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, dbv.ptszVal); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, dbv.ptszVal); if (item != NULL) { BOOL isXVcard = getByte(AI->hContact, "AvatarXVcard", 0); @@ -394,7 +394,7 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText(WPARAM wParam, LPARAM lPara if ( !wParam || !lParam) return 0; //room global tooltip not supported yet - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, (TCHAR*)wParam); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, (TCHAR*)wParam); if (item == NULL) return 0; //no room found diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index d16a5a1f15..7a89eae152 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -122,7 +122,7 @@ static VOID CALLBACK JabberPasswordCreateDialogApcProc(void* param) static VOID CALLBACK JabberOfflineChatWindows(void* param) { - CJabberProto* ppro = (CJabberProto*)param; + CJabberProto *ppro = (CJabberProto*)param; GCDEST gcd = { ppro->m_szModuleName, NULL, GC_EVENT_CONTROL }; GCEVENT gce = { 0 }; gce.cbSize = sizeof(GCEVENT); @@ -1187,7 +1187,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) } // If message is from a stranger (not in roster), item is NULL - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_ROSTER, from); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from); if ( !item) item = ListGetItemPtr(LIST_VCARD_TEMP, from); diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 4fdff5c530..617c5df776 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -76,7 +76,7 @@ struct JabberUserInfoDlgData { CJabberProto* ppro; HANDLE hContact; - JABBER_LIST_ITEM* item; + JABBER_LIST_ITEM *item; int resourceCount; }; @@ -209,7 +209,7 @@ static HTREEITEM sttFillInfoLine(HWND hwndTree, HTREEITEM htiRoot, HICON hIcon, return hti; } -static void sttFillResourceInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM htiRoot, JABBER_LIST_ITEM *item, int resource) +static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, JABBER_LIST_ITEM *item, int resource) { TCHAR buf[256]; HTREEITEM htiResource = htiRoot; @@ -317,7 +317,7 @@ static void sttFillResourceInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM hti } } -static void sttFillAdvStatusInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, HANDLE hContact, TCHAR *szTitle, char *pszSlot) +static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, HANDLE hContact, TCHAR *szTitle, char *pszSlot) { char *szAdvStatusIcon = ppro->ReadAdvStatusA(hContact, pszSlot, ADVSTATUS_VAL_ICON); TCHAR *szAdvStatusTitle = ppro->ReadAdvStatusT(hContact, pszSlot, ADVSTATUS_VAL_TITLE); @@ -337,7 +337,7 @@ static void sttFillAdvStatusInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM ht mir_free(szAdvStatusText); } -static void sttFillUserInfo(CJabberProto* ppro, HWND hwndTree, JABBER_LIST_ITEM *item) +static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM *item) { SendMessage(hwndTree, WM_SETREDRAW, FALSE, 0); @@ -605,7 +605,7 @@ struct USER_PHOTO_INFO { HANDLE hContact; HBITMAP hBitmap; - CJabberProto* ppro; + CJabberProto *ppro; }; static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index d32ad2404e..dac07bd2d8 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -99,7 +99,7 @@ HANDLE CJabberProto::HContactFromJID(const TCHAR *jid , BOOL bStripResource) if (jid == NULL) return (HANDLE)NULL; - JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, jid); + JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid); for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { DBVARIANT dbv; @@ -1064,7 +1064,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR* dest, size_t destLen) TCHAR* p = _tcschr(dest, '/'); - JABBER_LIST_ITEM* LI = ListGetItemPtr(LIST_ROSTER, jid); + JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid); if (LI && LI->resourceCount == 1 && LI->pResources[ 0 ].szCapsNode && _tcsicmp(LI->pResources[ 0 ].szCapsNode, _T("http://talk.google.com/xmpp/bot/caps")) == 0) { @@ -1330,7 +1330,7 @@ void JabberCopyText(HWND hwnd, TCHAR *text) struct JabberEnterStringParams { - CJabberProto* ppro; + CJabberProto *ppro; int type; TCHAR* caption; diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 28226ada40..30909944e8 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -47,7 +47,7 @@ int CJabberProto::SendGetVcard(const TCHAR *jid) ///////////////////////////////////////////////////////////////////////////////////////// -static void SetDialogField(CJabberProto* ppro, HWND hwndDlg, int nDlgItem, char* key, bool bTranslate = false) +static void SetDialogField(CJabberProto *ppro, HWND hwndDlg, int nDlgItem, char* key, bool bTranslate = false) { DBVARIANT dbv; @@ -61,7 +61,7 @@ static void SetDialogField(CJabberProto* ppro, HWND hwndDlg, int nDlgItem, char* static INT_PTR CALLBACK PersonalDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { const unsigned long iPageId = 0; - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: @@ -122,7 +122,7 @@ static INT_PTR CALLBACK PersonalDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L static INT_PTR CALLBACK HomeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { const unsigned long iPageId = 1; - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: @@ -185,7 +185,7 @@ static INT_PTR CALLBACK HomeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { const unsigned long iPageId = 2; - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: @@ -252,7 +252,7 @@ static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA struct PhotoDlgProcData { - CJabberProto* ppro; + CJabberProto *ppro; // char szPhotoFileName[MAX_PATH]; // BOOL bPhotoChanged; HBITMAP hBitmap; @@ -495,7 +495,7 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR static INT_PTR CALLBACK NoteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { const unsigned long iPageId = 4; - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: @@ -544,7 +544,7 @@ static INT_PTR CALLBACK NoteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA struct EditDlgParam { int id; - CJabberProto* ppro; + CJabberProto *ppro; }; static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -700,7 +700,7 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) { const unsigned long iPageId = 5; - CJabberProto* ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch(msg) { case WM_INITDIALOG: -- cgit v1.2.3