summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_skin.h71
-rw-r--r--plugins/AVS/acc.cpp2
-rw-r--r--plugins/AVS/commonheaders.h2
-rw-r--r--plugins/AVS/image_utils.cpp2
-rw-r--r--plugins/Alarms/alarmlist.cpp9
-rw-r--r--plugins/Alarms/options.cpp2
-rw-r--r--plugins/BASS_interface/Main.cpp4
-rw-r--r--plugins/BasicHistory/EventList.cpp2
-rw-r--r--plugins/Boltun/Engine/TalkEngine.cpp2
-rw-r--r--plugins/Boltun/boltun.cpp4
-rw-r--r--plugins/BossKeyPlus/BossKey.cpp2
-rw-r--r--plugins/BossKeyPlus/BossKeyIdle.cpp2
-rw-r--r--plugins/BuddyExpectator/BuddyExpectator.cpp8
-rw-r--r--plugins/CSList/cslist.cpp92
-rw-r--r--plugins/CSList/legacy.h4
-rw-r--r--plugins/ChangeKeyboardLayout/hook_events.c4
-rw-r--r--plugins/Chat/manager.c2
-rw-r--r--plugins/Chat/options.c20
-rw-r--r--plugins/Chat/services.c2
-rw-r--r--plugins/ClientChangeNotify/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/modern_aniavatars.cpp18
-rw-r--r--plugins/Clist_modern/modern_cachefuncs.cpp8
-rw-r--r--plugins/Clist_modern/modern_clc.cpp12
-rw-r--r--plugins/Clist_modern/modern_clcitems.cpp10
-rw-r--r--plugins/Clist_modern/modern_clcopts.cpp6
-rw-r--r--plugins/Clist_modern/modern_clcpaint.cpp184
-rw-r--r--plugins/Clist_modern/modern_clcutils.cpp4
-rw-r--r--plugins/Clist_modern/modern_clistevents.cpp2
-rw-r--r--plugins/Clist_modern/modern_clistmod.cpp4
-rw-r--r--plugins/Clist_modern/modern_clistopts.cpp6
-rw-r--r--plugins/Clist_modern/modern_clui.cpp40
-rw-r--r--plugins/Clist_modern/modern_cluiframes.cpp64
-rw-r--r--plugins/Clist_modern/modern_contact.cpp2
-rw-r--r--plugins/Clist_modern/modern_extraimage.cpp2
-rw-r--r--plugins/Clist_modern/modern_image_array.cpp2
-rw-r--r--plugins/Clist_modern/modern_rowtemplateopt.cpp8
-rw-r--r--plugins/Clist_modern/modern_skinbutton.cpp6
-rw-r--r--plugins/Clist_modern/modern_skinengine.cpp54
-rw-r--r--plugins/Clist_modern/modern_skinopt.cpp78
-rw-r--r--plugins/Clist_modern/modern_skinselector.cpp8
-rw-r--r--plugins/Clist_modern/modern_statusbar.cpp18
-rw-r--r--plugins/Clist_modern/modern_tbbutton.cpp16
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp22
-rw-r--r--plugins/Clist_mw/CLUIFrames/cluiframes.cpp22
-rw-r--r--plugins/Clist_mw/clcitems.cpp2
-rw-r--r--plugins/Clist_mw/clcpaint.cpp2
-rw-r--r--plugins/Clist_mw/clistopts.cpp4
-rw-r--r--plugins/Clist_mw/clistsettings.cpp6
-rw-r--r--plugins/Clist_mw/init.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/coolsb/coolscroll.cpp8
-rw-r--r--plugins/Console/Console.c10
-rw-r--r--plugins/CountryFlags/huffman.c8
-rw-r--r--plugins/Db3x/database.c2
-rw-r--r--plugins/Db3x/dbsettings.c2
-rw-r--r--plugins/Db3x/init.c2
-rw-r--r--plugins/Db3x_mmap/database.c2
-rw-r--r--plugins/Db3x_mmap/dbsettings.c2
-rw-r--r--plugins/Db3x_mmap/init.c2
-rw-r--r--plugins/Db_autobackups/backup.c2
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp2
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp10
-rw-r--r--plugins/Dbx_mmap_SA/database.c2
-rw-r--r--plugins/Dbx_mmap_SA/dbsettings.c2
-rw-r--r--plugins/Dbx_mmap_SA/dialogs.c6
-rw-r--r--plugins/Dbx_mmap_SA/init.c2
-rw-r--r--plugins/Dbx_tree/BlockManager.cpp2
-rw-r--r--plugins/Dbx_tree/Settings.cpp2
-rw-r--r--plugins/ExtraIcons/commons.h2
-rw-r--r--plugins/FloatingContacts/bitmap_funcs.cpp2
-rw-r--r--plugins/FloatingContacts/filedrop.cpp36
-rw-r--r--plugins/FloatingContacts/main.cpp60
-rw-r--r--plugins/FloatingContacts/thumbs.cpp50
-rw-r--r--plugins/FreeImage/Miranda/main.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp10
-rw-r--r--plugins/FreeImage/Source/FreeImage/ColorLookup.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImage/Conversion8.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/FreeImage.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/Halftoning.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginBMP.cpp10
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginGIF.cpp54
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginICO.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp12
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp8
-rw-r--r--plugins/FreeImage/Source/LibJPEG/jcparam.c2
-rw-r--r--plugins/FreeImage/Source/LibPNG/png.c4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngconf.h4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngpriv.h4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngrtran.c2
-rw-r--r--plugins/HistoryLinkListPlus/linklist_dlg.c18
-rw-r--r--plugins/HistoryLinkListPlus/linklist_fct.c72
-rw-r--r--plugins/HistorySweeperLight/historysweeperlight.c2
-rw-r--r--plugins/HistorySweeperLight/main.c2
-rw-r--r--plugins/ListeningTo/commons.h10
-rw-r--r--plugins/ListeningTo/listeningto.cpp14
-rw-r--r--plugins/ListeningTo/players/itunes.cpp24
-rw-r--r--plugins/ListeningTo/players/watrack.cpp2
-rw-r--r--plugins/MenuItemEx/images.c2
-rw-r--r--plugins/MenuItemEx/main.c2
-rw-r--r--plugins/NewAwaySysMod/AwaySys.cpp6
-rw-r--r--plugins/NewXstatusNotify/main.cpp13
-rw-r--r--plugins/Nudge/ChangeLog.txt2
-rw-r--r--plugins/Nudge/main.cpp4
-rw-r--r--plugins/Nudge/shake.cpp2
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/Popup/src/notifications.cpp2
-rw-r--r--plugins/Popup/src/opt_adv.cpp2
-rw-r--r--plugins/Popup/src/opt_gen.cpp4
-rw-r--r--plugins/Popup/src/opt_skins.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp4
-rw-r--r--plugins/Popup/src/skin.cpp2
-rw-r--r--plugins/QuickMessages/options.c26
-rw-r--r--plugins/SRMM/msgdialog.c4
-rw-r--r--plugins/Scriver/chat/colorchooser.c2
-rw-r--r--plugins/Scriver/chat/manager.c4
-rw-r--r--plugins/Scriver/chat/options.c22
-rw-r--r--plugins/Scriver/chat/services.c2
-rw-r--r--plugins/Scriver/chat/window.c2
-rw-r--r--plugins/Scriver/multimon.h2
-rw-r--r--plugins/Scriver/utils.c2
-rw-r--r--plugins/SecureIM/commonheaders.cpp2
-rw-r--r--plugins/SecureIM/crypt_check.cpp8
-rw-r--r--plugins/SecureIM/crypt_icons.cpp10
-rw-r--r--plugins/SecureIM/crypt_lists.cpp14
-rw-r--r--plugins/SecureIM/crypt_misc.cpp2
-rw-r--r--plugins/SecureIM/images.cpp2
-rw-r--r--plugins/SecureIM/main.cpp12
-rw-r--r--plugins/SecureIM/options.cpp24
-rw-r--r--plugins/SecureIM/rtfconv.cpp4
-rw-r--r--plugins/SecureIM/svcs_clist.cpp12
-rw-r--r--plugins/SecureIM/svcs_proto.cpp38
-rw-r--r--plugins/SecureIM/svcs_srmm.cpp4
-rw-r--r--plugins/SeenPlugin/main.c24
-rw-r--r--plugins/SimpleStatusMsg/options.cpp8
-rw-r--r--plugins/SmileyAdd/smileys.cpp2
-rw-r--r--plugins/SpellChecker/commons.h2
-rw-r--r--plugins/SpellChecker/hunspell/affixmgr.cxx6
-rw-r--r--plugins/SpellChecker/hunspell/csutil.cxx4
-rw-r--r--plugins/SpellChecker/hunspell/phonet.cxx4
-rw-r--r--plugins/SpellChecker/spellchecker.cpp2
-rw-r--r--plugins/SplashScreen/src/bitmap_funcs.cpp2
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp12
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/options.cpp6
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp8
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp38
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp12
-rw-r--r--plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/profiles.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.cpp2
-rw-r--r--plugins/StatusPlugins/commonstatus.cpp12
-rw-r--r--plugins/StatusPlugins/confirmdialog.cpp12
-rw-r--r--plugins/StopSpamPlus/src/events.cpp2
-rw-r--r--plugins/Svc_dbepp/exportimport.cpp4
-rw-r--r--plugins/Svc_dbepp/main.cpp2
-rw-r--r--plugins/Svc_dbepp/moduletree.cpp14
-rw-r--r--plugins/Svc_dbepp/settinglist.cpp4
-rw-r--r--plugins/TabSRMM/chat/options.cpp25
-rw-r--r--plugins/TabSRMM/docs/changelog.txt2
-rw-r--r--plugins/TabSRMM/docs/readme.txt2
-rw-r--r--plugins/TabSRMM/src/container.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp36
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TabSRMM/tabmodplus/modplus.cpp8
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp9
-rw-r--r--plugins/Updater/bzip2-1.0.3/blocksort.c12
-rw-r--r--plugins/Updater/bzip2-1.0.3/bzlib.c38
-rw-r--r--plugins/Updater/bzip2-1.0.3/compress.c4
-rw-r--r--plugins/Updater/bzip2-1.0.3/decompress.c4
-rw-r--r--plugins/UserGuide/main.c2
-rw-r--r--plugins/UserInfoEx/Flags/svc_flags.cpp2
-rw-r--r--plugins/UserInfoEx/Flags/svc_flagsicons.cpp4
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp6
-rw-r--r--plugins/UserInfoEx/ex_import/classExImContactXML.cpp6
-rw-r--r--plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp2
-rw-r--r--plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp2
-rw-r--r--plugins/UserInfoEx/mir_db.cpp4
-rw-r--r--plugins/UserInfoEx/svc_reminder.cpp8
-rw-r--r--plugins/Utils/mir_options.cpp2
-rw-r--r--plugins/Variables/contact.cpp20
-rw-r--r--plugins/Variables/help.cpp24
-rw-r--r--plugins/Variables/options.cpp2
-rw-r--r--plugins/Variables/parse_alias.cpp12
-rw-r--r--plugins/Variables/parse_external.cpp10
-rw-r--r--plugins/Variables/parse_inet.cpp4
-rw-r--r--plugins/Variables/parse_logic.cpp14
-rw-r--r--plugins/Variables/parse_miranda.cpp16
-rw-r--r--plugins/Variables/parse_str.cpp28
-rw-r--r--plugins/Variables/parse_system.cpp30
-rw-r--r--plugins/Variables/parse_variables.cpp8
-rw-r--r--plugins/Variables/tokenregister.cpp2
-rw-r--r--plugins/Variables/variables.cpp22
-rw-r--r--plugins/WhenWasIt/dlg_handlers.cpp2
-rw-r--r--plugins/WhenWasIt/hooked_events.cpp4
-rw-r--r--plugins/helpers/gen_helpers.cpp6
-rw-r--r--protocols/FacebookRM/JSON_CAJUN/elements.inl14
-rw-r--r--protocols/FacebookRM/chat.cpp12
-rw-r--r--protocols/FacebookRM/communication.cpp68
-rw-r--r--protocols/FacebookRM/connection.cpp22
-rw-r--r--protocols/FacebookRM/contacts.cpp18
-rw-r--r--protocols/FacebookRM/definitions.h2
-rw-r--r--protocols/FacebookRM/dialogs.cpp18
-rw-r--r--protocols/FacebookRM/events.cpp22
-rw-r--r--protocols/FacebookRM/json.cpp78
-rw-r--r--protocols/FacebookRM/list.hpp2
-rw-r--r--protocols/FacebookRM/main.cpp6
-rw-r--r--protocols/FacebookRM/messages.cpp20
-rw-r--r--protocols/FacebookRM/process.cpp48
-rw-r--r--protocols/FacebookRM/proto.cpp26
-rw-r--r--protocols/FacebookRM/theme.cpp2
-rw-r--r--protocols/FacebookRM/utils.cpp20
-rw-r--r--protocols/Gadu-Gadu/libgadu/sha1.c4
-rw-r--r--protocols/IRCG/MString.h150
-rw-r--r--protocols/IRCG/clist.cpp2
-rw-r--r--protocols/IRCG/commandmonitor.cpp66
-rw-r--r--protocols/IRCG/input.cpp28
-rw-r--r--protocols/IRCG/irclib.cpp14
-rw-r--r--protocols/IRCG/ircproto.cpp2
-rw-r--r--protocols/IRCG/options.cpp16
-rw-r--r--protocols/IRCG/output.cpp8
-rw-r--r--protocols/IRCG/scripting.cpp8
-rw-r--r--protocols/IRCG/services.cpp50
-rw-r--r--protocols/IRCG/tools.cpp8
-rw-r--r--protocols/IRCG/ui_utils.cpp2
-rw-r--r--protocols/IRCG/windows.cpp34
-rw-r--r--protocols/JabberG/MString.h150
-rw-r--r--protocols/JabberG/jabber.cpp2
-rw-r--r--protocols/JabberG/jabber_adhoc.cpp30
-rw-r--r--protocols/JabberG/jabber_agent.cpp14
-rw-r--r--protocols/JabberG/jabber_bookmarks.cpp6
-rw-r--r--protocols/JabberG/jabber_caps.cpp52
-rw-r--r--protocols/JabberG/jabber_captcha.cpp4
-rw-r--r--protocols/JabberG/jabber_chat.cpp20
-rw-r--r--protocols/JabberG/jabber_console.cpp6
-rw-r--r--protocols/JabberG/jabber_disco.cpp70
-rw-r--r--protocols/JabberG/jabber_disco.h10
-rw-r--r--protocols/JabberG/jabber_events.cpp2
-rw-r--r--protocols/JabberG/jabber_form.cpp32
-rw-r--r--protocols/JabberG/jabber_ft.cpp4
-rw-r--r--protocols/JabberG/jabber_groupchat.cpp12
-rw-r--r--protocols/JabberG/jabber_icolib.cpp6
-rw-r--r--protocols/JabberG/jabber_iq.cpp4
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp40
-rw-r--r--protocols/JabberG/jabber_iqid.cpp98
-rw-r--r--protocols/JabberG/jabber_list.cpp6
-rw-r--r--protocols/JabberG/jabber_menu.cpp12
-rw-r--r--protocols/JabberG/jabber_message_handlers.cpp12
-rw-r--r--protocols/JabberG/jabber_message_manager.cpp6
-rw-r--r--protocols/JabberG/jabber_misc.cpp8
-rw-r--r--protocols/JabberG/jabber_notes.cpp2
-rw-r--r--protocols/JabberG/jabber_opt.cpp16
-rw-r--r--protocols/JabberG/jabber_privacy.cpp94
-rw-r--r--protocols/JabberG/jabber_privacy.h12
-rw-r--r--protocols/JabberG/jabber_proto.cpp16
-rw-r--r--protocols/JabberG/jabber_rc.cpp74
-rw-r--r--protocols/JabberG/jabber_rc.h10
-rw-r--r--protocols/JabberG/jabber_search.cpp2
-rw-r--r--protocols/JabberG/jabber_svc.cpp6
-rw-r--r--protocols/JabberG/jabber_thread.cpp88
-rw-r--r--protocols/JabberG/jabber_userinfo.cpp28
-rw-r--r--protocols/JabberG/jabber_util.cpp24
-rw-r--r--protocols/JabberG/jabber_vcard.cpp6
-rw-r--r--protocols/JabberG/jabber_xml.cpp8
-rw-r--r--protocols/JabberG/jabber_xstatus.cpp16
-rw-r--r--protocols/JabberG/ui_utils.cpp2
-rw-r--r--protocols/MRA/MraAntiSpam.cpp4
-rw-r--r--protocols/MRA/MraAvatars.cpp2
-rw-r--r--protocols/MRA/MraFilesQueue.cpp2
-rw-r--r--protocols/MRA/MraPopUp.cpp2
-rw-r--r--protocols/MRA/Mra_options.cpp4
-rw-r--r--protocols/MRA/Mra_svcs.cpp4
-rw-r--r--protocols/MRA/Readme_MRA.txt2
-rw-r--r--protocols/MSN/msn_proto.cpp6
-rw-r--r--protocols/NewsAggregator/Src/Utils.cpp2
-rw-r--r--protocols/Omegle/chat.cpp12
-rw-r--r--protocols/Omegle/communication.cpp30
-rw-r--r--protocols/Omegle/connection.cpp6
-rw-r--r--protocols/Omegle/dialogs.cpp2
-rw-r--r--protocols/Omegle/main.cpp6
-rw-r--r--protocols/Omegle/messages.cpp2
-rw-r--r--protocols/Omegle/proto.cpp8
-rw-r--r--protocols/Omegle/theme.cpp2
-rw-r--r--protocols/Omegle/utils.cpp18
-rw-r--r--protocols/Twitter/chat.cpp10
-rw-r--r--protocols/Twitter/connection.cpp18
-rw-r--r--protocols/Twitter/contacts.cpp16
-rw-r--r--protocols/Twitter/http.cpp2
-rw-r--r--protocols/Twitter/main.cpp4
-rw-r--r--protocols/Twitter/proto.cpp10
-rw-r--r--protocols/Twitter/theme.cpp2
-rw-r--r--protocols/Twitter/twitter.cpp18
-rw-r--r--protocols/Twitter/twitter.h2
-rw-r--r--protocols/Twitter/ui.cpp24
-rw-r--r--protocols/Twitter/utility.cpp4
-rw-r--r--protocols/Weather/weather.cpp4
-rw-r--r--protocols/YAMN/browser/mailbrowser.cpp2
-rw-r--r--protocols/YAMN/main.cpp23
-rw-r--r--protocols/YAMN/proto/pop3/pop3comm.cpp2
-rw-r--r--protocols/Yahoo/avatar.cpp2
-rw-r--r--protocols/Yahoo/file_transfer.cpp2
-rw-r--r--protocols/Yahoo/http_gateway.cpp4
-rw-r--r--protocols/Yahoo/libyahoo2/libyahoo2.c6
-rw-r--r--protocols/Yahoo/libyahoo2/yahoo_httplib.c10
-rw-r--r--protocols/Yahoo/options.cpp2
-rw-r--r--protocols/Yahoo/proto.cpp6
-rw-r--r--protocols/Yahoo/server.cpp2
-rw-r--r--protocols/Yahoo/services.cpp4
-rw-r--r--protocols/Yahoo/util.cpp6
-rw-r--r--src/core/miranda.h35
-rw-r--r--src/modules/langpack/langpack.cpp1
-rw-r--r--src/modules/options/options.cpp2
-rw-r--r--src/modules/skin/hotkeys.cpp135
-rw-r--r--src/modules/skin/sounds.cpp377
-rw-r--r--src/modules/srauth/auth.cpp4
-rw-r--r--src/modules/srfile/file.cpp8
-rw-r--r--src/modules/srurl/url.cpp2
-rw-r--r--src/modules/useronline/useronline.cpp2
-rw-r--r--tools/dbtool/eventchain.cpp2
-rw-r--r--tools/dbtool/selectdb.cpp10
329 files changed, 2408 insertions, 2448 deletions
diff --git a/include/m_skin.h b/include/m_skin.h
index ea95e7c4b5..6f7a5683df 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_SKIN_H__
#define M_SKIN_H__ 1
+extern int hLangpack;
+
//loads an icon from the user's custom skin library, or from the exe if there
//isn't one of them
//wParam=id of icon to load - see below
@@ -115,7 +117,7 @@ __inline static HICON LoadSkinnedProtoIcon(const char *szProto, int status) {ret
__inline static HICON LoadSkinnedProtoIconBig(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICONBIG, (WPARAM)szProto, status);}
//add a new sound so it has a default and can be changed in the options dialog
-//wParam=0
+//wParam=hLangpack
//lParam=(LPARAM)(SKINSOUNDDESC*)ssd;
//returns 0 on success, nonzero otherwise
@@ -143,62 +145,43 @@ typedef struct {
const TCHAR *ptszSection;
};
DWORD dwFlags;
-} SKINSOUNDDESCEX;
-
-// Old struct pre 0.3.4
-typedef struct {
- int cbSize;
- const char *pszName; // name to refer to sound when playing and in db
- const char *pszDescription; // [TRANSLATED-BY-CORE] description for options dialog
- const char *pszDefaultFile; // default sound file to use
-} SKINSOUNDDESC;
-
-#define MS_SKIN_ADDNEWSOUND "Skin/Sounds/AddNew"
+}
+ SKINSOUNDDESCEX;
-// inline only works after 0.3.4+ (2004/10/*)
__inline static INT_PTR SkinAddNewSoundEx(const char *name, const char *section, const char *description)
{
- SKINSOUNDDESCEX ssd;
- ZeroMemory(&ssd, sizeof(ssd));
- ssd.cbSize=sizeof(ssd);
- ssd.pszName=name;
- ssd.pszSection=section;
- ssd.pszDescription=description;
- return CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ SKINSOUNDDESCEX ssd = { 0 };
+ ssd.cbSize = sizeof(ssd);
+ ssd.pszName = name;
+ ssd.pszSection = section;
+ ssd.pszDescription = description;
+ return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
__inline static INT_PTR SkinAddNewSound(const char *name, const char *description, const char *defaultFile)
{
- SKINSOUNDDESC ssd;
- ZeroMemory(&ssd, sizeof(ssd));
+ SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize=sizeof(ssd);
- ssd.pszName=name;
- ssd.pszDescription=description;
- ssd.pszDefaultFile=defaultFile;
- return CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ ssd.pszName = name;
+ ssd.pszDescription = description;
+ ssd.pszDefaultFile = defaultFile;
+ return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
-// 0.9.0+
__inline static INT_PTR SkinAddNewSoundExT(const char *name, const TCHAR *section, const TCHAR *description)
{
SKINSOUNDDESCEX ssd = { 0 };
- ssd.cbSize=sizeof(ssd);
- ssd.dwFlags=SSDF_TCHAR;
- ssd.pszName=name;
- ssd.ptszSection=section;
- ssd.ptszDescription=description;
- return CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ ssd.cbSize = sizeof(ssd);
+ ssd.dwFlags = SSDF_TCHAR;
+ ssd.pszName = name;
+ ssd.ptszSection = section;
+ ssd.ptszDescription = description;
+ return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
-__inline static INT_PTR SkinAddNewSoundT(const char *name, const TCHAR *description, const TCHAR *defaultFile)
+__inline static INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd)
{
- SKINSOUNDDESCEX ssd = { 0 };
- ssd.cbSize=sizeof(ssd);
- ssd.pszName=name;
- ssd.dwFlags=SSDF_TCHAR;
- ssd.ptszDescription=description;
- ssd.ptszDefaultFile=defaultFile;
- return CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)ssd);
}
//play a named sound event
@@ -207,7 +190,11 @@ __inline static INT_PTR SkinAddNewSoundT(const char *name, const TCHAR *descript
//pszName should have been added with Skin/Sounds/AddNew, but if not the
//function will not fail, it will play the Windows default sound instead.
#define MS_SKIN_PLAYSOUND "Skin/Sounds/Play"
-__inline static INT_PTR SkinPlaySound(const char *name) {return CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)name);}
+
+__inline static INT_PTR SkinPlaySound(const char *name)
+{
+ return CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)name);
+}
//sent when the icons DLL has been changed in the options dialog, and everyone
//should re-make their image lists
diff --git a/plugins/AVS/acc.cpp b/plugins/AVS/acc.cpp
index 5b6a08db3c..507245fca8 100644
--- a/plugins/AVS/acc.cpp
+++ b/plugins/AVS/acc.cpp
@@ -288,7 +288,7 @@ void AnimatedGifMountFrame(ACCData* data, int page)
RGBQUAD *pal = fei->FI_GetPalette(dib);
bool have_transparent = false;
int transparent_color = -1;
- if ( fei->FI_IsTransparent(dib) ) {
+ if ( fei->FI_IsTransparent(dib)) {
int count = fei->FI_GetTransparencyCount(dib);
BYTE *table = fei->FI_GetTransparencyTable(dib);
for ( int i = 0; i < count; i++ ) {
diff --git a/plugins/AVS/commonheaders.h b/plugins/AVS/commonheaders.h
index 70b0c88fae..5b9d4ee113 100644
--- a/plugins/AVS/commonheaders.h
+++ b/plugins/AVS/commonheaders.h
@@ -109,7 +109,7 @@ extern OBJLIST<protoPicCacheEntry> g_ProtoPictures, g_MyAvatars;
int SetAvatarAttribute(HANDLE hContact, DWORD attrib, int mode);
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define GAIR_FAILED 1000
diff --git a/plugins/AVS/image_utils.cpp b/plugins/AVS/image_utils.cpp
index 3a7c43a707..35cb33259a 100644
--- a/plugins/AVS/image_utils.cpp
+++ b/plugins/AVS/image_utils.cpp
@@ -18,7 +18,7 @@ extern int _DebugTrace(const char *fmt, ...);
extern int _DebugTrace(HANDLE hContact, const char *fmt, ...);
-#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
extern FI_INTERFACE *fei;
diff --git a/plugins/Alarms/alarmlist.cpp b/plugins/Alarms/alarmlist.cpp
index 9bce8b546b..35ac1fa022 100644
--- a/plugins/Alarms/alarmlist.cpp
+++ b/plugins/Alarms/alarmlist.cpp
@@ -722,12 +722,13 @@ int IdleChanged(WPARAM wParam, LPARAM lParam)
return 0;
}
-void InitList() {
+void InitList()
+{
InitializeCriticalSection(&alarm_cs);
- SkinAddNewSoundEx("Triggered1", Translate("Alarms"), Translate("Alert 1"));
- SkinAddNewSoundEx("Triggered2", Translate("Alarms"), Translate("Alert 2"));
- SkinAddNewSoundEx("Triggered3", Translate("Alarms"), Translate("Alert 3"));
+ SkinAddNewSoundEx("Triggered1", LPGEN("Alarms"), LPGEN("Alert 1"));
+ SkinAddNewSoundEx("Triggered2", LPGEN("Alarms"), LPGEN("Alert 2"));
+ SkinAddNewSoundEx("Triggered3", LPGEN("Alarms"), LPGEN("Alert 3"));
// load last checked time
DBCONTACTGETSETTING dbcgs;
diff --git a/plugins/Alarms/options.cpp b/plugins/Alarms/options.cpp
index 685beea35b..654d39032d 100644
--- a/plugins/Alarms/options.cpp
+++ b/plugins/Alarms/options.cpp
@@ -323,7 +323,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_COMMAND:
if ( HIWORD(wParam) == CBN_SELCHANGE ) {
- switch( LOWORD(wParam) ) {
+ switch( LOWORD(wParam)) {
case IDC_DAY:
case IDC_DAYNUM:
hw = GetDlgItem(hwndDlg, IDOK);
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp
index f843a4d3ad..8f7a82ae80 100644
--- a/plugins/BASS_interface/Main.cpp
+++ b/plugins/BASS_interface/Main.cpp
@@ -72,7 +72,7 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
case ID_STATUS_ONLINE: currstat <<= 1;
}
- if ( !DBGetContactSettingByte(NULL,"Skin","UseSound",0) ) doPlay = FALSE;
+ if ( !DBGetContactSettingByte(NULL,"Skin","UseSound",0)) doPlay = FALSE;
if ( QuietTime )
if (
@@ -80,7 +80,7 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
((TimeWrd2 < TimeWrd1) && (TimeWrd1 <= currtime || currtime < TimeWrd2))
) doPlay = FALSE;
- if ( !(currstat & StatMask) ) doPlay = FALSE;
+ if ( !(currstat & StatMask)) doPlay = FALSE;
if ( Preview || (int)wParam==1 ) doPlay = TRUE;
diff --git a/plugins/BasicHistory/EventList.cpp b/plugins/BasicHistory/EventList.cpp
index 45d6735883..8ac9e2eb37 100644
--- a/plugins/BasicHistory/EventList.cpp
+++ b/plugins/BasicHistory/EventList.cpp
@@ -787,7 +787,7 @@ bool EventList::GetEventData(const EventIndex& ev, EventData& data)
void EventList::GetExtEventDBei(const EventIndex& ev)
{
IImport::ExternalMessage& em = importedMessages[ev.exIdx];
- gdbei.flags = (em.flags & (~(DBEF_FIRST)) ) | 0x800;
+ gdbei.flags = (em.flags & (~(DBEF_FIRST))) | 0x800;
gdbei.eventType = em.eventType;
gdbei.timestamp = em.timestamp;
}
diff --git a/plugins/Boltun/Engine/TalkEngine.cpp b/plugins/Boltun/Engine/TalkEngine.cpp
index 378f8be102..550aac66cf 100644
--- a/plugins/Boltun/Engine/TalkEngine.cpp
+++ b/plugins/Boltun/Engine/TalkEngine.cpp
@@ -402,7 +402,7 @@ bool TalkBot::FindAny(ValueChooser<> &ch, tstring& res)
void TalkBot::SplitSectences(const tstring &incomingMessage, vector<tstring>& vec)
{
- //FIXME: (THINK ABOUT IT:-) )these chars not always mark the end of sentence.
+ //FIXME: (THINK ABOUT IT:-))these chars not always mark the end of sentence.
const TCHAR symbols[] = _T(".?!");
int it = 0, len = (int)incomingMessage.length();
while (it != len)
diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp
index 6efebc906f..a4ac93341a 100644
--- a/plugins/Boltun/boltun.cpp
+++ b/plugins/Boltun/boltun.cpp
@@ -608,11 +608,11 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam)
ZeroMemory(&clmi, sizeof(clmi));
clmi.cbSize = sizeof(clmi);
clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunautochat ? CMIF_CHECKED : 0);
- clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunautochat ? IDI_TICK : IDI_NOTICK)) );
+ clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunautochat ? IDI_TICK : IDI_NOTICK)));
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItemAutoChat, (LPARAM)&clmi);
clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunnottochat ? CMIF_CHECKED : 0);
- clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunnottochat ? IDI_TICK : IDI_NOTICK)) );
+ clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunnottochat ? IDI_TICK : IDI_NOTICK)));
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItemNotToChat, (LPARAM)&clmi);
}
return 0;
diff --git a/plugins/BossKeyPlus/BossKey.cpp b/plugins/BossKeyPlus/BossKey.cpp
index deeaa1ffa8..6888a5347b 100644
--- a/plugins/BossKeyPlus/BossKey.cpp
+++ b/plugins/BossKeyPlus/BossKey.cpp
@@ -540,7 +540,7 @@ static int MsgWinOpening(WPARAM wParam, LPARAM lParam) // hiding new message win
VOID CALLBACK WinEventProc(HWINEVENTHOOK g_hWinHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime)
{
- if (g_bWindowHidden && idObject == OBJID_WINDOW && (event == EVENT_OBJECT_CREATE || event == EVENT_OBJECT_SHOW) && (IsWindowVisible(hwnd)) )
+ if (g_bWindowHidden && idObject == OBJID_WINDOW && (event == EVENT_OBJECT_CREATE || event == EVENT_OBJECT_SHOW) && (IsWindowVisible(hwnd)))
{
if(hwnd == pcli->hwndContactList)
ShowWindow(hwnd,SW_HIDE);
diff --git a/plugins/BossKeyPlus/BossKeyIdle.cpp b/plugins/BossKeyPlus/BossKeyIdle.cpp
index 403681a918..eba26fd29e 100644
--- a/plugins/BossKeyPlus/BossKeyIdle.cpp
+++ b/plugins/BossKeyPlus/BossKeyIdle.cpp
@@ -50,7 +50,7 @@ static bool IsUserIdle()
LASTINPUTINFO ii;
ZeroMemory(&ii,sizeof(ii));
ii.cbSize=sizeof(ii);
- if ( MyGetLastInputInfo(&ii) )
+ if ( MyGetLastInputInfo(&ii))
return GetTickCount() - ii.dwTime > (minutes * 60 * 1000);
}
else {
diff --git a/plugins/BuddyExpectator/BuddyExpectator.cpp b/plugins/BuddyExpectator/BuddyExpectator.cpp
index ebf4625b93..19e02d446a 100644
--- a/plugins/BuddyExpectator/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/BuddyExpectator.cpp
@@ -749,10 +749,10 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hEventUserInfoInit = HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
// add sounds support
- SkinAddNewSoundEx("buddyExpectatorReturn", Translate("BuddyExpectator"), Translate("Contact returned"));
- SkinAddNewSoundEx("buddyExpectatorStillAbsent", Translate("BuddyExpectator"), Translate("Contact still absent"));
- SkinAddNewSoundEx("buddyExpectatorMissYou", Translate("BuddyExpectator"), Translate("Miss you event"));
- SkinAddNewSoundEx("buddyExpectatorHide", Translate("BuddyExpectator"), Translate("Hide contact event"));
+ SkinAddNewSoundEx("buddyExpectatorReturn", LPGEN("BuddyExpectator"), LPGEN("Contact returned"));
+ SkinAddNewSoundEx("buddyExpectatorStillAbsent", LPGEN("BuddyExpectator"), LPGEN("Contact still absent"));
+ SkinAddNewSoundEx("buddyExpectatorMissYou", LPGEN("BuddyExpectator"), LPGEN("Miss you event"));
+ SkinAddNewSoundEx("buddyExpectatorHide", LPGEN("BuddyExpectator"), LPGEN("Hide contact event"));
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp
index 0f511d72ab..42740beb52 100644
--- a/plugins/CSList/cslist.cpp
+++ b/plugins/CSList/cslist.cpp
@@ -93,7 +93,7 @@ extern "C" __declspec( dllexport ) int Load( PLUGINLINK *link )
// set global variables
// we need 0.8.0.9 core which introduced accounts support for protocols
- CSList::bAccountsSupported = ( CSList::dwMirandaVersion >= PLUGIN_MAKE_VERSION( 0, 8, 0, 9 ) );
+ CSList::bAccountsSupported = ( CSList::dwMirandaVersion >= PLUGIN_MAKE_VERSION( 0, 8, 0, 9 ));
// are we running under Unicode core?
{
@@ -214,7 +214,7 @@ int CSList::respondDBChange( WPARAM wparam, LPARAM lparam )
}
// own setting or not a status-related setting
- else if ( hContact == NULL || lstrcmpA( cws->szSetting, "Status" ) )
+ else if ( hContact == NULL || lstrcmpA( cws->szSetting, "Status" ))
return 0;
DWORD dwEasteredUin = getDword( "EasterEggedUIN", 0x0 );
@@ -323,7 +323,7 @@ void CSList::setStatus( WORD code, StatusItem* item, char* protoName)
void CSList::initIcoLib( )
{
- if ( !ServiceExists( MS_SKIN2_ADDICON ) )
+ if ( !ServiceExists( MS_SKIN2_ADDICON ))
return;
// init icons of buttons
@@ -437,7 +437,7 @@ void CSList::countPlusModProtos( char* protoName, void* arg )
{
int* protosExtraEnabled = ( int* )arg;
if ( DBGetContactSettingDword( NULL, protoName, "NonStandartXstatus", 0 ) ||
- DBGetContactSettingDword( NULL, protoName, "NonStandardXstatus", 0 ) )
+ DBGetContactSettingDword( NULL, protoName, "NonStandardXstatus", 0 ))
*protosExtraEnabled = ( *protosExtraEnabled )++;
}
@@ -461,7 +461,7 @@ void CSList::importCustomStatusUIStatusesFromAllProtos( char* protoName, void* a
DBGetContactSettingTString( NULL, protoName, bufMessage, &dbv );
lstrcpy( si->tszMessage, dbv.ptszVal );
- if ( lstrlen( si->tszTitle ) || lstrlen( si->tszMessage ) )
+ if ( lstrlen( si->tszTitle ) || lstrlen( si->tszMessage ))
{
cslist->mainWindow->itemslist->list->add( si );
cslist->mainWindow->bSomethingChanged = TRUE;
@@ -475,7 +475,7 @@ void CSList::importCustomStatusUIStatusesFromAllProtos( char* protoName, void* a
DBDeleteContactSetting( NULL, protoName, bufMessage );
}
}
- cslist->mainWindow->listview->reinitItems( cslist->mainWindow->itemslist->list->getListHead( ) );
+ cslist->mainWindow->listview->reinitItems( cslist->mainWindow->itemslist->list->getListHead( ));
}
@@ -536,7 +536,7 @@ void CSWindow::initIcons()
{
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_xstatus%d", protoName, i);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
}
}
}
@@ -554,7 +554,7 @@ void CSWindow::initIcons()
{
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_%s", protoName, moods_names[i].szTag);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
}
}
}
@@ -575,7 +575,7 @@ void CSWindow::initButtons( )
if ( forms[i].idc < 0 )
continue;
- SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ) );
+ SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ));
SendDlgItemMessage( this->handle, forms[i].idc, BUTTONSETASFLATBTN, TRUE, 0 ); //maybe set as BUTTONSETDEFAULT?
SendDlgItemMessage( this->handle, forms[i].idc, BUTTONADDTOOLTIP, ( WPARAM )TranslateTS(forms[i].ptszTitle), BATF_TCHAR );
}
@@ -588,9 +588,9 @@ void CSWindow::loadWindowPosition( )
int height = GetSystemMetrics( SM_CYSCREEN );
GetWindowRect( this->handle, &rect );
int x, y, defX, defY;
- defX = x = ( width + 1 - ( rect.right - rect.left ) ) >> 1;
- defY = y = ( height + 1 - ( rect.bottom - rect.top ) ) >> 1;
- if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) )
+ defX = x = ( width + 1 - ( rect.right - rect.left )) >> 1;
+ defY = y = ( height + 1 - ( rect.bottom - rect.top )) >> 1;
+ if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ))
{
x = getWord( "PositionX", defX );
y = getWord( "PositionY", defY );
@@ -625,12 +625,12 @@ BOOL CSWindow::itemPassedFilter( ListItem< StatusItem >* li )
TCHAR filter[MAX_PATH];
GetDlgItemText( this->handle, IDC_FILTER_FIELD, filter, MAX_PATH );
- if ( lstrlen( filter ) )
+ if ( lstrlen( filter ))
{
TCHAR title[EXTRASTATUS_TITLE_LIMIT], message[EXTRASTATUS_MESSAGE_LIMIT];
lstrcpy( title, li->item->tszTitle ); lstrcpy( message, li->item->tszMessage );
- if ( strpos( _tcslwr( title ), _tcslwr( filter ) ) == -1 )
- if ( strpos( _tcslwr( message ), _tcslwr( filter ) ) == -1 )
+ if ( strpos( _tcslwr( title ), _tcslwr( filter )) == -1 )
+ if ( strpos( _tcslwr( message ), _tcslwr( filter )) == -1 )
return FALSE;
}
@@ -653,7 +653,7 @@ void CSWindow::toggleFilter( )
TCHAR filterText[255];
GetDlgItemText(this->handle, IDC_FILTER_FIELD, filterText, SIZEOF(filterText));
if ( lstrlen( filterText ) > 0 )
- SetDlgItemText( this->handle, IDC_FILTER_FIELD, TEXT( "" ) );
+ SetDlgItemText( this->handle, IDC_FILTER_FIELD, TEXT( "" ));
}
}
@@ -661,8 +661,8 @@ void CSWindow::toggleFilter( )
BOOL CSWindow::toggleButtons( )
{
int selection = ListView_GetSelectedItemMacro( this->listview->handle );
- BOOL validSelection = ( selection >= 0 && ( unsigned int )selection < this->itemslist->list->getCount( ) ) ? TRUE : FALSE;
- BOOL filterEnabled = IsWindowVisible( GetDlgItem( this->handle, IDC_FILTER_FIELD ) );
+ BOOL validSelection = ( selection >= 0 && ( unsigned int )selection < this->itemslist->list->getCount( )) ? TRUE : FALSE;
+ BOOL filterEnabled = IsWindowVisible( GetDlgItem( this->handle, IDC_FILTER_FIELD ));
BOOL somethingChanged = this->bSomethingChanged;
EnableWindow( GetDlgItem( this->handle, IDC_ADD ), !filterEnabled );
@@ -688,7 +688,7 @@ CSAMWindow::CSAMWindow( WORD action, CSWindow* parent )
if ( this->action == IDC_ADD )
this->item = new StatusItem( );
else
- this->item = new StatusItem( *this->parent->itemslist->list->get( this->parent->listview->getPositionInList( ) ) );
+ this->item = new StatusItem( *this->parent->itemslist->list->get( this->parent->listview->getPositionInList( )) );
}
@@ -758,13 +758,13 @@ void CSAMWindow::fillDialog( )
{
if ( this->action == IDC_ADD )
{
- SetWindowText( this->handle, TranslateT("Add new item") );
- SetDlgItemText( this->handle, IDOK, TranslateT("Add") );
+ SetWindowText( this->handle, TranslateT("Add new item"));
+ SetDlgItemText( this->handle, IDOK, TranslateT("Add"));
}
else
{
- SetWindowText( this->handle, TranslateT("Modify item") );
- SetDlgItemText( this->handle, IDOK, TranslateT("Modify") );
+ SetWindowText( this->handle, TranslateT("Modify item"));
+ SetDlgItemText( this->handle, IDOK, TranslateT("Modify"));
}
SendMessage( this->hCombo, CB_SETCURSEL, this->item->iIcon, 0 );
@@ -833,8 +833,8 @@ void CSAMWindow::checkItemValidity()
int i = SendMessage(this->hCombo, CB_GETCURSEL, 0, 0);
lstrcpy(this->item->tszTitle, TranslateTS(moods_names[i].ptszTitle));
}
- if ( lstrcmp( this->item->tszMessage, tszInputMessage ) )
- ( lstrcpy( this->item->tszMessage, tszInputMessage ) ) && ( this->bChanged = TRUE );
+ if ( lstrcmp( this->item->tszMessage, tszInputMessage ))
+ ( lstrcpy( this->item->tszMessage, tszInputMessage )) && ( this->bChanged = TRUE );
}
@@ -913,7 +913,7 @@ void CSListView::initItems( ListItem< StatusItem >* items )
{
ListItem< StatusItem >* help = items;
for ( int i = 0; help != NULL; help = help->next, i++ )
- if ( parent->itemPassedFilter( help ) )
+ if ( parent->itemPassedFilter( help ))
addItem( help->item, i );
}
@@ -1092,7 +1092,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
csw->initIcons();
csw->initButtons( );
csw->listview = new CSListView( GetDlgItem( hwnd, IDC_CSLIST ), csw );
- csw->listview->initItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->initItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
csw->loadWindowPosition( );
@@ -1101,7 +1101,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
return TRUE;
case WM_COMMAND:
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_MODIFY:
case IDC_ADD:
@@ -1110,11 +1110,11 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
if ( csw->addModifyDlg->bChanged )
{
if ( LOWORD( wparam ) == IDC_MODIFY )
- csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ));
int selection = csw->itemslist->list->add( csw->addModifyDlg->item );
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->listview->setFullFocusedSelection( selection );
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
@@ -1123,12 +1123,12 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
break;
case IDC_REMOVE:
- if ( getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ) )
+ if ( getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ))
if ( MessageBox( hwnd, TranslateT("Do you really want to delete selected item?"), TranslateT(MODULENAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION ) == IDNO )
break;
- csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ));
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
break;
@@ -1136,12 +1136,12 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case IDC_FAVOURITE:
{
int selection = csw->listview->getPositionInList( );
- StatusItem* f = new StatusItem( *csw->itemslist->list->get( selection ) );
+ StatusItem* f = new StatusItem( *csw->itemslist->list->get( selection ));
f->bFavourite = ! f->bFavourite;
csw->itemslist->list->remove( selection );
selection = csw->itemslist->list->add( f );
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->listview->setFullFocusedSelection( selection );
csw->toggleButtons( );
}
@@ -1152,7 +1152,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
csw->itemslist->list->destroy( );
csw->itemslist->loadItems(csw->protoName);
csw->bSomethingChanged = FALSE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
break;
@@ -1184,14 +1184,14 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
case IDC_FILTER_FIELD:
if ( HIWORD( wparam ) == EN_CHANGE )
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
break;
case IDCLOSE: // close and save, no custom status
case IDCANCEL: // close and save, no custom status
case IDC_CANCEL: // close and save, cancel custom status
case IDOK: // close and save, set selected custom status
- if ( LOWORD( wparam ) == IDOK && csw->toggleButtons( ) )
+ if ( LOWORD( wparam ) == IDOK && csw->toggleButtons( ))
cslist->setStatus(IDOK, csw->itemslist->list->get(csw->listview->getPositionInList()), csw->protoName);
if ( LOWORD( wparam ) == IDC_CANCEL )
cslist->setStatus(IDC_CANCEL, NULL, csw->protoName);
@@ -1228,9 +1228,9 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
return FALSE;
case WM_CTLCOLORSTATIC:
- SetTextColor( ( HDC )wparam, RGB( 174, 174, 174 ) );
- if ( ( ( HWND )lparam == GetDlgItem( hwnd, IDC_NO_ITEMS ) ) ||
- ( ( HWND )lparam == GetDlgItem( hwnd, IDC_ADD_SAMPLE ) ) )
+ SetTextColor( ( HDC )wparam, RGB( 174, 174, 174 ));
+ if ( ( ( HWND )lparam == GetDlgItem( hwnd, IDC_NO_ITEMS )) ||
+ ( ( HWND )lparam == GetDlgItem( hwnd, IDC_ADD_SAMPLE )) )
return ( BOOL )GetStockObject( WHITE_BRUSH );
return FALSE;
}
@@ -1260,16 +1260,16 @@ INT_PTR CALLBACK CSAMWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM
break;
case WM_COMMAND:
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_MESSAGE:
- csamw->checkFieldLimit( HIWORD( wparam ), LOWORD( wparam ) );
+ csamw->checkFieldLimit( HIWORD( wparam ), LOWORD( wparam ));
break;
case IDOK:
csamw->checkItemValidity( );
case IDCANCEL:
EnableWindow( csamw->parent->handle, TRUE );
- EndDialog( hwnd, LOWORD( wparam ) );
+ EndDialog( hwnd, LOWORD( wparam ));
break;
}
@@ -1307,7 +1307,7 @@ INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
{
EnableWindow( GetDlgItem( hwnd, IDC_ALLOW_EXTRA_ICONS ), TRUE );
CheckDlgButton( hwnd, IDC_ALLOW_EXTRA_ICONS, getByte( "AllowExtraIcons",
- DEFAULT_ALLOW_EXTRA_ICONS ) );
+ DEFAULT_ALLOW_EXTRA_ICONS ));
}
TranslateDialogDefault(hwnd);
@@ -1341,7 +1341,7 @@ INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon )
{
- if ( ServiceExists( MS_SKIN2_GETICON ) ) {
+ if ( ServiceExists( MS_SKIN2_GETICON )) {
char szSettingName[64];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, IcoLibName);
return ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szSettingName );
diff --git a/plugins/CSList/legacy.h b/plugins/CSList/legacy.h
index 7139294521..8ef63089d7 100644
--- a/plugins/CSList/legacy.h
+++ b/plugins/CSList/legacy.h
@@ -41,8 +41,8 @@ int cslist_parse_row( TCHAR *row, int ord ) // parse + helpItem
TCHAR pIcon[4], pTitle[EXTRASTATUS_TITLE_LIMIT+2], pMsg[EXTRASTATUS_MESSAGE_LIMIT+2], pFav[4];
TCHAR scanfFormat[64];
- lstrcpy( pTitle, _T( "" ) );
- lstrcpy( pMsg, _T( "" ) );
+ lstrcpy( pTitle, _T( "" ));
+ lstrcpy( pMsg, _T( "" ));
// database row format: "%2[^]%64[^]%2048[^]%2[^]"
diff --git a/plugins/ChangeKeyboardLayout/hook_events.c b/plugins/ChangeKeyboardLayout/hook_events.c
index de8f764fe5..37f317a448 100644
--- a/plugins/ChangeKeyboardLayout/hook_events.c
+++ b/plugins/ChangeKeyboardLayout/hook_events.c
@@ -166,8 +166,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
ReadPopupOptions();
// Çàðåãèì çâóê
- SkinAddNewSoundEx(SND_ChangeLayout, Translate(ModuleName), Translate("Changing Layout"));
- SkinAddNewSoundEx(SND_ChangeCase, Translate(ModuleName), Translate("Changing Case"));
+ SkinAddNewSoundEx(SND_ChangeLayout, ModuleName, LPGEN("Changing Layout"));
+ SkinAddNewSoundEx(SND_ChangeCase, ModuleName, LPGEN("Changing Case"));
// Õóê íà íàæàòèå êëàâèøè
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, NULL, GetCurrentThreadId());
diff --git a/plugins/Chat/manager.c b/plugins/Chat/manager.c
index 9968086245..82fb61ae7b 100644
--- a/plugins/Chat/manager.c
+++ b/plugins/Chat/manager.c
@@ -1484,7 +1484,7 @@ TCHAR* UM_FindUserAutoComplete(USERINFO* pUserList, const TCHAR* pszOriginal, co
while ( pTemp != NULL ) {
if ( pTemp->pszNick && my_strstri( pTemp->pszNick, pszOriginal) == pTemp->pszNick )
- if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0) )
+ if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0))
pszName = pTemp->pszNick;
pTemp = pTemp->next;
diff --git a/plugins/Chat/options.c b/plugins/Chat/options.c
index 73f1bc364b..1e25f541e7 100644
--- a/plugins/Chat/options.c
+++ b/plugins/Chat/options.c
@@ -1083,17 +1083,17 @@ int OptionsInit(void)
g_Settings.iHeight = DBGetContactSettingDword(NULL, "Chat", "roomheight", -1);
LoadGlobalSettings();
- SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
- SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
- SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
- SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
- SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
- SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
- SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
- SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
- SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
- SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
if ( g_Settings.LoggingEnabled )
CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)g_Settings.pszLogDir);
diff --git a/plugins/Chat/services.c b/plugins/Chat/services.c
index 53ed1a03c0..4a9e785691 100644
--- a/plugins/Chat/services.c
+++ b/plugins/Chat/services.c
@@ -610,7 +610,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
if ( gce->cbSize != SIZEOF_STRUCT_GCEVENT_V1 && gce->cbSize != SIZEOF_STRUCT_GCEVENT_V2 )
return GC_EVENT_WRONGVER;
- if ( !IsEventSupported( gcd->iType ) )
+ if ( !IsEventSupported( gcd->iType ))
return GC_EVENT_ERROR;
EnterCriticalSection(&cs);
diff --git a/plugins/ClientChangeNotify/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
index 8ce9f2080d..12440b5aaa 100644
--- a/plugins/ClientChangeNotify/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
@@ -407,7 +407,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
hHooks.AddElem(HookEvent(ME_OPT_INITIALISE, OptionsDlgInit));
hHooks.AddElem(HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged));
hHooks.AddElem(HookEvent(ME_CONTACTSETTINGS_INITIALISE, ContactSettingsInit));
- SkinAddNewSound(CLIENTCHANGED_SOUND, Translate("ClientChangeNotify: Client changed"), "");
+ SkinAddNewSoundEx(CLIENTCHANGED_SOUND, NULL, LPGEN("ClientChangeNotify: Client changed"));
// updater plugin support
Update update = {0};
char szVersion[16];
diff --git a/plugins/Clist_modern/modern_aniavatars.cpp b/plugins/Clist_modern/modern_aniavatars.cpp
index dcad45f439..ae57520fa2 100644
--- a/plugins/Clist_modern/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/modern_aniavatars.cpp
@@ -195,7 +195,7 @@ int AniAva_InitModule()
memset(&AniAva,0,sizeof(AniAva));
if (g_CluiData.fGDIPlusFail) return 0;
if (!( ModernGetSettingByte(NULL,"CList","AvatarsAnimated",(ServiceExists(MS_AV_GETAVATARBITMAP)&&!g_CluiData.fGDIPlusFail))
- && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) ) ) return 0;
+ && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT)) ) return 0;
{
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
@@ -264,7 +264,7 @@ int AniAva_UpdateOptions()
BOOL bReloadAvatars=FALSE;
BOOL bBeEnabled=(!g_CluiData.fGDIPlusFail
&& ModernGetSettingByte(NULL,"CList","AvatarsAnimated",(ServiceExists(MS_AV_GETAVATARBITMAP)&&!g_CluiData.fGDIPlusFail))
- && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) );
+ && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT));
if (bBeEnabled && !AniAva.bModuleStarted)
{
AniAva_InitModule();
@@ -324,7 +324,7 @@ int AniAva_AddAvatar(HANDLE hContact, TCHAR * szFilename, int width, int heigth)
}
if (i==AniAva.Objects->realCount)
{
- pavi = (ANIAVA_OBJECT *) mir_calloc( sizeof(ANIAVA_OBJECT) );
+ pavi = (ANIAVA_OBJECT *) mir_calloc( sizeof(ANIAVA_OBJECT));
pavi->hWindow = NULL;
pavi->hContact = hContact;
pavi->bInvalidPos = 0;
@@ -493,7 +493,7 @@ int AniAva_RemoveInvalidatedAvatars()
for (i=0; i<AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai=(ANIAVA_OBJECT *)AniAva.Objects->items[i];
- if (pai->hWindow && (pai->bInvalidPos) )
+ if (pai->hWindow && (pai->bInvalidPos))
{
SendMessage(pai->hWindow,AAM_STOP,0,0);
if (pai->bInvalidPos)//>3)
@@ -880,7 +880,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /* = NUL
ske_SetRgnOpaque( tempDC, hRgn, TRUE );
}
// draw avatar
- if ( !(AniAva.bFlags & AAO_OPAQUE) )
+ if ( !(AniAva.bFlags & AAO_OPAQUE))
BitBlt(tempDC,0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC , dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, SRCCOPY);
else
{
@@ -898,7 +898,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /* = NUL
if ( ( AniAva.bFlags & AAO_HAS_OVERLAY )
&& ( dat->overlayIconIdx != -1 )
- && ( AniAva.overlayIconImageList ) )
+ && ( AniAva.overlayIconImageList ))
{
// if overlay - draw overlay icon
// position - on avatar
@@ -1064,9 +1064,9 @@ static void _AniAva_AnimationTreadProc(HANDLE hExitEvent)
if ( rc == WAIT_OBJECT_0 + 1 )
{
MSG msg;
- while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) )
+ while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
- if ( IsDialogMessage(msg.hwnd, &msg) ) continue;
+ if ( IsDialogMessage(msg.hwnd, &msg)) continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
@@ -1119,7 +1119,7 @@ void _AniAva_InvalidateParent(ANIAVA_WINDOWINFO * dat)
static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ANIAVA_WINDOWINFO * dat=NULL;
- if (msg==WM_TIMER || msg==WM_DESTROY || (msg>AAM_FIRST && msg<AAM_LAST) )
+ if (msg==WM_TIMER || msg==WM_DESTROY || (msg>AAM_FIRST && msg<AAM_LAST))
dat=(ANIAVA_WINDOWINFO *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch (msg)
diff --git a/plugins/Clist_modern/modern_cachefuncs.cpp b/plugins/Clist_modern/modern_cachefuncs.cpp
index 46e0d40b03..0a741adb90 100644
--- a/plugins/Clist_modern/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/modern_cachefuncs.cpp
@@ -151,7 +151,7 @@ void CSmileyString::_CopySmileyList( SortedList *plInput )
ClcContactTextPiece *pieceFrom=(ClcContactTextPiece *) plInput->items[i];
if ( pieceFrom != NULL )
{
- ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece) );
+ ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece));
*piece=*pieceFrom;
if ( pieceFrom->type == TEXT_PIECE_TYPE_SMILEY)
piece->smiley = CopyIcon( pieceFrom->smiley );
@@ -165,7 +165,7 @@ void CSmileyString::DestroySmileyList()
if ( plText == NULL ) return;
- if ( IsBadReadPtr( plText, sizeof(SortedList) ) )
+ if ( IsBadReadPtr( plText, sizeof(SortedList)) )
{
plText = NULL;
return;
@@ -180,7 +180,7 @@ void CSmileyString::DestroySmileyList()
{
ClcContactTextPiece *piece = (ClcContactTextPiece *) plText->items[i];
- if ( !IsBadWritePtr(piece, sizeof(ClcContactTextPiece) ) )
+ if ( !IsBadWritePtr(piece, sizeof(ClcContactTextPiece)) )
{
if (piece->type==TEXT_PIECE_TYPE_SMILEY && piece->smiley != g_hListeningToIcon)
DestroyIcon_protect(piece->smiley);
@@ -976,7 +976,7 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact)
{
int old_pos=contact->avatar_pos;
if (g_CluiData.bSTATE!=STATE_NORMAL
- || (dat->use_avatar_service && !ServiceExists(MS_AV_GETAVATARBITMAP)) ) // workaround for avatar service and other wich destroys service on OK_TOEXIT
+ || (dat->use_avatar_service && !ServiceExists(MS_AV_GETAVATARBITMAP))) // workaround for avatar service and other wich destroys service on OK_TOEXIT
{
contact->avatar_pos = AVATAR_POS_DONT_HAVE;
contact->avatar_data = NULL;
diff --git a/plugins/Clist_modern/modern_clc.cpp b/plugins/Clist_modern/modern_clc.cpp
index 5778ffe11f..1e05581498 100644
--- a/plugins/Clist_modern/modern_clc.cpp
+++ b/plugins/Clist_modern/modern_clc.cpp
@@ -222,7 +222,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam)
{
pcli->pfnClcBroadcast( INTM_GROUPSCHANGED,wParam,lParam);
}
- else if (!strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName") )
+ else if (!strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName"))
{
CLUIServices_ProtocolStatusChanged(0,(LPARAM)cws->szModule);
}
@@ -302,7 +302,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam)
pcli->pfnClcBroadcast( INTM_TIMEZONECHANGED,wParam,0);
else if (!strcmp(cws->szSetting,"ListeningTo"))
pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0);
- else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported") )
+ else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported"))
{
pcli->pfnInvalidateDisplayNameCacheEntry((HANDLE)wParam);
pcli->pfnClcBroadcast( CLM_AUTOREBUILD,wParam,0);
@@ -1008,7 +1008,7 @@ static LRESULT clcOnLButtonDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM
{
if ( hit==dat->selection && hitFlags&CLCHT_ONITEMLABEL && dat->exStyle&CLS_EX_EDITLABELS)
{
- if ( !(dat->dragStage&DRAGSTAGEF_SKIPRENAME) )
+ if ( !(dat->dragStage&DRAGSTAGEF_SKIPRENAME))
{
SetCapture(hwnd);
dat->iDragItem=dat->selection;
@@ -1152,7 +1152,7 @@ static LRESULT clcOnMouseMove(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w
pt.x= (short)LOWORD(lParam);
pt.y= (short)HIWORD(lParam);
if ( abs(pt.x-dat->ptDragStart.x)>GetSystemMetrics(SM_CXDOUBLECLK)
- ||abs(pt.y-dat->ptDragStart.y)>GetSystemMetrics(SM_CYDOUBLECLK) )
+ ||abs(pt.y-dat->ptDragStart.y)>GetSystemMetrics(SM_CYDOUBLECLK))
{
KillTimer( hwnd, TIMERID_RENAME );
dat->dragStage&=(~DRAGSTAGEF_MAYBERENAME);
@@ -1770,7 +1770,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP
{
shouldShow=TRUE;
}
- if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective) ) // CLVM changed
+ if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) // CLVM changed
{
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
@@ -1968,7 +1968,7 @@ static LRESULT clcOnIntmStatusChanged(struct ClcData *dat, HWND hwnd, UINT msg,
}
- if (ModernGetSettingByte(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT) )
+ if (ModernGetSettingByte(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT))
{
SendMessage(hwnd,CLM_AUTOREBUILD,0,0);
}
diff --git a/plugins/Clist_modern/modern_clcitems.cpp b/plugins/Clist_modern/modern_clcitems.cpp
index 367bbb57de..89e0395129 100644
--- a/plugins/Clist_modern/modern_clcitems.cpp
+++ b/plugins/Clist_modern/modern_clcitems.cpp
@@ -54,7 +54,7 @@ void AddSubcontacts(struct ClcData *dat, struct ClcContact * cont, BOOL showOffl
hsub=(HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j);
cacheEntry=(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hsub);
wStatus=pdnce___GetStatus( cacheEntry );
- if (showOfflineHereGroup||(!(ModernGetSettingByte(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && ModernGetSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) ) ||
+ if (showOfflineHereGroup||(!(ModernGetSettingByte(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && ModernGetSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)) ||
wStatus!=ID_STATUS_OFFLINE )
//&&
//(!cacheEntry->Hidden || style&CLS_SHOWHIDDEN)
@@ -337,7 +337,7 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected )
ClcContact * selcontact = NULL;
ClcGroup * selgroup = NULL;
- if ( !hSelected || !pcli->pfnFindItem( dat->hWnd, dat, hSelected, &selcontact, &selgroup, NULL) )
+ if ( !hSelected || !pcli->pfnFindItem( dat->hWnd, dat, hSelected, &selcontact, &selgroup, NULL))
{
dat->selection = -1;
return dat->selection;
@@ -345,11 +345,11 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected )
if ( !selcontact->isSubcontact )
{
- dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact ) );
+ dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact ));
}
else
{
- dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ) );
+ dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ));
if (dat->selection != -1 )
dat->selection += selcontact->isSubcontact;
@@ -675,7 +675,7 @@ void pdnce___SetStatus( pdisplayNameCacheEntry pdnce, WORD wStatus )
}
struct ClcContact* cliCreateClcContact( void )
{
- struct ClcContact* contact=(struct ClcContact*)mir_calloc(sizeof( struct ClcContact ) );
+ struct ClcContact* contact=(struct ClcContact*)mir_calloc(sizeof( struct ClcContact ));
memset((void*)contact->iWideExtraImage,0xFF,sizeof(contact->iWideExtraImage));
return contact;
}
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp
index ee97d8c1cf..4585205f2f 100644
--- a/plugins/Clist_modern/modern_clcopts.cpp
+++ b/plugins/Clist_modern/modern_clcopts.cpp
@@ -220,13 +220,13 @@ void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *e
if ( fontOptionsList[index].fontID == i )
break;
}
- if ( index == SIZEOF(fontOptionsList) )
+ if ( index == SIZEOF(fontOptionsList))
return;
FontIDT fontid = {0};
fontid.cbSize = FontID_SIZEOF_V2;
- _tcsncpy( fontid.group, fontOptionsList[index].szGroup, SIZEOF( fontid.group ) );
- _tcsncpy( fontid.name, fontOptionsList[index].szDescr, SIZEOF( fontid.name ) );
+ _tcsncpy( fontid.group, fontOptionsList[index].szGroup, SIZEOF( fontid.group ));
+ _tcsncpy( fontid.name, fontOptionsList[index].szDescr, SIZEOF( fontid.name ));
COLORREF col = CallService( MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf );
diff --git a/plugins/Clist_modern/modern_clcpaint.cpp b/plugins/Clist_modern/modern_clcpaint.cpp
index edc043da0f..548407d616 100644
--- a/plugins/Clist_modern/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/modern_clcpaint.cpp
@@ -111,7 +111,7 @@ CLCPaint::CLCPaint()
void CLCPaint::cliPaintClc( HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint )
{
- if ( MirandaExiting() ) return;
+ if ( MirandaExiting()) return;
g_CluiData.mutexPaintLock++;
g_clcPainter._PaintClc( hwnd, dat, hdc, rcPaint );
g_CluiData.mutexPaintLock--;
@@ -184,7 +184,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact )
&& _GetRealStatus( contact, ID_STATUS_OFFLINE ) != ID_STATUS_INVISIBLE )
||
( contact->flags&CONTACTF_VISTO
- && _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ) )
+ && _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ))
{
// the contact is in the always visible list and the proto is invisible
// the contact is in the always invisible and the proto is in any other mode
@@ -192,7 +192,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact )
}
else
{
- switch( pdnce___GetStatus( pdnce ) )
+ switch( pdnce___GetStatus( pdnce ))
{
case ID_STATUS_OFFLINE: return FONTID_OFFLINE;
case ID_STATUS_AWAY: return FONTID_AWAY;
@@ -398,7 +398,7 @@ int CLCPaint::_GetRealStatus( struct ClcContact * pContact, int nStatus )
for ( int i = 0; i<pcli->hClcProtoCount; i++ )
{
- if ( !lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ) )
+ if ( !lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ))
return pcli->clcProto[i].dwStatus;
}
return nStatus;
@@ -477,7 +477,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
else
{
// Draw text and smileys
- for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ) )
+ for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ))
{
ClcContactTextPiece *piece = ( ClcContactTextPiece * ) plText->items[i];
RECT text_rc = *free_rc;
@@ -491,11 +491,11 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
{
tmp_rc = text_rc;
tmp_rc.right += 50;
- ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &tmp_rc, DT_CALCRECT | ( uTextFormat & ~DT_END_ELLIPSIS ) );
+ ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &tmp_rc, DT_CALCRECT | ( uTextFormat & ~DT_END_ELLIPSIS ));
pos_x += tmp_rc.right - tmp_rc.left + 2;
if ( uTextFormat & DT_RTLREADING )
- text_rc.left = max( text_rc.left, text_rc.right - ( tmp_rc.right - tmp_rc.left ) );
+ text_rc.left = max( text_rc.left, text_rc.right - ( tmp_rc.right - tmp_rc.left ));
ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &text_rc, uTextFormat );
len -= piece->len;
@@ -533,7 +533,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
text_rc.top += ( row_height - fac_height ) >> 1;
ske_DrawIconEx( hdcMem, text_rc.left, text_rc.top, piece->smiley,
- fac_width, fac_height, 0, NULL, DI_NORMAL|( ( factor<1 )?128:0 ) ); //TO DO enchance drawing quality
+ fac_width, fac_height, 0, NULL, DI_NORMAL|( ( factor<1 )?128:0 )); //TO DO enchance drawing quality
}
else
{
@@ -551,10 +551,10 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
void CLCPaint::_AddParameter( MODERNMASK * mpModernMask, MASKPARAM * lpParam )
{
- mpModernMask->pl_Params = ( MASKPARAM * )realloc( mpModernMask->pl_Params, ( mpModernMask->dwParamCnt+1 )*sizeof( MASKPARAM ) );
- memmove( &( mpModernMask->pl_Params[mpModernMask->dwParamCnt] ), lpParam, sizeof( MASKPARAM ) );
+ mpModernMask->pl_Params = ( MASKPARAM * )realloc( mpModernMask->pl_Params, ( mpModernMask->dwParamCnt+1 )*sizeof( MASKPARAM ));
+ memmove( &( mpModernMask->pl_Params[mpModernMask->dwParamCnt] ), lpParam, sizeof( MASKPARAM ));
mpModernMask->dwParamCnt++;
- memset( lpParam, 0, sizeof( MASKPARAM ) );
+ memset( lpParam, 0, sizeof( MASKPARAM ));
}
void CLCPaint::_FillParam( MASKPARAM * lpParam, DWORD dwParamHash, const char* const szValue, DWORD dwValueHash )
@@ -563,7 +563,7 @@ void CLCPaint::_FillParam( MASKPARAM * lpParam, DWORD dwParamHash, const char*
lpParam->dwId = dwParamHash;
if ( !dwValueHash && szValue && szValue[0] ) lpParam->dwValueHash = mod_CalcHash( szValue );
else lpParam->dwValueHash = dwValueHash;
- if ( szValue ) lpParam->szValue = strdupn( szValue, strlen( szValue ) );
+ if ( szValue ) lpParam->szValue = strdupn( szValue, strlen( szValue ));
else lpParam->szValue = NULL;
}
@@ -577,7 +577,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
{
MODERNMASK * mpModernMask = NULL;
char buf[BUF2SIZE] = {0};
- mpModernMask = ( MODERNMASK* )mir_calloc( sizeof( MODERNMASK ) );
+ mpModernMask = ( MODERNMASK* )mir_calloc( sizeof( MODERNMASK ));
_AddParamShort( mpModernMask, hi_Module, hi_CL );
_AddParamShort( mpModernMask, hi_ID, hi_Row );
@@ -615,7 +615,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
_AddParamShort( mpModernMask, hi_Type, hi_Contact );
AddParam( mpModernMask, HASH[hi_Protocol], Drawing->proto, 0 );
_AddParamShort( mpModernMask, hi_RootGroup, ( group && group->parent == NULL )?hi_True:hi_False );
- switch( GetContactCachedStatus( Drawing->hContact ) )
+ switch( GetContactCachedStatus( Drawing->hContact ))
{
// case ID_STATUS_CONNECTING: AppendChar( buf, BUFSIZE, "CONNECTING" ); break;
case ID_STATUS_ONLINE: _AddParamShort( mpModernMask, hi_Status, hi_ONLINE ); break;
@@ -667,7 +667,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
int i, m;
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
- if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
+ if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char* b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Name], b3, 0 );
@@ -682,7 +682,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
int i, m;
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
- if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
+ if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char * b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Group], b3, 0 );
@@ -741,7 +741,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
RECT fr_rc = free_row_rc;
//1 draw icon
- if ( !( Drawing->type == CLCIT_GROUP && InClistWindow && dat->row_hide_group_icon ) )
+ if ( !( Drawing->type == CLCIT_GROUP && InClistWindow && dat->row_hide_group_icon ))
{
int iImage = -1;
// Get image
@@ -798,7 +798,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
p_rect.bottom = p_rect.top+ICON_HEIGHT;
if ( ( Drawing->type == CLCIT_GROUP || Drawing->type == CLCIT_CONTACT || Drawing->type == CLCIT_INFO )
- && dat->extraColumnsCount > 0 && ( !InClistWindow || Drawing->type == CLCIT_CONTACT ) )
+ && dat->extraColumnsCount > 0 && ( !InClistWindow || Drawing->type == CLCIT_CONTACT ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
@@ -900,7 +900,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( dat->row_align_group_mode != 2 ) //center or left
{
- int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ) )>>1:0;
+ int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left+= x;
nameRect.right = nameRect.left+text_size.cx;
countRect.left = nameRect.right+space_width;
@@ -928,7 +928,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
- //if ( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ))
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
@@ -1041,7 +1041,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
Drawing->pos_rename_rect = rc;
}
- if ( ( !InClistWindow || !g_CluiData.fLayered )&& ( ( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS ) ) )
+ if ( ( !InClistWindow || !g_CluiData.fLayered )&& ( ( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )) )
{
//???
RECT rc = fr_rc;
@@ -1069,7 +1069,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
// Call Placement
cppCalculateRowItemsPos( gl_RowRoot, free_row_rc.right-free_row_rc.left );
// Now paint
- while ( ( gl_RowTabAccess[i] != NULL || ( i<2 && Drawing->type == CLCIT_GROUP ) ) && !( i>= 2 && Drawing->type == CLCIT_GROUP ) )
+ while ( ( gl_RowTabAccess[i] != NULL || ( i<2 && Drawing->type == CLCIT_GROUP )) && !( i>= 2 && Drawing->type == CLCIT_GROUP ))
{
if ( gl_RowTabAccess[i]->r.right-gl_RowTabAccess[i]->r.left>0
@@ -1151,7 +1151,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( dat->row_align_group_mode != 2 ) //center or left
{
- int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ) )>>1:0;
+ int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left+= x;
nameRect.right = nameRect.left+text_size.cx;
countRect.left = nameRect.right+space_width;
@@ -1179,7 +1179,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
- //if ( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ))
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
@@ -1276,7 +1276,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
&& ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE )
)
- && !Drawing->image_is_special ) ) )
+ && !Drawing->image_is_special )) )
{
int iImage = -1;
// Get image
@@ -1417,7 +1417,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
// Draw avatar
if ( dat->use_avatar_service )
- /*if ( ServiceExists( MS_AV_BLENDDRAWAVATAR ) )
+ /*if ( ServiceExists( MS_AV_BLENDDRAWAVATAR ))
{
AVATARDRAWREQUEST adr;
@@ -1445,7 +1445,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
else
{
- if ( !( Drawing->avatar_data->dwFlags&AVS_PREMULTIPLIED ) )
+ if ( !( Drawing->avatar_data->dwFlags&AVS_PREMULTIPLIED ))
{
HDC hdcTmp = CreateCompatibleDC( hdcMem );
RECT r = {0, 0, w, h};
@@ -1496,7 +1496,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
//TODO fix overlays
// Draw overlay
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
p_rect.top = p_rect.bottom - ICON_HEIGHT;
p_rect.left = p_rect.right - ICON_HEIGHT;
@@ -1528,7 +1528,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
int item;
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
@@ -1553,7 +1553,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
if ( Drawing->type == CLCIT_CONTACT &&
- ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ) )
+ ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
@@ -1616,7 +1616,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
case TC_EXTRA9:
{
if ( Drawing->type == CLCIT_CONTACT &&
- ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ) )
+ ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int eNum = gl_RowTabAccess[i]->type-TC_EXTRA1;
if ( eNum<dat->extraColumnsCount )
@@ -1660,7 +1660,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
// Select font
ChangeToFont( hdcMem, dat, FONTID_CONTACT_TIME, NULL );
- ske_DrawText( hdcMem, szResult, lstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ) );
+ ske_DrawText( hdcMem, szResult, lstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ));
}
break;
}
@@ -1799,14 +1799,14 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat )
else if ( !g_CluiData.fLayered )
paintMode = DM_NON_LAYERED;
- if ( !(paintMode&DM_CONTROL) && !CLUI_IsInMainWindow( hWnd ) )
+ if ( !(paintMode&DM_CONTROL) && !CLUI_IsInMainWindow( hWnd ))
paintMode |= DM_FLOAT;
LONG lStyle = GetWindowLongPtr( hWnd, GWL_STYLE );
int nStatus = _GetGeneralisedStatus();
if ( ( lStyle & WS_DISABLED )
- || ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ) )
- || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd ) ) )
+ || ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ))
+ || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd )) )
paintMode |= DM_GRAY;
if ( lStyle&CLS_GREYALTERNATE )
@@ -1817,7 +1817,7 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat )
void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT& clRect, _PaintContext& pc )
{
- if ( paintMode&DM_GRAY && !(paintMode&DM_LAYERED) )
+ if ( paintMode&DM_GRAY && !(paintMode&DM_LAYERED))
{
pc.hdcMem2 = CreateCompatibleDC( hdc );
if ( paintMode&DM_CLASSIC )
@@ -1843,15 +1843,15 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i
}
else
{
- pc.tmpbkcolour = (!(paintMode&DM_CONTROL) && dat->bkChanged ) ? dat->bkColour : ( !dat->useWindowsColours ? dat->bkColour : GetSysColor( COLOR_3DFACE ) );
+ pc.tmpbkcolour = (!(paintMode&DM_CONTROL) && dat->bkChanged ) ? dat->bkColour : ( !dat->useWindowsColours ? dat->bkColour : GetSysColor( COLOR_3DFACE ));
pc.tmpforecolour = /*(paintMode&DM_CONTROL) ? */dat->fontModernInfo[FONTID_CONTACTS].colour;
}
if ( paintMode&DM_GREYALTERNATE )
{
- int rDelta = ( GetRValue( pc.tmpbkcolour ) > GetRValue( pc.tmpforecolour ) ) ? -10 : 10;
- int gDelta = ( GetGValue( pc.tmpbkcolour ) > GetGValue( pc.tmpforecolour ) ) ? -10 : 10;
- int bDelta = ( GetBValue( pc.tmpbkcolour ) > GetBValue( pc.tmpforecolour ) ) ? -10 : 10;
+ int rDelta = ( GetRValue( pc.tmpbkcolour ) > GetRValue( pc.tmpforecolour )) ? -10 : 10;
+ int gDelta = ( GetGValue( pc.tmpbkcolour ) > GetGValue( pc.tmpforecolour )) ? -10 : 10;
+ int bDelta = ( GetBValue( pc.tmpbkcolour ) > GetBValue( pc.tmpforecolour )) ? -10 : 10;
int rValue = GetRValue( pc.tmpbkcolour ) + rDelta;
int gValue = GetRValue( pc.tmpbkcolour ) + gDelta;
int bValue = GetRValue( pc.tmpbkcolour ) + bDelta;
@@ -1860,7 +1860,7 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i
BYTE bgValue = ( gValue >255) ? 255 : gValue < 0 ? 0 : (BYTE)gValue;
BYTE bbValue = ( bValue >255) ? 255 : bValue < 0 ? 0 : (BYTE)bValue;
- pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue ) ) );
+ pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue )) );
}
// Set some draw states
@@ -1874,18 +1874,18 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i
void CLCPaint::_DrawBackground( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT * rcPaint, RECT& clRect, _PaintContext& pc )
{
- if ( paintMode&(DM_FLOAT|DM_CONTROL) )
+ if ( paintMode&(DM_FLOAT|DM_CONTROL))
{
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
DeleteObject( hBrush );
ske_SetRectOpaque( pc.hdcMem, rcPaint );
- if ( !( paintMode&DM_GREYALTERNATE ) )
+ if ( !( paintMode&DM_GREYALTERNATE ))
SkinDrawGlyph( pc.hdcMem, &clRect, rcPaint, "CL,ID=Background,Type=Control" );
}
else if ( paintMode&DM_CLASSIC)
{
- if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat ) )
+ if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat ))
{
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
@@ -1995,12 +1995,12 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
// Store pos
Drawing->pos_indent = free_row_rc.left;
- ZeroMemory( &Drawing->pos_check, sizeof( Drawing->pos_check ) );
- ZeroMemory( &Drawing->pos_avatar, sizeof( Drawing->pos_avatar ) );
- ZeroMemory( &Drawing->pos_icon, sizeof( Drawing->pos_icon ) );
- ZeroMemory( &Drawing->pos_label, sizeof( Drawing->pos_label ) );
- ZeroMemory( &Drawing->pos_rename_rect, sizeof( Drawing->pos_rename_rect ) );
- ZeroMemory( &Drawing->pos_extra, sizeof( Drawing->pos_extra ) );
+ ZeroMemory( &Drawing->pos_check, sizeof( Drawing->pos_check ));
+ ZeroMemory( &Drawing->pos_avatar, sizeof( Drawing->pos_avatar ));
+ ZeroMemory( &Drawing->pos_icon, sizeof( Drawing->pos_icon ));
+ ZeroMemory( &Drawing->pos_label, sizeof( Drawing->pos_label ));
+ ZeroMemory( &Drawing->pos_rename_rect, sizeof( Drawing->pos_rename_rect ));
+ ZeroMemory( &Drawing->pos_extra, sizeof( Drawing->pos_extra ));
// **** Draw Background
@@ -2015,10 +2015,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
else
SkinDrawGlyph( pc.hdcMem, &row_rc, rcPaint, "CL,ID=GreyAlternate" );
}
- if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL) ) )
+ if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL)) )
{
// Row background
- if ( !(paintMode&DM_CONTROL) )
+ if ( !(paintMode&DM_CONTROL))
{ //Build mpRequest string
mpRequest = _GetCLCContactRowBackModernMask( group, Drawing, indent, line_num, selected, hottrack, dat );
{
@@ -2065,7 +2065,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
int checkboxWidth;
if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
- ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
+ ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
checkboxWidth = dat->checkboxSize+2;
else checkboxWidth = 0;
//background
@@ -2077,10 +2077,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
{
int i = y;
int row_height = row_rc.bottom-row_rc.top;
- for ( i = y; i<y+row_height; i+= max( dat->row_min_heigh, 1 ) )
+ for ( i = y; i<y+row_height; i+= max( dat->row_min_heigh, 1 ))
{
ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 0, i, clRect.right,
- min( y+row_height-i, max( dat->row_min_heigh, 1 ) ), CLR_NONE, CLR_NONE,
+ min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
dat->exStyle&CLS_EX_NOTRANSLUCENTSEL?ILD_NORMAL:ILD_BLEND25 );
}
SetTextColor( pc.hdcMem, paintMode&DM_CONTROL ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour );
@@ -2091,7 +2091,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
{
int i;
int row_height = row_rc.bottom-row_rc.top-1;
- for ( i = y+1; i<y+row_height; i+= max( dat->row_min_heigh, 1 ) )
+ for ( i = y+1; i<y+row_height; i+= max( dat->row_min_heigh, 1 ))
{
ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 1, i, clRect.right-2,
min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
@@ -2107,7 +2107,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
// **** Checkboxes
if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
- ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
+ ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
{
//RECT rc;
rc = free_row_rc;
@@ -2117,10 +2117,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
- if ( xpt_IsThemed( dat->hCheckBoxTheme ) ) {
+ if ( xpt_IsThemed( dat->hCheckBoxTheme )) {
xpt_DrawThemeBackground( dat->hCheckBoxTheme, pc.hdcMem, BP_CHECKBOX, Drawing->flags&CONTACTF_CHECKED?( hottrack?CBS_CHECKEDHOT:CBS_CHECKEDNORMAL ):( hottrack?CBS_UNCHECKEDHOT:CBS_UNCHECKEDNORMAL ), &rc, &rc );
}
- else DrawFrameControl( pc.hdcMem, &rc, DFC_BUTTON, DFCS_BUTTONCHECK|DFCS_FLAT|( Drawing->flags&CONTACTF_CHECKED?DFCS_CHECKED:0 )|( hottrack?DFCS_HOT:0 ) );
+ else DrawFrameControl( pc.hdcMem, &rc, DFC_BUTTON, DFCS_BUTTONCHECK|DFCS_FLAT|( Drawing->flags&CONTACTF_CHECKED?DFCS_CHECKED:0 )|( hottrack?DFCS_HOT:0 ));
left_pos += dat->checkboxSize + EXTRA_CHECKBOX_SPACE + HORIZONTAL_SPACE;
free_row_rc.left = row_rc.left + left_pos;
@@ -2154,7 +2154,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
y += dat->row_heights[line_num];
//increment by subcontacts
if ( ( group->cl.items && group->scanIndex<group->cl.count && group->cl.items[group->scanIndex]->subcontacts != NULL && group->cl.items[group->scanIndex]->type != CLCIT_GROUP )
- && ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ) )
+ && ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ))
{
if ( subindex<group->cl.items[group->scanIndex]->SubAllocated-1 )
subindex++;
@@ -2219,7 +2219,7 @@ void CLCPaint::_DrawInsertionMark( struct ClcData * dat, RECT& clRect, _PaintCon
void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT* rcPaint, RECT& clRect, _PaintContext& pc )
{
- if ( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ) )
+ if ( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ))
{
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, SRCCOPY );
}
@@ -2227,7 +2227,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p
if ( ( paintMode&DM_GRAY ) && hdc && hdc != pc.hdcMem )
{
BLENDFUNCTION bf = {AC_SRC_OVER, 0, 80, AC_SRC_ALPHA };
- BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED) ) );
+ BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED)) );
ske_AlphaBlend( a ? pc.hdcMem2 : hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, bf );
if ( a )
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem2, rcPaint->left, rcPaint->top, SRCCOPY );
@@ -2236,7 +2236,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p
void CLCPaint::_FreePaintContext( _PaintContext& pc )
{
if ( pc.hBrushAlternateGrey ) DeleteObject( pc.hBrushAlternateGrey );
- SelectObject( pc.hdcMem, (HFONT) GetStockObject( DEFAULT_GUI_FONT ) );
+ SelectObject( pc.hdcMem, (HFONT) GetStockObject( DEFAULT_GUI_FONT ));
if ( pc.fRelease&_PaintContext::release_hdcmem )
{
SelectObject( pc.hdcMem, pc.oldbmp );
@@ -2254,8 +2254,8 @@ void CLCPaint::_PaintClc( HWND hwnd, struct ClcData *dat, HDC hdc, RECT *_rcPain
{
g_CluiData.t_now = time( NULL );
- if ( _rcPaint && IsRectEmpty( _rcPaint ) ) return; // check if draw area is not empty
- if ( !IsWindowVisible( hwnd ) ) return; // and window is visible
+ if ( _rcPaint && IsRectEmpty( _rcPaint )) return; // check if draw area is not empty
+ if ( !IsWindowVisible( hwnd )) return; // and window is visible
RECT clRect;
GetClientRect( hwnd, &clRect );
@@ -2338,7 +2338,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
// Now let's check what we have to draw
for ( item_iterator = 0 ; item_iterator < NUM_ITEM_TYPE && free_row_rc.left < free_row_rc.right ; item_iterator++ )
{
- if ( Drawing->ext_nItemsNum>= SIZEOF( Drawing->ext_mpItemsDesc ) ) break;
+ if ( Drawing->ext_nItemsNum>= SIZEOF( Drawing->ext_mpItemsDesc )) break;
if ( left )
item = item_iterator;
else
@@ -2391,7 +2391,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
else
{
// Has to keep the empty space??
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ) )
+ if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
// Make rectangle
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
@@ -2436,8 +2436,8 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
RECT rc;
int iImage = -1;
BOOL has_avatar = ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
- ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ) )
- && !( CheckMiniMode( dat, selected, hottrack ) );
+ ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ))
+ && !( CheckMiniMode( dat, selected, hottrack ));
if ( Drawing->type == CLCIT_CONTACT
&& dat->icon_hide_on_avatar
@@ -2446,7 +2446,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
&& !Drawing->image_is_special )
{
// Don't have to draw, but has to keep the empty space?
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ) )
+ if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, dat->iconXSpace, ICON_HEIGHT, HORIZONTAL_SPACE );
@@ -2467,7 +2467,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
&& dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons )
&& dat->avatars_overlay_type == SETTING_AVATAR_OVERLAY_TYPE_CONTACT
- ) ) )
+ )) )
{
// Don't have to draw and don't have to keep the empty space
break;
@@ -2586,7 +2586,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
SIZE third_line_text_size = {0};
SIZE space_size = {0};
SIZE counts_size = {0};
- char *szCounts = NULL;//mir_tstrdup( TEXT( "" ) );
+ char *szCounts = NULL;//mir_tstrdup( TEXT( "" ));
int free_width;
int free_height;
int max_bottom_selection_border = SELECTION_BORDER;
@@ -2700,7 +2700,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
}
}
- else if ( Drawing->type == CLCIT_CONTACT && !CheckMiniMode( dat, selected, hottrack ) )
+ else if ( Drawing->type == CLCIT_CONTACT && !CheckMiniMode( dat, selected, hottrack ))
{
int tmp;
PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
@@ -2733,9 +2733,9 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
text_rc.bottom = text_rc.top + free_row_rc.bottom - free_row_rc.top - free_height;
if ( dat->text_align_right )
- text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - second_line_text_size.cx ) );
+ text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - second_line_text_size.cx ));
else
- text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + second_line_text_size.cx ) );
+ text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + second_line_text_size.cx ));
selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min( selection_text_rc.bottom, selection_text_rc.top + text_size.cy );
@@ -2770,9 +2770,9 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
text_rc.bottom = text_rc.top + free_row_rc.bottom - free_row_rc.top - free_height;
if ( dat->text_align_right )
- text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - third_line_text_size.cx ) );
+ text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - third_line_text_size.cx ));
else
- text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + third_line_text_size.cx ) );
+ text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + third_line_text_size.cx ));
selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min( selection_text_rc.bottom, selection_text_rc.top + text_size.cy );
@@ -2957,17 +2957,17 @@ void CLCPaint::_GetBlendMode( IN struct ClcData *dat, IN struct ClcContact * Dra
int mode;
int BlendedInActiveState = ( dat->dbbBlendInActiveState );
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- if ( selected && ( bFlag&GIM_SELECTED_AFFECT ) )
+ if ( selected && ( bFlag&GIM_SELECTED_AFFECT ))
{
colourFg = dat->selBkColour;
mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
}
- else if ( hottrack && ( bFlag&GIM_HOT_AFFECT ) )
+ else if ( hottrack && ( bFlag&GIM_HOT_AFFECT ))
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ) )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ))
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -3000,7 +3000,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
int overlayIdx = -1;
int blendmode = 255;
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
switch( dat->avatars_overlay_type )
{
@@ -3009,7 +3009,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
break;
case SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL:
overlayIdx = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
break;
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
overlayIdx = Drawing->iImage;
@@ -3034,7 +3034,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
if ( dat->avatars_use_custom_corner_size )
round_radius = dat->avatars_custom_corner_size;
else
- round_radius = min( _rcWidth( prcItem ), _rcHeight( prcItem ) ) / 5;
+ round_radius = min( _rcWidth( prcItem ), _rcHeight( prcItem )) / 5;
}
// draw borders
if ( dat->avatars_draw_border )
@@ -3072,7 +3072,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
DeleteObject( rgn );
// Draw overlays
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
POINT ptOverlay = { prcItem->right-ICON_HEIGHT, prcItem->bottom-ICON_HEIGHT };
if ( dat->avatars_draw_border )
@@ -3096,7 +3096,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
int item;
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
@@ -3281,12 +3281,12 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, struct ClcData *dat, struct ClcCont
{ //Subtract icon rect from left and right.
RECT rcTemp;
IntersectRect( &rcTemp, &Drawing->pos_icon, &rc1 );
- if ( !IsRectEmpty( &rcTemp ) ) rc1.right = rcTemp.left;
+ if ( !IsRectEmpty( &rcTemp )) rc1.right = rcTemp.left;
IntersectRect( &rcTemp, &Drawing->pos_icon, &rc2 );
- if ( !IsRectEmpty( &rcTemp ) ) rc2.left = rcTemp.right;
+ if ( !IsRectEmpty( &rcTemp )) rc2.left = rcTemp.right;
}
- if ( rc1.right-rc1.left>= 6 && !IsRectEmpty( &rc1 ) )
+ if ( rc1.right-rc1.left>= 6 && !IsRectEmpty( &rc1 ))
{
DrawEdge( hdcMem, &rc1, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque( hdcMem, &rc1 );
@@ -3295,7 +3295,7 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, struct ClcData *dat, struct ClcCont
RECT rcTemp = rc2;
IntersectRect( &rc2, &rcTemp, rcPaint );
}
- if ( rc2.right-rc2.left>= 6 && !IsRectEmpty( &rc2 ) )
+ if ( rc2.right-rc2.left>= 6 && !IsRectEmpty( &rc2 ))
{
DrawEdge( hdcMem, &rc2, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque( hdcMem, &rc2 );
@@ -3322,7 +3322,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st
for ( i = 0; i<Drawing->ext_nItemsNum; i++ )
{
RECT * prcItem = &( Drawing->ext_mpItemsDesc[i].itemRect );
- if ( __IsVisible( rcPaint, prcItem ) || ( Drawing->ext_mpItemsDesc[i].itemType == CIT_AVATAR && Drawing->avatar_pos == AVATAR_POS_ANIMATED ) )
+ if ( __IsVisible( rcPaint, prcItem ) || ( Drawing->ext_mpItemsDesc[i].itemType == CIT_AVATAR && Drawing->avatar_pos == AVATAR_POS_ANIMATED ))
{
switch( Drawing->ext_mpItemsDesc[i].itemType )
{
@@ -3357,13 +3357,13 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st
}
}
if ( ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )
- ||( Drawing->type == CLCIT_DIVIDER ) )
+ ||( Drawing->type == CLCIT_DIVIDER ))
_DrawContactLine( hdcMem, dat, Drawing, free_row_rc, rcPaint, text_rc );
}
void CLCPaint::_PaintRowItems ( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct ClcContact *Drawing, RECT row_rc, RECT free_row_rc, int left_pos, int right_pos, int selected, int hottrack, RECT *rcPaint )
{
//Extended LAYOUT
- if ( gl_RowRoot && ( dat->hWnd == pcli->hwndContactTree ) )
+ if ( gl_RowRoot && ( dat->hWnd == pcli->hwndContactTree ))
{
_PaintRowItemsEx( hwnd, hdcMem, dat, Drawing, row_rc, free_row_rc, left_pos, right_pos, selected, hottrack, rcPaint );
ske_ResetTextEffect( hdcMem );
diff --git a/plugins/Clist_modern/modern_clcutils.cpp b/plugins/Clist_modern/modern_clcutils.cpp
index 5ba8924e8c..33830c6e63 100644
--- a/plugins/Clist_modern/modern_clcutils.cpp
+++ b/plugins/Clist_modern/modern_clcutils.cpp
@@ -75,7 +75,7 @@ int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcConta
/////////
if ( ((testx<hitcontact->pos_indent) && !dat->text_rtl) ||
- ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl) )
+ ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl))
{
if(flags) *flags|=CLCHT_ONITEMINDENT;
return hit;
@@ -159,7 +159,7 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth)
| GetKeyState( VK_PRIOR )
| GetKeyState( VK_NEXT )
| GetKeyState( VK_HOME )
- | GetKeyState( VK_END ) ) & 0x8000 );
+ | GetKeyState( VK_END )) & 0x8000 );
if (!noSmooth && !keyDown)
{
diff --git a/plugins/Clist_modern/modern_clistevents.cpp b/plugins/Clist_modern/modern_clistevents.cpp
index 1c938a83aa..8f3f667d85 100644
--- a/plugins/Clist_modern/modern_clistevents.cpp
+++ b/plugins/Clist_modern/modern_clistevents.cpp
@@ -115,7 +115,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID;
if (p->cle.pszService && ( !strncmp("SRMsg/ReadMessage", p->cle.pszService, SIZEOF("SRMsg/ReadMessage"))
- || !strncmp("GChat/DblClickEvent", p->cle.pszService, SIZEOF("GChat/DblClickEvent")) ))
+ || !strncmp("GChat/DblClickEvent", p->cle.pszService, SIZEOF("GChat/DblClickEvent"))))
{
// dup check only for msg events
diff --git a/plugins/Clist_modern/modern_clistmod.cpp b/plugins/Clist_modern/modern_clistmod.cpp
index baa92d5e95..64143550da 100644
--- a/plugins/Clist_modern/modern_clistmod.cpp
+++ b/plugins/Clist_modern/modern_clistmod.cpp
@@ -357,7 +357,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) {
if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- else if ( ModernGetSettingByte(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT) || !ModernGetSettingByte(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT) )
+ else if ( ModernGetSettingByte(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT) || !ModernGetSettingByte(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
return GWVS_VISIBLE;
else if ( hwndFocused == pcli->hwndContactList || GetParent(hwndFocused) == pcli->hwndContactList )
return GWVS_VISIBLE;
@@ -513,7 +513,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam)
return 0;
}
- if ( (bShow == TRUE || lParam == 1) )
+ if ( (bShow == TRUE || lParam == 1))
{
Sync( CLUIFrames_ActivateSubContainers, TRUE );
CLUI_ShowWindowMod(pcli->hwndContactList, SW_RESTORE);
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp
index e16323619c..198678312b 100644
--- a/plugins/Clist_modern/modern_clistopts.cpp
+++ b/plugins/Clist_modern/modern_clistopts.cpp
@@ -419,7 +419,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_SIZE_PIXELS3),FALSE);
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
- if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) )
+ if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ))
{
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
@@ -481,7 +481,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_WIDTH_SPIN),enabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_SIZE_PIXELS),enabled);
- EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), enabled && IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) );
+ EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), enabled && IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ));
// }
// else
// {
@@ -492,7 +492,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
}
else if (LOWORD(wParam)==IDC_SHOW_ANIAVATARS)
{
- EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) );
+ EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ));
}
else if (LOWORD(wParam)==IDC_AVATAR_DRAW_BORDER)
diff --git a/plugins/Clist_modern/modern_clui.cpp b/plugins/Clist_modern/modern_clui.cpp
index 914c0e240b..5929ecfc87 100644
--- a/plugins/Clist_modern/modern_clui.cpp
+++ b/plugins/Clist_modern/modern_clui.cpp
@@ -176,14 +176,14 @@ int CLUI::OnEvent_DBSettingChanging(WPARAM wParam,LPARAM lParam)
if (dbcws==NULL) return(0);
if (MirandaExiting()) return 0;
- if ( ( dbcws->value.type==DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode") ) ||
+ if ( ( dbcws->value.type==DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode")) ||
( dbcws->value.type==DBVT_ASCIIZ &&
( ( !mir_strcmp(dbcws->szSetting,"e-mail") ||
!mir_strcmp(dbcws->szSetting,"Mye-mail0") ||
- !mir_strcmp(dbcws->szSetting,"Cellular") ) ||
+ !mir_strcmp(dbcws->szSetting,"Cellular")) ||
( !mir_strcmp(dbcws->szModule,"UserInfo") &&
( !mir_strcmp(dbcws->szSetting,"MyPhone0") ||
- !mir_strcmp(dbcws->szSetting,"Mye-mail0") ) ) ) ) )
+ !mir_strcmp(dbcws->szSetting,"Mye-mail0")) )) ))
ExtraImage_SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return(0);
};
@@ -393,7 +393,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT * prcParent, BYTE bAlpha)
RECT rcBounds;
GetRgnBox(hRgn,&rcBounds);
- if ( IsRectEmpty(&rcBounds) )
+ if ( IsRectEmpty(&rcBounds))
{
DeleteObject(hRgn);
return S_FALSE;
@@ -528,7 +528,7 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd)
{
int res=0;
- if (hWnd==pcli->hwndContactList && (nCmd==SW_HIDE || nCmd==SW_MINIMIZE) )
+ if (hWnd==pcli->hwndContactList && (nCmd==SW_HIDE || nCmd==SW_MINIMIZE))
{
AniAva_InvalidateAvatarPositions(NULL);
AniAva_RemoveInvalidatedAvatars();
@@ -1862,7 +1862,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD
{
sid.pszDefaultFile = NULL;
sid.iDefaultIndex = 0;
- sid.hDefaultIcon = LoadSmallIcon( hDefaultModuleInst, MAKEINTRESOURCE(iDefaultResource) );
+ sid.hDefaultIcon = LoadSmallIcon( hDefaultModuleInst, MAKEINTRESOURCE(iDefaultResource));
}
hIcolibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
if ( sid.hDefaultIcon ) DestroyIcon(sid.hDefaultIcon);
@@ -1874,7 +1874,7 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b
{
// proxy CLUI Messages
LRESULT result = 0;
- if ( ProcessCLUIFrameInternalMsg( m_hWnd, msg, wParam, lParam, result ) )
+ if ( ProcessCLUIFrameInternalMsg( m_hWnd, msg, wParam, lParam, result ))
{
bHandled = TRUE;
return result;
@@ -2168,9 +2168,9 @@ LRESULT CLUI::OnUpdate( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
}
LRESULT CLUI::OnInitMenu( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
- if ( !CLUI::IsMainMenuInited() )
+ if ( !CLUI::IsMainMenuInited())
{
- if ( ServiceExists( MS_CLIST_MENUBUILDMAIN ) ) CallService( MS_CLIST_MENUBUILDMAIN, 0, 0 );
+ if ( ServiceExists( MS_CLIST_MENUBUILDMAIN )) CallService( MS_CLIST_MENUBUILDMAIN, 0, 0 );
CLUI::m_fMainMenuInited = TRUE;
}
return FALSE;
@@ -2178,7 +2178,7 @@ LRESULT CLUI::OnInitMenu( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
LRESULT CLUI::OnNcPaint( UINT msg, WPARAM wParam, LPARAM lParam )
{
int lRes = DefWindowProc( m_hWnd, msg, wParam, lParam );
- if ( !g_CluiData.fLayered && ModernGetSettingByte( NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT ) )
+ if ( !g_CluiData.fLayered && ModernGetSettingByte( NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT ))
{
HDC hdc = NULL;
if ( msg == WM_PRINT ) hdc=(HDC)wParam;
@@ -2300,7 +2300,7 @@ LRESULT CLUI::OnSetAllExtraIcons( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lPar
LRESULT CLUI::OnCreateClc( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
CreateCLC();
- if ( ModernGetSettingByte( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ) )
+ if ( ModernGetSettingByte( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
cliShowHide( (WPARAM) m_hWnd, (LPARAM)TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
@@ -2313,7 +2313,7 @@ LRESULT CLUI::OnLButtonDown( UINT msg, WPARAM wParam, LPARAM lParam )
pt.y = (short)HIWORD(lParam);
ClientToScreen( m_hWnd, &pt );
- if ( CLUI_SizingOnBorder( pt, 1 ) )
+ if ( CLUI_SizingOnBorder( pt, 1 ))
{
mutex_bIgnoreActivation = TRUE;
return FALSE;
@@ -2334,7 +2334,7 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam )
wParam = 0;
lParam = 0;
- if ( CLUI_SizingOnBorder( pt,1 ) )
+ if ( CLUI_SizingOnBorder( pt,1 ))
{
mutex_bIgnoreActivation = TRUE;
return 0;
@@ -2346,7 +2346,7 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam )
LRESULT CLUI::OnSetFocus( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 ) ) )
+ if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 )) )
{
SetFocus(pcli->hwndContactTree);
}
@@ -2488,7 +2488,7 @@ LRESULT CLUI::OnUpdateBringTimer( UINT msg, WPARAM wParam, LPARAM lParam )
LRESULT CLUI::OnTimer( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( MirandaExiting() ) return FALSE;
+ if ( MirandaExiting()) return FALSE;
if ( (int)wParam >= TM_STATUSBARUPDATE && (int)wParam<=TM_STATUSBARUPDATE+64 )
{
@@ -2623,7 +2623,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam )
if ( (g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
result == HTTOPLEFT || result == HTTOPRIGHT ||
result==HTBOTTOM || result==HTBOTTOMRIGHT ||
- result==HTBOTTOMLEFT) )
+ result==HTBOTTOMLEFT))
return HTCLIENT;
if (result==HTMENU)
@@ -2744,7 +2744,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc )
rcWindow=rcSizingRect;
else
GetWindowRect(m_hWnd,&rcWindow);
- if ( !g_CluiData.fAutoSize || pcli->hwndContactTree==0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0) )
+ if ( !g_CluiData.fAutoSize || pcli->hwndContactTree==0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
return FALSE;
maxHeight=ModernGetSettingByte(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT);
@@ -2928,7 +2928,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam )
pt.y = rc.top + (rc.bottom - rc.top) / 2;
}
}
- if(PtInRect( &rc ,pt ) )
+ if(PtInRect( &rc ,pt ))
{
HMENU hMenu;
hMenu=(HMENU)CallService(MS_CLIST_MENUBUILDGROUP,0,0);
@@ -2954,7 +2954,7 @@ LRESULT CLUI::OnMeasureItem( UINT msg, WPARAM wParam, LPARAM lParam )
HDC hdc;
SIZE textSize;
hdc=GetDC( m_hWnd );
- GetTextExtentPoint32A( hdc, Translate("Status"), lstrlenA( Translate( "Status" ) ), &textSize );
+ GetTextExtentPoint32A( hdc, Translate("Status"), lstrlenA( Translate( "Status" )), &textSize );
pmis->itemWidth = textSize.cx;
pmis->itemHeight = 0;
ReleaseDC( m_hWnd, hdc );
@@ -2988,7 +2988,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam )
int y = (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + offset;
DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
- DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ) );
+ DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ));
CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
nMirMenuState=dis->itemState;
diff --git a/plugins/Clist_modern/modern_cluiframes.cpp b/plugins/Clist_modern/modern_cluiframes.cpp
index ee88e5a4de..aef631a26a 100644
--- a/plugins/Clist_modern/modern_cluiframes.cpp
+++ b/plugins/Clist_modern/modern_cluiframes.cpp
@@ -296,7 +296,7 @@ static FRAMEWND* FindFrameByWnd( HWND hwnd )
if ( hwnd == NULL ) return( NULL );
for(i=0;i<g_nFramesCount;i++)
- if ((g_pfwFrames[i].floating)&&(g_pfwFrames[i].ContainerWnd==hwnd) )
+ if ((g_pfwFrames[i].floating)&&(g_pfwFrames[i].ContainerWnd==hwnd))
return(&g_pfwFrames[i]);
return( NULL);
@@ -351,7 +351,7 @@ FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd)
static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveLeft )
{
- if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ) )
+ if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
{
pThumbRight->dockOpt.hwndLeft = pThumbLeft->ContainerWnd;
pThumbLeft->dockOpt.hwndRight = pThumbRight->ContainerWnd;
@@ -361,7 +361,7 @@ static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveL
static void UndockThumbs( FRAMEWND *pThumb1, FRAMEWND *pThumb2 )
{
- if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ) )
+ if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ))
{
return;
}
@@ -432,7 +432,7 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
if ( bMoveTogether )
{
- UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ) );
+ UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ));
GetWindowRect( pThumb->ContainerWnd, &rcOld );
}
@@ -487,23 +487,23 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
pt.y = rcThumb.top;
bDocked = FALSE;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
bDocked = TRUE;
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedLeft = bDocked;
@@ -514,7 +514,7 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
pt.y = rcThumb.top;
bDocked = FALSE;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
if ( !bDockedLeft )
{
@@ -528,17 +528,17 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedRight = bDocked;
@@ -561,16 +561,16 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
pt.x = rcThumb.left;
pt.y = rcThumb.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
@@ -581,16 +581,16 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
pt.x = rcThumb.right;
pt.y = rcThumb.bottom;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
nNewX = rc.left - nWidth;
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
@@ -748,7 +748,7 @@ static int LocateStorePosition(int Frameid,int maxstored)
mir_snprintf(settingname,SIZEOF(settingname),"Name%d",i);
DBVARIANT dbv={0};
- if ( ModernGetSettingTString( NULL, CLUIFrameModule, settingname, &dbv ) )
+ if ( ModernGetSettingTString( NULL, CLUIFrameModule, settingname, &dbv ))
continue;
if ( lstrcmpi( dbv.ptszVal, g_pfwFrames[Frameid].Name ) ==0 )
@@ -2164,7 +2164,7 @@ static int CLUIFrameMoveResize(const FRAMEWND *Frame)
ClientToScreen(pcli->hwndContactList,&Off);
GetWindowRect(pcli->hwndContactList,&pr);
- if ( Frame->visible && (!Frame->collapsed || Frame->wndSize.bottom-Frame->wndSize.top == 0) )
+ if ( Frame->visible && (!Frame->collapsed || Frame->wndSize.bottom-Frame->wndSize.top == 0))
{
ShowWindowAsync( Frame->OwnerWindow, SW_HIDE );
ShowWindowAsync( Frame->hWnd, SW_HIDE );
@@ -2260,7 +2260,7 @@ int CLUIFrames_GetTotalHeight()
sumheight+=g_CluiData.TopClientMargin;
sumheight+=g_CluiData.BottomClientMargin;
return max(ModernGetSettingWord(NULL,"CLUI","MinHeight",SETTING_MINHEIGTH_DEFAULT),
- (sumheight+border.top+border.bottom) );
+ (sumheight+border.top+border.bottom));
}
int CLUIFramesGetMinHeight()
@@ -2476,7 +2476,7 @@ int CLUIFrames_ApplyNewSizes(int mode)
for(i=0;i<g_nFramesCount;i++) {
if ( (mode==1 && g_pfwFrames[i].OwnerWindow!=(HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
(mode==2 && g_pfwFrames[i].OwnerWindow==(HWND)-2) ||
- (mode==3) )
+ (mode==3))
if (g_pfwFrames[i].floating){
CLUIFrameResizeFloatingFrame(i);
}else
@@ -3089,11 +3089,11 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
if (ServiceExists(MO_CREATENEWMENUOBJECT))
{
- //if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ){break;};
- if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ) break;
+ //if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)){break;};
+ if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)) break;
}else
{
- if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid) ){break;};
+ if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid)){break;};
};
@@ -3147,15 +3147,15 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
if (g_pfwFrames[framepos].visible)
{AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_visible,TranslateT("Visible"));}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible") );};
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible"));};
if (g_pfwFrames[framepos].TitleBar.ShowTitleBar)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar") );};
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar"));};
if (g_pfwFrames[framepos].floating)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating") );};
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating"));};
//err=GetMenuItemCount(hmenu)
@@ -3322,7 +3322,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
//IntersectRect( &rcOverlap, &rcwnd, &rcMiranda )
- if (!IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ) )
+ if (!IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ))
{
GetCursorPos(&curpt);
GetWindowRect( g_pfwFrames[pos].hWnd, &rcwnd );
@@ -3790,7 +3790,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP
//IntersectRect( &rcOverlap, &rcwnd, &rcMiranda )
- if (IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ) )
+ if (IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ))
{
GetCursorPos(&curpt);
GetWindowRect( g_pfwFrames[framepos].hWnd, &rcwnd );
diff --git a/plugins/Clist_modern/modern_contact.cpp b/plugins/Clist_modern/modern_contact.cpp
index 23e98b695a..d8613d9a06 100644
--- a/plugins/Clist_modern/modern_contact.cpp
+++ b/plugins/Clist_modern/modern_contact.cpp
@@ -214,6 +214,6 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam)
INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam)
{
ModernWriteSettingByte(NULL, "Skin", "UseSound",
- (BYTE) !ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ (BYTE) !ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
return 0;
}
diff --git a/plugins/Clist_modern/modern_extraimage.cpp b/plugins/Clist_modern/modern_extraimage.cpp
index 6f145d3c79..71433e4123 100644
--- a/plugins/Clist_modern/modern_extraimage.cpp
+++ b/plugins/Clist_modern/modern_extraimage.cpp
@@ -299,7 +299,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact)
w1=ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_WEB);
c1=ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_CLIENT);
- memset( ImgIndex, 0, sizeof( ImgIndex ) );
+ memset( ImgIndex, 0, sizeof( ImgIndex ));
ProtoEnumAccounts( &count, &accs );
maxpr=0;
//calc only needed protocols
diff --git a/plugins/Clist_modern/modern_image_array.cpp b/plugins/Clist_modern/modern_image_array.cpp
index f8381ad9e6..1c055e9357 100644
--- a/plugins/Clist_modern/modern_image_array.cpp
+++ b/plugins/Clist_modern/modern_image_array.cpp
@@ -56,7 +56,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size)
}
iad->nodes = tmp;
- memset( &iad->nodes[iad->nodes_allocated_size], 0, (size_grow - iad->nodes_allocated_size) * sizeof(IMAGE_ARRAY_DATA_NODE) );
+ memset( &iad->nodes[iad->nodes_allocated_size], 0, (size_grow - iad->nodes_allocated_size) * sizeof(IMAGE_ARRAY_DATA_NODE));
}
else
{
diff --git a/plugins/Clist_modern/modern_rowtemplateopt.cpp b/plugins/Clist_modern/modern_rowtemplateopt.cpp
index 756382b0f8..fd183b2c64 100644
--- a/plugins/Clist_modern/modern_rowtemplateopt.cpp
+++ b/plugins/Clist_modern/modern_rowtemplateopt.cpp
@@ -255,7 +255,7 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti)
{
int i = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA(rowOptTmplRoot, (pROWCELL*)&rowOptTA, &i);
}
@@ -305,7 +305,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
{
int i = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA( (pROWCELL)tvpi.lParam, (pROWCELL*)&rowOptTA, &i );
}
@@ -315,7 +315,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
// Change icon at parent item
if (!prnt || (prnt!=prev)) return;
- if ( TreeView_GetChild(htree, prnt) )
+ if ( TreeView_GetChild(htree, prnt))
{
tvpi.iImage = 1;
tvpi.iSelectedImage = 0;
@@ -435,7 +435,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
rowOptTmplRoot = NULL;
rowParse(rowOptTmplRoot, rowOptTmplRoot, rowOptTmplStr, hbuf, seq, rowOptTA);
seq = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA(rowOptTmplRoot, (pROWCELL*)&rowOptTA, &seq);
rowOptFillRowTree(htree);
diff --git a/plugins/Clist_modern/modern_skinbutton.cpp b/plugins/Clist_modern/modern_skinbutton.cpp
index cfbfa23b7e..0f74b5a9d2 100644
--- a/plugins/Clist_modern/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/modern_skinbutton.cpp
@@ -502,7 +502,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
if (bct->CommandService)
{
- if (!_CallServiceStrParams(bct->CommandService, NULL)&& (bct->ValueDBSection && bct->ValueTypeDef) )
+ if (!_CallServiceStrParams(bct->CommandService, NULL)&& (bct->ValueDBSection && bct->ValueTypeDef))
ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
}
bct->down=0;
@@ -746,7 +746,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r)
GetWindowRect(parent,&rc);
else
rc=*r;
- if (g_CluiData.fLayered && ( draw & SBRF_DO_ALT_DRAW ) )
+ if (g_CluiData.fLayered && ( draw & SBRF_DO_ALT_DRAW ))
{
int sx,sy;
sx=rd.right-rd.left;
@@ -790,7 +790,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r)
SetWindowPos(Buttons[i].hwnd,HWND_TOP,l,t,r-l,b-t,0);
if ( (rc.right-rc.left<Buttons[i].minW /*&& Buttons[i].minW!=0*/)
- ||(rc.bottom-rc.top<Buttons[i].minH /*&& Buttons[i].minH!=0*/) )
+ ||(rc.bottom-rc.top<Buttons[i].minH /*&& Buttons[i].minH!=0*/))
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_HIDE);
else
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_SHOW);
diff --git a/plugins/Clist_modern/modern_skinengine.cpp b/plugins/Clist_modern/modern_skinengine.cpp
index 487285304e..7753867a9f 100644
--- a/plugins/Clist_modern/modern_skinengine.cpp
+++ b/plugins/Clist_modern/modern_skinengine.cpp
@@ -126,14 +126,14 @@ IniParser::IniParser( TCHAR * tcsFileName, BYTE flags ) : _Flags( flags )
_DoInit();
if ( !tcsFileName ) return;
- if ( tcsFileName[0] == _T('%') )
+ if ( tcsFileName[0] == _T('%'))
{
//TODO: Add parser of resource filename here
_LoadResourceIni( g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF");
return;
}
- _hFile = _tfopen( tcsFileName, _T("r") );
+ _hFile = _tfopen( tcsFileName, _T("r"));
if ( _hFile != NULL )
{
@@ -188,9 +188,9 @@ HRESULT IniParser::WriteStrToDb( const char * szSection, const char * szName, co
if ( This->_SecCheck)
{
//TODO check security here
- if ( wildcmp( szSection,"Skin_Description_Section",1 ) ) return S_OK;
+ if ( wildcmp( szSection,"Skin_Description_Section",1 )) return S_OK;
}
- if ( ( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ) )
+ if ( ( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ))
return S_OK; // skip not objects
@@ -249,7 +249,7 @@ int IniParser::GetSkinFolder( IN const TCHAR * szFileName, OUT TCHAR * pszFolder
szBuff = mir_tstrdup( szFileName );
pszPos = szBuff + _tcslen( szBuff );
- while ( pszPos > szBuff && *pszPos!= _T('.') ) { pszPos--; }
+ while ( pszPos > szBuff && *pszPos!= _T('.')) { pszPos--; }
*pszPos=_T('\0');
_tcscpy( pszFolderName, szBuff );
@@ -258,7 +258,7 @@ int IniParser::GetSkinFolder( IN const TCHAR * szFileName, OUT TCHAR * pszFolder
TCHAR *b3;
_tcscpy( custom_folder, pszFolderName );
b3=custom_folder + _tcslen( custom_folder );
- while ( b3 > custom_folder && *b3!= _T('\\') ) { b3--; }
+ while ( b3 > custom_folder && *b3!= _T('\\')) { b3--; }
*b3=_T('\0');
GetPrivateProfileString(_T("Skin_Description_Section"),_T("SkinFolder"),_T(""),cus,SIZEOF(custom_folder),szFileName);
@@ -316,7 +316,7 @@ HRESULT IniParser::_DoParseFile()
if ( len > 0 )
{
pLine[len]='\0';
- if ( !_DoParseLine( pLine ) ) return E_FAIL;
+ if ( !_DoParseLine( pLine )) return E_FAIL;
}
else
_nLine++;
@@ -348,7 +348,7 @@ HRESULT IniParser::_DoParseResource()
if ( len > 0 )
{
pLine[len]='\0';
- if ( !_DoParseLine( pLine ) ) return E_FAIL;
+ if ( !_DoParseLine( pLine )) return E_FAIL;
}
else
_nLine++;
@@ -361,7 +361,7 @@ const char * IniParser::_RemoveTailings( const char * szLine, size_t& len )
const char * pStart = szLine;
while( *pStart == ' ' || *pStart=='\t' ) pStart++; //skip spaces at begin
const char * pEnd = pStart + strlen( pStart );
- while( pEnd > pStart && ( *pEnd == ' ' || *pEnd == '\t' || *pEnd == '\n' || *pEnd == '\r' ) ) pEnd--;
+ while( pEnd > pStart && ( *pEnd == ' ' || *pEnd == '\t' || *pEnd == '\n' || *pEnd == '\r' )) pEnd--;
len = pEnd - pStart;
return pStart;
@@ -1709,7 +1709,7 @@ INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam)
if (gl->hGlyph==NULL && gl->hGlyph!=(HBITMAP)-1 &&
( (gl->Style&7)==ST_IMAGE
||(gl->Style&7)==ST_FRAGMENT
- ||(gl->Style&7)==ST_SOLARIZE ) )
+ ||(gl->Style&7)==ST_SOLARIZE ))
if (gl->szFileName)
{
gl->hGlyph=ske_LoadGlyphImage(gl->szFileName);
@@ -2377,7 +2377,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin)
Skin->pMaskList=(LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK));
memset(Skin->pMaskList,0,sizeof(LISTMODERNMASK));
Skin->szSkinPlace= ModernGetStringA(NULL,SKIN,"SkinFolder");
- if (!Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !ModernGetSettingByte(NULL,SKIN,"Modified",0)) )
+ if (!Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !ModernGetSettingByte(NULL,SKIN,"Modified",0)))
{
BOOL bOnlyObjects=FALSE;
if (Skin->szSkinPlace && strchr(Skin->szSkinPlace, '%'))
@@ -2611,7 +2611,7 @@ static int ske_LoadSkinFromResource(BOOL bOnlyObjects)
{
IniParser parser(g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF", bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS );
- if ( !parser.CheckOK() ) return 0;
+ if ( !parser.CheckOK()) return 0;
ske_DeleteAllSettingInSection("ModernSkin");
ModernWriteSettingString(NULL,SKIN,"SkinFolder","%Default%");
@@ -2629,7 +2629,7 @@ int ske_LoadSkinFromIniFile(TCHAR * szFileName, BOOL bOnlyObjects)
return ske_LoadSkinFromResource( bOnlyObjects );
IniParser parser( szFileName, bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS );
- if ( !parser.CheckOK() ) return 0;
+ if ( !parser.CheckOK()) return 0;
ske_DeleteAllSettingInSection("ModernSkin");
IniParser::GetSkinFolder(szFileName,skinFolder);
@@ -2958,7 +2958,7 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei
static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, DWORD ARGBcolor)
{
- if ( !( lpString && lpRect ) )
+ if ( !( lpString && lpRect ))
{
DebugBreak();
return 0;
@@ -2980,7 +2980,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
for ( int i = 0; i < 256; i++ )
{
- gammaTbl[i]= (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ) );
+ gammaTbl[i]= (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ));
blueMulTbl[i] = i * blueCf;
redMulTbl[i] = i * redCf;
greenMulTbl[i] = i * greenCf;
@@ -3054,9 +3054,9 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
// replace end of string by elipsis
bNeedFreeWorkString = TRUE;
- lpWorkString = (TCHAR*) malloc( ( visibleCharCount + 4) * sizeof(TCHAR) );
+ lpWorkString = (TCHAR*) malloc( ( visibleCharCount + 4) * sizeof(TCHAR));
- memcpy( (void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR) );
+ memcpy( (void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR));
memcpy( (void*) ( lpWorkString + visibleCharCount ), _T("..."), 4 * sizeof(TCHAR)); // 3 + 1
nCount = visibleCharCount + 3;
@@ -3070,7 +3070,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
if ( workRectWidth > textSize.cx )
{
- if ( format & ( DT_RIGHT | DT_RTLREADING ) )
+ if ( format & ( DT_RIGHT | DT_RTLREADING ))
{
drx = workRectWidth - textSize.cx;
}
@@ -3124,8 +3124,8 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
HDC bufDC = CreateCompatibleDC( hDC );
HBITMAP bufoldbmp = (HBITMAP)SelectObject( bufDC, bufbmp );
HFONT hOldBufFont = (HFONT)SelectObject( bufDC, hFont );
- SetBkColor( bufDC, RGB( 0, 0, 0 ) );
- SetTextColor( bufDC,RGB(255,255,255) );
+ SetBkColor( bufDC, RGB( 0, 0, 0 ));
+ SetTextColor( bufDC,RGB(255,255,255));
// Copy from destination to temp buffer
BitBlt( hOffscreenDC, 0, 0, textSize.cx, textSize.cy, hDC, workRect.left + drx - 2, workRect.top + dry - 2, SRCCOPY );
@@ -3134,7 +3134,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
TextOut( bufDC, 2, 2, lpWorkString, nCount);
MODERNEFFECT effect;
- if (ske_GetTextEffect( hDC, &effect ) )
+ if (ske_GetTextEffect( hDC, &effect ))
ske_DrawTextEffect( bits, bufbits, textSize.cx, textSize.cy, &effect );
//RenderText
@@ -3255,7 +3255,7 @@ static int ske_DrawTextWithEffectWorker( HDC hdc, LPCTSTR lpString, int nCount,
INT_PTR ske_Service_DrawTextWithEffect( WPARAM wParam, LPARAM lParam )
{
DrawTextWithEffectParam * p = ( DrawTextWithEffectParam * ) wParam;
- if ( p->cbSize != sizeof(DrawTextWithEffectParam) )
+ if ( p->cbSize != sizeof(DrawTextWithEffectParam))
return FALSE;
return ske_DrawTextWithEffectWorker( p->hdc, p->lpchText, p->cchText, p->lprc, p->dwDTFormat, p->pEffect );
}
@@ -3422,7 +3422,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy
BYTE hasalpha=FALSE;
alpha=alpha?alpha:255;
- if ( g_CluiData.fDisableSkinEngine && !(diFlags&0x80) )
+ if ( g_CluiData.fDisableSkinEngine && !(diFlags&0x80))
return DrawIconEx(hdcDst,xLeft,yTop,hIcon,cxWidth,cyWidth,istepIfAniCur,hbrFlickerFreeDraw,diFlags&0xFFFF7F);
if (!GetIconInfo(hIcon,&ici)) return 0;
@@ -3618,7 +3618,7 @@ int ske_RedrawCompleteWindow()
static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM lParam) // Immideately recall paint routines for frame and refresh image
{
- if ( MirandaLoading() ) return 0;
+ if ( MirandaLoading()) return 0;
RECT wnd;
FRAMEWND *frm;
@@ -3671,7 +3671,7 @@ static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM lParam)
}
static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) // Post request for updating
{
- if ( MirandaLoading() ) return 0;
+ if ( MirandaLoading()) return 0;
if (wParam)
{
FRAMEWND *frm=FindFrameByItsHWND((HWND)wParam);
@@ -3692,7 +3692,7 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam)
RECT rcUpdate;
GetClientRect(frm->hWnd,&rcClient);
IntersectRect( &rcUpdate, &rcClient, &pr->rcUpdate );
- if ( IsRectEmpty( &rcUpdate ) )
+ if ( IsRectEmpty( &rcUpdate ))
return 0;
r2=CreateRectRgn( rcUpdate.left, rcUpdate.top, rcUpdate.right, rcUpdate.bottom );
}
@@ -4801,7 +4801,7 @@ BOOL SkinDBGetContactSetting(HANDLE hContact, const char* szSection, const char*
if (!hContact) { //only for not contact settings
char * szSkinKey;
NEWJOINEDSTR(szSkinKey,szSection,"@",szKey);
- if ( !ModernGetSetting(hContact, SKINSETSECTION, szSkinKey, retdbv) ) {
+ if ( !ModernGetSetting(hContact, SKINSETSECTION, szSkinKey, retdbv)) {
if (bSkined) *bSkined=TRUE;
return FALSE;
} }
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp
index 6a2296b287..3bd9650748 100644
--- a/plugins/Clist_modern/modern_skinopt.cpp
+++ b/plugins/Clist_modern/modern_skinopt.cpp
@@ -55,7 +55,7 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam )
if ( !g_CluiData.fDisableSkinEngine )
{
//Tabbed settings
- ZeroMemory( &odp, sizeof( odp ) );
+ ZeroMemory( &odp, sizeof( odp ));
odp.cbSize = sizeof( odp );
odp.position = -200000000;
odp.hInstance = g_hInst;
@@ -115,7 +115,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
case WM_COMMAND:
{
int isLoad = 0;
- switch ( LOWORD( wParam ) )
+ switch ( LOWORD( wParam ))
{
case IDC_COLOUR_MENUNORMAL:
case IDC_COLOUR_MENUSELECTED:
@@ -132,7 +132,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
TCHAR Description[400];
TCHAR text[2000];
SkinListData *sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
sd = ( SkinListData* )( tvi.lParam );
}
if ( !sd ) return 0;
- if ( sd->File && !_tcschr( sd->File, _T('%') ) )
+ if ( sd->File && !_tcschr( sd->File, _T('%')) )
{
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Author" ), TranslateT( "( unknown )" ), Author, SIZEOF( Author ), sd->File );
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "URL" ), _T( "" ), URL, SIZEOF( URL ), sd->File );
@@ -159,7 +159,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
TranslateT( "Angeli-Ka (graphics), FYR (template)" ),
_T( "JID: fyr@jabber.ru" ),
_T("fyr.mirandaim.ru"),
- TranslateT( "Inside library" ) );
+ TranslateT( "Inside library" ));
}
MessageBox( hwndDlg, text, TranslateT( "Skin Information" ), MB_OK|MB_ICONINFORMATION );
}
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if ( HIWORD( wParam ) == BN_CLICKED )
{
SkinListData *sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -202,10 +202,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
}
if ( g_hCLUIOptionsWnd )
{
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ) );
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ));
}
}
break;
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
HBITMAP hbmp, holdbmp, imgOldbmp;
int mWidth, mHeight;
RECT workRect = {0};
- HBRUSH hbr = CreateSolidBrush( GetSysColor( COLOR_3DFACE ) );
+ HBRUSH hbr = CreateSolidBrush( GetSysColor( COLOR_3DFACE ));
DRAWITEMSTRUCT *dis = ( DRAWITEMSTRUCT * )lParam;
mWidth = dis->rcItem.right-dis->rcItem.left;
mHeight = dis->rcItem.bottom-dis->rcItem.top;
@@ -363,7 +363,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
TCHAR Description[400];
TCHAR text[2000];
SkinListData* sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -374,7 +374,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
}
if ( !sd ) return 0;
- if ( sd->File && !_tcschr( sd->File, _T('%') ) )
+ if ( sd->File && !_tcschr( sd->File, _T('%')) )
{
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Author" ), TranslateT( "( unknown )" ), Author, SIZEOF( Author ), sd->File );
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "URL" ), _T( "" ), URL, SIZEOF( URL ), sd->File );
@@ -390,7 +390,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
TranslateT( "This is second default Modern Contact list skin in Vista Aero style" ),
TranslateT( "graphics by Angeli-Ka\ntemplate by FYR" ),
_T("JID: fyr@jabber.ru"),
- _T("fyr.mirandaim.ru") );
+ _T("fyr.mirandaim.ru"));
}
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), SW_HIDE );
ShowWindow( GetDlgItem( hwndDlg, IDC_STATIC_INFO ), SW_SHOW );
@@ -400,10 +400,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
else
{
//no selected
- SendDlgItemMessage( hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Select skin from list" ) );
+ SendDlgItemMessage( hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Select skin from list" ));
EnableWindow( GetDlgItem( hwndDlg, IDC_BUTTON_APPLY_SKIN ), FALSE );
EnableWindow( GetDlgItem( hwndDlg, IDC_BUTTON_INFO ), FALSE );
- SendDlgItemMessage( hwndDlg, IDC_STATIC_INFO, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Please select skin to apply" ) );
+ SendDlgItemMessage( hwndDlg, IDC_STATIC_INFO, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Please select skin to apply" ));
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), SW_HIDE );
}
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), hPreviewBitmap?SW_SHOW:SW_HIDE );
@@ -451,20 +451,20 @@ int SearchSkinFiles( HWND hwndDlg, TCHAR * Folder )
{
do {
AddSkinToList( hwndDlg, Folder, fd.name );
- }while ( !_tfindnext( hFile, &fd ) );
+ }while ( !_tfindnext( hFile, &fd ));
_findclose( hFile );
}
_sntprintf( mask, SIZEOF( mask ), _T("%s\\*"), Folder );
hFile = _tfindfirst( mask, &fd );
{
do {
- if ( fd.attrib&_A_SUBDIR && !( _tcsicmp( fd.name, _T(".")) ==0 ||_tcsicmp( fd.name, _T("..") )==0 ) )
+ if ( fd.attrib&_A_SUBDIR && !( _tcsicmp( fd.name, _T(".")) ==0 ||_tcsicmp( fd.name, _T(".."))==0 ))
{//Next level of subfolders
TCHAR path[MAX_PATH];
_sntprintf( path, SIZEOF( path ), _T("%s\\%s"), Folder, fd.name );
SearchSkinFiles( hwndDlg, path );
}
- }while ( !_tfindnext( hFile, &fd ) );
+ }while ( !_tfindnext( hFile, &fd ));
_findclose( hFile );
}
return 0;
@@ -477,14 +477,14 @@ HTREEITEM FillAvailableSkinList( HWND hwndDlg )
TCHAR path[MAX_PATH];//, mask[MAX_PATH];
int attrib;
TCHAR *SkinsFolder = ModernGetStringT( NULL, "ModernData", "SkinsFolder" );
- if ( !SkinsFolder ) SkinsFolder = mir_tstrdup( _T("Skins") );
+ if ( !SkinsFolder ) SkinsFolder = mir_tstrdup( _T("Skins"));
CallService( MS_UTILS_PATHTOABSOLUTET, ( WPARAM )SkinsFolder, ( LPARAM )path );
mir_free_and_nill( SkinsFolder );
- AddSkinToList( hwndDlg, TranslateT( "Default Skin" ), _T("%Default Skin%") );
+ AddSkinToList( hwndDlg, TranslateT( "Default Skin" ), _T("%Default Skin%"));
attrib = GetFileAttributes( path );
- if ( attrib != INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ) )
+ if ( attrib != INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ))
SearchSkinFiles( hwndDlg, path );
{
TCHAR * skinfile;
@@ -505,11 +505,11 @@ HTREEITEM AddSkinToListFullName( HWND hwndDlg, TCHAR * fullName )
TCHAR path[MAX_PATH] = {0};
TCHAR file[MAX_PATH] = {0};
TCHAR *buf;
- _tcsncpy( path, fullName, SIZEOF( path ) );
+ _tcsncpy( path, fullName, SIZEOF( path ));
buf = path + _tcslen( path );
while ( buf > path )
{
- if ( *buf == _T( '\\' ) )
+ if ( *buf == _T( '\\' ))
{
*buf = _T( '\0' );
break;
@@ -517,7 +517,7 @@ HTREEITEM AddSkinToListFullName( HWND hwndDlg, TCHAR * fullName )
buf--;
}
buf++;
- _tcsncpy( file, buf, SIZEOF( file ) );
+ _tcsncpy( file, buf, SIZEOF( file ));
return AddSkinToList( hwndDlg, path, file );
}
@@ -533,16 +533,16 @@ HTREEITEM AddSkinToList( HWND hwndDlg, TCHAR * path, TCHAR* file )
TCHAR fullName[MAX_PATH] = {0};
TCHAR defskinname[MAX_PATH] = {0};
SkinListData * sd = NULL;
- sd = ( SkinListData * )mir_alloc( sizeof( SkinListData ) );
+ sd = ( SkinListData * )mir_alloc( sizeof( SkinListData ));
if ( !sd ) return 0;
_sntprintf( fullName, SIZEOF( fullName ), _T("%s\\%s"), path, file );
- memmove( defskinname, file, (_tcslen( file )-4) * sizeof(TCHAR) );
+ memmove( defskinname, file, (_tcslen( file )-4) * sizeof(TCHAR));
defskinname[_tcslen( file )+1] = _T('\0');
- if ( !file || _tcschr( file, _T('%') ) )
+ if ( !file || _tcschr( file, _T('%')) )
{
//sd->File = "%Default Skin%";
- _sntprintf( sd->File, MAX_PATH, _T("%%Default Skin%%") );
- _sntprintf( sd->Name, 100, TranslateT( "%Default Skin%" ) );
+ _sntprintf( sd->File, MAX_PATH, _T("%%Default Skin%%"));
+ _sntprintf( sd->Name, 100, TranslateT( "%Default Skin%" ));
return AddItemToTree( GetDlgItem( hwndDlg, IDC_TREE1 ), TranslateT( "Default Skin" ), sd->Name, sd );
}
else
@@ -584,7 +584,7 @@ HTREEITEM FindChild( HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data
TreeView_GetItem( hTree, &tvi );
sd = ( SkinListData* )( tvi.lParam );
if ( sd )
- if ( !_tcsicmp( sd->File, ( ( SkinListData* )data )->File ) )
+ if ( !_tcsicmp( sd->File, ( ( SkinListData* )data )->File ))
return tmp;
}
else
@@ -606,8 +606,8 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da
BOOL ext = FALSE;
CallService( MS_UTILS_PATHTORELATIVET, ( WPARAM )folder, ( LPARAM )path );
ptrE = path;
- while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':') ) ptrE++;
- if ( *ptrE == _T('\\') )
+ while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':')) ptrE++;
+ if ( *ptrE == _T('\\'))
{
*ptrE = _T('\0');
ptrE++;
@@ -617,8 +617,8 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da
do
{
- while ( *ptrE!= _T('\\') && *ptrE!= _T('\0') ) ptrE++;
- if ( *ptrE == _T('\\') )
+ while ( *ptrE!= _T('\\') && *ptrE!= _T('\0')) ptrE++;
+ if ( *ptrE == _T('\\'))
{
*ptrE = _T('\0');
ptrE++;
@@ -708,10 +708,10 @@ INT_PTR SvcApplySkin(WPARAM wParam, LPARAM lParam)
}
if ( g_hCLUIOptionsWnd )
{
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ) );
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ));
}
return 0;
}
diff --git a/plugins/Clist_modern/modern_skinselector.cpp b/plugins/Clist_modern/modern_skinselector.cpp
index 2540790d53..fcd430fb56 100644
--- a/plugins/Clist_modern/modern_skinselector.cpp
+++ b/plugins/Clist_modern/modern_skinselector.cpp
@@ -82,7 +82,7 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask)
if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -103,7 +103,7 @@ BOOL wildcmpi(char * name, char * mask)
if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -421,7 +421,7 @@ int ParseToModernMask(MODERNMASK * mm, char * szText)
unsigned int valuelen;
int except;
- while ( _GetParamValue( szText, startPos, textLen, pszParam, paramlen, pszValue, valuelen, except) )
+ while ( _GetParamValue( szText, startPos, textLen, pszParam, paramlen, pszValue, valuelen, except))
{
if ( except & EXCEPTION_NOT_EQUAL )
param.bMaskParamFlag = MPF_NOT_EQUAL;
@@ -443,7 +443,7 @@ int ParseToModernMask(MODERNMASK * mm, char * szText)
param.szValue= strdupn( pszValue, valuelen );
- if ( !(except & EXCEPTION_WILD) )
+ if ( !(except & EXCEPTION_WILD))
{
param.dwValueHash = mod_CalcHash( param.szValue );
param.bMaskParamFlag |= MPF_HASHED;
diff --git a/plugins/Clist_modern/modern_statusbar.cpp b/plugins/Clist_modern/modern_statusbar.cpp
index 5e7eb0bc3b..1884cf1bd6 100644
--- a/plugins/Clist_modern/modern_statusbar.cpp
+++ b/plugins/Clist_modern/modern_statusbar.cpp
@@ -478,7 +478,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
if ( ( ProtosData[i].showProtoName) ||
(ProtosData[i].showProtoEmails && ProtosData[i].ProtoEMailCount ) ||
(ProtosData[i].showStatusName) ||
- ((ProtosData[i].xStatusMode&8) && ProtosData[i].ProtoXStatus) )
+ ((ProtosData[i].xStatusMode&8) && ProtosData[i].ProtoXStatus))
w -= spaceWidth;
ProtosData[i].fullWidth=w;
@@ -623,7 +623,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
if ( ( hxIcon || hIcon) && TRUE /* TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto*/ )
{
- if ( ModernGetSettingByte( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ) )
+ if ( ModernGetSettingByte( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ))
{
HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hLockOverlay != NULL)
@@ -719,7 +719,7 @@ static BOOL _ModernStatus_OnExtraIconClick( int protoIndex )
move This portion of code to related Protocols
*/
- if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "ICQ" ) )
+ if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "ICQ" ))
{
if ( ProtosData[protoIndex].ProtoStatus < ID_STATUS_ONLINE ) return FALSE;
@@ -740,13 +740,13 @@ static BOOL _ModernStatus_OnExtraIconClick( int protoIndex )
}
return TRUE;
}
- else if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "JABBER" ) )
+ else if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "JABBER" ))
{
if ( ProtosData[protoIndex].ProtoStatus < ID_STATUS_ONLINE ) return FALSE;
// Show Moods
char szService[128];
mir_snprintf(szService, SIZEOF(szService), "%s/AdvStatusSet/Mood", ProtosData[protoIndex].AccountName );
- if ( ServiceExists( szService ) )
+ if ( ServiceExists( szService ))
{
CallService( szService, 0 ,0 );
return TRUE;
@@ -987,7 +987,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
BOOL bShift =( GetKeyState( VK_SHIFT )&0x8000 );
BOOL bCtrl =( GetKeyState( VK_CONTROL )&0x8000 );
- if ( ( msg==WM_MBUTTONDOWN || ( msg==WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ) )
+ if ( ( msg==WM_MBUTTONDOWN || ( msg==WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ))
{
return TRUE;
}
@@ -1041,12 +1041,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
char protoF[ sizeof(g_CluiData.protoFilter) ];
mir_snprintf( protoF, SIZEOF(protoF), "%s|", accs[i]->szModuleName );
- if ( strstri( g_CluiData.protoFilter, protoF ) )
+ if ( strstri( g_CluiData.protoFilter, protoF ))
{
char * temp = mir_utf8encodeT( accs[i]->tszAccountName );
if ( !first )
- strncat( filterName, "; ", SIZEOF(filterName) - strlen(filterName) );
- strncat( filterName, temp, SIZEOF(filterName) - strlen(filterName) );
+ strncat( filterName, "; ", SIZEOF(filterName) - strlen(filterName));
+ strncat( filterName, temp, SIZEOF(filterName) - strlen(filterName));
first = false;
mir_free( temp );
}
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp
index bf0fe2add4..15bf49604e 100644
--- a/plugins/Clist_modern/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/modern_tbbutton.cpp
@@ -309,14 +309,14 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
case WM_LBUTTONDOWN:
{
- int xPos=( ( int )( short ) LOWORD( lParam ) );
- int yPos=( ( int )( short ) HIWORD( lParam ) );
+ int xPos=( ( int )( short ) LOWORD( lParam ));
+ int yPos=( ( int )( short ) HIWORD( lParam ));
POINT ptMouse = { xPos, yPos };
RECT rcClient;
GetClientRect( lpSBData->hWnd, &rcClient );
- if ( !PtInRect( &rcClient, ptMouse ) )
+ if ( !PtInRect( &rcClient, ptMouse ))
{
lpSBData->fHotMark = FALSE;
ReleaseCapture();
@@ -342,14 +342,14 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
if ( GetCapture() == lpSBData->hWnd )
{
- int xPos=( ( int )( short ) LOWORD( lParam ) );
- int yPos=( ( int )( short ) HIWORD( lParam ) );
+ int xPos=( ( int )( short ) LOWORD( lParam ));
+ int yPos=( ( int )( short ) HIWORD( lParam ));
POINT ptMouse = { xPos, yPos };
RECT rcClient;
GetClientRect( lpSBData->hWnd, &rcClient );
- if ( !PtInRect( &rcClient, ptMouse ) )
+ if ( !PtInRect( &rcClient, ptMouse ))
{
lpSBData->fHotMark = FALSE;
ReleaseCapture();
@@ -449,7 +449,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
POINT pt;
GetWindowRect(hwndDlg, &rc);
GetCursorPos(&pt);
- BOOL bInside = ( PtInRect( &rc, pt ) && ( WindowFromPoint( pt ) == lpSBData->hWnd) );
+ BOOL bInside = ( PtInRect( &rc, pt ) && ( WindowFromPoint( pt ) == lpSBData->hWnd));
if ( !bInside )
{
// mouse must be gone, trigger mouse leave
@@ -622,7 +622,7 @@ static void PaintWorker(TBBUTTONDATA *lpSBData, HDC hdcPaint , POINT * pOffset)
lpSBData->szButtonID, // ID
b2str(lpSBData->nStateId==PBS_HOT), // Hovered
b2str(lpSBData->nStateId==PBS_PRESSED || lpSBData->pbState == TRUE), // Pressed
- b2str(lpSBData->fFocused) ); // Focused
+ b2str(lpSBData->fFocused)); // Focused
SkinDrawGlyph(hdcMem,&rcClient,&rcClient,szRequest);
}
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 50ad1064ad..7720bae7fd 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -250,14 +250,14 @@ static int ehhToolBarSettingsChanged( WPARAM wParam, LPARAM lParam )
if (!mir_strcmp(cws->szModule,"CList"))
{
if (!mir_strcmp(cws->szSetting,"HideOffline"))
- sttSetButtonPressed("ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
+ sttSetButtonPressed("ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
else if (!mir_strcmp(cws->szSetting,"UseGroups"))
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
}
else if (!mir_strcmp(cws->szModule,"Skin"))
{
if (!mir_strcmp(cws->szSetting,"UseSound"))
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
}
return 0;
@@ -590,7 +590,7 @@ static void sttRegisterToolBarButton(char * pszButtonID, char * pszButtonName,
static void sttSetButtonPressed( char * hButton, BOOL bPressed )
{
- CallService(MS_TB_SETBUTTONSTATEBYID, (WPARAM) hButton, (LPARAM) (bPressed ? TBST_PUSHED : TBST_RELEASED) );
+ CallService(MS_TB_SETBUTTONSTATEBYID, (WPARAM) hButton, (LPARAM) (bPressed ? TBST_PUSHED : TBST_RELEASED));
}
static void sttAddStaticSeparator( BOOL bVisibleByDefault )
{
@@ -652,9 +652,9 @@ static void sttReloadButtons()
ToolBar_AddButtonToBars(mtbi);
}
tbunlock;
- sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
}
static int sttDBEnumProc (const char *szSetting,LPARAM lParam)
@@ -708,7 +708,7 @@ static void ToolBar_DefaultButtonRegistration()
sttRegisterToolBarButton( "ShowHideOffline","Show/Hide offline contacts", MS_CLIST_TOGGLEHIDEOFFLINE,
"Hide offline contacts", "Show offline contacts", 110 /*and 111 */ , IDI_RESETVIEW, IDI_RESETVIEW, TRUE );
- sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
+ sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
sttRegisterToolBarButton( "DatabaseEditor","DBEditor++", "DBEditorpp/MenuCommand",
"Database Editor", NULL, 130 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE );
@@ -722,12 +722,12 @@ static void ToolBar_DefaultButtonRegistration()
sttRegisterToolBarButton( "UseGroups","Use/Disable groups", MS_CLIST_TOGGLEGROUPS,
"Use groups", "Disable Groups", 160 /*and 161 */ , IDI_RESETVIEW, IDI_RESETVIEW, FALSE );
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
sttRegisterToolBarButton( "EnableSounds","Enable/Disable sounds", MS_CLIST_TOGGLESOUNDS,
"Enable sounds", "Disable Sounds", 170 /*and 171 */ , IDI_RESETVIEW, IDI_RESETVIEW, FALSE );
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
sttAddDynamicSeparator(FALSE);
@@ -777,7 +777,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
CLISTFrame Frame={0};
CREATESTRUCT * lpcs = (CREATESTRUCT *) lParam;
//create internal info
- MTBINFO * pMTBInfo = (MTBINFO *) mir_calloc( sizeof(MTBINFO) );
+ MTBINFO * pMTBInfo = (MTBINFO *) mir_calloc( sizeof(MTBINFO));
pMTBInfo->cbSize = sizeof(MTBINFO);
SetWindowLongPtr( hwnd, GWLP_USERDATA, (LONG_PTR) pMTBInfo );
diff --git a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp
index ab56da832d..3d5eb1d676 100644
--- a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp
@@ -293,7 +293,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY )
bLeading = pThumb->dockOpt.hwndRight != NULL;
if ( bMoveTogether ) {
- UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ) );
+ UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ));
GetWindowRect( pThumb->ContainerWnd, &rcOld );
}
@@ -350,7 +350,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY )
if ( PtInRect( &rcBottom, pt )) {
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
nNewX = rc.left;
}
@@ -401,7 +401,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY )
if ( PtInRect( &rcTop, pt )) {
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
nNewX = rc.left;
}
@@ -414,7 +414,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY )
if ( !bLeading && PtInRect( &rcTop, pt )) {
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
nNewX = rc.right - nWidth;
}
}
@@ -2226,9 +2226,9 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case WM_COMMAND:
if ( ServiceExists(MO_CREATENEWMENUOBJECT)) {
- if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ) break;
+ if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)) break;
}
- else if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid) )
+ else if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid))
break;
if (HIWORD(wParam) == 0) {//mouse events for self created menu
@@ -2278,15 +2278,15 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
if (Frames[framepos].visible)
{AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_visible,TranslateT("Visible"));}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible") );}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible"));}
if (Frames[framepos].TitleBar.ShowTitleBar)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
if (Frames[framepos].floating)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating") );}
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating"));}
ulockfrm();
}
diff --git a/plugins/Clist_mw/clcitems.cpp b/plugins/Clist_mw/clcitems.cpp
index ae69b6ee42..0a483fb76d 100644
--- a/plugins/Clist_mw/clcitems.cpp
+++ b/plugins/Clist_mw/clcitems.cpp
@@ -54,7 +54,7 @@ void AddSubcontacts(struct ClcContact * cont)
{
hsub = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j);
cacheEntry = GetContactFullCacheEntry(hsub);
- if (!(DBGetContactSettingByte(NULL,"CLC","MetaHideOfflineSub",1) && DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) )||
+ if (!(DBGetContactSettingByte(NULL,"CLC","MetaHideOfflineSub",1) && DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT))||
cacheEntry->status != ID_STATUS_OFFLINE )
{
cont->subcontacts[i].hContact = cacheEntry->hContact;
diff --git a/plugins/Clist_mw/clcpaint.cpp b/plugins/Clist_mw/clcpaint.cpp
index 952ef930f2..b4fc20850f 100644
--- a/plugins/Clist_mw/clcpaint.cpp
+++ b/plugins/Clist_mw/clcpaint.cpp
@@ -333,7 +333,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint)
}
else if (Drawing->type == CLCIT_DIVIDER)
ChangeToFont(hdcMem,dat,FONTID_DIVIDERS,&fontHeight);
- else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags&CONTACTF_NOTONLIST) && (!Drawing->isSubcontact) )
+ else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags&CONTACTF_NOTONLIST) && (!Drawing->isSubcontact))
ChangeToFont(hdcMem,dat,FONTID_NOTONLIST,&fontHeight);
else if ( Drawing->type == CLCIT_CONTACT &&
(
diff --git a/plugins/Clist_mw/clistopts.cpp b/plugins/Clist_mw/clistopts.cpp
index d2738d8aa6..b845c5a0a0 100644
--- a/plugins/Clist_mw/clistopts.cpp
+++ b/plugins/Clist_mw/clistopts.cpp
@@ -62,14 +62,14 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DBCONTACTWRITESETTING * ws = (DBCONTACTWRITESETTING *)lParam;
if ( hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
&& lstrcmpiA(ws->szModule,"CList") == 0 && lstrcmpiA(ws->szSetting,"UseGroups") == 0
- && IsWindowVisible(hwndDlg) ) {
+ && IsWindowVisible(hwndDlg)) {
CheckDlgButton(hwndDlg,IDC_DISABLEGROUPS,ws->value.bVal == 0);
}
break;
}
case WM_DESTROY:
{
- UnhookEvent( (HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA) );
+ UnhookEvent( (HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
break;
}
diff --git a/plugins/Clist_mw/clistsettings.cpp b/plugins/Clist_mw/clistsettings.cpp
index 24275f4362..25206e86ba 100644
--- a/plugins/Clist_mw/clistsettings.cpp
+++ b/plugins/Clist_mw/clistsettings.cpp
@@ -338,10 +338,10 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
*/
//name is null or (setting is myhandle)
- if (pdnce->name == NULL||(!strcmp(cws->szSetting,"MyHandle")) )
+ if (pdnce->name == NULL||(!strcmp(cws->szSetting,"MyHandle")))
InvalidateDisplayNameCacheEntryByPDNE((HANDLE)wParam,pdnce,cws->value.type);
- if ((!strcmp(cws->szSetting,"Group")) )
+ if ((!strcmp(cws->szSetting,"Group")))
InvalidateDisplayNameCacheEntryByPDNE((HANDLE)wParam,pdnce,cws->value.type);
if (!strcmp(cws->szSetting,"Hidden")) {
@@ -367,7 +367,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
}
}
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
}
diff --git a/plugins/Clist_mw/init.cpp b/plugins/Clist_mw/init.cpp
index 2c155b744d..d5167fffd5 100644
--- a/plugins/Clist_mw/init.cpp
+++ b/plugins/Clist_mw/init.cpp
@@ -122,7 +122,7 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam)
disableDefaultModule = (int*)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY,0,0);
if (!disableDefaultModule[DEFMOD_UICLUI]) if ( LoadCLUIModule()) return 1;
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
return 0;
}
@@ -231,7 +231,7 @@ LBL_Error:
OutputDebugStringA("CListInitialise ClistMW...Done\r\n");
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp
index 9e759946e9..b40a0a3328 100644
--- a/plugins/Clist_nicer/SRC/clcitems.cpp
+++ b/plugins/Clist_nicer/SRC/clcitems.cpp
@@ -46,7 +46,7 @@ static void TZ_LoadTimeZone(HANDLE hContact, struct TExtraCache *c, const char *
struct ClcContact* CreateClcContact( void )
{
- struct ClcContact* p = (struct ClcContact*)mir_alloc( sizeof( struct ClcContact ) );
+ struct ClcContact* p = (struct ClcContact*)mir_alloc( sizeof( struct ClcContact ));
if ( p != NULL ) {
ZeroMemory(p, sizeof(struct ClcContact));
//p->clientId = -1;
diff --git a/plugins/Clist_nicer/coolsb/coolscroll.cpp b/plugins/Clist_nicer/coolsb/coolscroll.cpp
index 882b91e8fd..ac31f86c24 100644
--- a/plugins/Clist_nicer/coolsb/coolscroll.cpp
+++ b/plugins/Clist_nicer/coolsb/coolscroll.cpp
@@ -1546,7 +1546,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
// We temporarily set a flag preventing the subsecuent
// WM_STYLECHANGING/WM_STYLECHANGED to be forwarded to
// the original window procedure
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
sw->bPreventStyleChange = TRUE;
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
@@ -1554,7 +1554,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
ret = CallWindowProc(sw->oldproc, hwnd, WM_NCPAINT, (WPARAM)hrgn, lParam);
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
@@ -2686,7 +2686,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam
dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// TURN OFF SCROLL-STYLES.
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
sw->bPreventStyleChange = TRUE;
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
@@ -2696,7 +2696,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam
ret = CallWindowProc(sw->oldproc, hwnd, WM_NCCALCSIZE, wParam, lParam);
// RESTORE PREVIOUS STYLES (if present at all)
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c
index 360065eb41..c0e02f994b 100644
--- a/plugins/Console/Console.c
+++ b/plugins/Console/Console.c
@@ -328,13 +328,13 @@ static LRESULT CALLBACK SubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lPa
}
*/
// CTRL
- if ( !(GetKeyState(VK_CONTROL)&0x8000) )
+ if ( !(GetKeyState(VK_CONTROL)&0x8000))
break;
switch(wParam) {
case 1: // Ctrl+A
- if ( ListView_GetSelectedCount(hwnd) != (UINT)ListView_GetItemCount(hwnd) )
+ if ( ListView_GetSelectedCount(hwnd) != (UINT)ListView_GetItemCount(hwnd))
ListView_SetItemState(hwnd, -1, LVIS_SELECTED, LVIS_SELECTED);
return 0;
@@ -614,7 +614,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARA
if ( !count ) break;
- if ( count == ListView_GetItemCount(dat->hList) ) {
+ if ( count == ListView_GetItemCount(dat->hList)) {
LVITEM lvi = {0};
ListView_DeleteAllItems(dat->hList);
lvi.mask = LVIF_TEXT | LVIF_IMAGE;
@@ -776,7 +776,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,L
if (!str) str = ""; // startup window
- lw = (LOGWIN*)mir_calloc( sizeof(LOGWIN) );
+ lw = (LOGWIN*)mir_calloc( sizeof(LOGWIN));
lw->Module = (char*)mir_strdup(str);
li.List_Insert(&lModules, lw, idx);
@@ -1033,7 +1033,7 @@ void __cdecl ConsoleThread(void* arg)
break;
}
- if ( IsDialogMessage(hwnd, &msg) )
+ if ( IsDialogMessage(hwnd, &msg))
continue;
TranslateMessage(&msg);
diff --git a/plugins/CountryFlags/huffman.c b/plugins/CountryFlags/huffman.c
index b253f2d48f..c460e9a66e 100644
--- a/plugins/CountryFlags/huffman.c
+++ b/plugins/CountryFlags/huffman.c
@@ -308,12 +308,12 @@ static void _Huffman_MakeTree( huff_sym_t *sym, huff_bitstream_t *stream )
{
if ( nodes[k].Count > 0 )
{
- if ( !node_1 || (nodes[k].Count <= node_1->Count) )
+ if ( !node_1 || (nodes[k].Count <= node_1->Count))
{
node_2 = node_1;
node_1 = &nodes[k];
}
- else if ( !node_2 || (nodes[k].Count <= node_2->Count) )
+ else if ( !node_2 || (nodes[k].Count <= node_2->Count))
{
node_2 = &nodes[k];
}
@@ -367,7 +367,7 @@ static huff_decodenode_t * _Huffman_RecoverTree( huff_decodenode_t *nodes,
this_node->ChildB = (huff_decodenode_t *) 0;
/* Is this a leaf node? */
- if ( _Huffman_ReadBit( stream ) )
+ if ( _Huffman_ReadBit( stream ))
{
/* Get symbol from tree description and store in lead node */
this_node->Symbol = _Huffman_Read8Bits( stream );
@@ -494,7 +494,7 @@ void Huffman_Uncompress( unsigned char *in, unsigned char *out,
while( node->Symbol < 0 )
{
/* Get next node */
- if ( _Huffman_ReadBit( &stream ) )
+ if ( _Huffman_ReadBit( &stream ))
node = node->ChildB;
else
node = node->ChildA;
diff --git a/plugins/Db3x/database.c b/plugins/Db3x/database.c
index 23d5e93723..66148ecffe 100644
--- a/plugins/Db3x/database.c
+++ b/plugins/Db3x/database.c
@@ -96,7 +96,7 @@ int LoadDatabaseModule(void)
if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Db3x/dbsettings.c b/plugins/Db3x/dbsettings.c
index 16bf2aa2bb..bda9b844aa 100644
--- a/plugins/Db3x/dbsettings.c
+++ b/plugins/Db3x/dbsettings.c
@@ -551,7 +551,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam,LPARAM lParam)
if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
settingNameLen=(int)strlen(tmp.szSetting);
diff --git a/plugins/Db3x/init.c b/plugins/Db3x/init.c
index 51ca5baafe..2aceba5e6b 100644
--- a/plugins/Db3x/init.c
+++ b/plugins/Db3x/init.c
@@ -84,7 +84,7 @@ static int grokHeader( char * profile, int * error )
return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Db3x_mmap/database.c b/plugins/Db3x_mmap/database.c
index b3bd3e70a0..0e8f45cc24 100644
--- a/plugins/Db3x_mmap/database.c
+++ b/plugins/Db3x_mmap/database.c
@@ -119,7 +119,7 @@ int LoadDatabaseModule(void)
if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Db3x_mmap/dbsettings.c b/plugins/Db3x_mmap/dbsettings.c
index ab306e8b48..451ea95501 100644
--- a/plugins/Db3x_mmap/dbsettings.c
+++ b/plugins/Db3x_mmap/dbsettings.c
@@ -585,7 +585,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam,LPARAM lParam)
if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths
diff --git a/plugins/Db3x_mmap/init.c b/plugins/Db3x_mmap/init.c
index 304c810a8e..30f8e9b60e 100644
--- a/plugins/Db3x_mmap/init.c
+++ b/plugins/Db3x_mmap/init.c
@@ -80,7 +80,7 @@ static int grokHeader( char * profile, int * error )
return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Db_autobackups/backup.c b/plugins/Db_autobackups/backup.c
index 3b0229ac56..fd27c9f09f 100644
--- a/plugins/Db_autobackups/backup.c
+++ b/plugins/Db_autobackups/backup.c
@@ -204,7 +204,7 @@ int Backup(TCHAR* backup_filename)
VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) {
time_t t = time(0), diff = t - (time_t)DBGetContactSettingDword(0, "AutoBackups", "LastBackupTimestamp", (DWORD)t);
- if(diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 ) )))
+ if(diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 ))))
Backup(NULL);
}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp
index 23dab85843..2b9ba5098a 100644
--- a/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp
+++ b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp
@@ -44,7 +44,7 @@ static void ConvertOldEvent( DBEvent*& dbei )
break;
} } }
else {
- if ( !is_utf8_string(( char* )dbei->blob) )
+ if ( !is_utf8_string(( char* )dbei->blob))
dbei->flags &= ~DBEF_UTF;
}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp
index 08bbd35016..9b1a08640e 100644
--- a/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp
+++ b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp
@@ -74,7 +74,7 @@ static int AddDatabaseToList(HWND hwndList, TCHAR* filename, TCHAR* dir)
_tcscpy(szName,dir);
_tcscat(szName,pName);
pDot = _tcsrchr( szName, '.' );
- if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")) )
+ if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")))
*pDot=0;
lvi.iItem = 0;
@@ -181,7 +181,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
// search in profile dir (using ini file)
- if ( lstrcmpi(szProfileDir,szMirandaProfiles) )
+ if ( lstrcmpi(szProfileDir,szMirandaProfiles))
FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
@@ -191,7 +191,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
// search in profile dir (using registry path + ini file)
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) {
if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) {
- if ( lstrcmp(szProfileDir,szMirandaPath) ) {
+ if ( lstrcmp(szProfileDir,szMirandaPath)) {
GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
}
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
}
// select
if ( opts.filename[0] )
- i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T("") );
+ i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T(""));
if ( i == -1 )
i = 0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
@@ -250,7 +250,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
ofn.nMaxFileTitle = MAX_PATH;
if ( GetOpenFileName( &ofn )) {
int i;
- i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T("") );
+ i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T(""));
if ( i == -1 )
i=0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
diff --git a/plugins/Dbx_mmap_SA/database.c b/plugins/Dbx_mmap_SA/database.c
index b9c1b9871f..c1e1483fb0 100644
--- a/plugins/Dbx_mmap_SA/database.c
+++ b/plugins/Dbx_mmap_SA/database.c
@@ -137,7 +137,7 @@ int LoadDatabaseModule(void)
if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Dbx_mmap_SA/dbsettings.c b/plugins/Dbx_mmap_SA/dbsettings.c
index 1d0fb69d62..53717ecafb 100644
--- a/plugins/Dbx_mmap_SA/dbsettings.c
+++ b/plugins/Dbx_mmap_SA/dbsettings.c
@@ -601,7 +601,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam, LPARAM lParam)
if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths
diff --git a/plugins/Dbx_mmap_SA/dialogs.c b/plugins/Dbx_mmap_SA/dialogs.c
index 748322692b..228db23f64 100644
--- a/plugins/Dbx_mmap_SA/dialogs.c
+++ b/plugins/Dbx_mmap_SA/dialogs.c
@@ -249,15 +249,15 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
char buf[512];
char * p = &buf[7];
lstrcpyA(buf,"mailto:");
- if ( GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7) ) {
- CallService(MS_UTILS_OPENURL,0,(LPARAM) (LOWORD(wParam)==IDC_EMAIL ? buf : p) );
+ if ( GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7)) {
+ CallService(MS_UTILS_OPENURL,0,(LPARAM) (LOWORD(wParam)==IDC_EMAIL ? buf : p));
}
break;
} } }
break;
case WM_NOTIFY:
- if ( hdr && hdr->hdr.code == LVN_ITEMCHANGED && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1) ) {
+ if ( hdr && hdr->hdr.code == LVN_ITEMCHANGED && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1)) {
iIndex = hdr->iItem;
if(hdr->uNewState & 0x2000){
for(i = 0; i < ModulesCount; i++) {
diff --git a/plugins/Dbx_mmap_SA/init.c b/plugins/Dbx_mmap_SA/init.c
index c985f43d77..f13a4b5667 100644
--- a/plugins/Dbx_mmap_SA/init.c
+++ b/plugins/Dbx_mmap_SA/init.c
@@ -81,7 +81,7 @@ static int grokHeader( char * profile, int * error )
return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Dbx_tree/BlockManager.cpp b/plugins/Dbx_tree/BlockManager.cpp
index 3be5d80506..b52298602f 100644
--- a/plugins/Dbx_tree/BlockManager.cpp
+++ b/plugins/Dbx_tree/BlockManager.cpp
@@ -391,7 +391,7 @@ inline CBlockManager::TCacheEntry * CBlockManager::_CacheInsert(uint32_t Idx, TB
res->Next = i;
- } while (i != CMPXCHG_Ptr(*last, res, i) );
+ } while (i != CMPXCHG_Ptr(*last, res, i));
res->LastUse = time(NULL) >> 2;
diff --git a/plugins/Dbx_tree/Settings.cpp b/plugins/Dbx_tree/Settings.cpp
index c4e555ec91..b4ba799c55 100644
--- a/plugins/Dbx_tree/Settings.cpp
+++ b/plugins/Dbx_tree/Settings.cpp
@@ -381,7 +381,7 @@ TDBTSettingHandle CSettings::FindSetting(TDBTSettingDescriptor & Descriptor)
if (Descriptor.Flags & DBT_SDF_FoundValid)
return Descriptor.FoundHandle;
- uint32_t namelength = static_cast<uint32_t>( strlen(Descriptor.pszSettingName) );
+ uint32_t namelength = static_cast<uint32_t>( strlen(Descriptor.pszSettingName));
uint32_t namehash;
if (Descriptor.Flags & DBT_SDF_HashValid)
diff --git a/plugins/ExtraIcons/commons.h b/plugins/ExtraIcons/commons.h
index 4b896a8c52..84b43008dd 100644
--- a/plugins/ExtraIcons/commons.h
+++ b/plugins/ExtraIcons/commons.h
@@ -80,7 +80,7 @@ using namespace std;
extern HINSTANCE hInst;
extern PLUGINLINK *pluginLink;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; }
#define ICON_SIZE 16
diff --git a/plugins/FloatingContacts/bitmap_funcs.cpp b/plugins/FloatingContacts/bitmap_funcs.cpp
index a99b5c4afe..334bf98abe 100644
--- a/plugins/FloatingContacts/bitmap_funcs.cpp
+++ b/plugins/FloatingContacts/bitmap_funcs.cpp
@@ -1144,7 +1144,7 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha)
MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/FloatingContacts/filedrop.cpp b/plugins/FloatingContacts/filedrop.cpp
index 6157e5dcf9..473c7a6814 100644
--- a/plugins/FloatingContacts/filedrop.cpp
+++ b/plugins/FloatingContacts/filedrop.cpp
@@ -6,7 +6,7 @@ static BOOL OnDropFiles ( HDROP hDrop, ThumbInfo *pThumb );
HRESULT STDMETHODCALLTYPE CDropTarget::QueryInterface(REFIID riid,LPVOID *ppvObj)
{
- if ( IsEqualIID( riid, IID_IDropTarget ) )
+ if ( IsEqualIID( riid, IID_IDropTarget ))
{
*ppvObj = this;
this->AddRef();
@@ -56,14 +56,14 @@ HRESULT STDMETHODCALLTYPE CDropTarget::DragEnter( IDataObject *pData, DWORD fKey
ThumbInfo *pThumb;
if ( S_OK == pData->QueryGetData( &feFile ) ||
- S_OK == pData->QueryGetData( &feText ) )
+ S_OK == pData->QueryGetData( &feText ))
{
shortPt.x = pt.x;
shortPt.y = pt.y;
hwnd = WindowFromPoint( shortPt );
- if ( pThumb = thumbList.FindThumb( hwnd ) )
+ if ( pThumb = thumbList.FindThumb( hwnd ))
{
hwndCurDrag = hwnd;
pThumb->ThumbSelect( TRUE );
@@ -106,11 +106,11 @@ HRESULT STDMETHODCALLTYPE CDropTarget::Drop( IDataObject *pData,DWORD fKeyState,
pThumb = (ThumbInfo*)GetWindowLongPtr( hwndCurDrag, GWLP_USERDATA );
if ( pThumb == NULL ) return( S_OK );
- if ( S_OK != pData->GetData( &fe,&stg ) )
+ if ( S_OK != pData->GetData( &fe,&stg ))
{
fe.cfFormat = CF_TEXT;
- if ( S_OK != pData->GetData( &fe,&stg ) )
+ if ( S_OK != pData->GetData( &fe,&stg ))
{
return( S_OK );
}
@@ -172,7 +172,7 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb )
nDroppedItemsCount = DragQueryFile( hDrop, 0xFFFFFFFF, NULL, 0 );
- ppDroppedItems = ( char** )malloc( sizeof(char*)*( nDroppedItemsCount + 1 ) );
+ ppDroppedItems = ( char** )malloc( sizeof(char*)*( nDroppedItemsCount + 1 ));
if ( ppDroppedItems == NULL )
{
@@ -183,13 +183,13 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb )
for ( iItem = 0; iItem < nDroppedItemsCount; ++iItem )
{
- DragQueryFileA( hDrop, iItem, szFilename, sizeof( szFilename ) );
+ DragQueryFileA( hDrop, iItem, szFilename, sizeof( szFilename ));
ppDroppedItems[ iItem ] = _strdup( szFilename );
}
nFilesCount = CountDroppedFiles( ppDroppedItems, nDroppedItemsCount );
- ppFiles = ( char** )malloc( sizeof( char *)* ( nFilesCount+1 ) );
+ ppFiles = ( char** )malloc( sizeof( char *)* ( nFilesCount+1 ));
if ( ppFiles == NULL )
{
@@ -235,13 +235,13 @@ static int CountFiles( char *szItem )
if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if ( ( 0 != strcmp( fd.cFileName, "." ) ) &&
- ( 0 != strcmp( fd.cFileName, ".." ) ) )
+ if ( ( 0 != strcmp( fd.cFileName, "." )) &&
+ ( 0 != strcmp( fd.cFileName, ".." )) )
{
char szDirName[ MAX_PATH ];
strncpy( szDirName, szItem, MAX_PATH - 1 );
- if ( NULL != strstr( szItem, "*.*" ) )
+ if ( NULL != strstr( szItem, "*.*" ))
{
sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
}
@@ -256,7 +256,7 @@ static int CountFiles( char *szItem )
++nCount;
}
}
- while( FALSE != FindNextFileA( hFind, &fd ) );
+ while( FALSE != FindNextFileA( hFind, &fd ));
}
return( nCount );
@@ -278,13 +278,13 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount )
if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if ( ( 0 != strcmp( fd.cFileName, "." ) ) &&
- ( 0 != strcmp( fd.cFileName, ".." ) ) )
+ if ( ( 0 != strcmp( fd.cFileName, "." )) &&
+ ( 0 != strcmp( fd.cFileName, ".." )) )
{
char szDirName[ MAX_PATH ];
strncpy( szDirName, szItem, MAX_PATH - 1 );
- if ( NULL != strstr( szItem, "*.*" ) )
+ if ( NULL != strstr( szItem, "*.*" ))
{
sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
}
@@ -299,12 +299,12 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount )
}
else
{
- int nSize = sizeof(char) * ( strlen( szItem ) + strlen( fd.cFileName ) + sizeof( char ) );
+ int nSize = sizeof(char) * ( strlen( szItem ) + strlen( fd.cFileName ) + sizeof( char ));
char *szFile = (char*) malloc( nSize ) ;
strncpy( szFile, szItem, nSize - 1 );
- if ( NULL != strstr( szFile, "*.*" ) )
+ if ( NULL != strstr( szFile, "*.*" ))
{
szFile[ strlen( szFile ) - 3 ] = '\0';
strncat( szFile, fd.cFileName, MAX_PATH - 1 );
@@ -314,7 +314,7 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount )
++( *pnCount );
}
}
- while( FALSE != FindNextFileA( hFind, &fd ) );
+ while( FALSE != FindNextFileA( hFind, &fd ));
}
}
diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp
index f05fda305d..199cf1ee08 100644
--- a/plugins/FloatingContacts/main.cpp
+++ b/plugins/FloatingContacts/main.cpp
@@ -367,7 +367,7 @@ static int OnContactDrag( WPARAM wParam, LPARAM lParam )
if ( pThumb == NULL ) {
idStatus = GetContactStatus( hContact );
- if ( !fcOpt.bHideAll && !HideOnFullScreen() && ( !fcOpt.bHideOffline || IsStatusVisible( idStatus ) ) && (!fcOpt.bHideWhenCListShow || !bIsCListShow)) {
+ if ( !fcOpt.bHideAll && !HideOnFullScreen() && ( !fcOpt.bHideOffline || IsStatusVisible( idStatus )) && (!fcOpt.bHideWhenCListShow || !bIsCListShow)) {
CreateThumbWnd( ptName, hContact, pt.x, pt.y );
pNewThumb = thumbList.FindThumbByContact( hContact );
ShowWindow( pNewThumb->hwnd, SW_SHOWNA );
@@ -377,7 +377,7 @@ static int OnContactDrag( WPARAM wParam, LPARAM lParam )
}
}
else if ( hContact == hNewContact )
- pThumb->PositionThumb( (short)( pt.x - 5 ), (short)( pt.y - 5 ) );
+ pThumb->PositionThumb( (short)( pt.x - 5 ), (short)( pt.y - 5 ));
return( hNewContact != NULL ? 1 : 0 );
}
@@ -393,16 +393,16 @@ static int OnContactDrop( WPARAM wParam, LPARAM lParam )
HANDLE hContact = ( HANDLE )wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact( hContact );
- if ( ( hNewContact == hContact ) && ( pThumb != NULL ) )
+ if ( ( hNewContact == hContact ) && ( pThumb != NULL ))
{
hNewContact = NULL;
GetWindowRect( hwndMiranda, &rcMiranda );
pThumb->GetThumbRect( &rcThumb );
- //if ( IntersectRect( &rcOverlap, &rcThumb, &rcMiranda ) )
+ //if ( IntersectRect( &rcOverlap, &rcThumb, &rcMiranda ))
//{
- // pThumb->OnLButtonDown( (short)(rcThumb.left + 5), (short)(rcThumb.top + 5) );
+ // pThumb->OnLButtonDown( (short)(rcThumb.left + 5), (short)(rcThumb.top + 5));
//}
}
@@ -417,7 +417,7 @@ static int OnContactDragStop( WPARAM wParam, LPARAM lParam )
HANDLE hContact = ( HANDLE )wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact( hContact );
- if ( ( pThumb != NULL ) && ( hNewContact == hContact ) )
+ if ( ( pThumb != NULL ) && ( hNewContact == hContact ))
{
thumbList.RemoveThumb( pThumb );
hNewContact = NULL;
@@ -452,7 +452,7 @@ static int OnContactSettingChanged( WPARAM wParam, LPARAM lParam )
if ( hContact == NULL )
{
- if (( 0 == stricmp( pdbcws->szModule, "CLC" ) ) || ( 0 == stricmp( pdbcws->szModule, sModule ) ) ) {
+ if (( 0 == stricmp( pdbcws->szModule, "CLC" )) || ( 0 == stricmp( pdbcws->szModule, sModule )) ) {
LoadDBSettings();
ApplyOptionsChanges();
}
@@ -463,15 +463,15 @@ static int OnContactSettingChanged( WPARAM wParam, LPARAM lParam )
if ( pThumb == NULL ) return( 0 );
// Only on these 2 events we need to refresh
- if ( 0 == stricmp( pdbcws->szSetting, "Status" ) )
+ if ( 0 == stricmp( pdbcws->szSetting, "Status" ))
{
idStatus = pdbcws->value.wVal;
}
- else if ( 0 == stricmp( pdbcws->szSetting, "Nick" ) )
+ else if ( 0 == stricmp( pdbcws->szSetting, "Nick" ))
{
idStatus = GetContactStatus( hContact );
}
- else if ( 0 == stricmp( pdbcws->szSetting, "MyHandle" ) )
+ else if ( 0 == stricmp( pdbcws->szSetting, "MyHandle" ))
{
idStatus = GetContactStatus( hContact );
}
@@ -520,7 +520,7 @@ static int OnPrebuildContactMenu( WPARAM wParam, LPARAM lParam )
ThumbInfo *pThumb = thumbList.FindThumbByContact( (HANDLE) wParam );
CLISTMENUITEM clmi;
- ZeroMemory( &clmi, sizeof( clmi ) );
+ ZeroMemory( &clmi, sizeof( clmi ));
clmi.cbSize = sizeof( clmi );
clmi.flags = ( pThumb == NULL ) ? CMIM_FLAGS | CMIF_HIDDEN : CMIM_FLAGS &~CMIF_HIDDEN;
@@ -650,7 +650,7 @@ static LRESULT __stdcall CommWndProc( HWND hwnd,
break;
case WM_LBUTTONDOWN:
- if (pThumb) pThumb->OnLButtonDown( (short)LOWORD( lParam ), (short)HIWORD( lParam ) );
+ if (pThumb) pThumb->OnLButtonDown( (short)LOWORD( lParam ), (short)HIWORD( lParam ));
break;
case WM_MOUSEMOVE:
@@ -765,7 +765,7 @@ void ApplyOptionsChanges()
static void RegisterWindowClass()
{
WNDCLASSEX wcx;
- ZeroMemory( &wcx, sizeof( wcx ) );
+ ZeroMemory( &wcx, sizeof( wcx ));
wcx.cbSize = sizeof( WNDCLASSEX );
wcx.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
@@ -823,7 +823,7 @@ static void CreateThumbWnd( TCHAR *ptszName, HANDLE hContact, int nX, int nY )
pThumb->ResizeThumb();
pThumb->SetThumbOpacity( fcOpt.thumbAlpha );
- ShowWindow( hwnd, ( fcOpt.bHideAll || HideOnFullScreen() || fcOpt.bHideOffline || (fcOpt.bHideWhenCListShow && bIsCListShow) )? SW_HIDE : SW_SHOWNA );
+ ShowWindow( hwnd, ( fcOpt.bHideAll || HideOnFullScreen() || fcOpt.bHideOffline || (fcOpt.bHideWhenCListShow && bIsCListShow))? SW_HIDE : SW_SHOWNA );
pThumb->PositionThumb( (short)nX, (short)nY );
// force repaint
@@ -839,7 +839,7 @@ static BOOL GetOSPlatform()
OSVERSIONINFO VersionInfo;
// Get OS platform
- ZeroMemory( &VersionInfo, sizeof( VersionInfo ) );
+ ZeroMemory( &VersionInfo, sizeof( VersionInfo ));
VersionInfo.dwOSVersionInfoSize = sizeof( VersionInfo );
GetVersionEx( &VersionInfo );
@@ -976,7 +976,7 @@ static int ClcStatusToPf2( int status )
BOOL IsStatusVisible( int status )
{
- return ( 0 == ( dwOfflineModes & ClcStatusToPf2( status ) ) );
+ return ( 0 == ( dwOfflineModes & ClcStatusToPf2( status )) );
}
@@ -995,7 +995,7 @@ void RegHotkey( HANDLE hContact, HWND hwnd )
strncpy(szBuf, dbv.pszVal, MAX_PATH - 1);
DBFreeVariant( &dbv );
- if ( 0 != strlen( szBuf ) )
+ if ( 0 != strlen( szBuf ))
{
UINT nModifiers = 0;
char chKey = 0;
@@ -1007,15 +1007,15 @@ void RegHotkey( HANDLE hContact, HWND hwnd )
for ( i = 0; i < 2; ++i )
{
- if ( 0 == strncmp( szMod[ i ], "ALT", 19 ) )
+ if ( 0 == strncmp( szMod[ i ], "ALT", 19 ))
{
nModifiers = nModifiers | MOD_ALT;
}
- else if ( 0 == strncmp( szMod[ i ], "CTRL", 19 ) )
+ else if ( 0 == strncmp( szMod[ i ], "CTRL", 19 ))
{
nModifiers = nModifiers | MOD_CONTROL;
}
- else if ( 0 == strncmp( szMod[ i ], "SHIFT", 19 ) )
+ else if ( 0 == strncmp( szMod[ i ], "SHIFT", 19 ))
{
nModifiers = nModifiers | MOD_SHIFT;
}
@@ -1023,7 +1023,7 @@ void RegHotkey( HANDLE hContact, HWND hwnd )
chKey = szKey[ 0 ];
- RegisterHotKey( hwnd, (int)hwnd, nModifiers, VkKeyScan( chKey ) );
+ RegisterHotKey( hwnd, (int)hwnd, nModifiers, VkKeyScan( chKey ));
}
}
@@ -1042,8 +1042,8 @@ void SaveContactsPos()
thumbList[i]->GetThumbRect( &rc );
- if ( 0 == GetLastError() )
- DBWriteContactSettingDword( thumbList[i]->hContact, sModule, "ThumbsPos", DB_POS_MAKE_XY(rc.left, rc.top) );
+ if ( 0 == GetLastError())
+ DBWriteContactSettingDword( thumbList[i]->hContact, sModule, "ThumbsPos", DB_POS_MAKE_XY(rc.left, rc.top));
}
}
@@ -1069,19 +1069,19 @@ static void LoadMenus()
mi.cbSize = sizeof( mi );
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_HIDE ) );
+ mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_HIDE ));
mi.ptszName = _T("Remove thumb");
mi.pszService = sModule "/RemoveThumb";
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
// Hide all thumbs main menu item
hMainHideAllThumbs = CreateServiceFunction( sModule "/MainHideAllThumbs", OnMainMenu_HideAll );
- ZeroMemory( &mi, sizeof( mi ) );
+ ZeroMemory( &mi, sizeof( mi ));
mi.cbSize = sizeof( mi );
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ) );
+ mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ));
mi.ptszName = fcOpt.bHideAll ? _T("Show all thumbs") : _T("Hide all thumbs");
mi.pszService = sModule "/MainHideAllThumbs";
Menu_AddMainMenuItem(&mi);
@@ -1149,7 +1149,7 @@ BOOL HideOnFullScreen()
RECT WindowRect;
GetWindowRect(hWnd, &WindowRect);
- if ( (w == (WindowRect.right - WindowRect.left) ) &&
+ if ( (w == (WindowRect.right - WindowRect.left)) &&
(h == (WindowRect.bottom - WindowRect.top)))
{
bFullscreen = TRUE;
@@ -1198,7 +1198,7 @@ static INT_PTR OnMainMenu_HideAll( WPARAM wParam, LPARAM lParam )
clmi.cbSize = sizeof( clmi );
clmi.flags = CMIM_NAME | CMIM_ICON|CMIF_TCHAR;
- clmi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ) );
+ clmi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ));
clmi.ptszName = fcOpt.bHideAll ? _T("Show all thumbs") : _T("Hide all thumbs");
b = CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMainMenuItemHideAll, ( LPARAM )&clmi );
return 0;
@@ -1224,7 +1224,7 @@ void ShowThumbsOnHideCList()
return;
for (int i = 0; i < thumbList.getCount(); ++i)
- if ( !fcOpt.bHideOffline || IsStatusVisible( GetContactStatus(thumbList[i]->hContact) ))
+ if ( !fcOpt.bHideOffline || IsStatusVisible( GetContactStatus(thumbList[i]->hContact)))
ShowWindow( thumbList[i]->hwnd, SW_SHOWNA );
}
@@ -1269,5 +1269,5 @@ static LRESULT __stdcall newMirandaWndProc( HWND hwnd, UINT uMsg, WPARAM wParam,
}
}
}
- return( CallWindowProc(oldMirandaWndProc, hwnd, uMsg, wParam, lParam) );
+ return( CallWindowProc(oldMirandaWndProc, hwnd, uMsg, wParam, lParam));
}
diff --git a/plugins/FloatingContacts/thumbs.cpp b/plugins/FloatingContacts/thumbs.cpp
index dffd19f153..0195ff0717 100644
--- a/plugins/FloatingContacts/thumbs.cpp
+++ b/plugins/FloatingContacts/thumbs.cpp
@@ -115,7 +115,7 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
if ( fcOpt.bMoveTogether )
{
- UndockThumbs( this, thumbList.FindThumb( dockOpt.hwndLeft ) );
+ UndockThumbs( this, thumbList.FindThumb( dockOpt.hwndLeft ));
}
@@ -161,23 +161,23 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
pt.y = rcThumb.top;
bDocked = FALSE;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
bDocked = TRUE;
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedLeft = bDocked;
@@ -188,7 +188,7 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
pt.y = rcThumb.top;
bDocked = FALSE;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
if ( !bDockedLeft )
{
@@ -202,17 +202,17 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedRight = bDocked;
@@ -235,16 +235,16 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
pt.x = rcThumb.left;
pt.y = rcThumb.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
@@ -255,16 +255,16 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos)
pt.x = rcThumb.right;
pt.y = rcThumb.bottom;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
nNewX = rc.left - nWidth;
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
@@ -395,7 +395,7 @@ void ThumbInfo::RefreshContactIcon(int iIcon)
void ThumbInfo::RefreshContactStatus(int idStatus)
{
- if ( IsStatusVisible( idStatus ) )
+ if ( IsStatusVisible( idStatus ))
{
RegisterFileDropping( hwnd, dropTarget );
}
@@ -404,7 +404,7 @@ void ThumbInfo::RefreshContactStatus(int idStatus)
UnregisterFileDropping( hwnd );
}
- ShowWindow( hwnd, fcOpt.bHideAll || HideOnFullScreen() || ( fcOpt.bHideOffline && ( !IsStatusVisible( idStatus ) ) ) || (fcOpt.bHideWhenCListShow && bIsCListShow) ? SW_HIDE : SW_SHOWNA );
+ ShowWindow( hwnd, fcOpt.bHideAll || HideOnFullScreen() || ( fcOpt.bHideOffline && ( !IsStatusVisible( idStatus )) ) || (fcOpt.bHideWhenCListShow && bIsCListShow) ? SW_HIDE : SW_SHOWNA );
}
void ThumbInfo::DeleteContactPos()
@@ -451,15 +451,15 @@ void ThumbInfo::OnLButtonUp()
if ( bMouseDown )
{
bMouseDown = FALSE;
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
// Check whether we shoud remove the window
GetWindowRect( hwndMiranda, &rcMiranda );
GetThumbRect( &rcThumb );
- if ( IntersectRect( &rcOverlap, &rcMiranda, &rcThumb ) )
+ if ( IntersectRect( &rcOverlap, &rcMiranda, &rcThumb ))
{
- if ( IsWindowVisible( hwndMiranda ) )
+ if ( IsWindowVisible( hwndMiranda ))
{
DeleteContactPos( );
thumbList.RemoveThumb( this );
@@ -504,7 +504,7 @@ void ThumbInfo::OnMouseMove(short nX, short nY, WPARAM wParam)
}
else
{
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
}
// Update selection status
@@ -568,7 +568,7 @@ void ThumbInfo::ThumbDeselect(BOOL bMouse)
void ThumbInfo::SetThumbOpacity(BYTE bAlpha)
{
- if ( pUpdateLayeredWindow && (bAlpha != btAlpha) )
+ if ( pUpdateLayeredWindow && (bAlpha != btAlpha))
{
btAlpha = bAlpha;
UpdateContent();
@@ -734,7 +734,7 @@ void ThumbInfo::UpdateContent()
nApparentMode = DBGetContactSettingWord(hContact, szProto, "ApparentMode", 0);
if ( (nStatus == ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_ONLINE) ||
- (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE) )
+ (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE))
{
if (ID_STATUS_OFFLINE == nContactStatus)
{
@@ -887,7 +887,7 @@ void ThumbInfo::OnTimer(BYTE idTimer)
void DockThumbs( ThumbInfo *pThumbLeft, ThumbInfo *pThumbRight, BOOL bMoveLeft )
{
- if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ) )
+ if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
{
pThumbRight->dockOpt.hwndLeft = pThumbLeft->hwnd;
pThumbLeft->dockOpt.hwndRight = pThumbRight->hwnd;
@@ -897,7 +897,7 @@ void DockThumbs( ThumbInfo *pThumbLeft, ThumbInfo *pThumbRight, BOOL bMoveLeft )
void UndockThumbs( ThumbInfo *pThumb1, ThumbInfo *pThumb2 )
{
- if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ) )
+ if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ))
{
return;
}
diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp
index 32b5e7a0e6..39befac6e8 100644
--- a/plugins/FreeImage/Miranda/main.cpp
+++ b/plugins/FreeImage/Miranda/main.cpp
@@ -419,7 +419,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun
void *newdata;
long newdatalen;
//double the data block size if we need to
- while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen) ) {
+ while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen)) {
//if we are at or above 1G, we cant double without going negative
if ( FIIOMEM(datalen) & 0x40000000 ) {
//max 2G
@@ -443,7 +443,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun
}
memcpy( (char *)FIIOMEM(data) + FIIOMEM(curpos), buffer, size*count );
FIIOMEM(curpos) += size*count;
- if ( FIIOMEM(curpos) > FIIOMEM(filelen) ) {
+ if ( FIIOMEM(curpos) > FIIOMEM(filelen)) {
FIIOMEM(filelen) = FIIOMEM(curpos);
}
return count;
diff --git a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
index d87658c24f..584870f359 100644
--- a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
+++ b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
@@ -939,7 +939,7 @@ FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag
// get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
TAGMAP *tagmap = NULL;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if(tagmap) {
@@ -1034,7 +1034,7 @@ FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src) {
TAGMAP *src_tagmap = (*i).second;
if(src_tagmap) {
- if ( dst_metadata->find(model) != dst_metadata->end() ) {
+ if ( dst_metadata->find(model) != dst_metadata->end()) {
// destroy dst model
FreeImage_SetMetadata((FREE_IMAGE_MDMODEL)model, dst, NULL, NULL);
}
@@ -1168,11 +1168,11 @@ FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key,
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
if (!(*metadata).empty()) {
METADATAMAP::iterator model_iterator = metadata->find(model);
- if (model_iterator != metadata->end() ) {
+ if (model_iterator != metadata->end()) {
// this model exists : try to get the requested tag
tagmap = model_iterator->second;
TAGMAP::iterator tag_iterator = tagmap->find(key);
- if (tag_iterator != tagmap->end() ) {
+ if (tag_iterator != tagmap->end()) {
// get the requested tag
*tag = tag_iterator->second;
}
@@ -1193,7 +1193,7 @@ FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib) {
// get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if (!tagmap) {
diff --git a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
index 5f677eee5c..3e81abdb95 100644
--- a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
+++ b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
@@ -568,7 +568,7 @@ FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB
if ( (szColor[0] == 'g' || szColor[0] == 'G') &&
(szColor[1] == 'r' || szColor[1] == 'R') &&
(szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) &&
- (szColor[3] == 'y' || szColor[3] == 'Y' ) ) {
+ (szColor[3] == 'y' || szColor[3] == 'Y' )) {
// grey<num>, or gray<num>, num 1...100
i = strtol(szColor+4, NULL, 10);
@@ -762,7 +762,7 @@ FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB
if ( (szColor[0] == 'g' || szColor[0] == 'G') &&
(szColor[1] == 'r' || szColor[1] == 'R') &&
(szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) &&
- (szColor[3] == 'y' || szColor[3] == 'Y' ) ) {
+ (szColor[3] == 'y' || szColor[3] == 'Y' )) {
// grey<num>, or gray<num>, num 1...100
i = strtol(szColor+4, NULL, 10);
diff --git a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
index 2eaeb94671..867cf756ed 100644
--- a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
+++ b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
@@ -279,7 +279,7 @@ FreeImage_ConvertToGreyscale(FIBITMAP *dib) {
// allocate a 24-bit buffer
- BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE) );
+ BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE));
if(NULL == buffer) {
FreeImage_Unload(new_dib);
return NULL;
diff --git a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
index 2de6077eed..b36f10aca1 100644
--- a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
+++ b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
@@ -132,7 +132,7 @@ FreeImage_OutputMessageProc(int fif, const char *fmt, ...) {
// check the length of the format string
- int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt) );
+ int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt));
// parse the format string and put the result in 'message'
diff --git a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
index 82df9b607b..1542fc9268 100644
--- a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
+++ b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
@@ -176,7 +176,7 @@ static FIBITMAP* OrderedDispersedDot(FIBITMAP *dib, int order) {
BYTE *matrix = (BYTE*)malloc(l*l * sizeof(BYTE));
for(int i = 0; i < l*l; i++) {
// according to "Purdue University: Digital Image Processing Laboratory: Image Halftoning, April 30th, 2006
- matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)) );
+ matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)));
}
// perform the dithering
diff --git a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
index 2d8d6e0b4a..d69336f3f5 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
@@ -520,7 +520,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
switch (compression) {
case BI_RGB :
- if ( LoadPixelData(io, handle, dib, height, pitch, bit_count) ) {
+ if ( LoadPixelData(io, handle, dib, height, pitch, bit_count)) {
return dib;
} else {
throw "Error encountered while decoding BMP data";
@@ -528,7 +528,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
break;
case BI_RLE4 :
- if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE4(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE4 BMP data";
@@ -536,7 +536,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
break;
case BI_RLE8 :
- if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE8(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE8 BMP data";
@@ -747,7 +747,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_
return dib;
case BI_RLE4 :
- if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE4(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE4 BMP data";
@@ -755,7 +755,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_
break;
case BI_RLE8 :
- if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE8(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE8 BMP data";
diff --git a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
index bf7c2550ae..7af1d821d8 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
@@ -167,7 +167,7 @@ FreeImage_SetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key
static BOOL
FreeImage_GetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FREE_IMAGE_MDTYPE type, FITAG **tag)
{
- if ( FreeImage_GetMetadata(model, dib, key, tag) ) {
+ if ( FreeImage_GetMetadata(model, dib, key, tag)) {
if ( FreeImage_GetTagType(*tag) == type ) {
return TRUE;
}
@@ -304,7 +304,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
m_strmap[nextprefix] = m_nextCode;
//increment the next highest valid code, increase the code size
- if ( m_nextCode == (1 << m_codeSize) ) {
+ if ( m_nextCode == (1 << m_codeSize)) {
m_codeSize++;
}
m_nextCode++;
@@ -321,7 +321,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
}
//increment to the next pixel
- if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) {
+ if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) {
m_bufferShift -= m_bpp;
} else {
m_bufferPos++;
@@ -341,7 +341,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
m_prefix = ch & 0x000FF;
//increment to the next pixel
- if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) {
+ if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) {
m_bufferShift -= m_bpp;
} else {
m_bufferPos++;
@@ -391,7 +391,7 @@ bool StringTable::Decompress(BYTE *buf, int *len)
m_strings[m_nextCode] = m_strings[m_oldCode] + m_strings[code == m_nextCode ? m_oldCode : code][0];
}
- if ( (int)m_strings[code].size() > *len - (bufpos - buf) ) {
+ if ( (int)m_strings[code].size() > *len - (bufpos - buf)) {
//out of space, stuff the code back in for next time
m_partial <<= m_codeSize;
m_partialSize += m_codeSize;
@@ -497,7 +497,7 @@ Validate(FreeImageIO *io, fi_handle handle) {
}
BOOL bResult = FALSE;
- if ( !strncmp(buf, "GIF", 3) ) {
+ if ( !strncmp(buf, "GIF", 3)) {
if ( buf[3] >= '0' && buf[3] <= '9' && buf[4] >= '0' && buf[4] <= '9' && buf[5] >= 'a' && buf[5] <= 'z' ) {
bResult = TRUE;
}
@@ -537,7 +537,7 @@ Open(FreeImageIO *io, fi_handle handle, BOOL read) {
if ( read ) {
try {
//Header
- if ( !Validate(io, handle) ) {
+ if ( !Validate(io, handle)) {
throw FI_MSG_ERROR_MAGIC_NUMBER;
}
io->seek_proc(handle, 6, SEEK_CUR);
@@ -666,7 +666,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( page == -1 ) {
page = 0;
}
- if ( page < 0 || page >= (int)info->image_descriptor_offsets.size() ) {
+ if ( page < 0 || page >= (int)info->image_descriptor_offsets.size()) {
return NULL;
}
@@ -787,7 +787,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( pagedib != NULL ) {
RGBQUAD *pal = FreeImage_GetPalette(pagedib);
have_transparent = false;
- if ( FreeImage_IsTransparent(pagedib) ) {
+ if ( FreeImage_IsTransparent(pagedib)) {
int count = FreeImage_GetTransparencyCount(pagedib);
BYTE *table = FreeImage_GetTransparencyTable(pagedib);
for ( int i = 0; i < count; i++ ) {
@@ -814,7 +814,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
//copy frame time
if ( page == end ) {
FITAG *tag;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag)) {
delay_time = *(LONG *)FreeImage_GetTagValue(tag);
}
}
@@ -915,7 +915,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
while( b ) {
io->read_proc(stringtable->FillInputBuffer(b), b, 1, handle);
int size = sizeof(buf);
- while( stringtable->Decompress(buf, &size) ) {
+ while( stringtable->Decompress(buf, &size)) {
for ( int i = 0; i < size; i++ ) {
scanline[xpos] |= (buf[i] & mask) << shift;
if ( shift > 0 ) {
@@ -989,7 +989,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( b == 11 ) { //All AEs start with an 11 byte sub-block to determine what type of AE it is
char buf[11];
io->read_proc(buf, 11, 1, handle);
- if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11) ) { //Not everybody recognizes ANIMEXTS1.0 but it is valid
+ if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11)) { //Not everybody recognizes ANIMEXTS1.0 but it is valid
io->read_proc(&b, 1, 1, handle);
if ( b == 3 ) { //we're supposed to have a 3 byte sub-block now
io->read_proc(&b, 1, 1, handle); //this should be 0x01 but isn't really important
@@ -1089,22 +1089,22 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
int disposal_method = GIF_DISPOSAL_BACKGROUND, delay_time = 100, transparent_color = 0;
WORD left = 0, top = 0, width = (WORD)FreeImage_GetWidth(dib), height = (WORD)FreeImage_GetHeight(dib);
WORD output_height = height;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag)) {
left = *(WORD *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag)) {
top = *(WORD *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag)) {
no_local_palette = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false;
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag)) {
interlaced = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false;
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag)) {
delay_time = *(LONG *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag)) {
disposal_method = *(BYTE *)FreeImage_GetTagValue(tag);
}
@@ -1119,14 +1119,14 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
if ( page == 0 ) {
//gather some info
WORD logicalwidth = width; // width has already been swapped...
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag)) {
logicalwidth = *(WORD *)FreeImage_GetTagValue(tag);
#ifdef FREEIMAGE_BIGENDIAN
SwapShort(&logicalwidth);
#endif
}
WORD logicalheight = height; // height has already been swapped...
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag)) {
logicalheight = *(WORD *)FreeImage_GetTagValue(tag);
#ifdef FREEIMAGE_BIGENDIAN
SwapShort(&logicalheight);
@@ -1134,7 +1134,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
}
RGBQUAD *globalpalette = NULL;
int globalpalette_size = 0;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag)) {
globalpalette_size = FreeImage_GetTagCount(tag);
if ( globalpalette_size >= 2 ) {
globalpalette = (RGBQUAD *)FreeImage_GetTagValue(tag);
@@ -1174,7 +1174,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
globalpalette_size = 256;
packed |= 7 & GIF_PACKED_LSD_GCTSIZE;
}
- if ( FreeImage_GetBackgroundColor(dib, &background_color) ) {
+ if ( FreeImage_GetBackgroundColor(dib, &background_color)) {
for ( int i = 0; i < globalpalette_size; i++ ) {
if ( background_color.rgbRed == globalpalette[i].rgbRed &&
background_color.rgbGreen == globalpalette[i].rgbGreen &&
@@ -1206,7 +1206,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
//Application Extension
LONG loop = 0;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag)) {
loop = *(LONG *)FreeImage_GetTagValue(tag);
}
if ( loop != 1 ) {
@@ -1250,7 +1250,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
}
//Graphic Control Extension
- if ( FreeImage_IsTransparent(dib) ) {
+ if ( FreeImage_IsTransparent(dib)) {
int count = FreeImage_GetTransparencyCount(dib);
BYTE *table = FreeImage_GetTransparencyTable(dib);
for ( int i = 0; i < count; i++ ) {
@@ -1316,9 +1316,9 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
b = sizeof(buf);
while( y < output_height ) {
memcpy(stringtable->FillInputBuffer(line), FreeImage_GetScanLine(dib, output_height - y - 1), line);
- while( stringtable->Compress(bufptr, &size) ) {
+ while( stringtable->Compress(bufptr, &size)) {
bufptr += size;
- if ( bufptr - buf == sizeof(buf) ) {
+ if ( bufptr - buf == sizeof(buf)) {
io->write_proc(&b, 1, 1, handle);
io->write_proc(buf, sizeof(buf), 1, handle);
size = sizeof(buf);
@@ -1339,7 +1339,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
size = (int)(bufptr - buf);
BYTE last[4];
w = (WORD)stringtable->CompressEnd(last);
- if ( size + w >= sizeof(buf) ) {
+ if ( size + w >= sizeof(buf)) {
//one last full size sub-block
io->write_proc(&b, 1, 1, handle);
io->write_proc(buf, size, 1, handle);
diff --git a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
index 1107841d33..d0ece3514c 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
@@ -100,7 +100,7 @@ CalculateImageOffset(std::vector<FIBITMAP*>& vPages, int nIndex ) {
// calculate the ICO header size
dwSize = sizeof(ICONHEADER);
// add the ICONDIRENTRY's
- dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY) );
+ dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY));
// add the sizes of the previous images
for(int k = 0; k < nIndex; k++) {
FIBITMAP *icon_dib = (FIBITMAP*)vPages[k];
diff --git a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
index b6393de7aa..b69ace95bc 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
@@ -785,7 +785,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
BYTE *icc_profile = NULL;
unsigned icc_length = 0;
- if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
+ if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length)) {
// copy ICC profile data
FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
// clean up
diff --git a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
index c40ee29c60..367cb13c96 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
@@ -61,10 +61,10 @@ static const float CIE_y_b = 0.060F;
static const float CIE_x_w = 0.3127F; // Illuminant D65
static const float CIE_y_w = 0.3290F;
-static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g) );
-static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g) );
-static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r) );
-static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r) );
+static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g));
+static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g));
+static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r));
+static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r));
/**
RGB to XYZ (no white balance)
@@ -415,8 +415,8 @@ static void findMaxMinPercentile(FIBITMAP *Y, float minPrct, float *minLum, floa
std::sort(vY.begin(), vY.end());
- *minLum = vY.at( int(minPrct * vY.size()) );
- *maxLum = vY.at( int(maxPrct * vY.size()) );
+ *minLum = vY.at( int(minPrct * vY.size()));
+ *maxLum = vY.at( int(maxPrct * vY.size()));
}
/**
diff --git a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
index 71be370b3e..bcd4524523 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
@@ -283,7 +283,7 @@ static FIBITMAP* PhiMatrix(FIBITMAP **gradients, float *avgGrad, int nlevels, fl
}
if(k < nlevels-1) {
- // compute PHI(k) = L( PHI(k+1) ) * phi(k)
+ // compute PHI(k) = L( PHI(k+1)) * phi(k)
FIBITMAP *L = FreeImage_Rescale(phi[k+1], width, height, FILTER_BILINEAR);
if (!L) throw(1);
diff --git a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
index dfa6553806..969aa4c950 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
@@ -113,7 +113,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo
for(x = 0; x < width; x++) {
I_a = Y[x]; // luminance(x, y)
for (i = 0; i < 3; i++) {
- *color /= ( *color + pow(f * I_a, m) );
+ *color /= ( *color + pow(f * I_a, m));
max_color = (*color > max_color) ? *color : max_color;
min_color = (*color < min_color) ? *color : min_color;
@@ -164,7 +164,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo
I_l = c * *color + (1-c) * L;
I_g = c * Cav[i] + (1-c) * Lav;
I_a = a * I_l + (1-a) * I_g;
- *color /= ( *color + pow(f * I_a, m) );
+ *color /= ( *color + pow(f * I_a, m));
max_color = (*color > max_color) ? *color : max_color;
min_color = (*color < min_color) ? *color : min_color;
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
index 7046a4acc9..d38d8c1bcd 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
@@ -730,7 +730,7 @@ Rotate45(FIBITMAP *src, double dAngle, const void *bkcolor) {
}
else {
// Negative angle
- dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3) );
+ dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3));
}
for(u = 0; u < height_3; u++, dOffset += dTan) {
int iShear = int(floor(dOffset));
@@ -878,7 +878,7 @@ FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor) {
// copy background color
RGBQUAD bkcolor;
- if ( FreeImage_GetBackgroundColor(dib, &bkcolor) ) {
+ if ( FreeImage_GetBackgroundColor(dib, &bkcolor)) {
FreeImage_SetBackgroundColor(dst, &bkcolor);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
index 59757287ed..753fdc736e 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
@@ -608,7 +608,7 @@ FreeImage_Copy(FIBITMAP *src, int left, int top, int right, int bottom) {
// copy background color
RGBQUAD bkcolor;
- if ( FreeImage_GetBackgroundColor(src, &bkcolor) ) {
+ if ( FreeImage_GetBackgroundColor(src, &bkcolor)) {
FreeImage_SetBackgroundColor(dst, &bkcolor);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
index c5345497f5..2d7399dcb2 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
@@ -211,7 +211,7 @@ LosslessTransform(const FilenameIO *filenameIO, FREE_IMAGE_JPEG_OPERATION operat
// Prepare transformation workspace
// Fails right away if perfect flag is TRUE and transformation is not perfect
- if ( !jtransform_request_workspace(&srcinfo, &transfoptions) ) {
+ if ( !jtransform_request_workspace(&srcinfo, &transfoptions)) {
FreeImage_OutputMessageProc(FIF_JPEG, "Transformation is not perfect");
throw(1);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
index 6d17d45319..a31961447a 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
@@ -68,7 +68,7 @@ static void fmg_restrict(FIBITMAP *UC, FIBITMAP *UF, int nc) {
// 0.5 * UF(row_uf, col_uf) + 0.125 * [ UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) + UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ]
float *uc_pixel = uc_scan + col_uc;
const float *uf_center = uf_scan + col_uf;
- *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1) );
+ *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1));
}
uc_scan += uc_pitch;
}
@@ -158,8 +158,8 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) {
for(row_uf = 1; row_uf < nf-1; row_uf += 2) {
float *uf_scan = uf_bits + row_uf * uf_pitch;
for (col_uf = 0; col_uf < nf; col_uf += 2) {
- // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) )
- uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf) );
+ // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf))
+ uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf));
}
}
}
@@ -168,7 +168,7 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) {
float *uf_scan = uf_bits;
for(row_uf = 0; row_uf < nf; row_uf++) {
for (col_uf = 1; col_uf < nf-1; col_uf += 2) {
- // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) )
+ // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1))
uf_scan[col_uf] = 0.5F * ( uf_scan[col_uf + 1] + uf_scan[col_uf - 1] );
}
uf_scan += uf_pitch;
diff --git a/plugins/FreeImage/Source/LibJPEG/jcparam.c b/plugins/FreeImage/Source/LibJPEG/jcparam.c
index c5e85dda55..1c81d2ec59 100644
--- a/plugins/FreeImage/Source/LibJPEG/jcparam.c
+++ b/plugins/FreeImage/Source/LibJPEG/jcparam.c
@@ -422,7 +422,7 @@ jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
compptr->v_samp_factor = (vsamp), \
compptr->quant_tbl_no = (quant), \
compptr->dc_tbl_no = (dctbl), \
- compptr->ac_tbl_no = (actbl) )
+ compptr->ac_tbl_no = (actbl))
/* Safety check to ensure start_compress not called yet. */
if (cinfo->global_state != CSTATE_START)
diff --git a/plugins/FreeImage/Source/LibPNG/png.c b/plugins/FreeImage/Source/LibPNG/png.c
index 5a490b2d92..0df53a62af 100644
--- a/plugins/FreeImage/Source/LibPNG/png.c
+++ b/plugins/FreeImage/Source/LibPNG/png.c
@@ -1035,13 +1035,13 @@ int png_XYZ_from_xy(png_XYZ *XYZ, png_xy xy)
*
* red-scale =
* ( (green-x - blue-x) * (white-y - blue-y) -
- * (green-y - blue-y) * (white-x - blue-x) ) / white-y
+ * (green-y - blue-y) * (white-x - blue-x)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
* green-scale =
* ( (red-y - blue-y) * (white-x - blue-x) -
- * (red-x - blue-x) * (white-y - blue-y) ) / white-y
+ * (red-x - blue-x) * (white-y - blue-y)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
diff --git a/plugins/FreeImage/Source/LibPNG/pngconf.h b/plugins/FreeImage/Source/LibPNG/pngconf.h
index 3fea47b860..121d204ccd 100644
--- a/plugins/FreeImage/Source/LibPNG/pngconf.h
+++ b/plugins/FreeImage/Source/LibPNG/pngconf.h
@@ -182,9 +182,9 @@
* conventions of the various functions.
*/
#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
- defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
+ defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)) &&\
( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
- defined(_M_X64) || defined(_M_IA64) )
+ defined(_M_X64) || defined(_M_IA64))
/* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
* builds under Cygwin or MinGW. Also includes Watcom builds but these need
* special treatment because they are not compatible with GCC or Visual C
diff --git a/plugins/FreeImage/Source/LibPNG/pngpriv.h b/plugins/FreeImage/Source/LibPNG/pngpriv.h
index 5f751de23d..02cc5d8c53 100644
--- a/plugins/FreeImage/Source/LibPNG/pngpriv.h
+++ b/plugins/FreeImage/Source/LibPNG/pngpriv.h
@@ -532,7 +532,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
#define PNG_ROWBYTES(pixel_bits, width) \
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
- (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
+ (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3))
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
@@ -540,7 +540,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
* integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
- ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta))
/* Conversions between fixed and floating point, only defined if
* required (to make sure the code doesn't accidentally use float
diff --git a/plugins/FreeImage/Source/LibPNG/pngrtran.c b/plugins/FreeImage/Source/LibPNG/pngrtran.c
index 26083a0dd5..bbee10ce56 100644
--- a/plugins/FreeImage/Source/LibPNG/pngrtran.c
+++ b/plugins/FreeImage/Source/LibPNG/pngrtran.c
@@ -4331,7 +4331,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_structp png_ptr)
((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
- ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
+ ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6)));
sp++;
}
}
diff --git a/plugins/HistoryLinkListPlus/linklist_dlg.c b/plugins/HistoryLinkListPlus/linklist_dlg.c
index 150e7d7d29..80d6b23f8f 100644
--- a/plugins/HistoryLinkListPlus/linklist_dlg.c
+++ b/plugins/HistoryLinkListPlus/linklist_dlg.c
@@ -153,7 +153,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
}
else if ( pENLink->msg == WM_LBUTTONUP )
{
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
+ link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&pENLink->chrg));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
@@ -183,7 +183,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hSubMenu, 0);
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
+ link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&(pENLink->chrg)));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
@@ -191,7 +191,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam);
ClientToScreen(((NMHDR *) lParam)->hwndFrom, &pt);
- switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL) )
+ switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL))
{
case IDM_LINK_OPEN:
{
@@ -215,7 +215,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
{
size_t dataLen;
HGLOBAL hData;
- if ( !OpenClipboard(hDlg) )
+ if ( !OpenClipboard(hDlg))
break;
EmptyClipboard();
@@ -288,7 +288,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
@@ -317,7 +317,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
@@ -345,7 +345,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_CHECKED )
@@ -370,7 +370,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
else if ( wParam == IDM_TYPE_MAIL )
{
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED )
@@ -540,7 +540,7 @@ INT_PTR WINAPI SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam
flags = flags | SLL_DEEP;
length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING))+1;
- buffer = (LPTSTR)malloc( length*sizeof(TCHAR) );
+ buffer = (LPTSTR)malloc( length*sizeof(TCHAR));
GetDlgItemText(hDlg, IDC_SEARCHSTRING, buffer, length);
WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
free(buffer);
diff --git a/plugins/HistoryLinkListPlus/linklist_fct.c b/plugins/HistoryLinkListPlus/linklist_fct.c
index da7771e8c0..4d73448865 100644
--- a/plugins/HistoryLinkListPlus/linklist_fct.c
+++ b/plugins/HistoryLinkListPlus/linklist_fct.c
@@ -83,10 +83,10 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
//hyperlinks are delimited by: <non-alphanumeric>"hyperlink"<whitespace>
//then all punctuation is stripped from the end of "hyperlink"
iLastAlphaNum = 0;
- while ( msg[i] && !_istalnum(msg[i]) )
+ while ( msg[i] && !_istalnum(msg[i]))
{
// support for files
- if ( (msg[i]==_T('\\')) && (msg[i+1]==_T('\\')) && (_istalnum(msg[i+2])) )
+ if ( (msg[i]==_T('\\')) && (msg[i+1]==_T('\\')) && (_istalnum(msg[i+2])))
{
break;
}
@@ -94,20 +94,20 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
if(IsDBCSLeadByte(msg[i]) && msg[i+1]) i++;
i++;
- if ( msg[i] != _T('\n') ) charCount++;
+ if ( msg[i] != _T('\n')) charCount++;
}
- if ( msg[i] == _T('\0') ) break;
+ if ( msg[i] == _T('\0')) break;
cpWordStart = charCount;
wordStart = i;
- while ( msg[i] && !_istspace(msg[i]) )
+ while ( msg[i] && !_istspace(msg[i]))
{
if ( IsDBCSLeadByte(msg[i] ) && msg[i+1]) i++;
else
- if ( _istalnum(msg[i]) || msg[i]==_T('/') )
+ if ( _istalnum(msg[i]) || msg[i]==_T('/'))
{
cpLastAlphaNum = charCount;
iLastAlphaNum = i;
@@ -133,7 +133,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
for ( j=0; j<_countof(hyperlinkPrefixes); j++ )
{
- if ( !_tcsncmp(wordsearch, hyperlinkPrefixes[j], _tcslen(hyperlinkPrefixes[j])) )
+ if ( !_tcsncmp(wordsearch, hyperlinkPrefixes[j], _tcslen(hyperlinkPrefixes[j])))
{
isLink = 1;
break;
@@ -143,7 +143,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
if ( !isLink ) {
for ( j=0; j<_countof(hyperlinkSubstrings); j++ )
{
- if ( _tcsstr(wordsearch+1,hyperlinkSubstrings[j]) )
+ if ( _tcsstr(wordsearch+1,hyperlinkSubstrings[j]))
{
isLink = 1;
break;
@@ -151,7 +151,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
}
}
- if ( _tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/')) )
+ if ( _tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/')))
{
isLink = 1; //e-mail addresses
type = LINK_MAIL;
@@ -160,15 +160,15 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
type = LINK_URL;
}
- if ( isLink && ( (i-wordStart+1) <= (int)(LINK_MAX - _mstrlen(_T("http://")))) )
+ if ( isLink && ( (i-wordStart+1) <= (int)(LINK_MAX - _mstrlen(_T("http://")))))
{
LPTSTR tok_ctx;
- if ( (_tcsstr(wordsearch, _T("www.")) != NULL) && (_tcsstr(wordsearch, _T("http://")) == NULL) )
+ if ( (_tcsstr(wordsearch, _T("www.")) != NULL) && (_tcsstr(wordsearch, _T("http://")) == NULL))
{
_tcsncpy_s(link, _countof(link), _T("http://"), _mstrlen(_T("http://")));
// Link longer than defined max -> cut link to max
- if ( (i-wordStart+1) > (int)(LINK_MAX-_mstrlen(_T("http://"))) )
+ if ( (i-wordStart+1) > (int)(LINK_MAX-_mstrlen(_T("http://"))))
_tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, LINK_MAX - _mstrlen(_T("http://")));
else
_tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, i-wordStart+1);
@@ -315,12 +315,12 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
if ( append == 0 )
ShowWindow(GetDlgItem(hDlg, IDC_MAIN), SW_HIDE);
- if ( (append > 0) && (GetMenuState(GetMenu(hDlg), IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( (append > 0) && (GetMenuState(GetMenu(hDlg), IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
return;
- if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE) )
+ if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE))
{
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK) );
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_AUTOURLDETECT, TRUE, 0 );
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETBKGNDCOLOR, FALSE, colourSet.background);
@@ -338,7 +338,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
// How to set RTF colour, font, etc.... found at
// http://www.winehq.com/hypermail/wine-devel/2004/08/0608.html
- ZeroMemory(&pf, sizeof(pf) );
+ ZeroMemory(&pf, sizeof(pf));
pf.cbSize = sizeof(pf);
pf.dwMask = PFM_ALIGNMENT;
pf.wAlignment = PFA_LEFT;
@@ -346,7 +346,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
if ( searchString != NULL )
{
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
@@ -360,7 +360,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
linePos += 2;
}
- ZeroMemory(&cf, sizeof(cf) );
+ ZeroMemory(&cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
_tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
@@ -408,16 +408,16 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
filter2 = 0;
filter3 = 0;
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
+ if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN))
filter1 = 1;
- else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
+ else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT))
filter1 = 1;
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
+ if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL))
filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
+ else if ( (params & WLL_URL) && (actualElement->type == LINK_URL))
filter2 = 1;
- else if ( (params & WLL_FILE) && (actualElement->type == LINK_FILE) )
+ else if ( (params & WLL_FILE) && (actualElement->type == LINK_FILE))
filter2 = 1;
@@ -435,7 +435,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
dbe.pBlob[dbe.cbBlob] = 0;
msg = DbGetEventTextT(&dbe, CP_ACP);
- if ( _tcsstr(msg, searchString) )
+ if ( _tcsstr(msg, searchString))
filter3 = 1;
free(dbe.pBlob);
@@ -446,14 +446,14 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
}
else
{
- if ( _tcsstr(actualElement->link, searchString) )
+ if ( _tcsstr(actualElement->link, searchString))
filter3 = 1;
}
}
else
filter3 = 1;
- if ( (filter1 == 1) && (filter2 == 1) && (filter3 == 1) )
+ if ( (filter1 == 1) && (filter2 == 1) && (filter3 == 1))
{
LPCTSTR type;
@@ -485,7 +485,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
_tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
}
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR;
@@ -523,7 +523,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
linePos++;
actualElement->linePos = linePos;
actCount++;
- if ( hwndProgress && ( ((int)(((float)actCount/listCount)*100.00)) % 10 == 0 ) )
+ if ( hwndProgress && ( ((int)(((float)actCount/listCount)*100.00)) % 10 == 0 ))
SendMessage(hwndProgress, WM_COMMAND, 100,((int)(((float)actCount/listCount)*100.00)));
}
@@ -536,7 +536,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
}
else if ( searchString == NULL )
{
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
@@ -817,14 +817,14 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz
filter2 = 0;
filter3 = 0;
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
+ if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN))
filter1 = 1;
- else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
+ else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT))
filter1 = 1;
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
+ if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL))
filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
+ else if ( (params & WLL_URL) && (actualElement->type == LINK_URL))
filter2 = 1;
if ( searchString != NULL )
@@ -840,7 +840,7 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz
dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
dbe.pBlob[dbe.cbBlob] = 0;
- if ( _tcsstr((LPTSTR)dbe.pBlob, searchString) )
+ if ( _tcsstr((LPTSTR)dbe.pBlob, searchString))
filter3 = 1;
free(dbe.pBlob);
@@ -1255,7 +1255,7 @@ int DBUpdate(WPARAM wParam, LPARAM lParam)
dbe.pBlob = (PBYTE)malloc((size_t)dbe.cbBlob+1);
CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbe);
- if ( (dbe.eventType == EVENTTYPE_URL) || (dbe.eventType == EVENTTYPE_MESSAGE) )
+ if ( (dbe.eventType == EVENTTYPE_URL) || (dbe.eventType == EVENTTYPE_MESSAGE))
{
// Call function to find URIs
linkNum = ExtractURI(&dbe, hEvent, DlgParam->listStart);
@@ -1324,7 +1324,7 @@ BOOL SaveEditAsStream( HWND hDlg )
ofn.lpstrTitle = _T("Save RTF File");
ofn.Flags = OFN_OVERWRITEPROMPT;
// Get a filename or quit
- if ( ! GetSaveFileName( &ofn ) )
+ if ( ! GetSaveFileName( &ofn ))
return FALSE;
// Create the specified file
hFile = CreateFile( szFilename, GENERIC_WRITE, 0, NULL,
diff --git a/plugins/HistorySweeperLight/historysweeperlight.c b/plugins/HistorySweeperLight/historysweeperlight.c
index ee99f0d5c6..50cc7e1386 100644
--- a/plugins/HistorySweeperLight/historysweeperlight.c
+++ b/plugins/HistorySweeperLight/historysweeperlight.c
@@ -183,7 +183,7 @@ void SweepHistoryFromContact(HANDLE hContact, CriteriaStruct Criteria, BOOL keep
// should we stop processing?
// lPolicy == 1 - for time criterion, lPolicy == 2 - keep N last events, lPolicy == 3 - delete all events
- if ( (lPolicy == 1 && (unsigned)Criteria.time < dbei.timestamp) || (lPolicy == 2 && Criteria.keep > --eventsCnt) ) break;
+ if ( (lPolicy == 1 && (unsigned)Criteria.time < dbei.timestamp) || (lPolicy == 2 && Criteria.keep > --eventsCnt)) break;
doDelete = TRUE;
diff --git a/plugins/HistorySweeperLight/main.c b/plugins/HistorySweeperLight/main.c
index 150f54a95f..3174ab1369 100644
--- a/plugins/HistorySweeperLight/main.c
+++ b/plugins/HistorySweeperLight/main.c
@@ -57,7 +57,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam)
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName)
- && DBGetContactSettingByte(NULL, ModuleName, "ChangeInMW", 0) )
+ && DBGetContactSettingByte(NULL, ModuleName, "ChangeInMW", 0))
{
int nh = sicd->dwId; HANDLE hContact = (HANDLE)wParam; StatusIconData sid = {0};
diff --git a/plugins/ListeningTo/commons.h b/plugins/ListeningTo/commons.h
index 3d8aeee91a..d0a9fc5b0c 100644
--- a/plugins/ListeningTo/commons.h
+++ b/plugins/ListeningTo/commons.h
@@ -85,7 +85,7 @@ extern BOOL loaded;
#define MIR_FREE(_X_) { mir_free(_X_); _X_ = NULL; }
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define MIN_TIME_BEETWEEN_SETS 10000 // ms
@@ -119,10 +119,10 @@ static bool IsEmpty(const WCHAR *str)
return str == NULL || str[0] == 0;
}
-#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_) )
-#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_) )
-#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_) )
-#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_) )
+#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_))
+#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_))
+#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_))
+#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_))
#endif // __COMMONS_H__
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index 486a32b7a2..265c208c34 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -158,9 +158,9 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_HOTKEYS_TOGGLE, HotkeysToggle));
// Hooks
- hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded) );
- hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown) );
- hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged) );
+ hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded));
+ hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown));
+ hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged));
hEnableStateChangedEvent = CreateHookableEvent(ME_LISTENINGTO_ENABLE_STATE_CHANGED);
hListeningInfoChangedEvent = CreateHookableEvent(ME_LISTENINGTO_LISTENING_INFO_CHANGED);
@@ -354,7 +354,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
}
else if (hExtraIcon == NULL && ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
{
- hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild) );
+ hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild));
}
{
@@ -409,7 +409,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
RegisterProtocol(protos[i]->szModuleName, protos[i]->tszAccountName);
}
- hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged) );
+ hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged));
}
else
{
@@ -433,7 +433,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
RebuildMenu();
- hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded) );
+ hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded));
// Variables support
if (ServiceExists(MS_VARS_REGISTERTOKEN))
@@ -562,7 +562,7 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam)
{
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick) );
+ hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick));
TTBButton ttb = {0};
ttb.cbSize = sizeof(ttb);
diff --git a/plugins/ListeningTo/players/itunes.cpp b/plugins/ListeningTo/players/itunes.cpp
index b00e6e4189..4801b2c78f 100644
--- a/plugins/ListeningTo/players/itunes.cpp
+++ b/plugins/ListeningTo/players/itunes.cpp
@@ -77,20 +77,20 @@ BOOL ITunes::InitAndGetFilename()
if (hwnd == NULL)
return FALSE;
- CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp) );
+ CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp));
ITPlayerState state;
- CALL( iTunesApp->get_PlayerState(&state) );
+ CALL( iTunesApp->get_PlayerState(&state));
if (state == ITPlayerStateStopped)
return FALSE;
- CALL( iTunesApp->get_CurrentTrack(&track) );
+ CALL( iTunesApp->get_CurrentTrack(&track));
if (track == NULL)
return FALSE;
- CALL( track->QueryInterface(__uuidof(file), (void **)&file) );
+ CALL( track->QueryInterface(__uuidof(file), (void **)&file));
- CALL( file->get_Location(&ret) );
+ CALL( file->get_Location(&ret));
return !IsEmpty(ret);
}
@@ -101,33 +101,33 @@ BOOL ITunes::FillCache()
HRESULT hr;
long lret;
- CALL( track->get_Album(&ret) );
+ CALL( track->get_Album(&ret));
listening_info.ptszAlbum = U2T(ret);
- CALL( track->get_Artist(&ret) );
+ CALL( track->get_Artist(&ret));
listening_info.ptszArtist = U2T(ret);
- CALL( track->get_Name(&ret) );
+ CALL( track->get_Name(&ret));
listening_info.ptszTitle = U2T(ret);
- CALL( track->get_Year(&lret) );
+ CALL( track->get_Year(&lret));
if (lret > 0)
{
listening_info.ptszYear = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszYear, 10);
}
- CALL( track->get_TrackNumber(&lret) );
+ CALL( track->get_TrackNumber(&lret));
if (lret > 0)
{
listening_info.ptszTrack = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszTrack, 10);
}
- CALL( track->get_Genre(&ret) );
+ CALL( track->get_Genre(&ret));
listening_info.ptszGenre = U2T(ret);
- CALL( track->get_Duration(&lret) );
+ CALL( track->get_Duration(&lret));
if (lret > 0)
{
listening_info.ptszLength = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
diff --git a/plugins/ListeningTo/players/watrack.cpp b/plugins/ListeningTo/players/watrack.cpp
index 133c97e57f..790613e856 100644
--- a/plugins/ListeningTo/players/watrack.cpp
+++ b/plugins/ListeningTo/players/watrack.cpp
@@ -101,7 +101,7 @@ void WATrack::GetData()
if (playing != WAT_PLS_NORMAL
|| si == NULL
|| si->status != 1
- || ( IsEmpty(si->artist) && IsEmpty(si->title) ) )
+ || ( IsEmpty(si->artist) && IsEmpty(si->title)) )
{
return;
}
diff --git a/plugins/MenuItemEx/images.c b/plugins/MenuItemEx/images.c
index aed5d99bf9..51903294bb 100644
--- a/plugins/MenuItemEx/images.c
+++ b/plugins/MenuItemEx/images.c
@@ -217,7 +217,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap)
}
-//#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+//#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
//BOOL MakeGrayscale(HBITMAP *hBitmap)
//{
diff --git a/plugins/MenuItemEx/main.c b/plugins/MenuItemEx/main.c
index 8c65f0a8bc..1183559159 100644
--- a/plugins/MenuItemEx/main.c
+++ b/plugins/MenuItemEx/main.c
@@ -1168,7 +1168,7 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam )
time_t tCurrentTime;
char *lpzProto;
- if ( ( HANDLE )wParam == NULL || lstrcmpA( cws->szSetting, "Status" ) )
+ if ( ( HANDLE )wParam == NULL || lstrcmpA( cws->szSetting, "Status" ))
return 0;
newStatus = cws->value.wVal;
diff --git a/plugins/NewAwaySysMod/AwaySys.cpp b/plugins/NewAwaySysMod/AwaySys.cpp
index 1e968393b9..c7fd8b5b8a 100644
--- a/plugins/NewAwaySysMod/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/AwaySys.cpp
@@ -937,9 +937,9 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
// we have to read the status message from contacts too... err
hServices.AddElem(CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetContactStatMsg));
- SkinAddNewSound(AWAYSYS_STATUSMSGREQUEST_SOUND, Translate("NewAwaySys: Incoming status message request"), "");
- if (ServiceExists(MS_VARS_REGISTERTOKEN))
- {
+ SkinAddNewSoundEx(AWAYSYS_STATUSMSGREQUEST_SOUND, NULL, LPGEN("NewAwaySys: Incoming status message request"));
+
+ if (ServiceExists(MS_VARS_REGISTERTOKEN)) {
struct
{
TCHAR *Name;
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp
index 36fe374c5e..9d149e0c3b 100644
--- a/plugins/NewXstatusNotify/main.cpp
+++ b/plugins/NewXstatusNotify/main.cpp
@@ -1325,18 +1325,17 @@ void InitIcolib()
void InitSound()
{
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
- SkinAddNewSoundEx(StatusList[Index(i)].lpzSkinSoundName, "Status Notify", StatusList[Index(i)].lpzSkinSoundDesc);
+ SkinAddNewSoundEx(StatusList[Index(i)].lpzSkinSoundName, LPGEN("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
- SkinAddNewSoundEx("UserFromOffline", "Status Notify", Translate("User: from offline (has priority!)"));
- SkinAddNewSoundEx(XSTATUS_SOUND_CHANGED, "Status Notify", "Extra status changed");
- SkinAddNewSoundEx(XSTATUS_SOUND_MSGCHANGED, "Status Notify", "Extra status message changed");
- SkinAddNewSoundEx(XSTATUS_SOUND_REMOVED, "Status Notify", "Extra status removed");
+ SkinAddNewSoundEx("UserFromOffline", LPGEN("Status Notify"), LPGEN("User: from offline (has priority!)"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_CHANGED, LPGEN("Status Notify"), LPGEN("Extra status changed"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_MSGCHANGED, LPGEN("Status Notify"), LPGEN("Extra status message changed"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_REMOVED, LPGEN("Status Notify"), LPGEN("Extra status removed"));
}
void InitTopToolbar()
{
- if (ServiceExists(MS_TB_ADDBUTTON))
- {
+ if (ServiceExists(MS_TB_ADDBUTTON)) {
TBButton tbb = {0};
tbb.cbSize = sizeof(TBButton);
tbb.pszServiceName = MS_STATUSCHANGE_MENUCOMMAND;
diff --git a/plugins/Nudge/ChangeLog.txt b/plugins/Nudge/ChangeLog.txt
index 5404a70544..140671c177 100644
--- a/plugins/Nudge/ChangeLog.txt
+++ b/plugins/Nudge/ChangeLog.txt
@@ -130,7 +130,7 @@
0.0.0.12
===========
-+ Now possible to change the text shown when sending or receiving nudge ( [color=red]BUZZ!!![/color] for yahoo ;) )
++ Now possible to change the text shown when sending or receiving nudge ( [color=red]BUZZ!!![/color] for yahoo ;))
* Change options page.
! Now apply button is enable when changing status.
diff --git a/plugins/Nudge/main.cpp b/plugins/Nudge/main.cpp
index b2f1ab36ac..5648e052a5 100644
--- a/plugins/Nudge/main.cpp
+++ b/plugins/Nudge/main.cpp
@@ -327,7 +327,7 @@ void LoadProtocols(void)
//Load the default nudge
mir_snprintf(DefaultNudge.ProtocolName,sizeof(DefaultNudge.ProtocolName),"Default");
mir_snprintf(DefaultNudge.NudgeSoundname,sizeof(DefaultNudge.NudgeSoundname),"Nudge : Default");
- SkinAddNewSoundExT( DefaultNudge.NudgeSoundname, LPGENT("Nudge"),LPGENT("Default Nudge"));
+ SkinAddNewSoundEx( DefaultNudge.NudgeSoundname, LPGEN("Nudge"), LPGEN("Default Nudge"));
DefaultNudge.Load();
GlobalNudge.Load();
@@ -778,7 +778,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto)
TCHAR soundDesc[MAXMODULELABELLENGTH + 10];
mir_sntprintf(soundDesc,sizeof(soundDesc),_T("Nudge for %s"),proto->tszAccountName);
- SkinAddNewSoundExT( newNudge->item.NudgeSoundname, LPGENT("Nudge") , soundDesc);
+ SkinAddNewSoundExT(newNudge->item.NudgeSoundname, LPGENT("Nudge"), soundDesc);
newNudge->next = NudgeList;
NudgeList = newNudge;
diff --git a/plugins/Nudge/shake.cpp b/plugins/Nudge/shake.cpp
index c39d79c57b..f396c4f535 100644
--- a/plugins/Nudge/shake.cpp
+++ b/plugins/Nudge/shake.cpp
@@ -110,7 +110,7 @@ int TriggerShakeChat( WPARAM wParam, LPARAM lParam )
sai = (SPECIFICACTIONINFO *) lParam;
- if ( (sai->td != NULL) && (sai->td->dFlags&DF_CONTACT) )
+ if ( (sai->td != NULL) && (sai->td->dFlags&DF_CONTACT))
hContact = sai->td->hContact;
else
return 0;
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index 22f60786fb..80931ee40d 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -921,7 +921,7 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha)
MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index a239965695..0a9beb7382 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -390,7 +390,7 @@ static int ModulesLoaded(WPARAM wParam,LPARAM lParam)
_T("You always can download them at\r\n")
_T("http://addons.miranda-im.org/\r\n")
_T("\r\n")
- _T("Do you want to visit Miranda IM homepage now?\r\n") );
+ _T("Do you want to visit Miranda IM homepage now?\r\n"));
if (MessageBox(NULL, msg, _T("Popup Plus Error"), MB_YESNO|MB_ICONSTOP) == IDYES)
ShellExecute(NULL, _T("open"), _T("http://addons.miranda-im.org/"), NULL, NULL, SW_SHOWNORMAL);
return 0;
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp
index c693405bdc..97be02af44 100644
--- a/plugins/Popup/src/notifications.cpp
+++ b/plugins/Popup/src/notifications.cpp
@@ -246,7 +246,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, BYTE typ)
for(int i = 0; i < gTreeData.getCount(); i++) {
if ( gTreeData[i]->typ == typ &&
(!group || (_tcscmp(gTreeData[i]->pszTreeRoot, group) == 0)) &&
- (!name || (_tcscmp(gTreeData[i]->pszDescription, name) == 0)) )
+ (!name || (_tcscmp(gTreeData[i]->pszDescription, name) == 0)))
{
return gTreeData[i];
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index ff804b78f3..2bd5ab39b9 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -134,7 +134,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SetWindowLongPtr(GetDlgItem(hwnd, IDC_AVT_SIZE_SLIDE), GWLP_WNDPROC, (LONG_PTR)AvatarTrackBarWndProc);
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETRANGE,FALSE,
- MAKELONG(SETTING_AVTSIZE_MIN, SETTING_AVTSIZE_MAX) );
+ MAKELONG(SETTING_AVTSIZE_MIN, SETTING_AVTSIZE_MAX));
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETPOS, TRUE,
max(PopUpOptions.avatarSize, SETTING_AVTSIZE_MIN));
SetDlgItemInt(hwnd, IDC_AVT_SIZE, PopUpOptions.avatarSize, FALSE);
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index 37d6d97d0b..667ddc7c0f 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -163,14 +163,14 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopUpOptions.UseMinimumWidth);
SendDlgItemMessage(hwnd, IDC_MINIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
- SETTING_MINIMUMWIDTH_MIN) );
+ SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopUpOptions.MinimumWidth, FALSE);
//Maximum Width
PopUpOptions.UseMaximumWidth = PopUpOptions.DynamicResize ? PopUpOptions.UseMaximumWidth : TRUE;
CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopUpOptions.UseMaximumWidth);
SendDlgItemMessage(hwnd, IDC_MAXIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
- SETTING_MINIMUMWIDTH_MIN) );
+ SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopUpOptions.MaximumWidth, FALSE);
//And finally let's enable/disable them.
EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopUpOptions.DynamicResize);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 89a413e747..1dc18f43cc 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -478,7 +478,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
IDC_SKINLIST,
LB_GETITEMDATA,
(WPARAM)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL,(WPARAM)0,(LPARAM)0),
- (LPARAM)0) );
+ (LPARAM)0));
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
mir_free(PopUpOptions.SkinPack);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 93fc5f428f..963e4e4a95 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -1750,7 +1750,7 @@ lbl_stack_fix_end: ; end of stack fix hack
{
do
{
- if ( !(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) )
+ if ( !(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
{
HMODULE hModule = GetModuleHandleA(ffd.cFileName);
if (((char *)PluginWindowProc > (char *)hModule) &&
@@ -1760,7 +1760,7 @@ lbl_stack_fix_end: ; end of stack fix hack
lstrcpynA(szBadModule, ffd.cFileName, sizeof(szBadModule));
}
}
- } while ( FindNextFileA(hFind, &ffd) );
+ } while ( FindNextFileA(hFind, &ffd));
FindClose(hFind);
}
}
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index 6cd3f7df14..509d98c908 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -1408,7 +1408,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name)
_T("for newer version of Popup Plus. And will not\r\n")
_T("display properly.\r\n")
_T("\r\n")
- _T("Please choose another skin.") ),
+ _T("Please choose another skin.")),
_T(MODULNAME_LONG), MB_ICONSTOP|MB_OK);
return any->skin;
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c
index ff412f3859..9cb1a10cf7 100644
--- a/plugins/QuickMessages/options.c
+++ b/plugins/QuickMessages/options.c
@@ -508,12 +508,12 @@ void MoveItem( HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild )
tvis.hInsertAfter = hInsertAfter;
}
// insert the item
- if ( !( hNewItem = TreeView_InsertItem( hMenuTree, &tvis ) ) )
+ if ( !( hNewItem = TreeView_InsertItem( hMenuTree, &tvis )) )
return;
// move children
hInsertAfter = hNewItem;
- while( hChild = TreeView_GetChild( hMenuTree, hItem ) ) {
+ while( hChild = TreeView_GetChild( hMenuTree, hItem )) {
MoveItem( hChild, hInsertAfter, 2 );
}
// delete old tree
@@ -602,7 +602,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
TreeView_SetInsertMark(hMenuTree, NULL, 0 );
ReleaseCapture();
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
hti.pt.x = ( SHORT )LOWORD( lparam );
hti.pt.y = ( SHORT )HIWORD( lparam );
@@ -621,13 +621,13 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
htiAfter = TVI_FIRST;
}
else
- if ( hti.flags & ( TVHT_NOWHERE|TVHT_BELOW ) ) {
+ if ( hti.flags & ( TVHT_NOWHERE|TVHT_BELOW )) {
htiAfter = TVI_LAST;
}
else
- if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
+ if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT )) {
// check where over the item, the pointer is
- if ( !TreeView_GetItemRect( hMenuTree, hti.hItem, &rc, FALSE ) ) {
+ if ( !TreeView_GetItemRect( hMenuTree, hti.hItem, &rc, FALSE )) {
drag=0;
break;
}
@@ -636,8 +636,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
if ( hti.pt.y - ( height / 3 ) < rc.top ) {
HTREEITEM hItem = hti.hItem;
- if ( !( hti.hItem = TreeView_GetPrevSibling( hMenuTree, hItem ) ) ) {
- if ( !( hti.hItem = TreeView_GetParent(hMenuTree, hItem ) ))
+ if ( !( hti.hItem = TreeView_GetPrevSibling( hMenuTree, hItem )) ) {
+ if ( !( hti.hItem = TreeView_GetParent(hMenuTree, hItem )))
htiAfter = TVI_FIRST;
else
bAsChild = TRUE;
@@ -687,25 +687,25 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
ClientToScreen(hdlg,&hti.pt);
ScreenToClient(hMenuTree,&hti.pt);
TreeView_HitTest(hMenuTree,&hti);
- if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
+ if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT )) {
RECT rc;
BYTE height;
- if ( TreeView_GetItemRect(hMenuTree, hti.hItem, &rc, FALSE ) ) {
+ if ( TreeView_GetItemRect(hMenuTree, hti.hItem, &rc, FALSE )) {
height = ( BYTE )( rc.bottom - rc.top );
if ( hti.pt.y - ( height / 3 ) < rc.top ) {
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
TreeView_SetInsertMark( hMenuTree, hti.hItem, 0 );
}
else
if ( hti.pt.y + ( height / 3 ) > rc.bottom ) {
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
TreeView_SetInsertMark( hMenuTree, hti.hItem, 1 );
}
else {
TreeView_SetInsertMark( hMenuTree, NULL, 0 );
- SetCursor( LoadCursor( GetModuleHandle(NULL), MAKEINTRESOURCE( 183 ) ) );
+ SetCursor( LoadCursor( GetModuleHandle(NULL), MAKEINTRESOURCE( 183 )) );
}
}
}
diff --git a/plugins/SRMM/msgdialog.c b/plugins/SRMM/msgdialog.c
index 47e099a781..a6dc2697c0 100644
--- a/plugins/SRMM/msgdialog.c
+++ b/plugins/SRMM/msgdialog.c
@@ -918,7 +918,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
ZeroMemory(&dbei, sizeof(dbei));
dbei.cbSize = sizeof(dbei);
CallService(MS_DB_EVENT_GET, (WPARAM) hdbEvent, (LPARAM) & dbei);
- if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei) ) && !(dbei.flags & DBEF_SENT)) {
+ if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)) && !(dbei.flags & DBEF_SENT)) {
dat->lastMessage = dbei.timestamp;
PostMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
break;
@@ -1502,7 +1502,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
else
SkinPlaySound("RecvMsgInactive");
}
- if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei) ) && dat->hwndStatus && !(dbei.flags & DBEF_SENT))
+ if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)) && dat->hwndStatus && !(dbei.flags & DBEF_SENT))
{
dat->lastMessage = dbei.timestamp;
SendMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
diff --git a/plugins/Scriver/chat/colorchooser.c b/plugins/Scriver/chat/colorchooser.c
index 4765e71a7f..c2c4d80bce 100644
--- a/plugins/Scriver/chat/colorchooser.c
+++ b/plugins/Scriver/chat/colorchooser.c
@@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
if ( (pCC->bForeground && pCC->si->bFGSet && pCC->si->iFG == i) ||
- (!pCC->bForeground && pCC->si->bBGSet && pCC->si->iBG == i) ) {
+ (!pCC->bForeground && pCC->si->bBGSet && pCC->si->iBG == i)) {
rc.top = (iThisRow-1) * 20+ 1 +20 ;
rc.left = (iThisColumn-1) * 25 + 1 + 1 ;
rc.bottom = iThisRow * 20- 1 + 20 ;
diff --git a/plugins/Scriver/chat/manager.c b/plugins/Scriver/chat/manager.c
index 74595f3bc0..061955af45 100644
--- a/plugins/Scriver/chat/manager.c
+++ b/plugins/Scriver/chat/manager.c
@@ -793,7 +793,7 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu
while (pTemp != NULL) {
if (pTemp != currSession && !lstrcmpiA(pszModule, pTemp->pszModule)) {
if ( my_strstri( pTemp->ptszName, pszOriginal) == pTemp->ptszName ) {
- if ( prevSession != pTemp && lstrcmpi( pTemp->ptszName, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->ptszName, pszName ) < 0) ) {
+ if ( prevSession != pTemp && lstrcmpi( pTemp->ptszName, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->ptszName, pszName ) < 0)) {
pResult = pTemp;
pszName = pTemp->ptszName;
}
@@ -1273,7 +1273,7 @@ TCHAR* UM_FindUserAutoComplete(USERINFO* pUserList, const TCHAR* pszOriginal, co
while ( pTemp != NULL ) {
if ( my_strstri( pTemp->pszNick, pszOriginal) == pTemp->pszNick )
- if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0) )
+ if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0))
pszName = pTemp->pszNick;
pTemp = pTemp->next;
diff --git a/plugins/Scriver/chat/options.c b/plugins/Scriver/chat/options.c
index 35be477e9d..f030359ee6 100644
--- a/plugins/Scriver/chat/options.c
+++ b/plugins/Scriver/chat/options.c
@@ -424,7 +424,7 @@ BOOL CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam
_T("%yy%"), TranslateT("year without century, 01- 99"),
_T("%yyyy%"), TranslateT("year with century, 1901-9999"),
_T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name") );
+ _T("%weekday%"), TranslateT("full weekday name"));
GetClientRect (GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), &rect);
rect.left = -85;
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"), &rect);
@@ -924,17 +924,17 @@ int OptionsInit(void)
g_Settings.iSplitterX = DBGetContactSettingWord(NULL, "Chat", "SplitterX", 105);
LoadGlobalSettings();
- SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
- SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
- SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
- SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
- SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
- SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
- SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
- SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
- SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
- SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
SetIndentSize();
return 0;
}
diff --git a/plugins/Scriver/chat/services.c b/plugins/Scriver/chat/services.c
index 22afdfd389..eb72218e7a 100644
--- a/plugins/Scriver/chat/services.c
+++ b/plugins/Scriver/chat/services.c
@@ -461,7 +461,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
if ( gce->cbSize != SIZEOF_STRUCT_GCEVENT_V1 && gce->cbSize != SIZEOF_STRUCT_GCEVENT_V2 )
return GC_EVENT_WRONGVER;
- if ( !IsEventSupported( gcd->iType ) )
+ if ( !IsEventSupported( gcd->iType ))
return GC_EVENT_ERROR;
EnterCriticalSection(&cs);
diff --git a/plugins/Scriver/chat/window.c b/plugins/Scriver/chat/window.c
index adae5fd909..2acd5aed25 100644
--- a/plugins/Scriver/chat/window.c
+++ b/plugins/Scriver/chat/window.c
@@ -2013,7 +2013,7 @@ LABEL_SHOWWINDOW:
if (!IsWindowEnabled(GetDlgItem(hwndDlg,IDC_CHAT_COLOR)))
break;
- if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_COLOR) ) {
+ if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_COLOR)) {
if (DBGetContactSettingByte(NULL, "Chat", "RightClickFilter", 0) == 0)
SendMessage(hwndDlg, GC_SHOWCOLORCHOOSER, 0, (LPARAM)IDC_CHAT_COLOR);
else if (si->bFGSet) {
diff --git a/plugins/Scriver/multimon.h b/plugins/Scriver/multimon.h
index 1ad717c554..aedd943da4 100644
--- a/plugins/Scriver/multimon.h
+++ b/plugins/Scriver/multimon.h
@@ -146,7 +146,7 @@ typedef struct {
(*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoW")) &&
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) &&
(GetSystemMetrics(SM_CXVIRTUALSCREEN) >= GetSystemMetrics(SM_CXSCREEN)) &&
- (GetSystemMetrics(SM_CYVIRTUALSCREEN) >= GetSystemMetrics(SM_CYSCREEN)) )
+ (GetSystemMetrics(SM_CYVIRTUALSCREEN) >= GetSystemMetrics(SM_CYSCREEN)))
{
fInitDone = TRUE;
return TRUE;
diff --git a/plugins/Scriver/utils.c b/plugins/Scriver/utils.c
index bad1314b40..8a87b5a5cb 100644
--- a/plugins/Scriver/utils.c
+++ b/plugins/Scriver/utils.c
@@ -120,7 +120,7 @@ TCHAR *a2t(const char *text) {
}
char* t2a( const TCHAR* src ) {
-return u2a( src, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ) );
+return u2a( src, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ));
}
char* t2acp( const TCHAR* src, int codepage ) {
diff --git a/plugins/SecureIM/commonheaders.cpp b/plugins/SecureIM/commonheaders.cpp
index 5d6d0657c0..3838adbc76 100644
--- a/plugins/SecureIM/commonheaders.cpp
+++ b/plugins/SecureIM/commonheaders.cpp
@@ -45,7 +45,7 @@ LPSTR myDBGetString(HANDLE hContact,const char *szModule,const char *szSetting)
DBVARIANT dbv;
dbv.type = DBVT_ASCIIZ;
DBGetContactSetting(hContact,szModule,szSetting,&dbv);
- if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR) )
+ if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR))
val = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
return val;
diff --git a/plugins/SecureIM/crypt_check.cpp b/plugins/SecureIM/crypt_check.cpp
index dfa486d1de..3a4a0e0c30 100644
--- a/plugins/SecureIM/crypt_check.cpp
+++ b/plugins/SecureIM/crypt_check.cpp
@@ -25,7 +25,7 @@ BYTE isContactSecured(HANDLE hContact) {
if (!clist_cnt) return 0;
BYTE r=0;
- if ( isProtoMetaContacts(hContact) )
+ if ( isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
for(int j=0;j<clist_cnt;j++) {
@@ -107,13 +107,13 @@ BOOL isProtoSmallPackets(HANDLE hContact) {
BOOL isContactInvisible(HANDLE hContact) {
- if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0) ) {
+ if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0)) {
if ( !clist_cnt ) return false;
for(int j=0;j<clist_cnt;j++) {
if ( clist[j].hContact == hContact ) {
if ( !clist[j].proto->inspecting ) return false;
if ( clist[j].waitForExchange ) return false;
- switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0) ) {
+ switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0)) {
case 0:
return (CallProtoService(clist[j].proto->name,PS_GETSTATUS,0,0)==ID_STATUS_INVISIBLE);
case ID_STATUS_ONLINE:
@@ -238,7 +238,7 @@ BOOL isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM) {
if ( !ptr->proto->inspecting ) return false;
BOOL isSecureIM = false;
- if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0) ) {
+ if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0)) {
return false;
}
LPSTR mirver = myDBGetString(ptr->hContact,ptr->proto->name,"MirVer");
diff --git a/plugins/SecureIM/crypt_icons.cpp b/plugins/SecureIM/crypt_icons.cpp
index 5c3d21023d..6c5984c345 100644
--- a/plugins/SecureIM/crypt_icons.cpp
+++ b/plugins/SecureIM/crypt_icons.cpp
@@ -19,7 +19,7 @@ HICON mode2icon(int mode,int type) {
if ( icons_cache ) {
for(i=0;i<icons_cache;i++) {
- if ( ICONS_CACHE[i].mode == ((type<<8) | mode) ) {
+ if ( ICONS_CACHE[i].mode == ((type<<8) | mode)) {
return ICONS_CACHE[i].icon;
}
}
@@ -59,7 +59,7 @@ IconExtraColumn mode2iec(int mode) {
int m=mode&0x0f,s=(mode&SECURED)>>4; // ðàçîáðàëè íà ÷àñòè - ðåæèì è ñîñòîÿíèå
- if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG) ) {
+ if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG)) {
return g_IEC[0]; // âåðíåì ïóñòîå ìåñòî
}
@@ -93,7 +93,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) {
}
}
}
- if ( ServiceExists(MS_MSG_MODIFYICON) ) { // îáíîâèòü èêîíêè â srmm
+ if ( ServiceExists(MS_MSG_MODIFYICON)) { // îáíîâèòü èêîíêè â srmm
StatusIconData sid;
memset(&sid,0,sizeof(sid));
sid.cbSize = sizeof(sid);
@@ -101,7 +101,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) {
for(int i=MODE_NATIVE; i<MODE_CNT;i++) {
sid.dwId = i;
sid.flags = (mode&SECURED)?0:MBF_DISABLED;
- if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact) )
+ if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact))
sid.flags |= MBF_HIDDEN; // îòêëþ÷àåì âñå íåíóæíûå èêîíêè
CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
if ( hMC )
@@ -140,7 +140,7 @@ void RefreshContactListIcons(void) {
}
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact) { // è ñíîâà çàæèãàåì èêîíêó
- if ( isSecureProtocol(hContact) )
+ if ( isSecureProtocol(hContact))
ShowStatusIcon(hContact);
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
}
diff --git a/plugins/SecureIM/crypt_lists.cpp b/plugins/SecureIM/crypt_lists.cpp
index f71398e4b4..7b68fbd250 100644
--- a/plugins/SecureIM/crypt_lists.cpp
+++ b/plugins/SecureIM/crypt_lists.cpp
@@ -86,8 +86,8 @@ void MoveToFirstInFilterList(HANDLE hContact) {
for(i=0;;i++) {
mir_itoa(i,str,10);
- if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break;
- if ( !strcmp(szModuleName,dbv.pszVal) ) { // íàøëè ìîé ìîäóëü
+ if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break;
+ if ( !strcmp(szModuleName,dbv.pszVal)) { // íàøëè ìîé ìîäóëü
if ( i==0 ) return;
DBGetContactSettingString(hContact,"_Filter","0",&dbv);
DBWriteContactSettingString(hContact,"_Filter","0",szModuleName);
@@ -108,8 +108,8 @@ void MoveToLastInFilterList(HANDLE hContact) {
for(i=0;;i++) {
mir_itoa(i,str,10);
- if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break;
- if ( !strcmp(szModuleName,dbv.pszVal) ) { // íàøëè ìîé ìîäóëü
+ if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break;
+ if ( !strcmp(szModuleName,dbv.pszVal)) { // íàøëè ìîé ìîäóëü
j=i;
}
mir_free(dbv.pszVal);
@@ -133,7 +133,7 @@ pUinKey addContact(HANDLE hContact) {
// LPSTR szProto = (LPSTR) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
pSupPro proto = getSupPro(hContact);
if ( proto ) {
- if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName) )
+ if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName))
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)szModuleName);
MoveToLastInFilterList(hContact);
for(j=0;j<clist_cnt;j++) {
@@ -152,9 +152,9 @@ pUinKey addContact(HANDLE hContact) {
clist[j].proto = proto;
clist[j].mode = DBGetContactSettingByte(hContact, szModuleName, "mode", 99);
if ( clist[j].mode == 99 ) {
- if ( isContactPGP(hContact) ) clist[j].mode = MODE_PGP;
+ if ( isContactPGP(hContact)) clist[j].mode = MODE_PGP;
else
- if ( isContactGPG(hContact) ) clist[j].mode = MODE_GPG;
+ if ( isContactGPG(hContact)) clist[j].mode = MODE_GPG;
else
clist[j].mode = MODE_RSAAES;
DBWriteContactSettingByte(hContact, szModuleName, "mode", clist[j].mode);
diff --git a/plugins/SecureIM/crypt_misc.cpp b/plugins/SecureIM/crypt_misc.cpp
index ee6d3a5910..7e0055913d 100644
--- a/plugins/SecureIM/crypt_misc.cpp
+++ b/plugins/SecureIM/crypt_misc.cpp
@@ -129,7 +129,7 @@ void waitForExchange(pUinKey ptr, int flag) {
// § ¯ã᪠¥¬ âàí¤
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID));
SetEvent( hEvent );
break;
}
diff --git a/plugins/SecureIM/images.cpp b/plugins/SecureIM/images.cpp
index 7006d4dfa0..eb4c87dea1 100644
--- a/plugins/SecureIM/images.cpp
+++ b/plugins/SecureIM/images.cpp
@@ -214,7 +214,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap)
}
-#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
BOOL MakeGrayscale(HBITMAP *hBitmap)
{
diff --git a/plugins/SecureIM/main.cpp b/plugins/SecureIM/main.cpp
index 24950bbacf..de80e12cf0 100644
--- a/plugins/SecureIM/main.cpp
+++ b/plugins/SecureIM/main.cpp
@@ -130,7 +130,7 @@ int __cdecl Load(PLUGINLINK *link) {
iCoreVersion = CallService(MS_SYSTEM_GETVERSION,0,0);
// load crypo++ dll
- if ( !loadlib() ) {
+ if ( !loadlib()) {
msgbox1(0,sim107,szModuleName,MB_OK|MB_ICONSTOP);
return 1;
}
@@ -242,10 +242,10 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) {
if ( !rsa_4096 ) {
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID));
}
- exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) );
+ exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10));
}
#if defined(_DEBUG) || defined(NETLIB_LOG)
@@ -361,8 +361,8 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) {
loadContactList();
// add new skin sound
- SkinAddNewSound("IncomingSecureMessage","Incoming Secure Message","Sounds\\iSecureMessage.wav");
- SkinAddNewSound("OutgoingSecureMessage","Outgoing Secure Message","Sounds\\oSecureMessage.wav");
+ SkinAddNewSound("IncomingSecureMessage",LPGEN("Incoming Secure Message"),"Sounds\\iSecureMessage.wav");
+ SkinAddNewSound("OutgoingSecureMessage",LPGEN("Outgoing Secure Message"),"Sounds\\oSecureMessage.wav");
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("init extra icons");
@@ -383,7 +383,7 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) {
AddHookFunction(ME_CLIST_PREBUILDCONTACTMENU, onRebuildContactMenu);
// g_hMC = HookEvent(ME_MC_SUBCONTACTSCHANGED, onMC);
- if ( ServiceExists(MS_EXTRAICON_REGISTER) ) {
+ if ( ServiceExists(MS_EXTRAICON_REGISTER)) {
g_hCLIcon = ExtraIcon_Register(szModuleName, Translate("SecureIM status"), "sim_cm_est",
onExtraImageListRebuilding,
onExtraImageApplying);
diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp
index a3513522e7..1925f19c09 100644
--- a/plugins/SecureIM/options.cpp
+++ b/plugins/SecureIM/options.cpp
@@ -368,7 +368,7 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR
if ( ptr->keyLoaded ) {
LPSTR buffer = (LPSTR) alloca(RSASIZE);
exp->rsa_export_pubkey(ptr->cntx,buffer);
- if ( !SaveExportRSAKeyDlg(hDlg,buffer,0) )
+ if ( !SaveExportRSAKeyDlg(hDlg,buffer,0))
msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
}
@@ -382,8 +382,8 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR
if(ptr) {
createRSAcntx(ptr);
LPSTR pub = (LPSTR) alloca(RSASIZE);
- if ( !LoadImportRSAKeyDlg(hDlg,pub,0) ) return TRUE;
- if ( exp->rsa_import_pubkey(ptr->cntx,pub) ) {
+ if ( !LoadImportRSAKeyDlg(hDlg,pub,0)) return TRUE;
+ if ( exp->rsa_import_pubkey(ptr->cntx,pub)) {
int len;
exp->rsa_get_pubkey(ptr->cntx,(PBYTE)pub,&len);
@@ -519,11 +519,11 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR
}
CheckMenuItem(hMenu, ID_DISABLED+ptr->tstatus, MF_CHECKED );
if ( ptr->tmode==MODE_NATIVE ) {
- if ( !hasKey(ptr) ) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED );
+ if ( !hasKey(ptr)) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED );
}
else
if ( ptr->tmode==MODE_RSAAES ) {
- if ( !hasKey(ptr) ) {
+ if ( !hasKey(ptr)) {
EnableMenuItem(hMenu, ID_EXPPUBL, MF_GRAYED );
EnableMenuItem(hMenu, ID_DELPUBL, MF_GRAYED );
}
@@ -607,7 +607,7 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM
case IDC_RSA_EXP: {
LPSTR pub = (LPSTR) alloca(RSASIZE);
exp->rsa_export_keypair(CPP_MODE_RSA,NULL,pub,NULL);
- if ( !SaveExportRSAKeyDlg(hDlg,pub,0) )
+ if ( !SaveExportRSAKeyDlg(hDlg,pub,0))
msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION);
return TRUE;
} break;
@@ -617,19 +617,19 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM
if ( res==IDOK ) {
LPSTR priv = (LPSTR) alloca(RSASIZE);
exp->rsa_export_keypair(CPP_MODE_RSA,priv,NULL,passphrase);
- if ( !SaveExportRSAKeyDlg(hDlg,priv,1) )
+ if ( !SaveExportRSAKeyDlg(hDlg,priv,1))
msgbox(hDlg,sim112,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
return TRUE;
} break;
case IDC_RSA_IMPPRIV: {
LPSTR priv = (LPSTR) alloca(RSASIZE);
- if ( !LoadImportRSAKeyDlg(hDlg,priv,1) ) return TRUE;
+ if ( !LoadImportRSAKeyDlg(hDlg,priv,1)) return TRUE;
//
LPSTR passphrase = (LPSTR) alloca(RSASIZE);
int res = DialogBoxParam(g_hInst,MAKEINTRESOURCE(IDD_PASSPHRASE),NULL,(DLGPROC)DlgProcSetPassphrase,(LPARAM)passphrase);
if ( res==IDOK ) {
- if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase) ) {
+ if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase)) {
msgbox(hDlg,sim113,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
else {
@@ -1440,7 +1440,7 @@ void ApplyGeneralSettings(HWND hDlg) {
GetDlgItemText(hDlg,IDC_KET,timeout,5);
tmp = atoi(timeout); if(tmp > 65535) tmp = 65535;
DBWriteContactSettingWord(0,szModuleName,"ket",tmp);
- exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) );
+ exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10));
mir_itoa(tmp,timeout,10);
SetDlgItemText(hDlg,IDC_KET,timeout);
@@ -1496,7 +1496,7 @@ void ApplyGeneralSettings(HWND hDlg) {
else DBWriteContactSettingByte(ptr->hContact, szModuleName, "StatusID", ptr->status);
}
if ( ptr->mode==MODE_NATIVE ) {
- if ( getListViewPSK(hLV,i) ) {
+ if ( getListViewPSK(hLV,i)) {
LPSTR tmp = myDBGetString(ptr->hContact,szModuleName,"tPSK");
DBWriteContactSettingString(ptr->hContact, szModuleName, "PSK", tmp);
mir_free(tmp);
@@ -1508,7 +1508,7 @@ void ApplyGeneralSettings(HWND hDlg) {
}
else
if ( ptr->mode==MODE_RSAAES ) {
- if ( !getListViewPUB(hLV,i) ) {
+ if ( !getListViewPUB(hLV,i)) {
DBDeleteContactSetting(ptr->hContact, szModuleName, "rsa_pub");
}
}
diff --git a/plugins/SecureIM/rtfconv.cpp b/plugins/SecureIM/rtfconv.cpp
index 271e62aa5b..994f541373 100644
--- a/plugins/SecureIM/rtfconv.cpp
+++ b/plugins/SecureIM/rtfconv.cpp
@@ -34,13 +34,13 @@ void free_rtfconv () {
void rtfconvA(LPCSTR rtf, LPWSTR plain) {
- pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR) );
+ pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR));
}
void rtfconvW(LPCWSTR rtf, LPWSTR plain) {
- pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR) );
+ pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR));
}
// EOF
diff --git a/plugins/SecureIM/svcs_clist.cpp b/plugins/SecureIM/svcs_clist.cpp
index 359e273562..12402a58be 100644
--- a/plugins/SecureIM/svcs_clist.cpp
+++ b/plugins/SecureIM/svcs_clist.cpp
@@ -82,7 +82,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onExtraImageListRebuilding");
#endif
- if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON) ) {
+ if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) {
RefreshContactListIcons();
}
return 0;
@@ -91,7 +91,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) {
int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) {
- if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam) ) {
+ if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam)) {
IconExtraColumn iec = mode2iec(isContactSecured((HANDLE)wParam));
if ( g_hCLIcon ) {
ExtraIcon_SetIcon(g_hCLIcon, (HANDLE)wParam, iec.hImage);
@@ -152,7 +152,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) {
}
if ( isSecureProto && !isChat && isMiranda &&
- (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES) ) {
+ (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES)) {
// Native/RSAAES
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIM_ICON;
if ( !isSecured ) {
@@ -167,7 +167,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) {
}
// set status menu
if ( bSCM && !bMC &&
- ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) {
+ ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) {
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
mi.hIcon = g_hICO[ICO_ST_DIS+ptr->status];
@@ -182,7 +182,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) {
}
}
else
- if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG) ) {
+ if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG)) {
// PGP, GPG
if ( ptr->mode==MODE_PGP && bPGPloaded ) {
if ((bPGPkeyrings || bPGPprivkey) && !isGPG) {
@@ -200,7 +200,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) {
if ( isSecureProto && !isChat && isMiranda ) {
// set mode menu
if ( bMCM && !bMC &&
- ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) {
+ ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) {
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
mi.hIcon = g_hICO[ICO_OV_NAT+ptr->mode];
diff --git a/plugins/SecureIM/svcs_proto.cpp b/plugins/SecureIM/svcs_proto.cpp
index a69d7d720d..ef8d6c850c 100644
--- a/plugins/SecureIM/svcs_proto.cpp
+++ b/plugins/SecureIM/svcs_proto.cpp
@@ -25,7 +25,7 @@ int getSecureSig(LPCSTR szMsg, LPSTR *szPlainMsg=NULL) {
int returnNoError(HANDLE hContact) {
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID));
SetEvent( hEvent );
return 777;
}
@@ -34,7 +34,7 @@ int returnNoError(HANDLE hContact) {
int returnError(HANDLE hContact, LPCSTR err) {
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID));
SetEvent( hEvent );
return 666;
}
@@ -271,7 +271,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: Native SiG_ENON message");
#endif
- if ( cpp_keyx(ptr->cntx) ) {
+ if ( cpp_keyx(ptr->cntx)) {
// decrypting message
szPlainMsg = decodeMsg(ptr,lParam,szEncMsg);
if (!ptr->decoded) {
@@ -392,7 +392,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) {
// receive KeyB from user;
showPopUpKR(ptr->hContact);
- if ( ptr->cntx && cpp_keyb(ptr->cntx) ) {
+ if ( ptr->cntx && cpp_keyb(ptr->cntx)) {
// reinit key exchange if an old key from user is found
cpp_reset_context(ptr->cntx);
}
@@ -450,7 +450,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) {
}
// auto send my public key to keyB user if not done before
- if ( !cpp_keya(ptr->cntx) ) {
+ if ( !cpp_keya(ptr->cntx)) {
LPSTR keyToSend = InitKeyA(ptr,0); // calculate public and private key
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: Sending KEYA %s", keyToSend);
@@ -534,7 +534,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) {
/* common part (CalcKeyX & SendQueue) */
// calculate KeyX
- if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) )
+ if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx))
CalculateKeyX(ptr,ptr->hContact);
ShowStatusIconNotify(ptr->hContact);
@@ -550,7 +550,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) {
} //switch
// receive message
- if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF) ) {
+ if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF)) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: message received");
#endif
@@ -571,7 +571,7 @@ INT_PTR __cdecl onSendMsgW(WPARAM wParam, LPARAM lParam) {
if (!lParam) return 0;
CCSDATA *ccs = (CCSDATA *) lParam;
- if ( !(ccs->wParam & PREF_UTF) )
+ if ( !(ccs->wParam & PREF_UTF))
ccs->wParam |= PREF_UNICODE;
return onSendMsg(wParam, lParam);
@@ -616,7 +616,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) {
Sent_NetLog("onSendMsg: PGP|GPG mode");
#endif
// åñëè ìîæíî çàøèôðîâàòü - øèôðóåì
- if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact) ) {
+ if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact)) {
/*
if(stat==ID_STATUS_OFFLINE) {
if (msgbox1(0,sim110,szModuleName,MB_YESNO|MB_ICONQUESTION)==IDNO) {
@@ -681,7 +681,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) {
else {
createRSAcntx(ptr);
}
- if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr) ) {
+ if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr)) {
if ( ssig==SiG_NONE ) {
// ïðîñòî øëåì íåçàøèôðîâàííîå â îôôëàéí
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
@@ -729,7 +729,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) {
return returnNoError(pccsd->hContact);
}
// ïðîñòî ñîîáùåíèå (áåç òýãîâ, íåò êîíòåêñòà è ðàáîòàþò AIP & NOL)
- if ( ssig==SiG_NONE && isSecureIM(ptr->hContact) ) {
+ if ( ssig==SiG_NONE && isSecureIM(ptr->hContact)) {
// äîáàâèì åãî â î÷åðåäü
addMsg2Queue(ptr, pccsd->wParam, (LPSTR)pccsd->lParam);
// çàïóñêàåì ïðîöåññ óñòàíîâêè ñîåäèíåíèÿ
@@ -789,7 +789,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onSendMsg: message for offline");
#endif
- if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx) ) {
+ if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx)) {
// reinit key exchange
cpp_reset_context(ptr->cntx);
}
@@ -875,13 +875,13 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) {
return returnNoError(pccsd->hContact);
}
- if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) )
+ if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx))
CalculateKeyX(ptr,ptr->hContact);
ShowStatusIconNotify(pccsd->hContact);
// if cryptokey exist
- if ( cpp_keyx(ptr->cntx) ) {
+ if ( cpp_keyx(ptr->cntx)) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onSendMsg: cryptokey exist");
#endif
@@ -1070,7 +1070,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) {
if ( ptr->fileSend ) {
char **file=ptr->fileSend;
for(int j=0;file[j];j++) {
- if ( strstr(file[j],".AESHELL") ) mir_unlink(file[j]);
+ if ( strstr(file[j],".AESHELL")) mir_unlink(file[j]);
mir_free(file[j]);
}
SAFE_FREE(ptr->fileSend);
@@ -1080,13 +1080,13 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) {
case ACKRESULT_NEXTFILE:
case ACKRESULT_SUCCESS: {
if ( ptr->finFileRecv && ptr->lastFileRecv ) {
- if ( strstr(ptr->lastFileRecv,".AESHELL") ) {
+ if ( strstr(ptr->lastFileRecv,".AESHELL")) {
char buf[MAX_PATH];
LPSTR file_out=mir_strdup(ptr->lastFileRecv);
LPSTR pos=strrchr(file_out,'.'); //find last .
if (pos) *pos='\0'; //remove AESHELL from name
- if ( isFileExist(file_out) ) {
+ if ( isFileExist(file_out)) {
buf[0]='\0';
LPSTR p=strrchr(file_out,'.');
LPSTR x=strrchr(file_out,'\\');
@@ -1096,7 +1096,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) {
}
for(int i=1;i<10000;i++) {
sprintf(pos," (%d)%s",i,buf);
- if ( !isFileExist(file_out) ) break;
+ if ( !isFileExist(file_out)) break;
}
}
@@ -1116,7 +1116,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) {
ptr->finFileRecv = false;
}
if ( ptr->finFileSend && ptr->lastFileSend ) {
- if ( strstr(ptr->lastFileSend,".AESHELL") ) mir_unlink(ptr->lastFileSend);
+ if ( strstr(ptr->lastFileSend,".AESHELL")) mir_unlink(ptr->lastFileSend);
SAFE_FREE(ptr->lastFileSend);
ptr->finFileSend = false;
}
diff --git a/plugins/SecureIM/svcs_srmm.cpp b/plugins/SecureIM/svcs_srmm.cpp
index ea7b8be780..688246847e 100644
--- a/plugins/SecureIM/svcs_srmm.cpp
+++ b/plugins/SecureIM/svcs_srmm.cpp
@@ -13,12 +13,12 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) {
int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
- if ( isProtoMetaContacts(hContact) )
+ if ( isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if ( strcmp(sicd->szModule, szModuleName) != 0 ||
- !isSecureProtocol(hContact) ) return 0; // not our event
+ !isSecureProtocol(hContact)) return 0; // not our event
BOOL isPGP = isContactPGP(hContact);
BOOL isGPG = isContactGPG(hContact);
diff --git a/plugins/SeenPlugin/main.c b/plugins/SeenPlugin/main.c
index 8dd6f643e3..dd9a91b840 100644
--- a/plugins/SeenPlugin/main.c
+++ b/plugins/SeenPlugin/main.c
@@ -91,26 +91,24 @@ int MainInit(WPARAM wparam,LPARAM lparam)
if(DBGetContactSettingByte(NULL,S_MOD,"MissedOnes",0))
ehmissed_proto=HookEvent(ME_PROTO_ACK,ModeChange_mo);
-// SetOffline();
+ ehdb = HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UpdateValues);
+ ehproto = HookEvent(ME_PROTO_ACK,ModeChange);
- ehdb=HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UpdateValues);
- ehproto=HookEvent(ME_PROTO_ACK,ModeChange);
-
- SkinAddNewSoundEx("LastSeenTrackedStatusChange",Translate("LastSeen"),Translate("User status change"));
- SkinAddNewSoundEx("LastSeenTrackedStatusOnline",Translate("LastSeen"),Translate("Changed to Online"));
- SkinAddNewSoundEx("LastSeenTrackedStatusOffline",Translate("LastSeen"),Translate("User Logged Off"));
- SkinAddNewSoundEx("LastSeenTrackedStatusFromOffline",Translate("LastSeen"),Translate("User Logged In"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusChange", LPGEN("LastSeen"), LPGEN("User status change"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusOnline", LPGEN("LastSeen"), LPGEN("Changed to Online"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusOffline", LPGEN("LastSeen"), LPGEN("User Logged Off"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusFromOffline", LPGEN("LastSeen"), LPGEN("User Logged In"));
+
// known modules list
if (ServiceExists("DBEditorpp/RegisterSingleModule"))
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)S_MOD, 0);
DBWriteContactSettingString(NULL,"Uninstall",Translate("Last seen"),S_MOD);
- if (ServiceExists(MS_TIPPER_ADDTRANSLATION)) {
- int i=0;
- for (i=0;i<TRANSNUMBER;i++) {
- CallService(MS_TIPPER_ADDTRANSLATION,0,(LPARAM)&idleTr[i]);
- }
+ if ( ServiceExists(MS_TIPPER_ADDTRANSLATION)) {
+ int i;
+ for (i=0; i < TRANSNUMBER; i++)
+ CallService(MS_TIPPER_ADDTRANSLATION, 0, (LPARAM)&idleTr[i]);
}
return 0;
diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp
index 9ae8bae627..cc450c12e4 100644
--- a/plugins/SimpleStatusMsg/options.cpp
+++ b/plugins/SimpleStatusMsg/options.cpp
@@ -285,8 +285,8 @@ static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
case WM_COMMAND:
if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE)
- || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS) )
- ) && (HWND)lParam == GetFocus() )
+ || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS))
+ ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch (LOWORD(wParam))
{
@@ -1552,8 +1552,8 @@ static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wPa
case WM_COMMAND:
if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE)
- || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO) )
- ) && (HWND)lParam == GetFocus() )
+ || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO))
+ ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch (LOWORD(wParam))
{
diff --git a/plugins/SmileyAdd/smileys.cpp b/plugins/SmileyAdd/smileys.cpp
index 84dc16b6a9..f94eb70580 100644
--- a/plugins/SmileyAdd/smileys.cpp
+++ b/plugins/SmileyAdd/smileys.cpp
@@ -1125,7 +1125,7 @@ void SmileyLookup::find(const bkstring& str, SmileyLocVecType& smlcur, bool firs
if (m_text.empty())
{
_TMatcher* matcher = m_pattern->createTMatcher(str);
- while( matcher->findNextMatch() )
+ while( matcher->findNextMatch())
{
bkstring::size_type st = matcher->getStartingIndex();
bkstring::size_type sz = matcher->getEndingIndex() - st;
diff --git a/plugins/SpellChecker/commons.h b/plugins/SpellChecker/commons.h
index f40628c0cb..7243704560 100644
--- a/plugins/SpellChecker/commons.h
+++ b/plugins/SpellChecker/commons.h
@@ -97,7 +97,7 @@ extern BOOL uinfoex_enabled;
extern BOOL variables_enabled;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; }
diff --git a/plugins/SpellChecker/hunspell/affixmgr.cxx b/plugins/SpellChecker/hunspell/affixmgr.cxx
index b9108d45e3..ae72f70270 100644
--- a/plugins/SpellChecker/hunspell/affixmgr.cxx
+++ b/plugins/SpellChecker/hunspell/affixmgr.cxx
@@ -821,7 +821,7 @@ int AffixMgr::build_pfxtree(PfxEntry* pfxptr)
pptr = NULL;
for (;;) {
pptr = ptr;
- if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) {
+ if (strcmp(ep->getKey(), ptr->getKey()) <= 0) {
ptr = ptr->getNextEQ();
if (!ptr) {
pptr->setNextEQ(ep);
@@ -885,7 +885,7 @@ int AffixMgr::build_sfxtree(SfxEntry* sfxptr)
pptr = NULL;
for (;;) {
pptr = ptr;
- if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) {
+ if (strcmp(ep->getKey(), ptr->getKey()) <= 0) {
ptr = ptr->getNextEQ();
if (!ptr) {
pptr->setNextEQ(ep);
@@ -965,7 +965,7 @@ int AffixMgr::process_pfx_order()
PfxEntry * nptr = ptr->getNext();
for (; nptr != NULL; nptr = nptr->getNext()) {
- if (! isSubset( ptr->getKey() , nptr->getKey() )) break;
+ if (! isSubset( ptr->getKey() , nptr->getKey())) break;
}
ptr->setNextNE(nptr);
ptr->setNextEQ(NULL);
diff --git a/plugins/SpellChecker/hunspell/csutil.cxx b/plugins/SpellChecker/hunspell/csutil.cxx
index dd89c19090..35154a73ed 100644
--- a/plugins/SpellChecker/hunspell/csutil.cxx
+++ b/plugins/SpellChecker/hunspell/csutil.cxx
@@ -5422,14 +5422,14 @@ static void toAsciiLowerAndRemoveNonAlphanumeric( const char* pName, char* pBuf
while ( *pName )
{
/* A-Z */
- if ( (*pName >= 0x41) && (*pName <= 0x5A) )
+ if ( (*pName >= 0x41) && (*pName <= 0x5A))
{
*pBuf = (*pName)+0x20; /* toAsciiLower */
pBuf++;
}
/* a-z, 0-9 */
else if ( ((*pName >= 0x61) && (*pName <= 0x7A)) ||
- ((*pName >= 0x30) && (*pName <= 0x39)) )
+ ((*pName >= 0x30) && (*pName <= 0x39)))
{
*pBuf = *pName;
pBuf++;
diff --git a/plugins/SpellChecker/hunspell/phonet.cxx b/plugins/SpellChecker/hunspell/phonet.cxx
index 144bd40d08..3a849b4444 100644
--- a/plugins/SpellChecker/hunspell/phonet.cxx
+++ b/plugins/SpellChecker/hunspell/phonet.cxx
@@ -140,10 +140,10 @@ int phonet (const char * inword, char * target,
|| (*s == '^'
&& (i == 0 || ! myisalpha(word[i-1]))
&& (*(s+1) != '$'
- || (! myisalpha(word[i+k0]) )))
+ || (! myisalpha(word[i+k0]))))
|| (*s == '$' && i > 0
&& myisalpha(word[i-1])
- && (! myisalpha(word[i+k0]) )))
+ && (! myisalpha(word[i+k0]))))
{
/** search for followup rules, if: **/
/** parms.followup and k > 1 and NO '-' in searchstring **/
diff --git a/plugins/SpellChecker/spellchecker.cpp b/plugins/SpellChecker/spellchecker.cpp
index 348e15a51c..09802db20e 100644
--- a/plugins/SpellChecker/spellchecker.cpp
+++ b/plugins/SpellChecker/spellchecker.cpp
@@ -1607,7 +1607,7 @@ BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len,
// See if it has only '-'s
BOOL has_valid_char = FALSE;
for (int i = sel.cpMin; i < sel.cpMax && !has_valid_char; i++)
- has_valid_char = ( text[i - first_char] != _T('-') );
+ has_valid_char = ( text[i - first_char] != _T('-'));
return has_valid_char;
}
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp
index 09ded3aeb2..3f69e77ca5 100644
--- a/plugins/SplashScreen/src/bitmap_funcs.cpp
+++ b/plugins/SplashScreen/src/bitmap_funcs.cpp
@@ -304,7 +304,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha)
MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
index 9213b915bb..c969b5c98a 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
@@ -146,7 +146,7 @@ void LoadOptions( OBJLIST<TAAAProtoSetting>& loadSettings, BOOL override)
if (!override) {
if (loadSettings[i].optionFlags & FLAG_MONITORMIRANDA)
monitorMiranda = TRUE;
- else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard) )
+ else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard))
monitorAll = TRUE;
} }
@@ -348,7 +348,7 @@ static VOID CALLBACK AutoAwayTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD
}
else if ( ((mouseStationaryTimer < sts1Time) && (!screenSaver) && (!locked)) &&
((aas.optionFlags&FLAG_LV2ONINACTIVE) || (!(aas.optionFlags&FLAG_SETNA))) &&
- (aas.optionFlags&FLAG_RESET) ) {
+ (aas.optionFlags&FLAG_RESET)) {
/* from STATUS1_SET to SET_ORGSTATUS */
changeState(aas, SET_ORGSTATUS);
}
@@ -478,14 +478,14 @@ static LRESULT CALLBACK MirandaMouseHookFunction(int code, WPARAM wParam, LPARAM
static LRESULT CALLBACK MirandaKeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hMirandaKeyBoardHook, code, wParam, lParam);
}
}
@@ -537,14 +537,14 @@ static LRESULT CALLBACK MouseHookFunction(int code, WPARAM wParam, LPARAM lParam
static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hKeyBoardHook, code, wParam, lParam);
}
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
index 3fd52ffec1..5e85f2d841 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
@@ -43,7 +43,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DWORD protoModeMsgFlags = 0;
for ( i=0; i < protoCount; i++ ) {
- if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)) )
+ if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)))
continue;
protoModeMsgFlags |= CallProtoService( proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0 );
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
@@ -144,7 +144,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
for ( i=0; i < count; i++ ) {
DBWriteContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
- if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0) )
+ if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0))
DBWriteContactSettingString(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
}
break;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
index 29b17ac44c..a4101b1b88 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp
@@ -187,7 +187,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
else
flags = 0;
for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++) {
- if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame) ) {
+ if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
lvItem.pszText = ( TCHAR* )CallService( MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
lvItem.lParam = ( LPARAM )statusModePf2List[i];
ListView_InsertItem(hList,&lvItem);
@@ -390,7 +390,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
break;
case WM_COMMAND:
- if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus() )
+ if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
@@ -494,7 +494,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara
break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
index e803c2dab4..edecc8f947 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp
@@ -35,10 +35,10 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) {
}
break;
case SET_ORGSTATUS:
- if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) ) {
+ if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0))) {
bReport = TRUE;;
}
- if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) ) {
+ if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0))) {
bReport = TRUE;;
}
break;
@@ -54,12 +54,12 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) {
szProto = DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
_snprintf(setting, sizeof(setting), "%s_Lv1Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
bReport = TRUE;
}
_snprintf(setting, sizeof(setting), "%s_Lv2Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
bReport = TRUE;
}
}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 5ef0b59b09..ba69168422 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -215,7 +215,7 @@ static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy()
ps[i]->szMsg = NULL;
ps[i]->szName = cs.szName;
ps[i]->tszAccName = cs.tszAccName;
- if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE) ) {
+ if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE)) {
NAS_PROTOINFO npi;
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -306,10 +306,10 @@ static int SetCurrentStatus()
ps = GetCurrentProtoSettingsCopy();
for (i=0;i<connectionSettings.getCount();i++) {
realStatus = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0);
- if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0)) ) { // ignore this proto by removing it's name (not so nice)
+ if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0))) { // ignore this proto by removing it's name (not so nice)
ps[i]->szName = "";
}
- else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)) ) {
+ else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE))) {
// force offline before reconnecting
log_infoA("KeepStatus: Setting %s offline before making a new connection attempt", ps[i]->szName);
CallProtoService(ps[i]->szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -356,7 +356,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM lParam)
for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName))
@@ -379,7 +379,7 @@ static int CSStatusChangeEx(WPARAM wParam, LPARAM lParam)
for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) {
if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED)
@@ -401,7 +401,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId);
if ( timer & IDT_PROCESSACK ) {
res = (processAckTimerId == 0)?0:1;
- if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart) ) {
+ if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, processAckTimerId);
@@ -413,7 +413,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONN ) {
res = (checkConnectionTimerId == 0?0:1)||res;
- if ( (checkConnectionTimerId == 0) || (restart) ) {
+ if ( (checkConnectionTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectionTimerId);
@@ -425,7 +425,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_AFTERCHECK ) {
res = (afterCheckTimerId==0?0:1)||res;
- if ( (afterCheckTimerId == 0) || (restart) ) {
+ if ( (afterCheckTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, afterCheckTimerId);
@@ -437,7 +437,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONTIN ) {
res = (checkContinTimerId==0?0:1)||res;
- if ( (checkContinTimerId == 0) || (restart) ) {
+ if ( (checkContinTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkContinTimerId);
@@ -450,7 +450,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart)
if ( timer & IDT_CHECKCONNECTING ) {
res = (checkConnectingTimerId==0?0:1)||res;
- if ( (checkConnectingTimerId == 0) || (restart) ) {
+ if ( (checkConnectingTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectingTimerId);
@@ -559,7 +559,7 @@ static int ProcessProtoAck(WPARAM wParam,LPARAM lParam)
char dbSetting[128];
int i;
- if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN) )
+ if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN))
return 0;
mir_snprintf(dbSetting, sizeof(dbSetting), "%s_enabled", ack->szModule);
@@ -648,7 +648,7 @@ static VOID CALLBACK CheckConnectingTimer(HWND hwnd,UINT message,UINT_PTR idEven
if (curStatus < MAX_CONNECT_RETRIES) { // connecting
maxConnectingTime = DBGetContactSettingDword(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0);
if (maxConnectingTime > 0) {
- if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000) ) {
+ if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000)) {
// set offline
log_infoA("KeepStatus: %s is too long connecting; setting offline", cs.szName);
CallProtoService(cs.szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -710,7 +710,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven
shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) ) {
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) {
setStatus = TRUE;
if (showConnectionPopups)
hIcon = (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)cs.szName, (LPARAM)SKINICON_STATUS_OFFLINE);
@@ -721,7 +721,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven
if (increaseExponential)
currentDelay = min(2*currentDelay,maxDelay);
- if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult)) ) {
+ if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult))) {
// no network
NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_RETRYNOCONN, (LPARAM)retryCount+1);
ProcessPopup(KS_CONN_STATE_RETRYNOCONN, 0);
@@ -779,7 +779,7 @@ static VOID CALLBACK AfterCheckTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWO
shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED) // (on ignoring proto)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) )
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS))
setStatus = TRUE;
}
@@ -853,9 +853,9 @@ static void CheckContinueslyFunction(void *arg)
}
if (bLastPingResult == FALSE) {
start = dbv.pszVal;
- while ( (*start != '\0') && (!bLastPingResult) ) {
+ while ( (*start != '\0') && (!bLastPingResult)) {
end = start;
- while ( (*end != ' ') && (*end != '\0') )
+ while ( (*end != ' ') && (*end != '\0'))
end++;
memset(host, '\0', sizeof(host));
strncpy(host, start, end-start);
@@ -888,7 +888,7 @@ static void CheckContinueslyFunction(void *arg)
return; // already connecting, leave
}
- if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT))) ) {
+ if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT)))) {
pingFailures = 0;
int count;
@@ -1022,7 +1022,7 @@ static int ProcessPopup(int reason, LPARAM lParam)
}
}
if (strlen(protoInfo) > 0) {
- // cut the last end of line (this may also be the first one ;) )
+ // cut the last end of line (this may also be the first one ;))
*(protoInfo + strlen(protoInfo) - 2) = '\0';
}
if (szProto != NULL)
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index 06ae43e3df..4615d78895 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -98,7 +98,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L
break;
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
// something changed
switch (LOWORD(wParam)) {
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg,UINT msg,WPARAM wParam,LPA
break;
}
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
// something changed
switch (LOWORD(wParam)) {
@@ -329,7 +329,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
@@ -435,7 +435,7 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
// wincolors
CheckDlgButton(hwndDlg, IDC_WINCOLORS, DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0));
// defaultcolors
- CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) ));
+ CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
@@ -495,8 +495,8 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
ppd.lchContact = NULL;
ppd.lchIcon = (HICON)CallService(MS_SKIN_LOADICON, (WPARAM)SKINICON_STATUS_OFFLINE, 0);
- strcpy( ppd.lpzContactName, Translate("KeepStatus") );
- strcpy( ppd.lpzText, Translate("You broke the Internet!") );
+ strcpy( ppd.lpzContactName, Translate("KeepStatus"));
+ strcpy( ppd.lpzText, Translate("You broke the Internet!"));
if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
else if (IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))
diff --git a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
index adbc8716c8..8421460d2f 100644
--- a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp
@@ -130,10 +130,10 @@ static int KeepStatusEvent(WPARAM wParam, LPARAM lParam) {
break;
case KS_CONN_STATE_STOPPEDCHECKING:
- if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)) )
+ if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)))
continue;
- if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)) )
+ if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)))
continue;
break;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 9227ae7f62..a790561310 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -664,7 +664,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, ps->szMsg);
bStatusMsg = ( (((CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND&~PF1_INDIVMODEMSG)) &&
- (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST) );
+ (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST));
}
EnableWindow(GetDlgItem(hwndDlg, IDC_MIRANDAMSG), bStatusMsg);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMMSG), bStatusMsg);
@@ -720,7 +720,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
}
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()))
if ( bInitDone )
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index cc98753df6..309c249a6a 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -189,7 +189,7 @@ char *GetStatusMessage(int profile, char *szProto)
DBVARIANT dbv;
for ( int i=0; i < pceCount; i++ ) {
- if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto)) ) {
+ if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) {
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
if (!DBGetContactSetting(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
pce[i].msg = ( char* )realloc(pce[i].msg, strlen(dbv.pszVal)+1);
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
index c9ad54ebb7..7028868272 100644
--- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp
@@ -334,7 +334,7 @@ static int Exit(WPARAM wParam, LPARAM lParam)
mir_free(npi.szMsg);
} } } }
- if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0)) ) {
+ if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))) {
if (ServiceExists(MS_CLIST_SETSTATUSMODE))
CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0);
else
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp
index f0e4a824eb..fb9bac079e 100644
--- a/plugins/StatusPlugins/commonstatus.cpp
+++ b/plugins/StatusPlugins/commonstatus.cpp
@@ -85,14 +85,14 @@ DWORD StatusModeToProtoFlag(int status)
int GetActualStatus(PROTOCOLSETTINGEX *protoSetting)
{
if (protoSetting->status == ID_STATUS_LAST) {
- if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS) )
+ if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS))
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
return protoSetting->lastStatus;
}
if (protoSetting->status == ID_STATUS_CURRENT)
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
- if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH) ) {
+ if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH)) {
log_debugA("invalid status detected: %d", protoSetting->status);
return 0;
}
@@ -227,7 +227,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
}
// fill the array of proto message for NAS, this will be used anyway
for (i=0;i<protoList->getCount();i++) {
- if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL) ) {
+ if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL)) {
continue;
}
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -248,12 +248,12 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
for (i=0;i<protoList->getCount();i++) {
msgCount = 0;
for (j=i;j<protoList->getCount();j++) {
- if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j])) ) {
+ if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j]))) {
msgCount += 1;
//log_infoA("Adding %s (%u) to %s (%u)", protoSettings[j]->szName, protoSettings[j]->status, protoSettings[i]->szName, protoSettings[i]->status);
}
}
- if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1)) ) {
+ if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1))) {
maxMsgCount = msgCount;
nasGlobalMsg = _strdup(nasProtoMessages[i]);
}
@@ -281,7 +281,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus)
npi.szMsg = mir_strdup(protoSettings[i]->szMsg);
log_infoA("CommonStatus will set status %u for %s and message specified by plugin using NAS (%x)", npi.status, npi.szProto, npi.szMsg);
}
- else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg)) ) {
+ else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg))) {
npi.szMsg = NULL;
log_infoA("CommonStatus will set status %u for %s and global message using NAS", npi.status, npi.szProto);
}
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp
index a6073d2373..f1a2dbf94b 100644
--- a/plugins/StatusPlugins/confirmdialog.cpp
+++ b/plugins/StatusPlugins/confirmdialog.cpp
@@ -141,7 +141,7 @@ static int SetStatusList(HWND hwndDlg)
}
// status message
- if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus)))) ) {
+ if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))) {
TCHAR *msg = GetDefaultStatusMessage( &confirmSettings[i], actualStatus );
if ( msg != NULL ) {
TCHAR* fMsg = variables_parsedup( msg, confirmSettings[i].tszAccName, NULL );
@@ -233,7 +233,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
// stop timer
KillTimer(hwndDlg, TIMER_ID);
SetDlgItemText(hwndDlg, IDC_CLOSE, TranslateT("Close"));
- if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK) ) { // something clicked
+ if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK)) { // something clicked
switch (LOWORD(wParam)) {
case IDC_PROFILE:
{
@@ -288,9 +288,9 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
else ListView_SetItemText(GetDlgItem(hwndDlg,IDC_STARTUPLIST), lvItem.iItem, 1,
( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR ));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT) )
+ else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
else
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), (CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))?TRUE:FALSE);
@@ -378,7 +378,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
for ( i = 0; i < SIZEOF(statusModeList); i++ ) {
- if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i])))) ) {
+ if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i]))))) {
TCHAR* statusMode = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR);
item = SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_ADDSTRING,0,(LPARAM)statusMode);
SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_SETITEMDATA,item,(LPARAM)statusModeList[i]);
@@ -388,7 +388,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
// enable status box
EnableWindow(GetDlgItem(hwndDlg,IDC_STATUS), (ListView_GetNextItem(GetDlgItem(hwndDlg,IDC_STARTUPLIST),-1,LVNI_SELECTED)>=0));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
else if ( proto->status == ID_STATUS_LAST || proto->status == ID_STATUS_CURRENT )
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index ab8c34d450..c4943f8e0f 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -161,7 +161,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
// if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
if ( (!plSets->InfTalkProtection.Get() || tstring::npos==message.find(infTalkProtPrefix))
- && (!plSets->MaxQuestCount.Get() || DBGetContactSettingDword(hContact, pluginName, questCountSetting, 0) < plSets->MaxQuestCount.Get()) )
+ && (!plSets->MaxQuestCount.Get() || DBGetContactSettingDword(hContact, pluginName, questCountSetting, 0) < plSets->MaxQuestCount.Get()))
{
// send question
tstring q = infTalkProtPrefix + variables_parse((tstring)(plSets->Question), hContact);
diff --git a/plugins/Svc_dbepp/exportimport.cpp b/plugins/Svc_dbepp/exportimport.cpp
index 2ac8d04e6e..14faf47198 100644
--- a/plugins/Svc_dbepp/exportimport.cpp
+++ b/plugins/Svc_dbepp/exportimport.cpp
@@ -131,7 +131,7 @@ void exportModule(HANDLE hContact, char* module, FILE* file)
{
int j;
char *data = NULL;
- if (!(data = (char*)mir_alloc( 3*(dbv.cpbVal+1)*sizeof(char)) ))
+ if (!(data = (char*)mir_alloc( 3*(dbv.cpbVal+1)*sizeof(char))))
break;
data[0] = '\0';
for (j=0; j<dbv.cpbVal; j++)
@@ -479,7 +479,7 @@ void importSettings(HANDLE hContact, char *importstring )
hContact = temp;
}
}
- else if (importstring[i] == '[' && !strchr(&importstring[i+1],'=') )// get the module
+ else if (importstring[i] == '[' && !strchr(&importstring[i+1],'='))// get the module
{
if (end = strpbrk(&importstring[i+1], "]")) {
if ((end+1) != '\0') *end = '\0';
diff --git a/plugins/Svc_dbepp/main.cpp b/plugins/Svc_dbepp/main.cpp
index 7ec81267a3..0c7eec1a0f 100644
--- a/plugins/Svc_dbepp/main.cpp
+++ b/plugins/Svc_dbepp/main.cpp
@@ -101,7 +101,7 @@ int DBSettingChanged(WPARAM wParam,LPARAM lParam)
for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (!mir_strcmp(cws->szModule, WatchListArray.item[i].module))
{
diff --git a/plugins/Svc_dbepp/moduletree.cpp b/plugins/Svc_dbepp/moduletree.cpp
index 231275c5c0..c927851ecc 100644
--- a/plugins/Svc_dbepp/moduletree.cpp
+++ b/plugins/Svc_dbepp/moduletree.cpp
@@ -315,8 +315,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t
}
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -358,8 +358,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t
}
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -405,8 +405,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t
}
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -975,7 +975,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i
if (WatchListArray.item)
for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (!mir_strcmp(module, WatchListArray.item[i].module) && !WatchListArray.item[i].setting)
{
diff --git a/plugins/Svc_dbepp/settinglist.cpp b/plugins/Svc_dbepp/settinglist.cpp
index ab2f5652e0..5fff4fed21 100644
--- a/plugins/Svc_dbepp/settinglist.cpp
+++ b/plugins/Svc_dbepp/settinglist.cpp
@@ -126,7 +126,7 @@ void additem(HWND hwnd2Settings,HANDLE hContact, char* module, char* setting, in
case DBVT_BLOB:
{
int j;
- if (!(data = (char*)mir_realloc(data, 3*(dbv.cpbVal+1)+10) ))
+ if (!(data = (char*)mir_realloc(data, 3*(dbv.cpbVal+1)+10)))
{msg(Translate("Couldnt allocate enough memory!"), modFullname); return;}
data[0] = '\0';
for (j=0; j<dbv.cpbVal; j++)
@@ -1026,7 +1026,7 @@ void SettingsListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here
// check if the setting is being watched and if it is then check the menu item
for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (WatchListArray.item[i].WatchModule == WATCH_MODULE) continue;
diff --git a/plugins/TabSRMM/chat/options.cpp b/plugins/TabSRMM/chat/options.cpp
index a00a87161b..28f0362869 100644
--- a/plugins/TabSRMM/chat/options.cpp
+++ b/plugins/TabSRMM/chat/options.cpp
@@ -1463,18 +1463,19 @@ int OptionsInit(void)
g_Settings.hGroup = 0;
LoadGlobalSettings();
g_Settings.Highlight = new CMUCHighlight();
- SkinAddNewSoundEx("ChatMessage", "Group chats", "Incoming message");
- SkinAddNewSoundEx("ChatSent", "Group chats", "Outgoing message");
- SkinAddNewSoundEx("ChatHighlight", "Group chats", "Message is highlighted");
- SkinAddNewSoundEx("ChatAction", "Group chats", "User has performed an action");
- SkinAddNewSoundEx("ChatJoin", "Group chats", "User has joined");
- SkinAddNewSoundEx("ChatPart", "Group chats", "User has left");
- SkinAddNewSoundEx("ChatKick", "Group chats", "User has kicked some other user");
- SkinAddNewSoundEx("ChatMode", "Group chats", "User's status was changed");
- SkinAddNewSoundEx("ChatNick", "Group chats", "User has changed name");
- SkinAddNewSoundEx("ChatNotice", "Group chats", "User has sent a notice");
- SkinAddNewSoundEx("ChatQuit", "Group chats", "User has disconnected");
- SkinAddNewSoundEx("ChatTopic", "Group chats", "The topic has been changed");
+
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatSent", LPGEN("Group chats"), LPGEN("Outgoing message"));
+ SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE);
hFont = CreateFontIndirect(&lf);
diff --git a/plugins/TabSRMM/docs/changelog.txt b/plugins/TabSRMM/docs/changelog.txt
index d5d1f52406..0bd0ebd908 100644
--- a/plugins/TabSRMM/docs/changelog.txt
+++ b/plugins/TabSRMM/docs/changelog.txt
@@ -667,7 +667,7 @@ Version 2.0.0.4 - 2007/12/23
menu bar.
! fixed untranslateable strings in the container options dialog
- disabled skin editor for tabsrmm (still not complete, avoid confusing
- people :) ).
+ people :)).
! fixed minor issue with double icons in status bar (on rare occasions)
! fixed skin drawing on multimonitor systems (patch by Bryan)
diff --git a/plugins/TabSRMM/docs/readme.txt b/plugins/TabSRMM/docs/readme.txt
index c1326b6b12..9f39dd28bf 100644
--- a/plugins/TabSRMM/docs/readme.txt
+++ b/plugins/TabSRMM/docs/readme.txt
@@ -86,7 +86,7 @@ Lots of people provided useful suggestions, feature requests and bug reports dur
the development phase. I cannot name you all here, because it's just too many.
* The Miranda-IM development team and all contributors for making the best
- IM client on this planet (and probably in the entire universe :) )
+ IM client on this planet (and probably in the entire universe :))
* sryo (teodalton@yahoo.com) for the minimal icons.
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index d10459da58..5181022eac 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -2202,7 +2202,7 @@ buttons_done:
* hwnd: handle of a message dialog.
*
* returns the tab index (zero based), -1 if no tab is found (which SHOULD not
- * really happen, but who knows... ;) )
+ * really happen, but who knows... ;))
*/
int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd)
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index b08957e938..d889bb2bca 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1320,7 +1320,7 @@ HWND TSAPI DM_CreateClist(TWindowData *dat)
HWND hwndClist = CreateWindowExA(0, "CListControl", "", WS_TABSTOP | WS_VISIBLE | WS_CHILD | 0x248,
184, 0, 30, 30, dat->hwnd, (HMENU)IDC_CLIST, g_hInst, NULL);
- //MAD: fix for little bug, when following code didn't work (another hack :) )
+ //MAD: fix for little bug, when following code didn't work (another hack :))
HANDLE hItem;
SendMessage(hwndClist, WM_TIMER, 14, 0);
//
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 07a4462386..a1c7d1033e 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -137,26 +137,26 @@ void CGlobals::reloadSystemStartup()
HDC hScrnDC;
DBVARIANT dbv = {0};
- m_WinVerMajor = WinVerMajor();
- m_WinVerMinor = WinVerMinor();
- m_bIsXP = IsWinVerXPPlus();
- m_bIsVista = IsWinVerVistaPlus();
- m_bIsWin7 = IsWinVer7Plus();
+ m_WinVerMajor = WinVerMajor();
+ m_WinVerMinor = WinVerMinor();
+ m_bIsXP = IsWinVerXPPlus();
+ m_bIsVista = IsWinVerVistaPlus();
+ m_bIsWin7 = IsWinVer7Plus();
::LoadTSButtonModule();
::RegisterTabCtrlClass();
CTip::registerClass();
- dwThreadID = GetCurrentThreadId();
+ dwThreadID = GetCurrentThreadId();
- PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT));
+ PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT));
TranslateMenu(g_hMenuContext);
- SkinAddNewSoundEx("RecvMsgActive", "Instant messages", "Incoming (Focused Window)");
- SkinAddNewSoundEx("RecvMsgInactive", "Instant messages", "Incoming (Unfocused Window)");
- SkinAddNewSoundEx("AlertMsg", "Instant messages", "Incoming (New Session)");
- SkinAddNewSoundEx("SendMsg", "Instant messages", "Outgoing");
- SkinAddNewSoundEx("SendError", "Instant messages", "Message send error");
+ SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (Focused Window)"));
+ SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)"));
+ SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (New Session)"));
+ SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing"));
+ SkinAddNewSoundEx("SendError", LPGEN("Instant messages"), LPGEN("Message send error"));
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
@@ -348,16 +348,16 @@ void CGlobals::reloadSettings(bool fReloadSkins)
*/
void CGlobals::reloadAdv()
{
- g_bDisableAniAvatars= M->GetByte("adv_DisableAniAvatars", 0);
- g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0);
- m_dontUseDefaultKbd= M->GetByte("adv_leaveKeyboardAlone", 1);
- g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0);
+ g_bDisableAniAvatars = M->GetByte("adv_DisableAniAvatars", 0);
+ g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0);
+ m_dontUseDefaultKbd = M->GetByte("adv_leaveKeyboardAlone", 1);
+ g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0);
if(g_bSoundOnTyping && m_TypingSoundAdded == false) {
- SkinAddNewSoundEx("SoundOnTyping", "Other", "TABSRMM: Typing");
+ SkinAddNewSoundEx("SoundOnTyping", LPGEN("Other"), LPGEN("TABSRMM: Typing"));
m_TypingSoundAdded = true;
}
- m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0);
+ m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0);
}
const HMENU CGlobals::getMenuBar()
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 770b415110..de5b221208 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -63,7 +63,7 @@ static int g_status_events[] = {
};
static int g_status_events_size = 0;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
BOOL TSAPI IsStatusEvent(int eventType)
{
@@ -412,7 +412,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId)
case ID_TABMENU_LEAVECHATROOM: {
if (dat && dat->bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = (SESSION_INFO *)dat->si;
- if ( (si != NULL) && (dat->hContact != NULL) ) {
+ if ( (si != NULL) && (dat->hContact != NULL)) {
char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, (WPARAM)dat->hContact, 0 );
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 71b5138bd6..f57b381e3b 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -558,9 +558,9 @@ int TN_ModuleInit()
mi.pszPopupName = LPGEN("PopUps");
hDisableMenu = Menu_AddMainMenuItem(&mi);
}
- SkinAddNewSoundEx("TNStart", "Instant messages", "Contact started typing");
- SkinAddNewSoundEx("TNStop", "Instant messages", "Contact stopped typing");
+ SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
return 0;
}
diff --git a/plugins/TabSRMM/tabmodplus/modplus.cpp b/plugins/TabSRMM/tabmodplus/modplus.cpp
index 8ac2e5d698..ce9e863f34 100644
--- a/plugins/TabSRMM/tabmodplus/modplus.cpp
+++ b/plugins/TabSRMM/tabmodplus/modplus.cpp
@@ -63,7 +63,7 @@ static char* getMirVer(HANDLE hContact)
if ( !szProto )
return (NULL);
- if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv) ) {
+ if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv)) {
msg=mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -76,7 +76,7 @@ static TCHAR* getMenuEntry(int i) {
DBVARIANT dbv = {0};
mir_snprintf(MEntry, 255, "MenuEntry_%u", i);
- if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv) ) {
+ if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv)) {
msg = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
}
@@ -121,7 +121,7 @@ int ModPlus_PreShutdown(WPARAM wparam, LPARAM lparam)
static int RegisterCustomButton(WPARAM wParam,LPARAM lParam)
{
- if ( ServiceExists(MS_BB_ADDBUTTON) ) {
+ if ( ServiceExists(MS_BB_ADDBUTTON)) {
BBButton bbd = {0};
bbd.cbSize = sizeof(BBButton);
bbd.bbbFlags = BBBF_ISIMBUTTON|BBBF_ISLSIDEBUTTON|BBBF_ISPUSHBUTTON;
@@ -261,7 +261,7 @@ int ModPlus_Init(WPARAM wparam,LPARAM lparam)
hEventCBButtonPressed=HookEvent(ME_MSG_BUTTONPRESSED,CustomButtonPressed);
hEventCBInit=HookEvent(ME_MSG_TOOLBARLOADED,RegisterCustomButton);
- if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON) ) {
+ if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON)) {
StatusIconData sid = {0};
sid.cbSize = sizeof(sid);
sid.szModule = (char *)"tabmodplus";
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 8a1a005144..1bac84a5c6 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -163,10 +163,11 @@ int CTooltipNotify::ModulesLoaded(WPARAM wParam, LPARAM lParam)
WriteSettingByte("firstrun", 0);
}
- SkinAddNewSound(SND_ONLINE, "Tooltip Notify: Online", "online.wav");
- SkinAddNewSound(SND_OFFLINE, "Tooltip Notify: Offline", "offline.wav");
- SkinAddNewSound(SND_OTHER, "Tooltip Notify: Other", "other.wav");
- SkinAddNewSound(SND_TYPING, "Tooltip Notify: Typing", "typing.wav");
+ // register fonts
+ SkinAddNewSound(SND_ONLINE, LPGEN("Tooltip Notify: Online"), "online.wav");
+ SkinAddNewSound(SND_OFFLINE, LPGEN("Tooltip Notify: Offline"), "offline.wav");
+ SkinAddNewSound(SND_OTHER, LPGEN("Tooltip Notify: Other"), "other.wav");
+ SkinAddNewSound(SND_TYPING, LPGEN("Tooltip Notify: Typing"), "typing.wav");
RegisterFonts();
diff --git a/plugins/Updater/bzip2-1.0.3/blocksort.c b/plugins/Updater/bzip2-1.0.3/blocksort.c
index d0d662cd4e..8b5e49b6ac 100644
--- a/plugins/Updater/bzip2-1.0.3/blocksort.c
+++ b/plugins/Updater/bzip2-1.0.3/blocksort.c
@@ -513,7 +513,7 @@ void mainSimpleSort ( UInt32* ptr,
j = i;
while ( mainGtU (
ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
+ )) {
ptr[j] = ptr[j-h];
j = j - h;
if (j <= (lo + h - 1)) break;
@@ -527,7 +527,7 @@ void mainSimpleSort ( UInt32* ptr,
j = i;
while ( mainGtU (
ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
+ )) {
ptr[j] = ptr[j-h];
j = j - h;
if (j <= (lo + h - 1)) break;
@@ -541,7 +541,7 @@ void mainSimpleSort ( UInt32* ptr,
j = i;
while ( mainGtU (
ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
+ )) {
ptr[j] = ptr[j-h];
j = j - h;
if (j <= (lo + h - 1)) break;
@@ -848,7 +848,7 @@ void mainSort ( UInt32* ptr,
for (i = h; i <= 255; i++) {
vv = runningOrder[i];
j = i;
- while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
+ while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv)) {
runningOrder[j] = runningOrder[j-h];
j = j - h;
if (j <= (h - 1)) goto zero;
@@ -886,7 +886,7 @@ void mainSort ( UInt32* ptr,
for (j = 0; j <= 255; j++) {
if (j != ss) {
sb = (ss << 8) + j;
- if ( ! (ftab[sb] & SETMASK) ) {
+ if ( ! (ftab[sb] & SETMASK)) {
Int32 lo = ftab[sb] & CLEARMASK;
Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
if (hi > lo) {
@@ -1071,7 +1071,7 @@ void BZ2_blockSort ( EState* s )
budgetInit - budget,
nblock,
(float)(budgetInit - budget) /
- (float)(nblock==0 ? 1 : nblock) );
+ (float)(nblock==0 ? 1 : nblock));
if (budget < 0) {
if (verb >= 2)
VPrintf0 ( " too repetitive; using fallback"
diff --git a/plugins/Updater/bzip2-1.0.3/bzlib.c b/plugins/Updater/bzip2-1.0.3/bzlib.c
index a3015c2533..028ac19d5a 100644
--- a/plugins/Updater/bzip2-1.0.3/bzlib.c
+++ b/plugins/Updater/bzip2-1.0.3/bzlib.c
@@ -165,7 +165,7 @@ int BZ_API(BZ2_bzCompressInit)
if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
- s = BZALLOC( sizeof(EState) );
+ s = BZALLOC( sizeof(EState));
if (s == NULL) return BZ_MEM_ERROR;
s->strm = strm;
@@ -174,9 +174,9 @@ int BZ_API(BZ2_bzCompressInit)
s->ftab = NULL;
n = 100000 * blockSize100k;
- s->arr1 = BZALLOC( n * sizeof(UInt32) );
- s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
- s->ftab = BZALLOC( 65537 * sizeof(UInt32) );
+ s->arr1 = BZALLOC( n * sizeof(UInt32));
+ s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32));
+ s->ftab = BZALLOC( 65537 * sizeof(UInt32));
if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
if (s->arr1 != NULL) BZFREE(s->arr1);
@@ -299,7 +299,7 @@ Bool copy_input_until_stop ( EState* s )
/*-- no input? --*/
if (s->strm->avail_in == 0) break;
progress_in = True;
- ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
+ ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))));
s->strm->next_in++;
s->strm->avail_in--;
s->strm->total_in_lo32++;
@@ -317,7 +317,7 @@ Bool copy_input_until_stop ( EState* s )
/*-- flush/finish end? --*/
if (s->avail_in_expect == 0) break;
progress_in = True;
- ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
+ ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))));
s->strm->next_in++;
s->strm->avail_in--;
s->strm->total_in_lo32++;
@@ -383,7 +383,7 @@ Bool handle_compress ( bz_stream* strm )
progress_in |= copy_input_until_stop ( s );
if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {
flush_RL ( s );
- BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) );
+ BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING));
s->state = BZ_S_OUTPUT;
}
else
@@ -505,7 +505,7 @@ int BZ_API(BZ2_bzDecompressInit)
if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
- s = BZALLOC( sizeof(DState) );
+ s = BZALLOC( sizeof(DState));
if (s == NULL) return BZ_MEM_ERROR;
s->strm = strm;
strm->state = s;
@@ -544,7 +544,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s )
while (True) {
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
- *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+ *( (UChar*)(s->strm->next_out)) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
s->state_out_len--;
s->strm->next_out++;
@@ -612,7 +612,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s )
while (True) {
if (cs_avail_out == 0) goto return_notr;
if (c_state_out_len == 1) break;
- *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+ *( (UChar*)(cs_next_out)) = c_state_out_ch;
BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
c_state_out_len--;
cs_next_out++;
@@ -623,7 +623,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s )
if (cs_avail_out == 0) {
c_state_out_len = 1; goto return_notr;
};
- *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+ *( (UChar*)(cs_next_out)) = c_state_out_ch;
BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
cs_next_out++;
cs_avail_out--;
@@ -714,7 +714,7 @@ Bool unRLE_obuf_to_output_SMALL ( DState* s )
while (True) {
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
- *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+ *( (UChar*)(s->strm->next_out)) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
s->state_out_len--;
s->strm->next_out++;
@@ -763,7 +763,7 @@ Bool unRLE_obuf_to_output_SMALL ( DState* s )
while (True) {
if (s->strm->avail_out == 0) return False;
if (s->state_out_len == 0) break;
- *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
+ *( (UChar*)(s->strm->next_out)) = s->state_out_ch;
BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
s->state_out_len--;
s->strm->next_out++;
@@ -934,7 +934,7 @@ BZFILE* BZ_API(BZ2_bzWriteOpen)
if (ferror(f))
{ BZ_SETERR(BZ_IO_ERROR); return NULL; };
- bzf = malloc ( sizeof(bzFile) );
+ bzf = malloc ( sizeof(bzFile));
if (bzf == NULL)
{ BZ_SETERR(BZ_MEM_ERROR); return NULL; };
@@ -1062,7 +1062,7 @@ void BZ_API(BZ2_bzWriteClose64)
}
}
- if ( !abandon && !ferror ( bzf->handle ) ) {
+ if ( !abandon && !ferror ( bzf->handle )) {
fflush ( bzf->handle );
if (ferror(bzf->handle))
{ BZ_SETERR(BZ_IO_ERROR); return; };
@@ -1078,7 +1078,7 @@ void BZ_API(BZ2_bzWriteClose64)
*nbytes_out_hi32 = bzf->strm.total_out_hi32;
BZ_SETERR(BZ_OK);
- BZ2_bzCompressEnd ( &(bzf->strm) );
+ BZ2_bzCompressEnd ( &(bzf->strm));
free ( bzf );
}
@@ -1107,7 +1107,7 @@ BZFILE* BZ_API(BZ2_bzReadOpen)
if (ferror(f))
{ BZ_SETERR(BZ_IO_ERROR); return NULL; };
- bzf = malloc ( sizeof(bzFile) );
+ bzf = malloc ( sizeof(bzFile));
if (bzf == NULL)
{ BZ_SETERR(BZ_MEM_ERROR); return NULL; };
@@ -1152,7 +1152,7 @@ void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b )
{ BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
if (bzf->initialisedOk)
- (void)BZ2_bzDecompressEnd ( &(bzf->strm) );
+ (void)BZ2_bzDecompressEnd ( &(bzf->strm));
free ( bzf );
}
@@ -1196,7 +1196,7 @@ int BZ_API(BZ2_bzRead)
bzf->strm.next_in = bzf->buf;
}
- ret = BZ2_bzDecompress ( &(bzf->strm) );
+ ret = BZ2_bzDecompress ( &(bzf->strm));
if (ret != BZ_OK && ret != BZ_STREAM_END)
{ BZ_SETERR(ret); return 0; };
diff --git a/plugins/Updater/bzip2-1.0.3/compress.c b/plugins/Updater/bzip2-1.0.3/compress.c
index caf7696011..98e64027d4 100644
--- a/plugins/Updater/bzip2-1.0.3/compress.c
+++ b/plugins/Updater/bzip2-1.0.3/compress.c
@@ -303,7 +303,7 @@ void sendMTFValues ( EState* s )
VPrintf5( " initial group %d, [%d .. %d], "
"has %d syms (%4.1f%%)\n",
nPart, gs, ge, aFreq,
- (100.0 * (float)aFreq) / (float)(s->nMTF) );
+ (100.0 * (float)aFreq) / (float)(s->nMTF));
for (v = 0; v < alphaSize; v++)
if (v >= gs && v <= ge)
@@ -624,7 +624,7 @@ void BZ2_compressBlock ( EState* s, Bool is_last_block )
bsPutUChar ( s, BZ_HDR_B );
bsPutUChar ( s, BZ_HDR_Z );
bsPutUChar ( s, BZ_HDR_h );
- bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) );
+ bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k));
}
if (s->nblock > 0) {
diff --git a/plugins/Updater/bzip2-1.0.3/decompress.c b/plugins/Updater/bzip2-1.0.3/decompress.c
index 311f5668f9..9e692a26fb 100644
--- a/plugins/Updater/bzip2-1.0.3/decompress.c
+++ b/plugins/Updater/bzip2-1.0.3/decompress.c
@@ -209,13 +209,13 @@ Int32 BZ2_decompress ( DState* s )
s->blockSize100k -= BZ_HDR_0;
if (s->smallDecompress) {
- s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );
+ s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16));
s->ll4 = BZALLOC(
((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar)
);
if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR);
} else {
- s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) );
+ s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32));
if (s->tt == NULL) RETURN(BZ_MEM_ERROR);
}
diff --git a/plugins/UserGuide/main.c b/plugins/UserGuide/main.c
index 0adc8dab7a..8fd3f6f818 100644
--- a/plugins/UserGuide/main.c
+++ b/plugins/UserGuide/main.c
@@ -58,7 +58,7 @@ static INT_PTR ShowGuideFile(WPARAM wParam,LPARAM lParam)
if (pszDivider == NULL)
{
pszDirName = "";
- strncpy(pszFileName, dbv.pszVal, strlen(dbv.pszVal) );
+ strncpy(pszFileName, dbv.pszVal, strlen(dbv.pszVal));
}
else
{
diff --git a/plugins/UserInfoEx/Flags/svc_flags.cpp b/plugins/UserInfoEx/Flags/svc_flags.cpp
index 49435ec5c0..ec08f9704c 100644
--- a/plugins/UserInfoEx/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/Flags/svc_flags.cpp
@@ -366,7 +366,7 @@ static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam) {
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
if ((HANDLE)wParam!=NULL)return 0;
if (!lstrcmpA(dbcws->szModule, "ExtraIcons") &&
- !lstrcmpA(dbcws->szSetting,"Slot_Flags") ) {
+ !lstrcmpA(dbcws->szSetting,"Slot_Flags")) {
BOOL bEnable;
switch (dbcws->value.type) {
case DBVT_BYTE:
diff --git a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
index a765b8e8f8..e265d1b850 100644
--- a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
+++ b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
@@ -103,10 +103,10 @@ static int CountryNumberToBitmapIndex(int countryNumber)
countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
//countryNumber=31; /* Netherlands */
break;
- case 5995: /* St. Maarten (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles) ) */
+ case 5995: /* St. Maarten (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles)) */
countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
break;
- case 5999: /* Curacao (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles) ) */
+ case 5999: /* Curacao (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles)) */
countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
break;
case 5399: /* missing Guantanamo Bay */
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index 60718f5861..680dd1e23b 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -583,14 +583,14 @@ class CAnnivList
if (!pDlg->_wmINIT && (wndPos->cx != 0 || wndPos->cy != 0)) {
//win pos change
if ( (wndPos->cx == pDlg->_rcWin.right - pDlg->_rcWin.left) &&
- (wndPos->cy == pDlg->_rcWin.bottom - pDlg->_rcWin.top) ) {
+ (wndPos->cy == pDlg->_rcWin.bottom - pDlg->_rcWin.top)) {
//win pos change (store new pos)
GetWindowRect(hDlg, &pDlg->_rcWin);
}
//win size change
else {
// l change
- if ( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left) ) {
+ if ( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left)) {
wndPos->x = wndPos->x + wndPos->cx - pDlg->_sizeMin.cx;
wndPos->cx = pDlg->_sizeMin.cx;
}
@@ -600,7 +600,7 @@ class CAnnivList
}
// t change
- if ( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top) ) {
+ if ( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top)) {
wndPos->y = wndPos->y + wndPos->cy - pDlg->_sizeMin.cy;
wndPos->cy = pDlg->_sizeMin.cy;
}
diff --git a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
index 11f2aed631..2264f4d278 100644
--- a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
@@ -579,10 +579,10 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
numSettings = numEvents = 0;
for (xmod = _xmlNode->FirstChild();
xmod != NULL;
- xmod = xmod->NextSibling(XKEY_MOD) ) {
+ xmod = xmod->NextSibling(XKEY_MOD)) {
for (xkey = xmod->FirstChild();
xkey != NULL;
- xkey = xkey->NextSibling() ) {
+ xkey = xkey->NextSibling()) {
if (!mir_stricmp(xkey->Value(), XKEY_SET)) numSettings++;
else numEvents++;
}
@@ -941,7 +941,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule)
else if(isProtoModule && isMetaModule) {
if (!mir_stricmp(xKey->Attribute("key"),"Nick") ||
!mir_stricmp(xKey->Attribute("key"),"TzName") ||
- !mir_stricmp(xKey->Attribute("key"),"Timezone") ) {
+ !mir_stricmp(xKey->Attribute("key"),"Timezone")) {
if (ImportSetting(pszModule, xKey->ToElement()) == ERROR_OK) {
_pXmlFile->_numSettingsDone++;
}
diff --git a/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp
index ba026e2c52..9ca27d7289 100644
--- a/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp
@@ -363,7 +363,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
(!pDat->ExImContact->hContact || mir_stricmp(p, pszProto)) &&
//mir_stricmp(p, "Protocol") &&
mir_stricmp(p, USERINFO) &&
- mir_stricmp(p, MOD_MBIRTHDAY) )
+ mir_stricmp(p, MOD_MBIRTHDAY))
{
ExportTree_AddItem(hTree, hItemOptional, (LPSTR)p, bImagesLoaded, 1);
}
diff --git a/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp
index 6e1bb7ad54..d9d0efbd7d 100644
--- a/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -168,7 +168,7 @@ static LRESULT PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
// profile button
case 41064:
// set button text
- iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM) TranslateT("Profile") );
+ iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM) TranslateT("Profile"));
if (iString != -1) tbb->iString = iString;
// set tooltip
diff --git a/plugins/UserInfoEx/mir_db.cpp b/plugins/UserInfoEx/mir_db.cpp
index b17dc3e7d0..e4596df4cc 100644
--- a/plugins/UserInfoEx/mir_db.cpp
+++ b/plugins/UserInfoEx/mir_db.cpp
@@ -1222,7 +1222,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
sdbe = hDbExistingEvent;
for ( edbe = sdbe;
edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp <= edbei.timestamp);
- edbe = FindPrev(edbe) ) {
+ edbe = FindPrev(edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if ( result = IsEqual(dbei, &edbei, false)) {
@@ -1239,7 +1239,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
if (!result) {
for ( edbe = FindNext(sdbe);
edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp >= edbei.timestamp);
- edbe = FindNext(edbe) ) {
+ edbe = FindNext(edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if ( result = IsEqual(dbei, &edbei, false)) {
diff --git a/plugins/UserInfoEx/svc_reminder.cpp b/plugins/UserInfoEx/svc_reminder.cpp
index 203b98faa4..20abe584a6 100644
--- a/plugins/UserInfoEx/svc_reminder.cpp
+++ b/plugins/UserInfoEx/svc_reminder.cpp
@@ -1189,22 +1189,22 @@ VOID SvcReminderLoadModule(VOID)
// init sounds
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
- ssd.pszSection = LPGEN(MODNAME);
+ ssd.pszSection = MODNAME;
ssd.pszName = SOUND_BIRTHDAY_TODAY;
ssd.pszDescription = LPGEN("Birthday reminder");
ssd.pszDefaultFile = "Sounds\\BirthDay.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
ssd.pszName = SOUND_BIRTHDAY_SOON;
ssd.pszDescription = LPGEN("Birthday reminder: it's coming");
ssd.pszDefaultFile = "Sounds\\BirthDayComing.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
ssd.pszName = SOUND_ANNIVERSARY;
ssd.pszDescription = LPGEN("Anniversary Reminder");
ssd.pszDefaultFile = "Sounds\\Reminder.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
// create service functions
myCreateServiceFunction(MS_USERINFO_REMINDER_CHECK, CheckService);
diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp
index 2fa58dffbf..6f8a831e5d 100644
--- a/plugins/Utils/mir_options.cpp
+++ b/plugins/Utils/mir_options.cpp
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA.
#include "mir_memory.h"
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
static TCHAR* MyDBGetContactSettingTString(HANDLE hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
diff --git a/plugins/Variables/contact.cpp b/plugins/Variables/contact.cpp
index c6b7b8f566..b6d48ee1e3 100644
--- a/plugins/Variables/contact.cpp
+++ b/plugins/Variables/contact.cpp
@@ -339,7 +339,7 @@ int getContactFromString( CONTACTSINFO* ci )
free(tmp);
}
- if ( (tszContact == NULL) || (_tcslen(tszContact) == 0) )
+ if ( (tszContact == NULL) || (_tcslen(tszContact) == 0))
return -1;
ci->hContacts = NULL;
@@ -394,7 +394,7 @@ int getContactFromString( CONTACTSINFO* ci )
tszProto = a2u(szProto);
- if ( (tszProto != NULL) && (szFind != NULL) ) {
+ if ( (tszProto != NULL) && (szFind != NULL)) {
wsprintf(szFind, _T("<%s:%s>"), tszProto, cInfo);
free(cInfo);
free(tszProto);
@@ -407,7 +407,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// id (exact)
- if ( (ci->flags&CI_UNIQUEID) && (!bMatch) ) {
+ if ( (ci->flags&CI_UNIQUEID) && (!bMatch)) {
szFind = getContactInfoT(CNF_UNIQUEID, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -417,7 +417,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// nick (not exact)
- if ( (ci->flags&CI_NICK) && (!bMatch) ) {
+ if ( (ci->flags&CI_NICK) && (!bMatch)) {
szFind = getContactInfoT(CNF_NICK, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -427,7 +427,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// list name (not exact)
- if ( (ci->flags&CI_LISTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_LISTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_DISPLAY, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -437,7 +437,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// firstname (exact)
- if ( (ci->flags&CI_FIRSTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_FIRSTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_FIRSTNAME, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -447,7 +447,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// lastname (exact)
- if ( (ci->flags&CI_LASTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_LASTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_LASTNAME, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -457,7 +457,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// email (exact)
- if ( (ci->flags&CI_EMAIL) && (!bMatch) ) {
+ if ( (ci->flags&CI_EMAIL) && (!bMatch)) {
szFind = getContactInfoT(CNF_EMAIL, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -467,7 +467,7 @@ int getContactFromString( CONTACTSINFO* ci )
}
}
// CNF_ (exact)
- if ( (ci->flags&CI_CNFINFO) && (!bMatch) ) {
+ if ( (ci->flags&CI_CNFINFO) && (!bMatch)) {
szFind = getContactInfoT((BYTE)(ci->flags&~(CI_CNFINFO|CI_TCHAR)), hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -533,7 +533,7 @@ static int contactSettingChanged(WPARAM wParam, LPARAM lParam)
((!strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags&CI_EMAIL)) ||
((!strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags&CI_LISTNAME)) ||
(cce[i].flags & CI_CNFINFO) != 0 || // lazy; always invalidate CNF info cache entries
- (( ((int)uid != CALLSERVICE_NOTFOUND) && (uid != NULL) ) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
+ (( ((int)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
{
/* remove from cache */
free(cce[i].tszContact);
diff --git a/plugins/Variables/help.cpp b/plugins/Variables/help.cpp
index 3fe5915cb2..5231294de3 100644
--- a/plugins/Variables/help.cpp
+++ b/plugins/Variables/help.cpp
@@ -163,7 +163,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
free(tszContact);
} }
- if ( (hContact != INVALID_HANDLE_VALUE) && (hContact != NULL) )
+ if ( (hContact != INVALID_HANDLE_VALUE) && (hContact != NULL))
hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
else
hItem = NULL;
@@ -429,7 +429,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam
i += 1;
tszHelpDesc = tszTokenDesc = NULL;
tr = getTokenRegister(i);
- if ( (tr == NULL) || (tr->tszTokenString == NULL) ) {
+ if ( (tr == NULL) || (tr->tszTokenString == NULL)) {
continue;
}
else if (hdd != NULL) {
@@ -498,7 +498,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam
else {
text = NULL;
}
- if ( (text != NULL) && ((last == NULL) || (_tcsicmp(last, text))) ) {
+ if ( (text != NULL) && ((last == NULL) || (_tcsicmp(last, text)))) {
lvItem.mask = LVIF_TEXT;
lvItem.pszText = text;
ListView_InsertItem(hList, &lvItem);
@@ -521,7 +521,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam
}
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TOKENLIST) && (((NMHDR*)lParam)->code == NM_DBLCLK) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TOKENLIST) && (((NMHDR*)lParam)->code == NM_DBLCLK)) {
HWND hList, hwndInputDlg;
LVITEM lvItem;
int len, item;
@@ -940,7 +940,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
hShow = hShow==0?hPage:hShow;
- if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->szFormat != NULL) ) {
+ if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->szFormat != NULL)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
SendMessage(hwndDlg, VARM_SETINPUTTEXT, 0, (LPARAM)dat->vhs->fi->tszFormat);
else {
@@ -966,7 +966,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
}
}
if ( (dat->vhs->flags&VHF_SUBJECT) ||
- ((dat->vhs->flags&VHF_INPUT) && (((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL)) || (dat->vhs->flags&VHF_SETLASTSUBJECT))) ) {
+ ((dat->vhs->flags&VHF_INPUT) && (((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL)) || (dat->vhs->flags&VHF_SETLASTSUBJECT)))) {
// subject window is created, but not necessarily shown
dat->hwndSubjectDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CLIST_DIALOG), hwndDlg, clistDlgProc, (LPARAM)GetParent(hwndDlg));
if (pfnEnableThemeDialogTexture) {
@@ -976,7 +976,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
- if ((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL) )
+ if ((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL))
SendMessage(hwndDlg, VARM_SETSUBJECT, (WPARAM)dat->vhs->fi->hContact, 0);
else if (dat->vhs->flags&VHF_SETLASTSUBJECT)
SendMessage(hwndDlg, VARM_SETSUBJECT, (WPARAM)INVALID_HANDLE_VALUE, 0);
@@ -991,7 +991,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
}
}
if ( (dat->vhs->flags&VHF_EXTRATEXT) ||
- ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL)) ) {
+ ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL))) {
// extratext window is created, but not necessarily shown
dat->hwndExtraTextDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EXTRATEXT_DIALOG), hwndDlg, extratextDlgProc, (LPARAM)GetParent(hwndDlg));
if (pfnEnableThemeDialogTexture)
@@ -999,7 +999,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
- if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL) ) {
+ if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
SendMessage(hwndDlg, VARM_SETEXTRATEXT, 0, (LPARAM)dat->vhs->fi->tszExtraText);
else {
@@ -1042,7 +1042,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_OK:
- if ( (dat->vhs->fi != NULL) && (!(dat->vhs->flags&VHF_DONTFILLSTRUCT)) ) {
+ if ( (dat->vhs->fi != NULL) && (!(dat->vhs->flags&VHF_DONTFILLSTRUCT))) {
int len = SendMessage(hwndDlg, VARM_GETINPUTTEXTLENGTH, 0, 0);
if (len > 0) {
@@ -1081,7 +1081,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
(LPARAM)dat->vhs->hwndCtrl);
}
- if ( (dat->vhs->flags&VHF_FULLFILLSTRUCT) && (dat->vhs->fi != NULL) ) {
+ if ( (dat->vhs->flags&VHF_FULLFILLSTRUCT) && (dat->vhs->fi != NULL)) {
int len;
len = SendMessage(hwndDlg, VARM_GETEXTRATEXTLENGTH, 0, 0);
@@ -1217,7 +1217,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
}
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
diff --git a/plugins/Variables/options.cpp b/plugins/Variables/options.cpp
index b4a720094f..175baff0f0 100644
--- a/plugins/Variables/options.cpp
+++ b/plugins/Variables/options.cpp
@@ -43,7 +43,7 @@ static INT_PTR CALLBACK SetOptsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARA
break;
case WM_COMMAND:
- if ( (HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) ) {
+ if ( (HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) {
switch (LOWORD(wParam)) {
case IDC_PARSEATSTARTUP:
case IDC_STRIPCRLF:
diff --git a/plugins/Variables/parse_alias.cpp b/plugins/Variables/parse_alias.cpp
index 7f90e0eb04..2fe4164d15 100644
--- a/plugins/Variables/parse_alias.cpp
+++ b/plugins/Variables/parse_alias.cpp
@@ -29,7 +29,7 @@ static ALIASREGISTER *searchAliasRegister(TCHAR *szAlias) {
unsigned int i;
res = NULL;
- if ( (szAlias == NULL) || (_tcslen(szAlias) == 0) ) {
+ if ( (szAlias == NULL) || (_tcslen(szAlias) == 0)) {
return NULL;
}
EnterCriticalSection(&csAliasRegister);
@@ -55,12 +55,12 @@ static TCHAR *replaceArguments(TCHAR *res, TCHAR *tArg, TCHAR *rArg) {
cur = ecur = 0;
while (*(res+cur) != _T('\0')) {
- if ( (*(res+cur) == _T('(')) || (*(res+cur) == _T(',')) ) {
+ if ( (*(res+cur) == _T('(')) || (*(res+cur) == _T(','))) {
ecur = ++cur;
- while ( (*(res+ecur) != _T(')')) && (*(res+ecur) != _T(',')) ) {
+ while ( (*(res+ecur) != _T(')')) && (*(res+ecur) != _T(','))) {
ecur++;
}
- if ( ((signed int)_tcslen(tArg) == (ecur-cur)) && (!_tcsncmp(tArg, res+cur, _tcslen(tArg))) ) {
+ if ( ((signed int)_tcslen(tArg) == (ecur-cur)) && (!_tcsncmp(tArg, res+cur, _tcslen(tArg)))) {
if (_tcslen(rArg) > _tcslen(tArg)) {
res = ( TCHAR* )realloc(res, (_tcslen(res) + (_tcslen(rArg)-_tcslen(tArg)) + 1)*sizeof(TCHAR));
if (res == NULL)
@@ -83,7 +83,7 @@ static TCHAR *parseTranslateAlias(ARGUMENTSINFO *ai) {
ALIASREGISTER *areg;
areg = searchAliasRegister(ai->targv[0]);
- if ( (areg == NULL) || (areg->argc != ai->argc-1) ) {
+ if ( (areg == NULL) || (areg->argc != ai->argc-1)) {
return NULL;
}
res = _tcsdup(areg->szTranslation);
@@ -188,7 +188,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) {
if (i != argc-1)
_tcscat(szArgs, _T(","));
}
- if ( (szArgs != NULL) && (argc > 0) ) {
+ if ( (szArgs != NULL) && (argc > 0)) {
szArgsA = u2a(szArgs);
diff --git a/plugins/Variables/parse_external.cpp b/plugins/Variables/parse_external.cpp
index a93f6ba44f..65226fb0e4 100644
--- a/plugins/Variables/parse_external.cpp
+++ b/plugins/Variables/parse_external.cpp
@@ -73,7 +73,7 @@ static TCHAR *parseWinampSong(ARGUMENTSINFO *ai) {
}
scur = _tcschr(szTitle, _T('.'));
cur = _tcsstr(scur, _T(" - Winamp"));
- if ( (scur == NULL) || (cur == NULL) || (scur >= cur) || (scur > (szTitle + _tcslen(szTitle) - 2)) || (cur > (szTitle + _tcslen(szTitle))) ) {
+ if ( (scur == NULL) || (cur == NULL) || (scur >= cur) || (scur > (szTitle + _tcslen(szTitle) - 2)) || (cur > (szTitle + _tcslen(szTitle)))) {
free(szTitle);
return NULL;
}
@@ -101,15 +101,15 @@ static TCHAR *parseWinampState(ARGUMENTSINFO *ai) {
}
scur = _tcschr(szTitle, _T('.'));
cur = _tcsstr(scur, _T(" - Winamp"));
- if ( (scur == NULL) || (cur == NULL) ) {
+ if ( (scur == NULL) || (cur == NULL)) {
free(szTitle);
return _tcsdup(TranslateT("Stopped"));
}
- if ( (!_tcsncmp(cur+10, _T("[Stopped]"), 9)) ) {
+ if ( (!_tcsncmp(cur+10, _T("[Stopped]"), 9))) {
free(szTitle);
return _tcsdup(TranslateT("Stopped"));
}
- if ( (!_tcsncmp(cur+10, _T("[Paused]"), 8)) ) {
+ if ( (!_tcsncmp(cur+10, _T("[Paused]"), 8))) {
free(szTitle);
return _tcsdup(TranslateT("Paused"));
}
@@ -135,7 +135,7 @@ static unsigned int checkAMIP() {
}
log_debugA("AMIP failed to initialized");
if (lastAMIPFailure == 0) {
- /* if this is the first failure after a succesful init, call uninit for a cleanup (maybe it'll help for the next try ;) ) */
+ /* if this is the first failure after a succesful init, call uninit for a cleanup (maybe it'll help for the next try ;)) */
acUninit();
}
lastAMIPFailure = GetTickCount();
diff --git a/plugins/Variables/parse_inet.cpp b/plugins/Variables/parse_inet.cpp
index 21938b21ad..41481e3b60 100644
--- a/plugins/Variables/parse_inet.cpp
+++ b/plugins/Variables/parse_inet.cpp
@@ -37,7 +37,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) {
}
cur = 0;
while (cur < strlen(res)) {
- if ( ( (*(res+cur) >= '0') && (*(res+cur) <= '9') ) || ( (*(res+cur) >= 'a') && (*(res+cur) <= 'z') ) || ( (*(res+cur) >= 'A') && (*(res+cur) <= 'Z') ) ) {
+ if ( ( (*(res+cur) >= '0') && (*(res+cur) <= '9')) || ( (*(res+cur) >= 'a') && (*(res+cur) <= 'z')) || ( (*(res+cur) >= 'A') && (*(res+cur) <= 'Z')) ) {
cur++;
continue;
}
@@ -75,7 +75,7 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) {
}
cur = 0;
while (cur < strlen(res)) {
- if ( (*(res+cur) == '%') && (strlen(res+cur) >= 3) ) {
+ if ( (*(res+cur) == '%') && (strlen(res+cur) >= 3)) {
memset(hex, '\0', sizeof(hex));
strncpy(hex, res+cur+1, 2);
*(res+cur) = (char)strtol(hex, NULL, 16);
diff --git a/plugins/Variables/parse_logic.cpp b/plugins/Variables/parse_logic.cpp
index 36a5f664e3..23f8badca8 100644
--- a/plugins/Variables/parse_logic.cpp
+++ b/plugins/Variables/parse_logic.cpp
@@ -141,7 +141,7 @@ static TCHAR *parseIfequal(ARGUMENTSINFO *ai)
tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL)
free(tszFirst);
@@ -150,7 +150,7 @@ static TCHAR *parseIfequal(ARGUMENTSINFO *ai)
return NULL;
}
- if ( (ttoi(tszFirst)) == (ttoi(tszSecond)) ) {
+ if ( (ttoi(tszFirst)) == (ttoi(tszSecond))) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -176,7 +176,7 @@ static TCHAR *parseIfgreater(ARGUMENTSINFO *ai) {
tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL) {
free(tszFirst);
}
@@ -185,7 +185,7 @@ static TCHAR *parseIfgreater(ARGUMENTSINFO *ai) {
}
return NULL;
}
- if ( (ttoi(tszFirst)) > (ttoi(tszSecond)) ) {
+ if ( (ttoi(tszFirst)) > (ttoi(tszSecond))) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -210,7 +210,7 @@ static TCHAR *parseIflonger(ARGUMENTSINFO *ai) {
tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL) {
free(tszFirst);
}
@@ -219,7 +219,7 @@ static TCHAR *parseIflonger(ARGUMENTSINFO *ai) {
}
return NULL;
}
- if ( _tcslen(tszFirst) > _tcslen(tszSecond) ) {
+ if ( _tcslen(tszFirst) > _tcslen(tszSecond)) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -302,7 +302,7 @@ static TCHAR *parseLonger(ARGUMENTSINFO *ai)
if (ai->argc != 3)
return NULL;
- if ( _tcslen(ai->targv[1]) <= _tcslen(ai->targv[2]) )
+ if ( _tcslen(ai->targv[1]) <= _tcslen(ai->targv[2]))
ai->flags |= AIF_FALSE;
return _tcsdup(_T(""));
diff --git a/plugins/Variables/parse_miranda.cpp b/plugins/Variables/parse_miranda.cpp
index e941a91e89..7a4e26567e 100644
--- a/plugins/Variables/parse_miranda.cpp
+++ b/plugins/Variables/parse_miranda.cpp
@@ -430,7 +430,7 @@ static TCHAR *parseLastSeenStatus(ARGUMENTSINFO *ai) {
ci.tszContact = ai->targv[1];
ci.flags = 0xFFFFFFFF^(CI_TCHAR==0?CI_UNICODE:0);
count = getContactFromString( &ci );
- if ( (count == 1) && (ci.hContacts != NULL) ) {
+ if ( (count == 1) && (ci.hContacts != NULL)) {
hContact = ci.hContacts[0];
free(ci.hContacts);
}
@@ -598,7 +598,7 @@ static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags)
((dbe->eventType == EVENTTYPE_STATUSCHANGE) && (flags&DBE_STATUSCHANGE)) ||
((flags&DBE_OTHER));
bEventFlags = (dbe->flags&DBEF_SENT)?(flags&DBE_SENT):(flags&DBE_RCVD);
- bEventFlags = (bEventFlags && ((dbe->flags&DBEF_READ)?(flags&DBE_READ):(flags&DBE_UNREAD)) );
+ bEventFlags = (bEventFlags && ((dbe->flags&DBEF_READ)?(flags&DBE_READ):(flags&DBE_UNREAD)));
return (bEventType && bEventFlags);
}
@@ -614,9 +614,9 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags)
dbe.cbBlob = 0;
dbe.pBlob = NULL;
if (hContact != NULL) {
- if ( (flags & DBE_FIRST) && (flags & DBE_UNREAD) ) {
+ if ( (flags & DBE_FIRST) && (flags & DBE_UNREAD)) {
hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0);
- if ( hDbEvent == NULL && (flags & DBE_READ) )
+ if ( hDbEvent == NULL && (flags & DBE_READ))
hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0);
}
else if (flags & DBE_FIRST)
@@ -673,7 +673,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags)
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!CallService(MS_DB_EVENT_GET, (WPARAM)hSearchEvent, (LPARAM)&dbe)) {
- if (((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0) ) && (dbe.timestamp > priorTimestamp)) {
+ if (((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp > priorTimestamp)) {
hMatchEvent = hSearchEvent;
matchTimestamp = dbe.timestamp;
}
@@ -691,7 +691,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags)
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!CallService(MS_DB_EVENT_GET, (WPARAM)hSearchEvent, (LPARAM)&dbe)) {
- if ( ((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp < priorTimestamp) ) {
+ if ( ((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp < priorTimestamp)) {
hMatchEvent = hSearchEvent;
matchTimestamp = dbe.timestamp;
}
@@ -717,7 +717,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags)
flags &= ~DBE_LAST;
}
}
- } while ( (!bEventOk) && (hDbEvent != NULL) );
+ } while ( (!bEventOk) && (hDbEvent != NULL));
return hDbEvent;
}
@@ -806,7 +806,7 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai)
ci.tszContact = ai->targv[1];
ci.flags = 0xFFFFFFFF^(CI_TCHAR==0?CI_UNICODE:0);
count = getContactFromString( &ci );
- if ( (count == 1) && (ci.hContacts != NULL) ) {
+ if ( (count == 1) && (ci.hContacts != NULL)) {
hContact = ci.hContacts[0];
free(ci.hContacts);
}
diff --git a/plugins/Variables/parse_str.cpp b/plugins/Variables/parse_str.cpp
index d8edcf642d..df1739a815 100644
--- a/plugins/Variables/parse_str.cpp
+++ b/plugins/Variables/parse_str.cpp
@@ -32,7 +32,7 @@ static TCHAR *parseCaps(ARGUMENTSINFO *ai) {
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
cur++;
while (*cur != _T('\0')) {
- if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0')) ) {
+ if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0'))) {
cur++;
if (IsCharLower(*cur))
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
@@ -58,7 +58,7 @@ static TCHAR *parseCaps2(ARGUMENTSINFO *ai) {
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
cur++;
while (*cur != _T('\0')) {
- if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0')) ) {
+ if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0'))) {
cur++;
if (IsCharLower(*cur))
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
@@ -87,7 +87,7 @@ static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai) {
cur = res;
do {
cur = _tcschr(cur, _T('\n'));
- if ( (cur == NULL) || ((cur > res) && (*(cur-1) == '\r')) ) {
+ if ( (cur == NULL) || ((cur > res) && (*(cur-1) == '\r'))) {
continue;
}
log_debug(cur);
@@ -116,7 +116,7 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai) {
return NULL;
}
cur = ai->targv[1];
- while ( (_tcscmp(cur, _T("\r\n"))) && (*cur != _T('\n')) && (*cur != _T('\0')) ) {
+ while ( (_tcscmp(cur, _T("\r\n"))) && (*cur != _T('\n')) && (*cur != _T('\0'))) {
cur++;
}
if (*cur == '\0') {
@@ -445,7 +445,7 @@ static TCHAR *parseReplace(ARGUMENTSINFO *ai) {
TCHAR *res, *cur;
unsigned int i, pos;
- if ( (ai->argc < 4) || (ai->argc%2 != 0) ) {
+ if ( (ai->argc < 4) || (ai->argc%2 != 0)) {
return NULL;
}
pos = 0;
@@ -556,7 +556,7 @@ static TCHAR *parseStrchr(ARGUMENTSINFO *ai) {
}
ZeroMemory(szVal, sizeof(szVal));
c = _tcschr(ai->targv[1], *ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -650,7 +650,7 @@ static TCHAR *parseStrrchr(ARGUMENTSINFO *ai) {
return NULL;
}
c = _tcsrchr(ai->targv[1], *ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -665,7 +665,7 @@ static TCHAR *parseStrstr(ARGUMENTSINFO *ai) {
return NULL;
}
c = _tcsstr(ai->targv[1], ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -705,7 +705,7 @@ static TCHAR *parseSelect(ARGUMENTSINFO *ai) {
return NULL;
}
n = ttoi(ai->targv[1]);
- if ( (n > (signed int)ai->argc-2) || (n <= 0) ) {
+ if ( (n > (signed int)ai->argc-2) || (n <= 0)) {
return NULL;
}
@@ -739,7 +739,7 @@ static TCHAR *parseTrim(ARGUMENTSINFO *ai) {
scur++;
}
ecur = ai->targv[1] + _tcslen(ai->targv[1])-1;
- while ( (*ecur == _T(' ')) && (ecur > ai->targv[1]) ) {
+ while ( (*ecur == _T(' ')) && (ecur > ai->targv[1])) {
ecur--;
}
if (scur >= ecur) {
@@ -761,7 +761,7 @@ static TCHAR *parseTab(ARGUMENTSINFO *ai) {
TCHAR *res, *cur;
count = 1;
- if ( (ai->argc == 2) && (_tcslen(ai->targv[1]) > 0) ) {
+ if ( (ai->argc == 2) && (_tcslen(ai->targv[1]) > 0)) {
count = ttoi(ai->targv[1]);
}
if (count < 0) {
@@ -809,7 +809,7 @@ static TCHAR *getNthWord(TCHAR *szString, int w) {
scur++;
}
count+=1;
- while ( (count < w) && (scur < szString+_tcslen(szString)) ) {
+ while ( (count < w) && (scur < szString+_tcslen(szString))) {
if (*scur == _T(' ')) {
while (*scur == _T(' ')) {
scur++;
@@ -824,7 +824,7 @@ static TCHAR *getNthWord(TCHAR *szString, int w) {
return NULL;
}
ecur = scur;
- while ( (*ecur != _T(' ')) && (*ecur != _T('\0')) ) {
+ while ( (*ecur != _T(' ')) && (*ecur != _T('\0'))) {
ecur++;
}
res = ( TCHAR* )malloc((ecur-scur+1)*sizeof(TCHAR));
@@ -855,7 +855,7 @@ static TCHAR *parseWord(ARGUMENTSINFO *ai) {
}
else to = from;
- if ( (from == 0) || (to == 0) || (from > to) )
+ if ( (from == 0) || (to == 0) || (from > to))
return NULL;
for (i=from;i<=to;i++) {
diff --git a/plugins/Variables/parse_system.cpp b/plugins/Variables/parse_system.cpp
index 65e75ffc9a..9ede81bf4a 100644
--- a/plugins/Variables/parse_system.cpp
+++ b/plugins/Variables/parse_system.cpp
@@ -194,7 +194,7 @@ static TCHAR *parseDirectory(ARGUMENTSINFO *ai) {
ecur = ai->targv[1]+_tcslen(ai->targv[1]);
while (depth > 0) {
- while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]) )
+ while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]))
ecur--;
if (*ecur != _T('\\'))
@@ -204,7 +204,7 @@ static TCHAR *parseDirectory(ARGUMENTSINFO *ai) {
ecur--;
}
scur = ecur;
- while ( (*scur != _T('\\')) && (scur > ai->targv[1]) )
+ while ( (*scur != _T('\\')) && (scur > ai->targv[1]))
scur--;
if (*scur == _T('\\'))
@@ -239,7 +239,7 @@ static TCHAR *parseDirectory2(ARGUMENTSINFO *ai) {
ecur = ai->targv[1]+_tcslen(ai->targv[1]);
while (depth > 0) {
- while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]) )
+ while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]))
ecur--;
if (*ecur != _T('\\'))
@@ -456,12 +456,12 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) {
if (hFind == INVALID_HANDLE_VALUE) {
return NULL;
}
- if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles)) ) {
+ if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
tszRes = ( TCHAR* )malloc((_tcslen(ffd.cFileName) + _tcslen(tszSeperator) + 1)*sizeof(TCHAR));
_tcscpy(tszRes, ffd.cFileName);
}
while (FindNextFile(hFind, &ffd) != 0) {
- if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles)) ) {
+ if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
if (tszRes != NULL) {
_tcscat(tszRes, tszSeperator);
tszRes = ( TCHAR* )realloc(tszRes, (_tcslen(tszRes) + _tcslen(ffd.cFileName) + _tcslen(tszSeperator) + 1)*sizeof(TCHAR));
@@ -484,7 +484,7 @@ static BOOL CALLBACK MyProcessEnumerator(DWORD dwPID, WORD wTask, char *szProces
char **szProc;
szProc = (char **)lParam;
- if ( (*szProc != NULL) && (!_stricmp(*szProc, szProcess)) ) {
+ if ( (*szProc != NULL) && (!_stricmp(*szProc, szProcess))) {
*szProc = NULL;
}
@@ -558,7 +558,7 @@ static TCHAR *parseRegistryValue(ARGUMENTSINFO *ai) {
}
ZeroMemory(res, len);
err = RegQueryValueEx(hKey, ai->targv[2], NULL, &type, (BYTE*)res, &len);
- if ( (err != ERROR_SUCCESS) || (type != REG_SZ) ) {
+ if ( (err != ERROR_SUCCESS) || (type != REG_SZ)) {
RegCloseKey(hKey);
free(res);
return NULL;
@@ -602,7 +602,7 @@ static TCHAR *parseTimestamp2Date(ARGUMENTSINFO *ai) {
if (timestamp == 0) {
return NULL;
}
- if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0)) ) {
+ if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0))) {
szFormat = NULL;
}
else {
@@ -638,7 +638,7 @@ static TCHAR *parseTimestamp2Time(ARGUMENTSINFO *ai) {
if (timestamp == 0) {
return NULL;
}
- if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0)) ) {
+ if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0))) {
szFormat = NULL;
}
else {
@@ -755,7 +755,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) {
}
}
}
- } while ( (totalReadSz < fileSz) && (readSz > 0) );
+ } while ( (totalReadSz < fileSz) && (readSz > 0));
if (lineNo < 0) {
lineNo = lineCount + lineNo + 1;
}
@@ -796,12 +796,12 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) {
}
}
}
- if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r')) ) {
+ if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r'))) {
// in case the \r was at the end of the buffer, \n could be next
SetFilePointer(hFile, -1*csz, NULL, FILE_CURRENT);
totalReadSz -= csz;
}
- } while ( (totalReadSz < fileSz) && (readSz > 0) );
+ } while ( (totalReadSz < fileSz) && (readSz > 0));
if (linePos < 0) {
CloseHandle(hFile);
free(pBuf);
@@ -823,7 +823,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) {
}
for (pCur = pBuf;(pCur < pBuf+readSz);pCur+=csz) {
if ((tUC) && ((!_tcsncmp((TCHAR *)pCur, _T("\r\n"), 2)) || (*(TCHAR *)pCur == _T('\n'))) ||
- ((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n')))) ) {
+ ((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n'))))) {
CloseHandle(hFile);
if (tUC) {
*(TCHAR *)pCur = _T('\0');
@@ -843,7 +843,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) {
return res;
}
}
- if ( ((DWORD)(linePos+(pCur-pBuf)) == fileSz) ) { // eof
+ if ( ((DWORD)(linePos+(pCur-pBuf)) == fileSz)) { // eof
CloseHandle(hFile);
if (tUC) {
@@ -859,7 +859,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) {
if (readSz == bufSz-csz) {
// buffer must be increased
bufSz += TXTFILEBUFSZ*csz;
- if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r')) ) {
+ if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r'))) {
pCur -= csz;
}
icur = pCur - pBuf;
diff --git a/plugins/Variables/parse_variables.cpp b/plugins/Variables/parse_variables.cpp
index 19f5a39c20..58520f1087 100644
--- a/plugins/Variables/parse_variables.cpp
+++ b/plugins/Variables/parse_variables.cpp
@@ -28,12 +28,12 @@ static int addToVariablesRegister(TCHAR *szName, TCHAR *szText) {
int i;
- if ( (szName == NULL) || (szText == NULL) || (_tcslen(szName) <= 0) ) {
+ if ( (szName == NULL) || (szText == NULL) || (_tcslen(szName) <= 0)) {
return -1;
}
EnterCriticalSection(&csVarRegister);
for (i=0;i<vrCount;i++) {
- if ( (!_tcscmp(vr[i].szName, szName)) ) { // && (vr[i].dwOwnerThread == GetCurrentThreadId()) ) {
+ if ( (!_tcscmp(vr[i].szName, szName))) { // && (vr[i].dwOwnerThread == GetCurrentThreadId())) {
free(vr[i].szText);
vr[i].szText = _tcsdup(szText);
LeaveCriticalSection(&csVarRegister);
@@ -61,12 +61,12 @@ static TCHAR *searchVariableRegister(TCHAR *szName) {
int i;
res = NULL;
- if ( (szName == NULL) || (_tcslen(szName) <= 0) ) {
+ if ( (szName == NULL) || (_tcslen(szName) <= 0)) {
return NULL;
}
EnterCriticalSection(&csVarRegister);
for (i=0;i<vrCount;i++) {
- if ( (!_tcscmp(vr[i].szName, szName)) ) { // && (vr[i].dwOwnerThread == GetCurrentThreadId()) ) {
+ if ( (!_tcscmp(vr[i].szName, szName))) { // && (vr[i].dwOwnerThread == GetCurrentThreadId())) {
res = _tcsdup(vr[i].szText);
LeaveCriticalSection(&csVarRegister);
return res;
diff --git a/plugins/Variables/tokenregister.cpp b/plugins/Variables/tokenregister.cpp
index c9b13e674f..56d30ffc30 100644
--- a/plugins/Variables/tokenregister.cpp
+++ b/plugins/Variables/tokenregister.cpp
@@ -183,7 +183,7 @@ TCHAR *parseFromRegister(ARGUMENTSINFO *ai)
TCHAR *temp, *res;
TOKENREGISTEREX *thisVr, trCopy;
- if ( (ai == NULL) || (ai->argc == 0) || (ai->targv[0] == NULL) ) {
+ if ( (ai == NULL) || (ai->argc == 0) || (ai->targv[0] == NULL)) {
return NULL;
}
callRes = 0;
diff --git a/plugins/Variables/variables.cpp b/plugins/Variables/variables.cpp
index 69adcd87f0..5f81c35eb3 100644
--- a/plugins/Variables/variables.cpp
+++ b/plugins/Variables/variables.cpp
@@ -61,7 +61,7 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) {
cur++;
scur = cur-1;
bDontParse = bNewArg = bDone = FALSE;
- while ( (!bDone) && (*cur != _T('\0')) ) {
+ while ( (!bDone) && (*cur != _T('\0'))) {
switch (*cur) {
case _T(DONTPARSE_CHAR):
if (bDontParse) {
@@ -73,7 +73,7 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) {
break;
case _T(','):
- if ( (!bDontParse) && (brackets == 0) ) {
+ if ( (!bDontParse) && (brackets == 0)) {
bNewArg = TRUE;
}
break;
@@ -85,10 +85,10 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) {
break;
case _T(')'):
- if ( (brackets == 0) && (!bDontParse) ) {
+ if ( (brackets == 0) && (!bDontParse)) {
bDone = bNewArg = TRUE;
}
- else if ( (brackets > 0) && (!bDontParse) ) {
+ else if ( (brackets > 0) && (!bDontParse)) {
brackets -= 1;
}
break;
@@ -207,12 +207,12 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
continue;
}
// remove end of lines
- else if ( (!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL) ) {
+ else if ( (!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL)) {
MoveMemory(cur, cur+2, (_tcslen(cur+2)+1)*sizeof(TCHAR));
pos = cur-string-1;
continue;
}
- else if ( ((*cur == _T('\n')) && (gParseOpts.bStripEOL)) || ((*cur == _T(' ')) && (gParseOpts.bStripWS)) ) {
+ else if ( ((*cur == _T('\n')) && (gParseOpts.bStripEOL)) || ((*cur == _T(' ')) && (gParseOpts.bStripWS))) {
MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));
pos = cur - string - 1;
continue;
@@ -232,7 +232,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
pos = scur-string-1;
continue;
}
- else if ( (*cur != _T(FIELD_CHAR)) && (*cur != _T(FUNC_CHAR)) && (*cur != _T(FUNC_ONCE_CHAR)) ) {
+ else if ( (*cur != _T(FIELD_CHAR)) && (*cur != _T(FUNC_CHAR)) && (*cur != _T(FUNC_ONCE_CHAR))) {
if (gParseOpts.bStripAll) {
MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));
pos = cur - string - 1;
@@ -283,12 +283,12 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
}
cur += len+1;
}
- else if ( (*cur == _T(FUNC_CHAR)) || (*cur == _T(FUNC_ONCE_CHAR)) ) {
+ else if ( (*cur == _T(FUNC_CHAR)) || (*cur == _T(FUNC_ONCE_CHAR))) {
TCHAR *argcur;
cur += _tcslen(tr->tszTokenString)+1;
argcur = getArguments(cur, &argv, &argc);
- if ( (argcur == cur) || (argcur == NULL) ) {
+ if ( (argcur == cur) || (argcur == NULL)) {
fi->eCount += 1;
// error getting arguments
continue;
@@ -348,7 +348,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
// 'special' chars need to be taken care of (DONTPARSE, TRYPARSE, \r\n)
// if the var contains the escape character, this character must be doubled, we don't want it to act as an esacpe char
/*for (tcur=parsedToken;*tcur != '\0';tcur++) {
- if (*tcur == DONTPARSE_CHAR) {//|| (*(var+pos) == ')') ) {
+ if (*tcur == DONTPARSE_CHAR) {//|| (*(var+pos) == ')')) {
parsedToken = realloc(parsedToken, strlen(parsedToken) + 2);
if (parsedToken == NULL) {
fi->err = EMEM;
@@ -572,7 +572,7 @@ int LoadVarModule() {
HMODULE hUxTheme;
- if ( (initTokenRegister() != 0) || (initContactModule() != 0) ) {
+ if ( (initTokenRegister() != 0) || (initContactModule() != 0)) {
return -1;
}
diff --git a/plugins/WhenWasIt/dlg_handlers.cpp b/plugins/WhenWasIt/dlg_handlers.cpp
index e789b29d32..37160995e2 100644
--- a/plugins/WhenWasIt/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/dlg_handlers.cpp
@@ -740,7 +740,7 @@ INT_PTR CALLBACK BirthdaysCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam
return res;
}
-//only updates the birthday part of the list view entry. Won't update the protocol and the contact name (those shouldn't change anyway :) )
+//only updates the birthday part of the list view entry. Won't update the protocol and the contact name (those shouldn't change anyway :))
int UpdateBirthdayEntry(HWND hList, HANDLE hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
{
const int maxSize = 2048;
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp
index 4353e605f6..dca0cbf879 100644
--- a/plugins/WhenWasIt/hooked_events.cpp
+++ b/plugins/WhenWasIt/hooked_events.cpp
@@ -98,8 +98,8 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hContactSettingChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
hTopToolBarModuleLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarModuleLoaded);
- SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, "WhenWasIt", "Birthday near");
- SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, "WhenWasIt", "Birthday today");
+ SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, LPGEN("WhenWasIt"), LPGEN("Birthday near"));
+ SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, LPGEN("WhenWasIt"), LPGEN("Birthday today"));
RebuildAdvIconList();
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp
index 084be88139..a792493284 100644
--- a/plugins/helpers/gen_helpers.cpp
+++ b/plugins/helpers/gen_helpers.cpp
@@ -31,7 +31,7 @@ char *Hlp_GetProtocolNameA(const char *proto) {
char protoname[256];
- if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname)) ) {
+ if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname))) {
return NULL;
}
@@ -42,7 +42,7 @@ TCHAR *Hlp_GetProtocolName(const char *proto) {
char protoname[256];
- if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname)) ) {
+ if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname))) {
return NULL;
}
@@ -413,7 +413,7 @@ int Hlp_UnicodeCheck(char *szPluginName, BOOL bForce, const char *szModule) {
if (!CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)sizeof(szVersionText), (LPARAM)szVersionText)) {
ptr = strstr(szVersionText, "Unicode");
- if ( (ptr == NULL) && (!DBGetContactSettingByte(NULL, szModule, SETTING_NOENCODINGCHECK, 0)) ) {
+ if ( (ptr == NULL) && (!DBGetContactSettingByte(NULL, szModule, SETTING_NOENCODINGCHECK, 0))) {
if (bForce) {
MessageBoxA(NULL, "You are running the ANSI version Miranda. Please use the ANSI build of this plugin.", szPluginName, MB_OK);
diff --git a/protocols/FacebookRM/JSON_CAJUN/elements.inl b/protocols/FacebookRM/JSON_CAJUN/elements.inl
index deb838cb3f..7febabc3a2 100644
--- a/protocols/FacebookRM/JSON_CAJUN/elements.inl
+++ b/protocols/FacebookRM/JSON_CAJUN/elements.inl
@@ -108,14 +108,14 @@ public:
-inline UnknownElement::UnknownElement() : m_pImp( new Imp_T<Null>( Null() ) ) {}
+inline UnknownElement::UnknownElement() : m_pImp( new Imp_T<Null>( Null()) ) {}
inline UnknownElement::UnknownElement(const UnknownElement& unknown) : m_pImp( unknown.m_pImp->Clone()) {}
-inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T<Object>(object) ) {}
-inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T<Array>(array) ) {}
-inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T<Number>(number) ) {}
-inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T<Boolean>(boolean) ) {}
-inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T<String>(string) ) {}
-inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T<Null>(null) ) {}
+inline UnknownElement::UnknownElement(const Object& object) : m_pImp( new Imp_T<Object>(object)) {}
+inline UnknownElement::UnknownElement(const Array& array) : m_pImp( new Imp_T<Array>(array)) {}
+inline UnknownElement::UnknownElement(const Number& number) : m_pImp( new Imp_T<Number>(number)) {}
+inline UnknownElement::UnknownElement(const Boolean& boolean) : m_pImp( new Imp_T<Boolean>(boolean)) {}
+inline UnknownElement::UnknownElement(const String& string) : m_pImp( new Imp_T<String>(string)) {}
+inline UnknownElement::UnknownElement(const Null& null) : m_pImp( new Imp_T<Null>(null)) {}
inline UnknownElement::~UnknownElement() { delete m_pImp; }
diff --git a/protocols/FacebookRM/chat.cpp b/protocols/FacebookRM/chat.cpp
index 2b66e730a1..db50207076 100644
--- a/protocols/FacebookRM/chat.cpp
+++ b/protocols/FacebookRM/chat.cpp
@@ -48,7 +48,7 @@ void FacebookProto::UpdateChat(const char *chat_id, const char *id, const char *
// Close chat window, if set
- ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(chat_id, FACEBOOK_SEND_MESSAGE ) );
+ ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(chat_id, FACEBOOK_SEND_MESSAGE ));
}
int FacebookProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
@@ -75,7 +75,7 @@ int FacebookProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
if (isOnline()) {
LOG("**Chat - Outgoing message: %s", text);
- ForkThread(&FacebookProto::SendChatMsgWorker, this, new send_chat(chat_id, msg) );
+ ForkThread(&FacebookProto::SendChatMsgWorker, this, new send_chat(chat_id, msg));
}
break;
@@ -198,9 +198,9 @@ void FacebookProto::AddChat(const char *id, const char *name)
// Create a user statuses
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
// Finish initialization
gcd.iType = GC_EVENT_CONTROL;
@@ -258,10 +258,10 @@ int FacebookProto::OnJoinChat(WPARAM,LPARAM suppress)
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
SetTopic("Omegle is a great way of meeting new friends!");
diff --git a/protocols/FacebookRM/communication.cpp b/protocols/FacebookRM/communication.cpp
index 90296b18e0..7cbaed3f8d 100644
--- a/protocols/FacebookRM/communication.cpp
+++ b/protocols/FacebookRM/communication.cpp
@@ -144,7 +144,7 @@ bool facebook_client::validate_response( http::response* resp )
try
{
pos += 8;
- int error_num = atoi( resp->data.substr( pos, resp->data.find( ",", pos ) - pos ).c_str() );
+ int error_num = atoi( resp->data.substr( pos, resp->data.find( ",", pos ) - pos ).c_str());
if ( error_num != 0 )
{
std::string error = "";
@@ -154,7 +154,7 @@ bool facebook_client::validate_response( http::response* resp )
error = resp->data.substr( pos, resp->data.find( "\"", pos ) - pos );
error = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( error ) ) );
+ utils::text::slashu_to_utf8( error )) );
}
@@ -215,7 +215,7 @@ DWORD facebook_client::choose_security_level( int request_type )
if (this->https_)
{
if ( request_type != FACEBOOK_REQUEST_MESSAGES_RECEIVE
- || DBGetContactSettingByte( NULL, parent->m_szModuleName, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL ) )
+ || DBGetContactSettingByte( NULL, parent->m_szModuleName, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL ))
return NLHRF_SSL;
}
@@ -451,7 +451,7 @@ std::string facebook_client::choose_action( int request_type, std::string* data,
action = "/pull?clientid=&channel=p_%s&seq=%s&cb=&state=active";
//utils::text::replace_first( &action, "%s", dtsg_ );
} else {
- utils::text::replace_first( &action, "%s", utils::time::unix_timestamp() );
+ utils::text::replace_first( &action, "%s", utils::time::unix_timestamp());
}
utils::text::replace_first( &action, "%s", self_.user_id );
@@ -485,8 +485,8 @@ std::string facebook_client::choose_action( int request_type, std::string* data,
std::string facebook_client::choose_request_url( int request_type, std::string* data, std::string* get_data )
{
std::string url = choose_proto( request_type );
- url.append( choose_server( request_type, data, get_data ) );
- url.append( choose_action( request_type, data, get_data ) );
+ url.append( choose_server( request_type, data, get_data ));
+ url.append( choose_action( request_type, data, get_data ));
return url;
}
@@ -497,7 +497,7 @@ NETLIBHTTPHEADER* facebook_client::get_request_headers( int request_type, int* h
else
*headers_count = 4;
- NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ) );
+ NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ));
if (request_type == REQUEST_POST)
{
@@ -531,7 +531,7 @@ char* facebook_client::load_cookies( )
std::string cookieString = "isfbe=false;";
- if ( !cookies.empty( ) )
+ if ( !cookies.empty( ))
for ( std::map< std::string, std::string >::iterator iter = cookies.begin(); iter != cookies.end(); ++iter )
{
cookieString.append( iter->first );
@@ -554,7 +554,7 @@ void facebook_client::store_headers( http::response* resp, NETLIBHTTPHEADER* hea
if ( header_name == "Set-Cookie" )
{
- std::string cookie_name = header_value.substr( 0, header_value.find( "=" ) );
+ std::string cookie_name = header_value.substr( 0, header_value.find( "=" ));
std::string cookie_value = header_value.substr( header_value.find( "=" ) + 1, header_value.find( ";" ) - header_value.find( "=" ) - 1 );
if ( cookie_value == "deleted" )
{
@@ -567,7 +567,7 @@ void facebook_client::store_headers( http::response* resp, NETLIBHTTPHEADER* hea
}
else
{ // TODO RM: (un)comment
- //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str() );
+ //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str());
resp->headers[header_name] = header_value;
}
}
@@ -577,7 +577,7 @@ void facebook_client::clear_cookies( )
{
ScopedLock s( cookies_lock_ );
- if ( !cookies.empty( ) )
+ if ( !cookies.empty( ))
cookies.clear( );
}
@@ -602,12 +602,12 @@ bool facebook_client::login(const std::string &username,const std::string &passw
// Process result data
validate_response(&resp);
- if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end() )
+ if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end())
{
// Check whether some Facebook things are required
if ( resp.headers["Location"].find("help.php") != std::string::npos )
{
- client_notify( TranslateT("Login error: Some Facebook things are required.") );
+ client_notify( TranslateT("Login error: Some Facebook things are required."));
parent->Log(" ! ! Login error: Some Facebook things are required.");
// return handle_error( "login", FORCE_DISCONNECT );
}
@@ -646,7 +646,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
}
}
- if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end() )
+ if ( resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end())
{
// Check whether HTTPS connection is required and we don't have enabled it
if (!this->https_)
@@ -662,15 +662,15 @@ bool facebook_client::login(const std::string &username,const std::string &passw
}
// Check for Device ID
- if ( cookies["datr"].length() )
- DBWriteContactSettingString( NULL, parent->m_szModuleName, FACEBOOK_KEY_DEVICE_ID, cookies["datr"].c_str() );
+ if ( cookies["datr"].length())
+ DBWriteContactSettingString( NULL, parent->m_szModuleName, FACEBOOK_KEY_DEVICE_ID, cookies["datr"].c_str());
switch ( resp.code )
{
case HTTP_CODE_FAKE_DISCONNECTED:
{
// When is error only because timeout, try login once more
- if ( handle_error( "login" ) )
+ if ( handle_error( "login" ))
return login(username, password);
else
return false;
@@ -681,7 +681,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
// Check whether captcha code is required
if ( resp.data.find("id=\"captcha\"") != std::string::npos )
{
- client_notify( TranslateT("Login error: Captcha code is required. Bad login credentials?") );
+ client_notify( TranslateT("Login error: Captcha code is required. Bad login credentials?"));
parent->Log(" ! ! Login error: Captcha code is required.");
return handle_error( "login", FORCE_DISCONNECT );
}
@@ -691,9 +691,9 @@ bool facebook_client::login(const std::string &username,const std::string &passw
utils::text::special_expressions_decode(
utils::text::remove_html(
utils::text::edit_html(
- utils::text::source_get_value( &resp.data, 2, "id=\"standard_error\">", "</h2>" ) ) ) ) );
+ utils::text::source_get_value( &resp.data, 2, "id=\"standard_error\">", "</h2>" )) )) );
- if ( !error_str.length() )
+ if ( !error_str.length())
error_str = Translate("Unknown login error");
parent->Log(" ! ! Login error: %s", error_str.c_str());
@@ -708,7 +708,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
return handle_error( "login", FORCE_DISCONNECT );
case HTTP_CODE_FOUND: // Found and redirected to Home, Logged in, everything is OK
- if ( cookies.find("c_user") != cookies.end() )
+ if ( cookies.find("c_user") != cookies.end())
{
this->self_.user_id = cookies.find("c_user")->second;
DBWriteContactSettingString(NULL,parent->m_szModuleName,FACEBOOK_KEY_ID,this->self_.user_id.c_str());
@@ -724,7 +724,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw
bool facebook_client::logout( )
{
- if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, FACEBOOK_KEY_DISABLE_LOGOUT, 0) )
+ if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, FACEBOOK_KEY_DISABLE_LOGOUT, 0))
return true;
handle_entry( "logout" );
@@ -769,13 +769,13 @@ bool facebook_client::home( )
if ( resp.data.find( "id=\"navAccountName\"" ) != std::string::npos )
{ // Backup for old fb version
// Get real_name
- this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 2, " id=\"navAccountName\">", "</a" ) ) );
+ this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 2, " id=\"navAccountName\">", "</a" )) );
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NAME,this->self_.real_name.c_str());
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NICK,this->self_.real_name.c_str());
parent->Log(" Got self real name: %s", this->self_.real_name.c_str());
} else if ( resp.data.find("id=\"pageNav\"") != std::string::npos ) {
// Get real_name
- this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 3, " class=\"headerTinymanName\"", ">", "</a" ) ) );
+ this->self_.real_name = utils::text::remove_html( utils::text::special_expressions_decode( utils::text::source_get_value( &resp.data, 3, " class=\"headerTinymanName\"", ">", "</a" )) );
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NAME,this->self_.real_name.c_str());
DBWriteContactSettingUTF8String(NULL,parent->m_szModuleName,FACEBOOK_KEY_NICK,this->self_.real_name.c_str());
parent->Log(" Got self real name: %s", this->self_.real_name.c_str());
@@ -789,7 +789,7 @@ bool facebook_client::home( )
if (avatar.empty())
avatar = utils::text::source_get_value( &resp.data, 3, "class=\"fbxWelcomeBoxImg", "src=\"", "\"" );
- this->self_.image_url = utils::text::trim( utils::text::special_expressions_decode( avatar ) );
+ this->self_.image_url = utils::text::trim( utils::text::special_expressions_decode( avatar ));
parent->Log(" Got self avatar: %s", this->self_.image_url.c_str());
parent->CheckAvatarChange(NULL, this->self_.image_url);
@@ -810,18 +810,18 @@ bool facebook_client::home( )
if (!DBGetContactSettingByte(NULL,parent->m_szModuleName,FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES))
{
str_count = utils::text::source_get_value( &resp.data, 2, "<span id=\"messagesCountValue\">", "</span>" );
- if ( str_count.length() && str_count != std::string( "0" ) )
+ if ( str_count.length() && str_count != std::string( "0" ))
{
std::string message = Translate("Got new messages: ") + str_count;
TCHAR* tmessage = mir_a2t(message.c_str());
- parent->NotifyEvent( parent->m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER, TEXT(FACEBOOK_URL_MESSAGES) );
+ parent->NotifyEvent( parent->m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER, TEXT(FACEBOOK_URL_MESSAGES));
mir_free( tmessage );
}
}
str_count = utils::text::source_get_value( &resp.data, 2, "<span id=\"notificationsCountValue\">", "</span>" );
- if ( str_count.length() && str_count != std::string( "0" ) )
+ if ( str_count.length() && str_count != std::string( "0" ))
{
// Parse notifications directly to popups
ForkThread( &FacebookProto::ProcessNotifications, this->parent, NULL );
@@ -839,7 +839,7 @@ bool facebook_client::home( )
if (!id.empty()) {
std::string name = utils::text::source_get_value( &item, 3, "class=\"linkWrap", ">", "</div>" );
- name = utils::text::special_expressions_decode(utils::text::slashu_to_utf8( name ) );
+ name = utils::text::special_expressions_decode(utils::text::slashu_to_utf8( name ));
parent->Log(" Got new group chat: %s (id: %s)", name.c_str(), id.c_str());
if (!name.empty())
parent->AddChat(id.c_str(), name.c_str());
@@ -1112,9 +1112,9 @@ bool facebook_client::send_message( std::string message_recipient, std::string m
data += "&recipients[0]=";
data += message_recipient;
data += "&lsd=&fb_dtsg=";
- data += ( dtsg_.length( ) ) ? dtsg_ : "0";
+ data += ( dtsg_.length( )) ? dtsg_ : "0";
data += "&post_form_id=";
- data += ( post_form_id_.length( ) ) ? post_form_id_ : "0";
+ data += ( post_form_id_.length( )) ? post_form_id_ : "0";
resp = flap( FACEBOOK_REQUEST_ASYNC, &data );
}
@@ -1215,7 +1215,7 @@ bool facebook_client::set_status(const std::string &status_text)
data += "&fb_dtsg=" + (this->dtsg_.length() ? this->dtsg_ : "0");
data += "&target_id=" + this->self_.user_id;
- if ( status_text.length( ) )
+ if ( status_text.length( ))
{
data += "&action=PROFILE_UPDATE&app_id=&hey_kid_im_a_composer=true&display_context=profile&_log_display_context=profile&ajax_log=1";
data += "&status=" + utils::url::encode( status_text );
@@ -1250,12 +1250,12 @@ bool facebook_client::save_url(const std::string &url,const std::tstring &filena
req.nlc = nlc;
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(this->parent->m_hNetlibUser), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(this->parent->m_hNetlibUser), reinterpret_cast<LPARAM>(&req)));
if ( resp )
{
nlc = resp->nlc;
- parent->Log( "@@@@@ Saving avatar URL %s to path %s", url.c_str(), filename.c_str() );
+ parent->Log( "@@@@@ Saving avatar URL %s to path %s", url.c_str(), filename.c_str());
// Create folder if necessary
std::tstring dir = filename.substr(0,filename.rfind('\\'));
diff --git a/protocols/FacebookRM/connection.cpp b/protocols/FacebookRM/connection.cpp
index 5d955d917f..4ae173d60d 100644
--- a/protocols/FacebookRM/connection.cpp
+++ b/protocols/FacebookRM/connection.cpp
@@ -43,7 +43,7 @@ void FacebookProto::ChangeStatus(void*)
SetEvent(update_loop_lock_);
Netlib_Shutdown(facy.hMsgCon);
- if ( getByte(FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT) )
+ if ( getByte(FACEBOOK_KEY_DISCONNECT_CHAT, DEFAULT_DISCONNECT_CHAT))
facy.chat_state( false );
facy.logout( );
@@ -82,7 +82,7 @@ void FacebookProto::ChangeStatus(void*)
ResetEvent(update_loop_lock_);
- if ( NegotiateConnection( ) )
+ if ( NegotiateConnection( ))
{
facy.last_feeds_update_ = ::time( NULL );
@@ -97,7 +97,7 @@ void FacebookProto::ChangeStatus(void*)
if (getByte(FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES))
ForkThread( &FacebookProto::ProcessUnreadMessages, this );
- setDword( "LogonTS", (DWORD)time(NULL) );
+ setDword( "LogonTS", (DWORD)time(NULL));
ForkThread( &FacebookProto::UpdateLoop, this );
ForkThread( &FacebookProto::MessageLoop, this );
@@ -146,7 +146,7 @@ bool FacebookProto::NegotiateConnection( )
DBVARIANT dbv = {0};
error = true;
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_LOGIN,&dbv))
{
user = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -159,7 +159,7 @@ bool FacebookProto::NegotiateConnection( )
}
error = true;
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -174,7 +174,7 @@ bool FacebookProto::NegotiateConnection( )
}
// Load machine name
- if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_DEVICE_ID,&dbv) )
+ if ( !DBGetContactSettingString(NULL,m_szModuleName,FACEBOOK_KEY_DEVICE_ID,&dbv))
{
facy.cookies["datr"] = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -195,11 +195,11 @@ void FacebookProto::UpdateLoop(void *)
{
if ( i != -1 ) {
if ( !facy.invisible_ )
- if ( !facy.buddy_list( ) )
+ if ( !facy.buddy_list( ))
break;
}
- if ( i == 2 && getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ) )
- if ( !facy.feeds( ) )
+ if ( i == 2 && getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ))
+ if ( !facy.feeds( ))
break;
if ( i == 49 )
@@ -220,9 +220,9 @@ void FacebookProto::MessageLoop(void *)
time_t tim = ::time(NULL);
LOG( ">>>>> Entering Facebook::MessageLoop[%d]", tim );
- while ( facy.channel( ) )
+ while ( facy.channel( ))
{
- if ( isOffline() )
+ if ( isOffline())
break;
LOG( "***** FacebookProto::MessageLoop[%d] refreshing...", tim );
}
diff --git a/protocols/FacebookRM/contacts.cpp b/protocols/FacebookRM/contacts.cpp
index 32cc1ce269..ab953e809d 100644
--- a/protocols/FacebookRM/contacts.cpp
+++ b/protocols/FacebookRM/contacts.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
bool FacebookProto::IsMyContact(HANDLE hContact, bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if( proto && strcmp(m_szModuleName,proto) == 0 )
{
@@ -42,13 +42,13 @@ HANDLE FacebookProto::ChatIDToHContact(std::string chat_id)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact, true))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,"ChatRoomID",&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,"ChatRoomID",&dbv))
{
if( strcmp(chat_id.c_str(),dbv.pszVal) == 0 )
{
@@ -67,13 +67,13 @@ HANDLE FacebookProto::ContactIDToHContact(std::string user_id)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
if( strcmp(user_id.c_str(),dbv.pszVal) == 0 )
{
@@ -115,7 +115,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, BYTE type, bool dont_
DBDeleteContactSetting(hContact, "CList", "MyHandle");
DBVARIANT dbv;
- if( !DBGetContactSettingTString(NULL,m_szModuleName,FACEBOOK_KEY_DEF_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(NULL,m_szModuleName,FACEBOOK_KEY_DEF_GROUP,&dbv))
{
DBWriteContactSettingTString(hContact,"CList","Group",dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -200,7 +200,7 @@ void FacebookProto::DeleteContactFromServer(void *data)
NotifyEvent(m_tszUserName, TranslateT("Contact was removed from your server list."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when removing contact from server.") );
+ facy.client_notify( TranslateT("Error occured when removing contact from server."));
}
if (resp.code != HTTP_CODE_OK)
@@ -244,7 +244,7 @@ void FacebookProto::AddContactToServer(void *data)
NotifyEvent(m_tszUserName, TranslateT("Request for friendship was sent."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when requesting friendship.") );
+ facy.client_notify( TranslateT("Error occured when requesting friendship."));
}
if (resp.code != HTTP_CODE_OK)
@@ -314,7 +314,7 @@ void FacebookProto::CancelFriendsRequest(void *data)
DBWriteContactSettingByte(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, FACEBOOK_CONTACT_NONE);
NotifyEvent(m_tszUserName, TranslateT("Request for friendship was canceled."), NULL, FACEBOOK_EVENT_OTHER, NULL);
} else {
- facy.client_notify( TranslateT("Error occured when canceling friendship request.") );
+ facy.client_notify( TranslateT("Error occured when canceling friendship request."));
}
if (resp.code != HTTP_CODE_OK)
diff --git a/protocols/FacebookRM/definitions.h b/protocols/FacebookRM/definitions.h
index 5a862438d8..94efdb128b 100644
--- a/protocols/FacebookRM/definitions.h
+++ b/protocols/FacebookRM/definitions.h
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CODE_BLOCK_END }
#define FLAG_CONTAINS(x,y) ( ( x & y ) == y )
-#define REMOVE_FLAG(x,y) ( x = ( x & ~y ) )
+#define REMOVE_FLAG(x,y) ( x = ( x & ~y ))
#define LOG Log
diff --git a/protocols/FacebookRM/dialogs.cpp b/protocols/FacebookRM/dialogs.cpp
index 02ce022d5b..9eb1b3b2d5 100644
--- a/protocols/FacebookRM/dialogs.cpp
+++ b/protocols/FacebookRM/dialogs.cpp
@@ -50,13 +50,13 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv))
{
SetDlgItemTextA(hwnd,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -74,11 +74,11 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
if ( LOWORD( wparam ) == IDC_NEWACCOUNTLINK )
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ( FACEBOOK_URL_HOMEPAGE ) );
+ ( FACEBOOK_URL_HOMEPAGE ));
return TRUE;
}
- if ( HIWORD( wparam ) == EN_CHANGE && reinterpret_cast<HWND>(lparam) == GetFocus() )
+ if ( HIWORD( wparam ) == EN_CHANGE && reinterpret_cast<HWND>(lparam) == GetFocus())
{
switch(LOWORD(wparam))
{
@@ -195,13 +195,13 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv))
{
SetDlgItemTextA(hwnd,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv) )
+ if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,reinterpret_cast<LPARAM>(dbv.pszVal));
SetDlgItemTextA(hwnd,IDC_PW,dbv.pszVal);
@@ -216,7 +216,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
SendDlgItemMessage(hwnd, IDC_GROUP, EM_LIMITTEXT, FACEBOOK_GROUP_NAME_LIMIT, 0);
- if ( !DBGetContactSettingTString(0,proto->ModuleName(),FACEBOOK_KEY_DEF_GROUP,&dbv) )
+ if ( !DBGetContactSettingTString(0,proto->ModuleName(),FACEBOOK_KEY_DEF_GROUP,&dbv))
{
SetDlgItemText(hwnd,IDC_GROUP,dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -232,7 +232,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
if ( LOWORD( wparam ) == IDC_NEWACCOUNTLINK )
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ( FACEBOOK_URL_HOMEPAGE ) );
+ ( FACEBOOK_URL_HOMEPAGE ));
return TRUE;
}
@@ -412,7 +412,7 @@ INT_PTR CALLBACK FBEventsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
} return TRUE;
case WM_COMMAND: {
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_PREVIEW:
{
diff --git a/protocols/FacebookRM/events.cpp b/protocols/FacebookRM/events.cpp
index 2f93a58335..5d01df88df 100644
--- a/protocols/FacebookRM/events.cpp
+++ b/protocols/FacebookRM/events.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int FacebookProto::Log(const char *fmt,...)
{
- if ( !getByte( FACEBOOK_KEY_LOGGING_ENABLE, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_LOGGING_ENABLE, 0 ))
return EXIT_SUCCESS;
va_list va;
@@ -52,7 +52,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
if ( url.substr(0,4) != "http" )
url = FACEBOOK_URL_HOMEPAGE + url; // make absolute url
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) url.c_str() );
+ CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) url.c_str());
}
// After a click, destroy popup
@@ -85,9 +85,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
switch ( flags )
{
case FACEBOOK_EVENT_CLIENT:
- if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_ENABLE, DEFAULT_EVENT_CLIENT_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_CLIENT_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_CLIENT_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_CLIENT_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -97,9 +97,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_NEWSFEED:
- if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_FEEDS_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_FEEDS_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_FEEDS_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -110,9 +110,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_NOTIFICATION:
- if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_NOTIFICATIONS_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -123,9 +123,9 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
case FACEBOOK_EVENT_OTHER:
- if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_ENABLE, DEFAULT_EVENT_OTHER_ENABLE ))
goto exit;
- if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_DEFAULT, 0 ) )
+ if ( !getByte( FACEBOOK_KEY_EVENT_OTHER_DEFAULT, 0 ))
{
colorBack = getDword( FACEBOOK_KEY_EVENT_OTHER_COLBACK, DEFAULT_EVENT_COLBACK );
colorText = getDword( FACEBOOK_KEY_EVENT_OTHER_COLTEXT, DEFAULT_EVENT_COLTEXT );
@@ -136,7 +136,7 @@ void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HANDLE contact, DWORD
break;
}
- if ( !getByte(FACEBOOK_KEY_SYSTRAY_NOTIFY,DEFAULT_SYSTRAY_NOTIFY) )
+ if ( !getByte(FACEBOOK_KEY_SYSTRAY_NOTIFY,DEFAULT_SYSTRAY_NOTIFY))
{
if (ServiceExists(MS_POPUP_ADDPOPUP))
{
diff --git a/protocols/FacebookRM/json.cpp b/protocols/FacebookRM/json.cpp
index bb92cb4434..b9bf8915a8 100644
--- a/protocols/FacebookRM/json.cpp
+++ b/protocols/FacebookRM/json.cpp
@@ -40,14 +40,14 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
const Object& objRoot = objDocument;
/* const Array& wasAvailableIDs = objRoot["payload"]["buddy_list"]["wasAvailableIDs"];
- for ( Array::const_iterator itWasAvailable( wasAvailableIDs.Begin() );
+ for ( Array::const_iterator itWasAvailable( wasAvailableIDs.Begin());
itWasAvailable != wasAvailableIDs.End(); ++itWasAvailable)
{
const Number& member = *itWasAvailable;
char was_id[32];
lltoa( member.Value(), was_id, 10 );
- current = buddy_list->find( std::string( was_id ) );
+ current = buddy_list->find( std::string( was_id ));
if ( current != NULL )
current->status_id = ID_STATUS_OFFLINE;
}*/ // Facebook removed support for "wasAvailableIDs"
@@ -61,7 +61,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
if (DBGetContactSettingByte(NULL,proto->m_szModuleName,FACEBOOK_KEY_LOAD_MOBILE, DEFAULT_LOAD_MOBILE)) {
const Array& mobileFriends = objRoot["payload"]["buddy_list"]["mobile_friends"];
- for ( Array::const_iterator buddy( mobileFriends.Begin() ); buddy != mobileFriends.End(); ++buddy) {
+ for ( Array::const_iterator buddy( mobileFriends.Begin()); buddy != mobileFriends.End(); ++buddy) {
const Number& member = *buddy;
char was_id[32];
lltoa( member.Value(), was_id, 10 );
@@ -71,7 +71,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
current = buddy_list->find( id );
if ( current == NULL) {
- buddy_list->insert( std::make_pair( id, new facebook_user( ) ) );
+ buddy_list->insert( std::make_pair( id, new facebook_user( )) );
current = buddy_list->find( id );
current->user_id = id;
}
@@ -94,7 +94,7 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
if ( current == NULL) {
if (idle) continue; // Just little optimalization
- buddy_list->insert( std::make_pair( member.name, new facebook_user( ) ) );
+ buddy_list->insert( std::make_pair( member.name, new facebook_user( )) );
current = buddy_list->find( member.name );
current->user_id = current->real_name = member.name;
}
@@ -118,23 +118,23 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use
const String& imageUrl = objMember["thumbSrc"];
current->real_name = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( realName.Value( ) ) );
+ utils::text::special_expressions_decode( realName.Value( )) );
current->image_url = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( imageUrl.Value( ) ) );
+ utils::text::special_expressions_decode( imageUrl.Value( )) );
}
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -154,7 +154,7 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
const Object& objRoot = objDocument;
const Object& payload = objRoot["payload"];
- for ( Object::const_iterator payload_item( payload.Begin() ); payload_item != payload.End(); ++payload_item)
+ for ( Object::const_iterator payload_item( payload.Begin()); payload_item != payload.End(); ++payload_item)
{
const Object::Member& member = *payload_item;
@@ -169,9 +169,9 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
fbu->user_id = member.name;
fbu->real_name = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( realName.Value() ) );
+ utils::text::special_expressions_decode( realName.Value()) );
fbu->image_url = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( imageUrl.Value() ) );
+ utils::text::special_expressions_decode( imageUrl.Value()) );
if (gender.Value() == 1) {
fbu->gender = 70; // female
@@ -179,21 +179,21 @@ int facebook_json_parser::parse_friends( void* data, std::map< std::string, face
fbu->gender = 77; // male
}
- friends->insert( std::make_pair( member.name, fbu ) );
+ friends->insert( std::make_pair( member.name, fbu ));
}
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -214,7 +214,7 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
const Object& objRoot = objDocument;
const Object& payload = objRoot["payload"]["notifications"];
- for ( Object::const_iterator payload_item( payload.Begin() ); payload_item != payload.End(); ++payload_item)
+ for ( Object::const_iterator payload_item( payload.Begin()); payload_item != payload.End(); ++payload_item)
{
const Object::Member& member = *payload_item;
@@ -227,11 +227,11 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
continue;
std::string text = utils::text::slashu_to_utf8(
- utils::text::special_expressions_decode( content.Value() ) );
+ utils::text::special_expressions_decode( content.Value()) );
facebook_notification* notification = new facebook_notification( );
- notification->text = utils::text::remove_html( utils::text::source_get_value(&text, 1, "<abbr") );
+ notification->text = utils::text::remove_html( utils::text::source_get_value(&text, 1, "<abbr"));
notification->link = utils::text::source_get_value(&text, 3, "<a ", "href=\"", "\"");
notifications->push_back( notification );
@@ -240,16 +240,16 @@ int facebook_json_parser::parse_notifications( void *data, std::vector< facebook
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log( "!!!!! Caught json::Exception: %s", e.what());
}
catch (const std::exception& e)
{
- proto->Log( "!!!!! Caught std::exception: %s", e.what() );
+ proto->Log( "!!!!! Caught std::exception: %s", e.what());
}
return EXIT_SUCCESS;
@@ -301,8 +301,8 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
last_msg = text.Value();
facebook_message* message = new facebook_message( );
message->message_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
- message->time = utils::time::fix_timestamp( time_sent.Value() );
+ utils::text::slashu_to_utf8( text.Value( )) );
+ message->time = utils::time::fix_timestamp( time_sent.Value());
message->user_id = was_id;
messages->push_back( message );
@@ -344,19 +344,19 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
facebook_message* message = new facebook_message( );
message->message_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
message->sender_name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( sender_name.Value( ) ) );
+ utils::text::slashu_to_utf8( sender_name.Value( )) );
- message->time = utils::time::fix_timestamp( time_sent.Value() );
+ message->time = utils::time::fix_timestamp( time_sent.Value());
message->user_id = was_id; // TODO: Check if we have contact with this ID in friendlist and then do something different?
if (row.find("uiSplitPic",0) != std::string::npos) {
// This is multiuser message
std::string authors = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( row ) );
+ utils::text::slashu_to_utf8( row ));
authors = utils::text::source_get_value(&authors, 2, "<strong class=\"authors\">", "<");
const String& to_id = messageContent["tid"];
@@ -410,17 +410,17 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
const String& text = messageContent["text"];
std::string msg = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
std::string name = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( ) ) );
+ utils::text::slashu_to_utf8( from_name.Value( )) );
// Add contact into chat, if isn't there already
if (!proto->IsChatContact(group_id, was_id))
proto->AddChatContact(group_id, was_id, name.c_str());
const Number& time_sent = messageContent["time"];
- DWORD timestamp = utils::time::fix_timestamp( time_sent.Value() );
+ DWORD timestamp = utils::time::fix_timestamp( time_sent.Value());
// Add message into chat
proto->UpdateChat(group_id, was_id, name.c_str(), msg.c_str(), timestamp);
@@ -447,15 +447,15 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
std::string popup_text = utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( from_name.Value( ) ) );
+ utils::text::slashu_to_utf8( from_name.Value( )) );
popup_text += ": ";
popup_text += utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) );
std::string title = Translate("Multichat");
title += ": ";
title += utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( to_name.Value( ) ) );
+ utils::text::slashu_to_utf8( to_name.Value( )) );
std::string url = "/?action=read&sk=inbox&page&query&tid=";
url += to_id.Value();
@@ -487,9 +487,9 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
facebook_notification* notification = new facebook_notification( );
notification->text = utils::text::remove_html(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( text.Value( ) ) ) );
+ utils::text::slashu_to_utf8( text.Value( )) ));
- notification->link = utils::text::special_expressions_decode( link.Value( ) );
+ notification->link = utils::text::special_expressions_decode( link.Value( ));
notifications->push_back( notification );
}
@@ -526,12 +526,12 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess
}
catch (Reader::ParseException& e)
{
- proto->Log( "!!!!! Caught json::ParseException: %s", e.what() );
+ proto->Log( "!!!!! Caught json::ParseException: %s", e.what());
proto->Log( " Line/offset: %d/%d", e.m_locTokenBegin.m_nLine + 1, e.m_locTokenBegin.m_nLineOffset + 1 );
}
catch (const Exception& e)
{
- proto->Log ( "!!!!! Caught json::Exception: %s", e.what() );
+ proto->Log ( "!!!!! Caught json::Exception: %s", e.what());
}
return EXIT_SUCCESS;
diff --git a/protocols/FacebookRM/list.hpp b/protocols/FacebookRM/list.hpp
index 597a2b413e..7a26aec1ec 100644
--- a/protocols/FacebookRM/list.hpp
+++ b/protocols/FacebookRM/list.hpp
@@ -86,7 +86,7 @@ namespace List
void insert( Item< T >* item )
{
- if ( this->empty( ) )
+ if ( this->empty( ))
{
this->first = this->last = item;
this->count = 1;
diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp
index b6f4c3af1b..8725af285e 100644
--- a/protocols/FacebookRM/main.cpp
+++ b/protocols/FacebookRM/main.cpp
@@ -98,7 +98,7 @@ static int protoUninit(PROTO_INTERFACE* proto)
int OnModulesLoaded(WPARAM,LPARAM)
{
- if ( ServiceExists( MS_UPDATE_REGISTER ) )
+ if ( ServiceExists( MS_UPDATE_REGISTER ))
{
Update upd = {sizeof(upd)};
char curr_version[30];
@@ -114,7 +114,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
#else
upd.szBetaUpdateURL = "http://robyer.info/stahni/facebookRM.zip";
#endif
- upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -134,7 +134,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/protocols/FacebookRM/messages.cpp b/protocols/FacebookRM/messages.cpp
index def7a6b64b..1f6d80a6d5 100644
--- a/protocols/FacebookRM/messages.cpp
+++ b/protocols/FacebookRM/messages.cpp
@@ -26,9 +26,9 @@ int FacebookProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
{
DBVARIANT dbv;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
- ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ) );
+ ForkThread( &FacebookProto::MessagingWorker, this, new send_messaging(dbv.pszVal, FACEBOOK_RECV_MESSAGE ));
DBFreeVariant(&dbv);
}
@@ -49,11 +49,11 @@ void FacebookProto::SendMsgWorker(void *p)
DBVARIANT dbv;
- if ( !isOnline( ) )
+ if ( !isOnline( ))
{
ProtoBroadcastAck(m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, (LPARAM)Translate("You cannot send messages when you are offline."));
}
- else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
int retries = 5;
std::string error_text = "";
@@ -64,7 +64,7 @@ void FacebookProto::SendMsgWorker(void *p)
}
if (result) {
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_SUCCESS, data->msgid,0);
- MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ) );
+ MessagingWorker( new send_messaging(dbv.pszVal, FACEBOOK_SEND_MESSAGE ));
} else {
char *err = mir_utf8decodeA(error_text.c_str());
ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, data->msgid,(LPARAM)err);
@@ -118,7 +118,7 @@ int FacebookProto::SendMsg(HANDLE hContact, int flags, const char *msg)
msg = mir_utf8encode(msg);
facy.msgid_ = (facy.msgid_ % 1024)+1;
- ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_) );
+ ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_));
return facy.msgid_;
}
@@ -146,14 +146,14 @@ void FacebookProto::SendTypingWorker(void *p)
facy.is_typing_ = (typing->status == PROTOTYPE_SELFTYPING_ON);
SleepEx( 2000, true );
- if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON) )
+ if ( !facy.is_typing_ == (typing->status == PROTOTYPE_SELFTYPING_ON))
{
delete typing;
return;
}
DBVARIANT dbv;
- if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(typing->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string data = "typ=";
data += ( typing->status == PROTOTYPE_SELFTYPING_ON ) ? "1" : "0"; // PROTOTYPE_SELFTYPING_OFF
@@ -162,7 +162,7 @@ void FacebookProto::SendTypingWorker(void *p)
data += "&source=mercury-chat";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&post_form_id=";
- data += ( facy.post_form_id_.length( ) ) ? facy.post_form_id_ : "0";
+ data += ( facy.post_form_id_.length( )) ? facy.post_form_id_ : "0";
data += "&post_form_id_source=AsyncRequest&lsd=&phstamp=0&__user=";
data += facy.self_.user_id;
@@ -184,7 +184,7 @@ void FacebookProto::MessagingWorker(void *p)
if (data->type == FACEBOOK_RECV_MESSAGE)
facy.chat_mark_read( data->user_id );
-// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ) )
+// if ( DBGetContactSettingByte(NULL, m_szModuleName, FACEBOOK_KEY_CLOSE_WINDOWS_ENABLE, DEFAULT_CLOSE_WINDOWS_ENABLE ))
// facy.close_chat( data->user_id );
delete data;
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp
index 09bdd2ac79..f8ffa7e1ce 100644
--- a/protocols/FacebookRM/process.cpp
+++ b/protocols/FacebookRM/process.cpp
@@ -31,7 +31,7 @@ void FacebookProto::ProcessBuddyList( void* data )
std::string* resp = (std::string*)data;
- if ( isOffline() )
+ if ( isOffline())
goto exit;
LOG("***** Starting processing buddy list");
@@ -81,7 +81,7 @@ void FacebookProto::ProcessBuddyList( void* data )
}
// Wasn't contact removed from "server-list" someday?
- if ( DBGetContactSettingDword(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED, 0) ) {
+ if ( DBGetContactSettingDword(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED, 0)) {
DBDeleteContactSetting(fbu->handle, m_szModuleName, FACEBOOK_KEY_DELETED);
std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
@@ -131,14 +131,14 @@ void FacebookProto::ProcessFriendList( void* data )
// Check and update old contacts
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if (!IsMyContact(hContact))
continue;
DBVARIANT dbv;
facebook_user *fbu;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv)) {
std::string id = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -158,9 +158,9 @@ void FacebookProto::ProcessFriendList( void* data )
DBWriteContactSettingByte(hContact, m_szModuleName, "Gender", fbu->gender);
// Update real name
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) )
+ if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv))
{
- update_required = strcmp( dbv.pszVal, fbu->real_name.c_str() ) != 0;
+ update_required = strcmp( dbv.pszVal, fbu->real_name.c_str()) != 0;
DBFreeVariant(&dbv);
}
if ( update_required )
@@ -175,7 +175,7 @@ void FacebookProto::ProcessFriendList( void* data )
}
// Wasn't contact removed from "server-list" someday?
- if ( DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_DELETED, 0) ) {
+ if ( DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_DELETED, 0)) {
DBDeleteContactSetting(hContact, m_szModuleName, FACEBOOK_KEY_DELETED);
std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
@@ -204,7 +204,7 @@ void FacebookProto::ProcessFriendList( void* data )
DBWriteContactSettingByte(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, FACEBOOK_CONTACT_NONE);
std::string contactname = id;
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
+ if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
contactname = dbv.pszVal;
DBFreeVariant(&dbv);
}
@@ -253,7 +253,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string get_data = "sk=inbox&query=is%3Aunread";
std::string data = "post_form_id=";
- data += ( facy.post_form_id_.length( ) ) ? facy.post_form_id_ : "0";
+ data += ( facy.post_form_id_.length( )) ? facy.post_form_id_ : "0";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&post_form_id_source=AsyncRequest&lsd=&phstamp=";
data += utils::time::mili_timestamp();
@@ -277,7 +277,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string::size_type pos = 0;
- while ( ( pos = threadlist.find( "<li class=\\\"threadRow noDraft unread", pos ) ) != std::string::npos )
+ while ( ( pos = threadlist.find( "<li class=\\\"threadRow noDraft unread", pos )) != std::string::npos )
{
std::string::size_type pos2 = threadlist.find( "/li>", pos );
std::string thread_content = threadlist.substr( pos, pos2 - pos );
@@ -313,7 +313,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
// TODO: maybe create new "receiveMsg" function and use it for offline and channel messages?
pos2 = 0;
- while ( ( pos2 = messageslist.find( "class=\\\"MessagingMessage ", pos2 ) ) != std::string::npos ) {
+ while ( ( pos2 = messageslist.find( "class=\\\"MessagingMessage ", pos2 )) != std::string::npos ) {
pos2 += 8;
std::string strclass = messageslist.substr(pos2, messageslist.find("\\\"", pos2) - pos2);
@@ -325,10 +325,10 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string messagesgroup = messageslist.substr( pos2, pos3 - pos2 );
DWORD timestamp = utils::conversion::to_timestamp(
- utils::text::source_get_value( &messagesgroup, 2, "data-utime=\\\"", "\\\"" ) );
+ utils::text::source_get_value( &messagesgroup, 2, "data-utime=\\\"", "\\\"" ));
pos3 = 0;
- while ( ( pos3 = messagesgroup.find( "class=\\\"content noh", pos3 ) ) != std::string::npos )
+ while ( ( pos3 = messagesgroup.find( "class=\\\"content noh", pos3 )) != std::string::npos )
{
std::string message_attachments = "";
@@ -337,17 +337,17 @@ void FacebookProto::ProcessUnreadMessages( void* )
std::string attachments = messagesgroup.substr( pos4, messagesgroup.find("<\\/ul", pos4) - pos4 );
pos4 = 0;
- while ( ( pos4 = attachments.find("<li", pos4) ) != std::string::npos ) {
+ while ( ( pos4 = attachments.find("<li", pos4)) != std::string::npos ) {
std::string attachment = attachments.substr( pos4, attachments.find("<\\/li>", pos4) - pos4 );
std::string link = utils::text::source_get_value( &attachment, 4, "<a class=", "attachment", "href=\\\"", "\\\"" );
link = utils::text::trim(
- utils::text::special_expressions_decode( link ) );
+ utils::text::special_expressions_decode( link ));
// or first: std::string name = utils::text::source_get_value( &attachment, 4, "<a class=", "attachment", ">", "<\\/a>" );
std::string name = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( attachment ) ) );
+ utils::text::remove_html( attachment )) );
if (link.find("/ajax/messaging/attachments/photo/dialog.php?uri=") != std::string::npos) {
link = link.substr(49);
@@ -366,7 +366,7 @@ void FacebookProto::ProcessUnreadMessages( void* )
message_text = utils::text::source_get_value( &message_text, 2, "\\\">", "<\\/div" );
message_text = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( message_text ) ) );
+ utils::text::remove_html( message_text )) );
if (!message_attachments.empty()) {
if (!message_text.empty())
@@ -404,7 +404,7 @@ void FacebookProto::ProcessMessages( void* data )
std::string* resp = (std::string*)data;
- if ( isOffline() )
+ if ( isOffline())
goto exit;
LOG("***** Starting processing messages");
@@ -476,7 +476,7 @@ exit:
void FacebookProto::ProcessNotifications( void* )
{
- if ( isOffline() )
+ if ( isOffline())
return;
if (!getByte( FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE ))
@@ -643,7 +643,7 @@ void FacebookProto::ProcessFeeds( void* data )
*resp = utils::text::slashu_to_utf8(*resp);
*resp = utils::text::source_get_value(resp, 2, "\"html\":\"", ">\"");
- while ( ( pos = resp->find( "<div class=\\\"mainWrapper\\\"", pos ) ) != std::string::npos && limit <= 25 )
+ while ( ( pos = resp->find( "<div class=\\\"mainWrapper\\\"", pos )) != std::string::npos && limit <= 25 )
{
std::string::size_type pos2 = resp->find( "<div class=\\\"mainWrapper\\\"", pos+5 );
if (pos2 == std::string::npos)
@@ -669,19 +669,19 @@ void FacebookProto::ProcessFeeds( void* data )
nf->title = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::remove_html( post_header ) ) );
+ utils::text::remove_html( post_header )) );
nf->user_id = utils::text::source_get_value( &post_header, 2, "user.php?id=", "\\\"" );
nf->link = utils::text::special_expressions_decode(
- utils::text::source_get_value( &post_link, 2, "href=\\\"", "\\\">" ) );
+ utils::text::source_get_value( &post_link, 2, "href=\\\"", "\\\">" ));
nf->text = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::remove_html(
- utils::text::edit_html( post_message ) ) ) );
+ utils::text::edit_html( post_message )) ));
- if ( !nf->title.length() || !nf->text.length() )
+ if ( !nf->title.length() || !nf->text.length())
{
delete nf;
continue;
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp
index e51a39f1dd..cc5f446662 100644
--- a/protocols/FacebookRM/proto.cpp
+++ b/protocols/FacebookRM/proto.cpp
@@ -69,9 +69,9 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username)
facy.set_handle(m_hNetlibUser);
- SkinAddNewSoundExT( "Notification", m_tszUserName, LPGENT( "Notification" ) );
- SkinAddNewSoundExT( "NewsFeed", m_tszUserName, LPGENT( "News Feed" ) );
- SkinAddNewSoundExT( "OtherEvent", m_tszUserName, LPGENT( "Other Event" ) );
+ SkinAddNewSoundExT( "Notification", m_tszUserName, LPGENT( "Notification" ));
+ SkinAddNewSoundExT( "NewsFeed", m_tszUserName, LPGENT( "News Feed" ));
+ SkinAddNewSoundExT( "OtherEvent", m_tszUserName, LPGENT( "Other Event" ));
TCHAR *profile = Utils_ReplaceVarsT( _T("%miranda_avatarcache%"));
def_avatar_folder_ = std::tstring(profile) + _T("\\") + m_tszUserName;
@@ -115,7 +115,7 @@ DWORD_PTR FacebookProto::GetCaps( int type, HANDLE hContact )
{
DWORD_PTR flags = PF1_IM | PF1_CHAT | PF1_SERVERCLIST | PF1_AUTHREQ | /*PF1_ADDED |*/ PF1_BASICSEARCH | PF1_USERIDISEMAIL | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_ADDSEARCHRES; // | PF1_VISLIST | PF1_INVISLIST;
- if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ) )
+ if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ))
return flags |= PF1_MODEMSG;
else
return flags |= PF1_MODEMSGRECV;
@@ -123,7 +123,7 @@ DWORD_PTR FacebookProto::GetCaps( int type, HANDLE hContact )
case PFLAGNUM_2:
return PF2_ONLINE | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE; // | PF2_SHORTAWAY;
case PFLAGNUM_3:
- if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ) )
+ if ( getByte( FACEBOOK_KEY_SET_MIRANDA_STATUS, 0 ))
return PF2_ONLINE; // | PF2_SHORTAWAY;
else
return 0;
@@ -222,7 +222,7 @@ int FacebookProto::SetAwayMsg( int status, const PROTOCHAR *msg )
void FacebookProto::SetAwayMsgWorker(void *)
{
- if ( !last_status_msg_.empty() )
+ if ( !last_status_msg_.empty())
facy.set_status( last_status_msg_ );
}
@@ -446,7 +446,7 @@ int FacebookProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
int FacebookProto::OnMind(WPARAM,LPARAM)
{
HWND hDlg = CreateDialogParam( g_hInstance, MAKEINTRESOURCE( IDD_MIND ),
- ( HWND )0, FBMindProc, reinterpret_cast<LPARAM>( this ) );
+ ( HWND )0, FBMindProc, reinterpret_cast<LPARAM>( this ));
ShowWindow( hDlg, SW_SHOW );
return FALSE;
}
@@ -456,7 +456,7 @@ int FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if ( wParam != 0 && !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv) )
+ if ( wParam != 0 && !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv))
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>(dbv.pszVal));
DBFreeVariant(&dbv);
@@ -494,22 +494,22 @@ int FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam)
DBVARIANT dbv;
TCHAR tstr[256];
- if ( !DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
+ if ( !DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv)) {
mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
- } else if ( !DBGetContactSettingTString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
+ } else if ( !DBGetContactSettingTString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv)) {
mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
}
if (MessageBox( 0, tstr, m_tszUserName, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2 ) == IDYES) {
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string* id = new std::string(dbv.pszVal);
if (deleting) {
- facebook_user* fbu = facy.buddies.find( (*id) );
+ facebook_user* fbu = facy.buddies.find( (*id));
if (fbu != NULL) {
fbu->handle = NULL;
}
@@ -532,7 +532,7 @@ int FacebookProto::RequestFriendship(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
+ if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
std::string* id = new std::string(dbv.pszVal);
ForkThread( &FacebookProto::AddContactToServer, this, ( void* )id );
diff --git a/protocols/FacebookRM/theme.cpp b/protocols/FacebookRM/theme.cpp
index 02c28a4b8e..c3d2fca65b 100644
--- a/protocols/FacebookRM/theme.cpp
+++ b/protocols/FacebookRM/theme.cpp
@@ -117,7 +117,7 @@ HANDLE g_hContactMenuSvc[CMITEMS_COUNT];
static FacebookProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(!proto)
return 0;
diff --git a/protocols/FacebookRM/utils.cpp b/protocols/FacebookRM/utils.cpp
index e34238a372..8e33b26e01 100644
--- a/protocols/FacebookRM/utils.cpp
+++ b/protocols/FacebookRM/utils.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
@@ -114,7 +114,7 @@ void utils::text::replace_all( std::string* data, std::string from, std::string
{
std::string::size_type position = 0;
- while ( ( position = data->find( from, position ) ) != std::string::npos )
+ while ( ( position = data->find( from, position )) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -126,7 +126,7 @@ unsigned int utils::text::count_all( std::string* data, std::string term )
unsigned int count = 0;
std::string::size_type position = 0;
- while ( ( position = data->find( term, position ) ) != std::string::npos )
+ while ( ( position = data->find( term, position )) != std::string::npos )
{
count++;
position++;
@@ -282,14 +282,14 @@ std::string utils::text::slashu_to_utf8( std::string data )
if ( udn >= 128 && udn <= 2047 )
{ // U+0080 .. U+07FF
- new_string += ( char )( 192 + ( udn / 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 192 + ( udn / 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn >= 2048 && udn <= 65535 )
{ // U+0800 .. U+FFFF
- new_string += ( char )( 224 + ( udn / 4096 ) );
- new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 224 + ( udn / 4096 ));
+ new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn <= 127 )
{ // U+0000 .. U+007F (should not appear)
@@ -380,7 +380,7 @@ std::string utils::text::source_get_value2( std::string* data, const char *term,
int utils::number::random( )
{
- srand( ::time( NULL ) );
+ srand( ::time( NULL ));
return rand( );
}
@@ -389,7 +389,7 @@ int utils::debug::log(std::string file_name, std::string text)
char szFile[MAX_PATH];
GetModuleFileNameA(g_hInstance, szFile, SIZEOF(szFile));
std::string path = szFile;
- path = path.substr( 0, path.rfind( "\\" ) );
+ path = path.substr( 0, path.rfind( "\\" ));
path = path.substr( 0, path.rfind( "\\" ) + 1 );
path = path + file_name.c_str() + ".txt";
diff --git a/protocols/Gadu-Gadu/libgadu/sha1.c b/protocols/Gadu-Gadu/libgadu/sha1.c
index d68efc5b98..124a1cffaa 100644
--- a/protocols/Gadu-Gadu/libgadu/sha1.c
+++ b/protocols/Gadu-Gadu/libgadu/sha1.c
@@ -195,7 +195,7 @@ unsigned char finalcount[8];
for (i = 0; i < 8; i++) {
finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
- >> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
+ >> ((3-(i & 3)) * 8)) & 255); /* Endian independent */
}
SHA1_Update(context, (unsigned char *)"\200", 1);
while ((context->count[0] & 504) != 448) {
@@ -204,7 +204,7 @@ unsigned char finalcount[8];
SHA1_Update(context, finalcount, 8); /* Should cause a SHA1_Transform() */
for (i = 0; i < 20; i++) {
digest[i] = (unsigned char)
- ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+ ((context->state[i>>2] >> ((3-(i & 3)) * 8)) & 255);
}
/* Wipe variables */
i = j = 0;
diff --git a/protocols/IRCG/MString.h b/protocols/IRCG/MString.h
index 6f90b7741b..7cc16ff4a3 100644
--- a/protocols/IRCG/MString.h
+++ b/protocols/IRCG/MString.h
@@ -115,7 +115,7 @@ public:
CMSimpleStringT(PCXSTR pszSrc)
{
int nLength = StringLength( pszSrc );
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if (pData != NULL)
{
Attach( pData );
@@ -125,7 +125,7 @@ public:
}
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if ( pData != NULL )
{
Attach( pData );
@@ -150,8 +150,8 @@ public:
CMStringData* pOldData = GetData();
if ( pSrcData != pOldData)
{
- if ( pOldData->IsLocked() )
- SetString( strSrc.GetString(), strSrc.GetLength() );
+ if ( pOldData->IsLocked())
+ SetString( strSrc.GetString(), strSrc.GetLength());
else
{
CMStringData* pNewData = CloneData( pSrcData );
@@ -218,7 +218,7 @@ public:
void Append( PCXSTR pszSrc )
{
- Append( pszSrc, StringLength( pszSrc ) );
+ Append( pszSrc, StringLength( pszSrc ));
}
void Append( PCXSTR pszSrc, int nLength )
{
@@ -257,7 +257,7 @@ public:
}
void Append( const CMSimpleStringT& strSrc )
{
- Append( strSrc.GetString(), strSrc.GetLength() );
+ Append( strSrc.GetString(), strSrc.GetLength());
}
void Empty()
{
@@ -265,7 +265,7 @@ public:
if ( pOldData->nDataLength == 0 )
return;
- if ( pOldData->IsLocked() )
+ if ( pOldData->IsLocked())
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -284,15 +284,15 @@ public:
if ( pOldData->nAllocLength == nLength )
return;
- if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked()) // Don't reallocate a locked buffer that's shrinking
{
- CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ));
if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
- CopyChars( PXSTR( pNewData->data() ), nLength, PCXSTR( pOldData->data() ), nLength );
+ CopyChars( PXSTR( pNewData->data()), nLength, PCXSTR( pOldData->data()), nLength );
pOldData->Release();
Attach( pNewData );
@@ -311,7 +311,7 @@ public:
PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public:
PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -389,7 +389,7 @@ public:
}
void SetString( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void SetString( PCXSTR pszSrc, int nLength )
{
@@ -421,7 +421,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength());
return s;
}
@@ -430,7 +430,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return s;
}
@@ -439,7 +439,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength());
return s;
}
@@ -527,7 +527,7 @@ private:
if (pNewData != NULL)
{
int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
- CopyChars( PXSTR( pNewData->data() ), nCharsToCopy, PCXSTR( pOldData->data() ), nCharsToCopy );
+ CopyChars( PXSTR( pNewData->data()), nCharsToCopy, PCXSTR( pOldData->data()), nCharsToCopy );
pNewData->nDataLength = nOldLength;
pOldData->Release();
Attach(pNewData);
@@ -578,7 +578,7 @@ private:
if ( pOldData->nAllocLength >= nLength || nLength <= 0)
return;
- CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ));
if ( pNewData != NULL )
Attach( pNewData );
}
@@ -676,19 +676,19 @@ public:
static int __stdcall StringSpanIncluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static int __stdcall StringSpanExcluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static LPSTR __stdcall StringUppercase( LPSTR psz )
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -696,7 +696,7 @@ public:
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -722,7 +722,7 @@ public:
static LPSTR __stdcall StringReverse( LPSTR psz )
{
- return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz )) );
}
static int __stdcall GetFormattedLength( LPCSTR pszFormat, va_list args );
@@ -741,7 +741,7 @@ public:
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc )
{
// Returns required buffer length in XCHARs
- return int( strlen( pszSrc ) );
+ return int( strlen( pszSrc ));
}
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc, int nLength )
@@ -768,7 +768,7 @@ public:
if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s( pszDest, nDestLength*sizeof( char ),
- pszSrc, nSrcLength*sizeof( char ) );
+ pszSrc, nSrcLength*sizeof( char ));
}
static void __stdcall ConvertToBaseType( LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
@@ -835,13 +835,13 @@ public:
static int __stdcall SafeStringLen( LPCSTR psz )
{
// returns length in bytes
- return (psz != NULL) ? int( strlen( psz ) ) : 0;
+ return (psz != NULL) ? int( strlen( psz )) : 0;
}
static int __stdcall SafeStringLen( LPCWSTR psz )
{
// returns length in wchar_ts
- return (psz != NULL) ? int( wcslen( psz ) ) : 0;
+ return (psz != NULL) ? int( wcslen( psz )) : 0;
}
static int __stdcall GetCharLen( const wchar_t* pch )
@@ -853,7 +853,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return int( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return int( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize )
@@ -879,12 +879,12 @@ public:
static int __stdcall IsDigit( wchar_t ch )
{
- return iswdigit( static_cast<unsigned short>(ch) );
+ return iswdigit( static_cast<unsigned short>(ch));
}
static int __stdcall IsSpace( wchar_t ch )
{
- return iswspace( static_cast<unsigned short>(ch) );
+ return iswspace( static_cast<unsigned short>(ch));
}
static int __stdcall StringCompare( LPCWSTR pszA, LPCWSTR pszB )
@@ -1068,7 +1068,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize )
@@ -1362,7 +1362,7 @@ public:
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
PXSTR pszBuffer = this->GetBuffer();
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#else
memmove( pszBuffer+iIndex, pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#endif
@@ -1378,7 +1378,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1387,9 +1387,9 @@ public:
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#endif
pszBuffer[iIndex] = ch;
@@ -1403,7 +1403,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
{
iIndex = this->GetLength();
}
@@ -1418,10 +1418,10 @@ public:
PXSTR pszBuffer = this->GetBuffer( nNewLength );
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy_s( pszBuffer+iIndex, nInsertLength*sizeof( XCHAR ), psz, nInsertLength*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy( pszBuffer+iIndex, psz, nInsertLength*sizeof( XCHAR ));
#endif
this->ReleaseBufferSetLength( nNewLength );
@@ -1440,7 +1440,7 @@ public:
{
// otherwise modify each character that matches in the string
bool bCopied = false;
- PXSTR pszBuffer = const_cast< PXSTR >( this->GetString() ); // We don't actually write to pszBuffer until we've called GetBuffer().
+ PXSTR pszBuffer = const_cast< PXSTR >( this->GetString()); // We don't actually write to pszBuffer until we've called GetBuffer().
int nLength = this->GetLength();
int iChar = 0;
@@ -1488,7 +1488,7 @@ public:
while( pszStart < pszEnd )
{
PCXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL)
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL)
{
nCount++;
pszStart = pszTarget+nSourceLen;
@@ -1505,7 +1505,7 @@ public:
int nOldLength = this->GetLength();
int nNewLength = nOldLength+(nReplacementLen-nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ) );
+ PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart+nOldLength;
@@ -1514,13 +1514,13 @@ public:
while( pszStart < pszEnd )
{
PXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL )
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL )
{
int nBalance = nOldLength-int(pszTarget-pszBuffer+nSourceLen);
memmove_s( pszTarget+nReplacementLen, nBalance*sizeof( XCHAR ),
- pszTarget+nSourceLen, nBalance*sizeof( XCHAR ) );
+ pszTarget+nSourceLen, nBalance*sizeof( XCHAR ));
memcpy_s( pszTarget, nReplacementLen*sizeof( XCHAR ),
- pszNew, nReplacementLen*sizeof( XCHAR ) );
+ pszNew, nReplacementLen*sizeof( XCHAR ));
pszStart = pszTarget+nReplacementLen;
pszTarget[nReplacementLen+nBalance] = 0;
nOldLength += (nReplacementLen-nSourceLen);
@@ -1571,7 +1571,7 @@ public:
CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0))
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1707,7 +1707,7 @@ public:
while( *psz != 0 )
{
- if ( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ))
{
if ( pszLast == NULL )
pszLast = psz;
@@ -1722,7 +1722,7 @@ public:
if ( pszLast != NULL )
{
// truncate at trailing space start
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1737,20 +1737,20 @@ public:
PCXSTR psz = this->GetString();
- while( StringTraits::IsSpace( *psz ) )
+ while( StringTraits::IsSpace( *psz ))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1805,7 +1805,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1816,7 +1816,7 @@ public:
CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
@@ -1846,7 +1846,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1864,15 +1864,15 @@ public:
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1883,26 +1883,26 @@ public:
CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
PCXSTR psz = this->GetString();
- while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL) )
+ while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1946,14 +1946,14 @@ public:
if (nCount < 0)
nCount = 0;
- if ( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength())
nCount = this->GetLength()-iFirst;
- if ( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength())
nCount = 0;
// optimize case of returning entire string
- if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()))
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -2030,13 +2030,13 @@ public:
// Allocate a BSTR containing a copy of the string
BSTR AllocSysString() const
{
- BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength() );
+ BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength());
return bstrResult;
}
BSTR SetSysString( BSTR* pbstr ) const
{
- StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength() );
+ StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength());
return *pbstr;
}
@@ -2075,7 +2075,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength());
return strResult;
}
@@ -2084,7 +2084,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return strResult;
}
@@ -2093,7 +2093,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength());
return strResult;
}
@@ -2123,7 +2123,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
@@ -2133,7 +2133,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
diff --git a/protocols/IRCG/clist.cpp b/protocols/IRCG/clist.cpp
index 8dc683caa6..31c81db884 100644
--- a/protocols/IRCG/clist.cpp
+++ b/protocols/IRCG/clist.cpp
@@ -114,7 +114,7 @@ HANDLE CIrcProto::CList_AddContact(CONTACT * user, bool InList, bool SetOnline)
setTString(hContact, "Nick", user->name);
setTString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE:ID_STATUS_OFFLINE);
- if ( !InList && getByte( "MirVerAutoRequestTemp", 0) )
+ if ( !InList && getByte( "MirVerAutoRequestTemp", 0))
PostIrcMessage( _T("/PRIVMSG %s \001VERSION\001"), user->name);
return hContact;
}
diff --git a/protocols/IRCG/commandmonitor.cpp b/protocols/IRCG/commandmonitor.cpp
index 57e9aa3517..dac26d1349 100644
--- a/protocols/IRCG/commandmonitor.cpp
+++ b/protocols/IRCG/commandmonitor.cpp
@@ -53,7 +53,7 @@ VOID CALLBACK TimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
if ( ppro->m_forceVisible )
ppro->PostIrcMessage( _T("/MODE %s -i"), ppro->m_info.sNick.c_str());
- if ( lstrlenA( ppro->m_myHost ) == 0 && ppro->IsConnected() )
+ if ( lstrlenA( ppro->m_myHost ) == 0 && ppro->IsConnected())
ppro->DoUserhostWithReason(2, (_T("S") + ppro->m_info.sNick).c_str(), true, _T("%s"), ppro->m_info.sNick.c_str());
}
@@ -243,7 +243,7 @@ void __cdecl CIrcProto::ResolveIPThread(LPVOID di)
EnterCriticalSection( &m_resolve);
if ( ipr != NULL && (ipr->iType == IP_AUTO && lstrlenA(m_myHost) == 0 || ipr->iType == IP_MANUAL )) {
- hostent* myhost = gethostbyname( ipr->sAddr.c_str() );
+ hostent* myhost = gethostbyname( ipr->sAddr.c_str());
if ( myhost ) {
IN_ADDR in;
memcpy( &in, myhost->h_addr, 4 );
@@ -422,7 +422,7 @@ bool CIrcProto::OnIrc_KICK( const CIrcMessage* pmsg )
GCDEST gcd = {0};
GCEVENT gce = {0};
- CMString S = MakeWndID( pmsg->parameters[0].c_str() );
+ CMString S = MakeWndID( pmsg->parameters[0].c_str());
gce.cbSize = sizeof(GCEVENT);
gce.dwFlags = GC_TCHAR;
gcd.ptszID = ( TCHAR* )S.c_str();
@@ -513,7 +513,7 @@ bool CIrcProto::OnIrc_MODE( const CIrcMessage* pmsg )
if ( strchr( sUserModes.c_str(), (char)*p1 )) {
CMString sStatus = ModeToStatus( *p1 );
if (( int )pmsg->parameters.getCount() > iParametercount ) {
- if ( !_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str() )) {
+ if ( !_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
char cModeBit = -1;
CHANNELINFO* wi = (CHANNELINFO *)DoEvent( GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, false, false, 0 );
switch (*p1) {
@@ -907,12 +907,12 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
} } }
}
// ... or try another method of separating the dcc command
- else if ( !GetWord(mess.c_str(), (bIsChat) ? 4 : 5 ).IsEmpty() ) {
+ else if ( !GetWord(mess.c_str(), (bIsChat) ? 4 : 5 ).IsEmpty()) {
int index = (bIsChat) ? 4 : 5;
bool bFlag = false;
// look for the part of the ctcp command that contains adress, port and size
- while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty() ) {
+ while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty()) {
CMString sTemp;
if ( type == _T("chat"))
@@ -928,7 +928,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
ind++;
}
- if ( sTemp[ind] == '\0' && GetWord( mess.c_str(), index + ((bIsChat) ? 1 : 2 )).IsEmpty() )
+ if ( sTemp[ind] == '\0' && GetWord( mess.c_str(), index + ((bIsChat) ? 1 : 2 )).IsEmpty())
bFlag = true;
index++;
}
@@ -976,12 +976,12 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
} } }
}
// ... or try another method of separating the dcc command
- else if ( !GetWord(mess.c_str(), 4).IsEmpty() ) {
+ else if ( !GetWord(mess.c_str(), 4).IsEmpty()) {
int index = 4;
bool bFlag = false;
// look for the part of the ctcp command that contains adress, port and size
- while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty() ) {
+ while ( !bFlag && !GetWord(mess.c_str(), index).IsEmpty()) {
CMString sTemp = GetWord(mess.c_str(), index-1) + GetWord(mess.c_str(), index);
// if all characters are number it indicates we have found the adress, port and size parameters
@@ -993,7 +993,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
ind++;
}
- if ( sTemp[ind] == '\0' && GetWord(mess.c_str(), index + 2).IsEmpty() )
+ if ( sTemp[ind] == '\0' && GetWord(mess.c_str(), index + 2).IsEmpty())
bFlag = true;
index++;
}
@@ -1165,7 +1165,7 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
di->bSender = false;
di->bTurbo = bTurbo;
di->bSSL = false;
- di->bReverse = (iPort == 0 && !sToken.IsEmpty() ) ? true : false;
+ di->bReverse = (iPort == 0 && !sToken.IsEmpty()) ? true : false;
if ( di->bReverse )
di->sToken = sTokenBackup;
@@ -1210,16 +1210,16 @@ bool CIrcProto::IsCTCP( const CIrcMessage* pmsg )
}
// if the whois window is visible and the ctcp reply belongs to the user in it, then show the reply in the whois window
- if ( m_whoisDlg && IsWindowVisible( m_whoisDlg->GetHwnd() )) {
+ if ( m_whoisDlg && IsWindowVisible( m_whoisDlg->GetHwnd())) {
m_whoisDlg->m_InfoNick.GetText( szTemp, SIZEOF(szTemp));
if ( lstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0 ) {
if ( pmsg->m_bIncoming && (command == _T("version") || command == _T("userinfo") || command == _T("time"))) {
- SetActiveWindow( m_whoisDlg->GetHwnd() );
+ SetActiveWindow( m_whoisDlg->GetHwnd());
m_whoisDlg->m_Reply.SetText( DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE));
return true;
}
if (pmsg->m_bIncoming && command == _T("ping")) {
- SetActiveWindow( m_whoisDlg->GetHwnd() );
+ SetActiveWindow( m_whoisDlg->GetHwnd());
int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1));
TCHAR szTemp[30];
if ( s == 1 )
@@ -1261,10 +1261,10 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
BOOL bFlag = false;
// Is the user on the names list?
- while ( !name.IsEmpty() ) {
+ while ( !name.IsEmpty()) {
name = GetWord( sNamesList.c_str(), i );
i++;
- if ( !name.IsEmpty() ) {
+ if ( !name.IsEmpty()) {
int index = 0;
while ( _tcschr( sUserModePrefixes.c_str(), name[index] ))
index++;
@@ -1325,7 +1325,7 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
sTemp = GetWord(sNamesList.c_str(), i);
// Fill the nicklist
- while ( !sTemp.IsEmpty() ) {
+ while ( !sTemp.IsEmpty()) {
CMString sStat;
CMString sTemp2 = sTemp;
sStat = PrefixToStatus(sTemp[0]);
@@ -1412,10 +1412,10 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
CMString save = _T("");
int i = 0;
- while ( !command.IsEmpty() ) {
+ while ( !command.IsEmpty()) {
command = GetWord( dbv.ptszVal, i );
i++;
- if ( !command.IsEmpty() ) {
+ if ( !command.IsEmpty()) {
CMString S = command.Mid(1, command.GetLength());
if ( !lstrcmpi( sChanName, S.c_str()))
break;
@@ -1423,7 +1423,7 @@ bool CIrcProto::OnIrc_ENDNAMES( const CIrcMessage* pmsg )
save += command + _T(" ");
} }
- if ( !command.IsEmpty() ) {
+ if ( !command.IsEmpty()) {
save += GetWordAddress( dbv.ptszVal, i );
switch ( command[0] ) {
case 'M':
@@ -1788,7 +1788,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER( const CIrcMessage* pmsg )
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false};
HANDLE hContact = CList_FindContact( &user );
if ( hContact ) {
- AddOutgoingMessageToDB( hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str() );
+ AddOutgoingMessageToDB( hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str());
DBVARIANT dbv;
if ( !getTString( hContact, "Default", &dbv )) {
@@ -1832,10 +1832,10 @@ static void __stdcall sttShowNickWnd( void* param )
bool CIrcProto::OnIrc_NICK_ERR( const CIrcMessage* pmsg )
{
if ( pmsg->m_bIncoming ) {
- if ( nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick)) ) {
+ if ( nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
TCHAR m[200];
mir_sntprintf( m, SIZEOF(m), _T("NICK %s"), m_alternativeNick );
- if ( IsConnected() )
+ if ( IsConnected())
SendIrcMessage( m );
}
else {
@@ -1856,7 +1856,7 @@ bool CIrcProto::OnIrc_JOINERROR( const CIrcMessage* pmsg )
CMString save = _T("");
int i = 0;
- while ( !command.IsEmpty() ) {
+ while ( !command.IsEmpty()) {
command = GetWord( dbv.ptszVal, i );
i++;
@@ -1960,7 +1960,7 @@ bool CIrcProto::OnIrc_WHO_END( const CIrcMessage* pmsg )
}
/// if it is not a channel
- TCHAR* UserList = mir_tstrdup( m_whoReply.c_str() );
+ TCHAR* UserList = mir_tstrdup( m_whoReply.c_str());
const TCHAR* p1= UserList;
m_whoReply = _T("");
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false};
@@ -2108,8 +2108,8 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
// Cycle through results
j = 0;
sTemp = GetWord( pmsg->parameters[1].c_str(), j );
- while ( !sTemp.IsEmpty() ) {
- p1 = mir_tstrdup( sTemp.c_str() );
+ while ( !sTemp.IsEmpty()) {
+ p1 = mir_tstrdup( sTemp.c_str());
p2 = p1;
// Pull out host, user and nick
@@ -2132,7 +2132,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
}
mess = _T("");
mask = nick + _T("!") + user + _T("@") + host;
- if ( host.IsEmpty() || user.IsEmpty() || nick.IsEmpty() ) {
+ if ( host.IsEmpty() || user.IsEmpty() || nick.IsEmpty()) {
mir_free( p1 );
continue;
}
@@ -2154,7 +2154,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY( const CIrcMessage* pmsg )
// If user found, remove from checklist
for ( i = 0; i < checklist.getCount(); i++ )
- if ( !lstrcmpi(checklist[i].c_str(), nick.c_str() ))
+ if ( !lstrcmpi(checklist[i].c_str(), nick.c_str()))
checklist.remove( i );
}
break;
@@ -2237,7 +2237,7 @@ bool CIrcProto::OnIrc_SUPPORT( const CIrcMessage* pmsg )
if ( pmsg->m_bIncoming && pmsg->parameters.getCount() > 0 ) {
CMString S;
for ( int i = 0; i < pmsg->parameters.getCount(); i++ ) {
- TCHAR* temp = mir_tstrdup( pmsg->parameters[i].c_str() );
+ TCHAR* temp = mir_tstrdup( pmsg->parameters[i].c_str());
if ( _tcsstr( temp, _T("CHANTYPES="))) {
TCHAR* p1 = _tcschr( temp, '=' );
p1++;
@@ -2332,7 +2332,7 @@ void CIrcProto::OnIrcDisconnected()
CallChatEvent( SESSION_OFFLINE, (LPARAM)&gce);
}
- if ( !Miranda_Terminated() )
+ if ( !Miranda_Terminated())
CList_SetAllOffline( m_disconnectDCCChats );
// restore the original nick, cause it might be changed
@@ -2386,7 +2386,7 @@ bool CIrcProto::DoOnConnect( const CIrcMessage* )
if ( m_perform ) {
DoPerform( "ALL NETWORKS" );
- if ( IsConnected() ) {
+ if ( IsConnected()) {
DoPerform( _T2A( m_info.sNetwork.c_str()));
switch( m_iStatus ) {
case ID_STATUS_FREECHAT: DoPerform( "Event: Free for chat" ); break;
@@ -2473,7 +2473,7 @@ int CIrcProto::IsIgnored( CMString user, char type )
if ( !_tcschr( C.flags.c_str(), type ))
continue;
- if ( C.network.IsEmpty() )
+ if ( C.network.IsEmpty())
return i+1;
if ( IsConnected() && !lstrcmpi( C.network.c_str(), m_info.sNetwork.c_str()))
diff --git a/protocols/IRCG/input.cpp b/protocols/IRCG/input.cpp
index bdcedaae82..88c980149d 100644
--- a/protocols/IRCG/input.cpp
+++ b/protocols/IRCG/input.cpp
@@ -249,11 +249,11 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
if (command == _T("/clear")) {
CMString S;
- if ( !one.IsEmpty() ) {
+ if ( !one.IsEmpty()) {
if ( one == _T("server"))
S = SERVERWINDOW;
else
- S = MakeWndID( one.c_str() );
+ S = MakeWndID( one.c_str());
}
else if ( lstrcmpi( window, SERVERWINDOW) == 0 )
S = window;
@@ -273,10 +273,10 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
}
if ( command == _T("/ignore")) {
- if ( IsConnected() ) {
+ if ( IsConnected()) {
CMString IgnoreFlags;
TCHAR temp[500];
- if ( one.IsEmpty() ) {
+ if ( one.IsEmpty()) {
if ( m_ignore )
DoEvent( GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is enabled"), NULL, NULL, NULL, true, false);
else
@@ -313,12 +313,12 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
else IgnoreFlags = _T("qnidc");
CMString m_network;
- if ( three.IsEmpty() )
+ if ( three.IsEmpty())
m_network = m_info.sNetwork;
else
m_network = three;
- AddIgnore( one.c_str(), IgnoreFlags.c_str(), m_network.c_str() );
+ AddIgnore( one.c_str(), IgnoreFlags.c_str(), m_network.c_str());
mir_sntprintf(temp, SIZEOF(temp), TranslateT("%s on %s is now ignored (+%s)"), one.c_str(), m_network.c_str(), IgnoreFlags.c_str());
DoEvent( GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), temp, NULL, NULL, NULL, true, false);
@@ -450,9 +450,9 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
if ( command == _T("/channelmanager")) {
if ( window && !hContact && IsChannel( window )) {
- if ( IsConnected() ) {
+ if ( IsConnected()) {
if ( m_managerDlg != NULL ) {
- SetActiveWindow( m_managerDlg->GetHwnd() );
+ SetActiveWindow( m_managerDlg->GetHwnd());
m_managerDlg->Close();
}
else {
@@ -507,7 +507,7 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac
m_listDlg = new CListDlg( this );
m_listDlg->Show();
}
- SetActiveWindow( m_listDlg->GetHwnd() );
+ SetActiveWindow( m_listDlg->GetHwnd());
int minutes = ( int )m_noOfChannels/4000;
int minutes2 = ( int )m_noOfChannels/9000;
@@ -841,7 +841,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
CMString Message = szBuf;
AddCR( Message );
RemoveLinebreaks( Message );
- if ( !hContact && IsConnected() ) {
+ if ( !hContact && IsConnected()) {
Message = DoAlias( Message.c_str(), windowname );
if ( Message.Find( _T("%question")) != -1 ) {
@@ -887,10 +887,10 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
// Do this if the message is not a command
if ( (GetWord( DoThis.c_str(), 0)[0] != '/') || // not a command
- ( (GetWord( DoThis.c_str(), 0)[0] == '/') && (GetWord( DoThis.c_str(), 0)[1] == '/') ) || // or double backslash at the beginning
+ ( (GetWord( DoThis.c_str(), 0)[0] == '/') && (GetWord( DoThis.c_str(), 0)[1] == '/')) || // or double backslash at the beginning
hContact ) {
CMString S = _T("/PRIVMSG ");
- if ( lstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty() )
+ if ( lstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty())
S += m_info.sServerName + _T(" ") + DoThis;
else
S += CMString(windowname) + _T(" ") + DoThis;
@@ -906,7 +906,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
if ( !IsConnected() && !bDCC )
continue;
- if ( !flag && IsConnected() )
+ if ( !flag && IsConnected())
DoThis = DoIdentifiers(DoThis, windowname);
if ( hContact ) {
@@ -921,7 +921,7 @@ bool CIrcProto::PostIrcMessageWnd( TCHAR* window, HANDLE hContact, const TCHAR*
dcc->SendStuff( mess.c_str());
}
}
- else if ( IsConnected() ) {
+ else if ( IsConnected()) {
FormatMsg( DoThis );
SendIrcMessage( DoThis.c_str(), false, codepage );
}
diff --git a/protocols/IRCG/irclib.cpp b/protocols/IRCG/irclib.cpp
index 78d33f11dc..c018b57a02 100644
--- a/protocols/IRCG/irclib.cpp
+++ b/protocols/IRCG/irclib.cpp
@@ -52,7 +52,7 @@ CIrcMessage::CIrcMessage(const CIrcMessage& m) :
m_bNotify( m.m_bNotify ),
m_codePage( m.m_codePage ),
m_proto( m.m_proto ),
- parameters( m.parameters.getCount() )
+ parameters( m.parameters.getCount())
{
prefix.sNick = m.prefix.sNick;
prefix.sUser = m.prefix.sUser;
@@ -213,7 +213,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
return false;
} }
- if ( Miranda_Terminated() ) {
+ if ( Miranda_Terminated()) {
Disconnect();
return false;
}
@@ -223,7 +223,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
// start receiving messages from host
ircFork( &CIrcProto::ThreadProc, NULL );
Sleep( 100 );
- if ( info.sPassword.GetLength() )
+ if ( info.sPassword.GetLength())
NLSend( "PASS %s\r\n", info.sPassword.c_str());
NLSend( _T("NICK %s\r\n"), info.sNick.c_str());
@@ -232,7 +232,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
DWORD cbHostName = SIZEOF( szHostName );
GetComputerName(szHostName, &cbHostName);
CMString HostName = GetWord(szHostName, 0);
- if ( m_userID.IsEmpty() )
+ if ( m_userID.IsEmpty())
m_userID = _T("Miranda");
if ( HostName.IsEmpty())
HostName= _T("host");
@@ -691,7 +691,7 @@ void CIrcSessionInfo::Reset()
void CIrcProto::OnIrcMessage(const CIrcMessage* pmsg)
{
if ( pmsg != NULL ) {
- PfnIrcMessageHandler pfn = FindMethod( pmsg->sCommand.c_str() );
+ PfnIrcMessageHandler pfn = FindMethod( pmsg->sCommand.c_str());
if ( pfn ) {
// call member function. if it returns 'false',
// call the default handling
@@ -702,7 +702,7 @@ void CIrcProto::OnIrcMessage(const CIrcMessage* pmsg)
}
__except( EXCEPTION_EXECUTE_HANDLER ) // dedicated to Sava :)
{
- DoNetlibLog( "IRC handler feels sick: %S", pmsg->sCommand.c_str() );
+ DoNetlibLog( "IRC handler feels sick: %S", pmsg->sCommand.c_str());
}
}
else // handler not found. call default handler
@@ -853,7 +853,7 @@ int CDccSession::NLReceive(const unsigned char* buf, int cbBuf)
int CDccSession::SendStuff(const TCHAR* fmt)
{
- String buf = _T2A( fmt, m_proto->getCodepage() );
+ String buf = _T2A( fmt, m_proto->getCodepage());
return NLSend(( const unsigned char* )buf.c_str(), buf.GetLength());
}
diff --git a/protocols/IRCG/ircproto.cpp b/protocols/IRCG/ircproto.cpp
index 3fd32d1f68..6afe5328e7 100644
--- a/protocols/IRCG/ircproto.cpp
+++ b/protocols/IRCG/ircproto.cpp
@@ -435,7 +435,7 @@ HANDLE __cdecl CIrcProto::FileAllow( HANDLE, HANDLE hTransfer, const TCHAR* szPa
{
DCCINFO* di = ( DCCINFO* )hTransfer;
- if ( !IsConnected() ) {
+ if ( !IsConnected()) {
delete di;
return (HANDLE)szPath;
}
diff --git a/protocols/IRCG/options.cpp b/protocols/IRCG/options.cpp
index 61684cbae1..2152e340c9 100644
--- a/protocols/IRCG/options.cpp
+++ b/protocols/IRCG/options.cpp
@@ -352,7 +352,7 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto>
CCtrlCombo m_groupCombo;
CServerDlg( CIrcProto* _pro, CConnectPrefsDlg* _owner, int _action ) :
- CProtoDlgBase<CIrcProto>( _pro, IDD_ADDSERVER, _owner->GetHwnd() ),
+ CProtoDlgBase<CIrcProto>( _pro, IDD_ADDSERVER, _owner->GetHwnd()),
m_owner( _owner ),
m_action( _action ),
m_OK( this, IDOK ),
@@ -1228,7 +1228,7 @@ void COtherPrefsDlg::OnApply()
int curSel = m_codepage.GetCurSel();
m_proto->m_codepage = m_codepage.GetItemData( curSel );
- if ( m_proto->IsConnected() )
+ if ( m_proto->IsConnected())
m_proto->setCodepage( m_proto->m_codepage );
m_proto->m_utfAutodetect = m_autodetect.GetState();
@@ -1271,7 +1271,7 @@ void COtherPrefsDlg::addPerformComboValue( int idx, const char* szValueName )
// 'add ignore' preferences dialog
CAddIgnoreDlg::CAddIgnoreDlg( CIrcProto* _pro, const TCHAR* mask, CIgnorePrefsDlg* _owner ) :
- CProtoDlgBase<CIrcProto>( _pro, IDD_ADDIGNORE, _owner->GetHwnd() ),
+ CProtoDlgBase<CIrcProto>( _pro, IDD_ADDIGNORE, _owner->GetHwnd()),
m_Ok( this, IDOK ),
m_owner( _owner )
{
@@ -1315,7 +1315,7 @@ void CAddIgnoreDlg::OnOk( CCtrlButton* )
if ( !_tcschr(Mask.c_str(), '!') && !_tcschr(Mask.c_str(), '@'))
Mask += _T("!*@*");
- if ( !flags.IsEmpty() ) {
+ if ( !flags.IsEmpty()) {
if ( *szOldMask )
m_proto->RemoveIgnore( szOldMask );
m_proto->AddIgnore(Mask.c_str(), flags.c_str(), szNetwork);
@@ -1341,7 +1341,7 @@ static TDbSetting IgnoreSettings[] =
static int CALLBACK IgnoreListSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
CIgnorePrefsDlg* hwndDlg = ( CIgnorePrefsDlg* )lParamSort;
- if ( !hwndDlg->GetHwnd() )
+ if ( !hwndDlg->GetHwnd())
return 1;
TCHAR temp1[512];
@@ -1418,7 +1418,7 @@ void CIrcProto::InitIgnore( void )
String mask = GetWord(p1, 0);
String flags = GetWord(p1, 1);
String network = GetWord(p1, 2);
- if ( !mask.IsEmpty() )
+ if ( !mask.IsEmpty())
m_ignoreItems.insert( new CIrcIgnoreItem( getCodepage(), mask.c_str(), flags.c_str(), network.c_str()));
p1 = p2;
@@ -1912,7 +1912,7 @@ INT_PTR CIrcProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
static void sttImportIni( const TCHAR* szIniFile )
{
- FILE* serverFile = _tfopen( szIniFile, _T("r") );
+ FILE* serverFile = _tfopen( szIniFile, _T("r"));
if ( serverFile == NULL )
return;
@@ -1946,7 +1946,7 @@ void InitServers()
if ( g_servers.getCount() == 0 ) {
TCHAR *szIniFile = Utils_ReplaceVarsT(_T("%temp%\\default_servers.ini"));
- FILE *serverFile = _tfopen( szIniFile, _T("a") );
+ FILE *serverFile = _tfopen( szIniFile, _T("a"));
if (serverFile) {
char* pszSvrs = ( char* )LockResource(LoadResource(hInst,FindResource(hInst,MAKEINTRESOURCE(IDR_SERVERS),_T("TEXT"))));
if (pszSvrs)
diff --git a/protocols/IRCG/output.cpp b/protocols/IRCG/output.cpp
index 3f64810a68..6a97f45baf 100644
--- a/protocols/IRCG/output.cpp
+++ b/protocols/IRCG/output.cpp
@@ -50,7 +50,7 @@ static CMString FormatOutput (const CIrcMessage* pmsg)
goto THE_END;
}
- int index = StrToInt( pmsg->sCommand.c_str() );
+ int index = StrToInt( pmsg->sCommand.c_str());
if ( index == 301 && pmsg->parameters.getCount() > 0 ) {
TCHAR temp[500]; *temp = '\0';
mir_sntprintf(temp, SIZEOF(temp), TranslateT("%s is away"), pmsg->parameters[1].c_str());
@@ -117,7 +117,7 @@ static CMString FormatOutput (const CIrcMessage* pmsg)
sMessage += pmsg->parameters[i] + _T(" ");
}
else {
- if ( pmsg->prefix.sNick.GetLength() )
+ if ( pmsg->prefix.sNick.GetLength())
sMessage = pmsg->prefix.sNick + _T(" ");
sMessage += pmsg->sCommand + _T(" ");
for ( int i=0; i < (int)pmsg->parameters.getCount(); i++ )
@@ -135,13 +135,13 @@ BOOL CIrcProto::ShowMessage (const CIrcMessage* pmsg)
if ( !pmsg->m_bIncoming )
ReplaceString( mess, _T("%%"), _T("%"));
- int iTemp = StrToInt( pmsg->sCommand.c_str() );
+ int iTemp = StrToInt( pmsg->sCommand.c_str());
//To active window
if (( iTemp > 400 || iTemp < 500 ) && pmsg->sCommand[0] == '4' //all error messages
|| pmsg->sCommand == _T("303") //ISON command
|| pmsg->sCommand == _T("INVITE")
- || ( (pmsg->sCommand == _T("NOTICE")) && ( (pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001"))==NULL) : false) ) // CTCP answers should go to m_network Log window!
+ || ( (pmsg->sCommand == _T("NOTICE")) && ( (pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001"))==NULL) : false)) // CTCP answers should go to m_network Log window!
|| pmsg->sCommand == _T("515")) //chanserv error
{
DoEvent(GC_EVENT_INFORMATION, NULL, pmsg->m_bIncoming?pmsg->prefix.sNick.c_str():m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming?false:true);
diff --git a/protocols/IRCG/scripting.cpp b/protocols/IRCG/scripting.cpp
index ed75934643..26c6bc2a55 100644
--- a/protocols/IRCG/scripting.cpp
+++ b/protocols/IRCG/scripting.cpp
@@ -25,7 +25,7 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertRawIn(WPARAM, LPARAM lParam)
{
char* pszRaw = ( char* ) lParam;
- if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected() ) {
+ if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected()) {
TCHAR* p = mir_a2t( pszRaw );
InsertIncomingEvent( p );
mir_free( p );
@@ -38,7 +38,7 @@ INT_PTR __cdecl CIrcProto::Scripting_InsertRawIn(WPARAM, LPARAM lParam)
INT_PTR __cdecl CIrcProto::Scripting_InsertRawOut( WPARAM, LPARAM lParam )
{
char* pszRaw = ( char* ) lParam;
- if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected() ) {
+ if ( m_bMbotInstalled && m_scriptingEnabled && pszRaw && IsConnected()) {
String S = pszRaw;
ReplaceString( S, "%", "%%%%");
NLSendNoScript((const unsigned char *)S.c_str(), lstrlenA(S.c_str()));
@@ -254,12 +254,12 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam)
j++;
} }
- if ( !S.IsEmpty() )
+ if ( !S.IsEmpty())
sOutput = ( TCHAR* )S.c_str();
}
// send it to mbot
if ( !sOutput.IsEmpty())
- return ( INT_PTR )mir_t2a( sOutput.c_str() );
+ return ( INT_PTR )mir_t2a( sOutput.c_str());
}
return 0;
}
diff --git a/protocols/IRCG/services.cpp b/protocols/IRCG/services.cpp
index 63fd495b7a..e3b363ac15 100644
--- a/protocols/IRCG/services.cpp
+++ b/protocols/IRCG/services.cpp
@@ -395,7 +395,7 @@ INT_PTR __cdecl CIrcProto::OnQuickConnectMenuCommand(WPARAM, LPARAM)
}
ShowWindow( m_quickDlg->GetHwnd(), SW_SHOW );
- SetActiveWindow( m_quickDlg->GetHwnd() );
+ SetActiveWindow( m_quickDlg->GetHwnd());
return 0;
}
@@ -624,11 +624,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
/* case 5: // nickserv register nick
PostIrcMessage( _T("/nickserv REGISTER %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick") );
+ TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick"));
break;
*/ case 6: // nickserv Identify
PostIrcMessage( _T("/nickserv AUTH %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick") );
+ TranslateT("Please enter your authentification code"), TranslateT("Authentificate nick"));
break;
case 7: // nickserv drop nick
if (MessageBox(0, TranslateT("Are you sure you want to unregister your current nick?"), TranslateT("Delete nick"),
@@ -642,7 +642,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
HWND question_hWnd = dlg->GetHwnd();
HWND hEditCtrl = GetDlgItem( question_hWnd, IDC_EDIT);
SetDlgItemText( question_hWnd, IDC_CAPTION, TranslateT("Identify nick"));
- SetWindowText( GetDlgItem( question_hWnd, IDC_TEXT), TranslateT("Please enter your password") );
+ SetWindowText( GetDlgItem( question_hWnd, IDC_TEXT), TranslateT("Please enter your password"));
SetDlgItemText( question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\""));
SetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE,
(LONG)GetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD);
@@ -661,23 +661,23 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 10: // nickserv set new password
PostIrcMessage( _T("/nickserv SET PASSWORD %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your new password"), TranslateT("Set new password") );
+ TranslateT("Please enter your new password"), TranslateT("Set new password"));
break;
case 11: // nickserv set language
PostIrcMessage( _T("/nickserv SET LANGUAGE %%question=\"%s\",\"%s\""),
- TranslateT("Please enter desired languageID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages") );
+ TranslateT("Please enter desired languageID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages"));
break;
case 12: // nickserv set homepage
PostIrcMessage( _T("/nickserv SET URL %%question=\"%s\",\"%s\""),
- TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick") );
+ TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick"));
break;
case 13: // nickserv set email
PostIrcMessage( _T("/nickserv SET EMAIL %%question=\"%s\",\"%s\""),
- TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick") );
+ TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick"));
break;
case 14: // nickserv set info
PostIrcMessage( _T("/nickserv SET INFO %%question=\"%s\",\"%s\""),
- TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick") );
+ TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick"));
break;
case 15: // nickserv kill unauth off
PostIrcMessage( _T("/nickserv SET KILL OFF"));
@@ -708,15 +708,15 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 24: // nickserv Link nick to current
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick") );
+ TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick"));
break;
case 25: // nickserv Unlink nick from current
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick") );
+ TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick"));
break;
case 26: // nickserv Set main nick
PostIrcMessage( _T("/nickserv LINK %%question=\"%s\",\"%s\""),
- TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick") );
+ TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick"));
break;
case 27: // nickserv list all linked nicks
PostIrcMessage( _T("/nickserv LISTLINKS"));
@@ -746,7 +746,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 6:
PostIrcMessage( _T("/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""),
- p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk") );
+ p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk"));
break;
case 7:
DoUserhostWithReason(1, _T("B") + (CMString)p1, true, _T("%s"), gch->ptszUID );
@@ -795,11 +795,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
break;
case 22:
PostIrcMessage( _T("/NOTICE %s %%question=\"%s\",\"%s\""),
- gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice") );
+ gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice"));
break;
case 23:
PostIrcMessage( _T("/INVITE %s %%question=\"%s\",\"%s\""),
- gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel") );
+ gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel"));
break;
case 30:
{
@@ -988,13 +988,13 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM)
{
EnterCriticalSection(&cs);
- if ( m_perform && IsConnected() )
+ if ( m_perform && IsConnected())
if ( DoPerform( "Event: Disconnect" ))
Sleep( 200 );
DisconnectAllDCCSessions( true );
- if ( IsConnected() )
+ if ( IsConnected())
Disconnect();
if ( m_listDlg )
m_listDlg->Close();
@@ -1042,13 +1042,13 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
else {
// for normal contact
clmi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE;
- if ( !IsConnected() )
+ if ( !IsConnected())
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hUMenuWhois, ( LPARAM )&clmi );
if (bIsOnline) {
DBVARIANT dbv3;
- if ( !getString( hContact, "Host", &dbv3) ) {
+ if ( !getString( hContact, "Host", &dbv3)) {
if (dbv3.pszVal[0] == 0)
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
DBFreeVariant( &dbv3 );
@@ -1065,7 +1065,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = ( HANDLE ) wParam;
- if ( hContact == NULL || !IsConnected() )
+ if ( hContact == NULL || !IsConnected())
return 0;
DBCONTACTWRITESETTING* cws = ( DBCONTACTWRITESETTING* )lParam;
@@ -1075,10 +1075,10 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
if ( cws->value.type != DBVT_DELETED && !( cws->value.type==DBVT_BYTE && cws->value.bVal==0 ))
return 0;
- if ( !strcmp( cws->szSetting, "NotOnList" ) ) {
+ if ( !strcmp( cws->szSetting, "NotOnList" )) {
DBVARIANT dbv;
if ( !getTString( hContact, "Nick", &dbv )) {
- if ( getByte( "MirVerAutoRequest", 1) )
+ if ( getByte( "MirVerAutoRequest", 1))
PostIrcMessage( _T("/PRIVMSG %s \001VERSION\001"), dbv.ptszVal );
DBFreeVariant( &dbv );
} }
@@ -1128,7 +1128,7 @@ void __cdecl CIrcProto::DisconnectServerThread( void* )
{
EnterCriticalSection( &cs );
KillChatTimer( RetryTimer );
- if ( IsConnected() )
+ if ( IsConnected())
Disconnect();
LeaveCriticalSection( &cs );
return;
@@ -1184,7 +1184,7 @@ void CIrcProto::DisconnectFromServer(void)
GCEVENT gce = {0};
GCDEST gcd = {0};
- if ( m_perform && IsConnected() )
+ if ( m_perform && IsConnected())
DoPerform( "Event: Disconnect" );
gcd.iType = GC_EVENT_CONTROL;
@@ -1241,7 +1241,7 @@ VOID CALLBACK RetryTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
else ppro->KillChatTimer( ppro->RetryTimer );
}
-// logs text into NetLib (stolen from Jabber ;) )
+// logs text into NetLib (stolen from Jabber ;))
void CIrcProto::DoNetlibLog( const char* fmt, ... )
{
va_list vararg;
diff --git a/protocols/IRCG/tools.cpp b/protocols/IRCG/tools.cpp
index 5044c12715..d9218b2b42 100644
--- a/protocols/IRCG/tools.cpp
+++ b/protocols/IRCG/tools.cpp
@@ -117,7 +117,7 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand)
break;
tmp = op + tmp;
- if ( res.IsEmpty() )
+ if ( res.IsEmpty())
res = tmp;
else
res += _T(" ") + tmp;
@@ -227,7 +227,7 @@ void __stdcall RemoveLinebreaks( CMString& Message )
if (Message.Find( _T("\r\n"), 0) == 0)
Message.Delete(0,2);
- if ( (Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength()-2) == 0) )
+ if ( (Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength()-2) == 0))
Message.Delete(Message.GetLength()-2, 2);
}
@@ -542,7 +542,7 @@ INT_PTR CIrcProto::CallChatEvent(WPARAM wParam, LPARAM lParam)
//MBOT CORRECTIONS
//if ( gcetemp && gcetemp->pDest && gcetemp->pDest->ptszID ) {
if ( gcetemp && gcetemp->pDest && gcetemp->pDest->ptszID &&
- !my_strstri(gcetemp->pDest->ptszID, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline")) ) {
+ !my_strstri(gcetemp->pDest->ptszID, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline"))) {
CMString sTempId = MakeWndID( gcetemp->pDest->ptszID );
mir_realloc( gcetemp->pDest->ptszID, sizeof(TCHAR)*(sTempId.GetLength() + 1));
@@ -611,7 +611,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN
else
gce.ptszUserInfo = m_showAddresses ? pszUserInfo : NULL;
- if ( !sText.IsEmpty() )
+ if ( !sText.IsEmpty())
gce.ptszText = sText.c_str();
gce.dwItemData = dwItemData;
diff --git a/protocols/IRCG/ui_utils.cpp b/protocols/IRCG/ui_utils.cpp
index 3f8cb48029..d7c8e4b6b6 100644
--- a/protocols/IRCG/ui_utils.cpp
+++ b/protocols/IRCG/ui_utils.cpp
@@ -551,7 +551,7 @@ CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, HICON hIcon, const char*
CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, int iCoreIcon, const char* tooltip ) :
CCtrlButton( dlg, ctrlId ),
- m_hIcon( LoadSkinnedIcon(iCoreIcon) ),
+ m_hIcon( LoadSkinnedIcon(iCoreIcon)),
m_toolTip( tooltip )
{
}
diff --git a/protocols/IRCG/windows.cpp b/protocols/IRCG/windows.cpp
index 6eef163d34..313e99353c 100644
--- a/protocols/IRCG/windows.cpp
+++ b/protocols/IRCG/windows.cpp
@@ -169,12 +169,12 @@ void CWhoisDlg::ShowMessage( const CIrcMessage* pmsg )
m_InfoName.SetText( pmsg->parameters[5].c_str());
m_InfoAddress.SetText( pmsg->parameters[3].c_str());
m_InfoId.SetText( pmsg->parameters[2].c_str());
- m_InfoChannels.SetText( _T("") );
- m_InfoServer.SetText( _T("") );
- m_InfoAway2.SetText( _T("") );
- m_InfoAuth.SetText( _T("") );
- m_InfoOther.SetText( _T("") );
- m_Reply.SetText( _T("") );
+ m_InfoChannels.SetText( _T(""));
+ m_InfoServer.SetText( _T(""));
+ m_InfoAway2.SetText( _T(""));
+ m_InfoAuth.SetText( _T(""));
+ m_InfoOther.SetText( _T(""));
+ m_Reply.SetText( _T(""));
SetWindowText( m_hwnd, TranslateT("User information"));
EnableWindow( GetDlgItem( m_hwnd, ID_INFO_QUERY), true );
ShowWindow( m_hwnd, SW_SHOW);
@@ -189,13 +189,13 @@ void CWhoisDlg::ShowMessageNoUser( const CIrcMessage* pmsg )
m_InfoNick.SetText( pmsg->parameters[2].c_str());
m_InfoNick.SendMsg( CB_SETEDITSEL, 0,MAKELPARAM(0,-1));
m_Caption.SetText( pmsg->parameters[2].c_str());
- m_InfoName.SetText( _T("") );
- m_InfoAddress.SetText( _T("") );
- m_InfoId.SetText( _T("") );
- m_InfoChannels.SetText( _T("") );
- m_InfoServer.SetText( _T("") );
- m_InfoAway2.SetText( _T("") );
- m_InfoAuth.SetText( _T("") );
+ m_InfoName.SetText( _T(""));
+ m_InfoAddress.SetText( _T(""));
+ m_InfoId.SetText( _T(""));
+ m_InfoChannels.SetText( _T(""));
+ m_InfoServer.SetText( _T(""));
+ m_InfoAway2.SetText( _T(""));
+ m_InfoAuth.SetText( _T(""));
m_Reply.SetText( _T(""));
EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), false);
}
@@ -422,7 +422,7 @@ struct ListViewSortParam
static int CALLBACK ListViewSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
ListViewSortParam* param = ( ListViewSortParam* )lParamSort;
- if ( !param->pList->GetHwnd() )
+ if ( !param->pList->GetHwnd())
return 0;
TCHAR temp1[512];
@@ -926,7 +926,7 @@ void CManagerDlg::OnClose()
S += _T(" ") + S1;
} }
- if ( !S.IsEmpty() && m_proto->IsConnected() ) {
+ if ( !S.IsEmpty() && m_proto->IsConnected()) {
mir_sntprintf( temp, SIZEOF(temp), _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
char* p = mir_t2a(temp);
m_proto->setTString(p, S.c_str());
@@ -1228,7 +1228,7 @@ void CManagerDlg::OnCheck5( CCtrlData* )
void CManagerDlg::OnCheck6( CCtrlData* )
{
- m_limit.Enable( m_check6.GetState() );
+ m_limit.Enable( m_check6.GetState());
m_applyModes.Enable();
}
@@ -1272,7 +1272,7 @@ void CManagerDlg::InitManager( int mode, const TCHAR* window )
CHANNELINFO* wi = (CHANNELINFO *)m_proto->DoEvent(GC_EVENT_GETITEMDATA, window, NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0);
if ( wi ) {
- if ( m_proto->IsConnected() ) {
+ if ( m_proto->IsConnected()) {
TCHAR temp[1000];
mir_sntprintf(temp, SIZEOF(temp), _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
diff --git a/protocols/JabberG/MString.h b/protocols/JabberG/MString.h
index 6f90b7741b..7cc16ff4a3 100644
--- a/protocols/JabberG/MString.h
+++ b/protocols/JabberG/MString.h
@@ -115,7 +115,7 @@ public:
CMSimpleStringT(PCXSTR pszSrc)
{
int nLength = StringLength( pszSrc );
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if (pData != NULL)
{
Attach( pData );
@@ -125,7 +125,7 @@ public:
}
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if ( pData != NULL )
{
Attach( pData );
@@ -150,8 +150,8 @@ public:
CMStringData* pOldData = GetData();
if ( pSrcData != pOldData)
{
- if ( pOldData->IsLocked() )
- SetString( strSrc.GetString(), strSrc.GetLength() );
+ if ( pOldData->IsLocked())
+ SetString( strSrc.GetString(), strSrc.GetLength());
else
{
CMStringData* pNewData = CloneData( pSrcData );
@@ -218,7 +218,7 @@ public:
void Append( PCXSTR pszSrc )
{
- Append( pszSrc, StringLength( pszSrc ) );
+ Append( pszSrc, StringLength( pszSrc ));
}
void Append( PCXSTR pszSrc, int nLength )
{
@@ -257,7 +257,7 @@ public:
}
void Append( const CMSimpleStringT& strSrc )
{
- Append( strSrc.GetString(), strSrc.GetLength() );
+ Append( strSrc.GetString(), strSrc.GetLength());
}
void Empty()
{
@@ -265,7 +265,7 @@ public:
if ( pOldData->nDataLength == 0 )
return;
- if ( pOldData->IsLocked() )
+ if ( pOldData->IsLocked())
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -284,15 +284,15 @@ public:
if ( pOldData->nAllocLength == nLength )
return;
- if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked()) // Don't reallocate a locked buffer that's shrinking
{
- CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ));
if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
- CopyChars( PXSTR( pNewData->data() ), nLength, PCXSTR( pOldData->data() ), nLength );
+ CopyChars( PXSTR( pNewData->data()), nLength, PCXSTR( pOldData->data()), nLength );
pOldData->Release();
Attach( pNewData );
@@ -311,7 +311,7 @@ public:
PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public:
PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if ( pData->IsShared() )
+ if ( pData->IsShared())
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -389,7 +389,7 @@ public:
}
void SetString( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void SetString( PCXSTR pszSrc, int nLength )
{
@@ -421,7 +421,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength());
return s;
}
@@ -430,7 +430,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return s;
}
@@ -439,7 +439,7 @@ public:
{
CMSimpleStringT s;
- Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength());
return s;
}
@@ -527,7 +527,7 @@ private:
if (pNewData != NULL)
{
int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
- CopyChars( PXSTR( pNewData->data() ), nCharsToCopy, PCXSTR( pOldData->data() ), nCharsToCopy );
+ CopyChars( PXSTR( pNewData->data()), nCharsToCopy, PCXSTR( pOldData->data()), nCharsToCopy );
pNewData->nDataLength = nOldLength;
pOldData->Release();
Attach(pNewData);
@@ -578,7 +578,7 @@ private:
if ( pOldData->nAllocLength >= nLength || nLength <= 0)
return;
- CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ));
if ( pNewData != NULL )
Attach( pNewData );
}
@@ -676,19 +676,19 @@ public:
static int __stdcall StringSpanIncluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static int __stdcall StringSpanExcluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static LPSTR __stdcall StringUppercase( LPSTR psz )
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -696,7 +696,7 @@ public:
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -722,7 +722,7 @@ public:
static LPSTR __stdcall StringReverse( LPSTR psz )
{
- return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz )) );
}
static int __stdcall GetFormattedLength( LPCSTR pszFormat, va_list args );
@@ -741,7 +741,7 @@ public:
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc )
{
// Returns required buffer length in XCHARs
- return int( strlen( pszSrc ) );
+ return int( strlen( pszSrc ));
}
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc, int nLength )
@@ -768,7 +768,7 @@ public:
if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s( pszDest, nDestLength*sizeof( char ),
- pszSrc, nSrcLength*sizeof( char ) );
+ pszSrc, nSrcLength*sizeof( char ));
}
static void __stdcall ConvertToBaseType( LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
@@ -835,13 +835,13 @@ public:
static int __stdcall SafeStringLen( LPCSTR psz )
{
// returns length in bytes
- return (psz != NULL) ? int( strlen( psz ) ) : 0;
+ return (psz != NULL) ? int( strlen( psz )) : 0;
}
static int __stdcall SafeStringLen( LPCWSTR psz )
{
// returns length in wchar_ts
- return (psz != NULL) ? int( wcslen( psz ) ) : 0;
+ return (psz != NULL) ? int( wcslen( psz )) : 0;
}
static int __stdcall GetCharLen( const wchar_t* pch )
@@ -853,7 +853,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return int( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return int( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize )
@@ -879,12 +879,12 @@ public:
static int __stdcall IsDigit( wchar_t ch )
{
- return iswdigit( static_cast<unsigned short>(ch) );
+ return iswdigit( static_cast<unsigned short>(ch));
}
static int __stdcall IsSpace( wchar_t ch )
{
- return iswspace( static_cast<unsigned short>(ch) );
+ return iswspace( static_cast<unsigned short>(ch));
}
static int __stdcall StringCompare( LPCWSTR pszA, LPCWSTR pszB )
@@ -1068,7 +1068,7 @@ public:
static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize )
@@ -1362,7 +1362,7 @@ public:
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
PXSTR pszBuffer = this->GetBuffer();
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#else
memmove( pszBuffer+iIndex, pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#endif
@@ -1378,7 +1378,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1387,9 +1387,9 @@ public:
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#endif
pszBuffer[iIndex] = ch;
@@ -1403,7 +1403,7 @@ public:
if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
{
iIndex = this->GetLength();
}
@@ -1418,10 +1418,10 @@ public:
PXSTR pszBuffer = this->GetBuffer( nNewLength );
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy_s( pszBuffer+iIndex, nInsertLength*sizeof( XCHAR ), psz, nInsertLength*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy( pszBuffer+iIndex, psz, nInsertLength*sizeof( XCHAR ));
#endif
this->ReleaseBufferSetLength( nNewLength );
@@ -1440,7 +1440,7 @@ public:
{
// otherwise modify each character that matches in the string
bool bCopied = false;
- PXSTR pszBuffer = const_cast< PXSTR >( this->GetString() ); // We don't actually write to pszBuffer until we've called GetBuffer().
+ PXSTR pszBuffer = const_cast< PXSTR >( this->GetString()); // We don't actually write to pszBuffer until we've called GetBuffer().
int nLength = this->GetLength();
int iChar = 0;
@@ -1488,7 +1488,7 @@ public:
while( pszStart < pszEnd )
{
PCXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL)
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL)
{
nCount++;
pszStart = pszTarget+nSourceLen;
@@ -1505,7 +1505,7 @@ public:
int nOldLength = this->GetLength();
int nNewLength = nOldLength+(nReplacementLen-nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ) );
+ PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart+nOldLength;
@@ -1514,13 +1514,13 @@ public:
while( pszStart < pszEnd )
{
PXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL )
+ while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL )
{
int nBalance = nOldLength-int(pszTarget-pszBuffer+nSourceLen);
memmove_s( pszTarget+nReplacementLen, nBalance*sizeof( XCHAR ),
- pszTarget+nSourceLen, nBalance*sizeof( XCHAR ) );
+ pszTarget+nSourceLen, nBalance*sizeof( XCHAR ));
memcpy_s( pszTarget, nReplacementLen*sizeof( XCHAR ),
- pszNew, nReplacementLen*sizeof( XCHAR ) );
+ pszNew, nReplacementLen*sizeof( XCHAR ));
pszStart = pszTarget+nReplacementLen;
pszTarget[nReplacementLen+nBalance] = 0;
nOldLength += (nReplacementLen-nSourceLen);
@@ -1571,7 +1571,7 @@ public:
CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0))
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1707,7 +1707,7 @@ public:
while( *psz != 0 )
{
- if ( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ))
{
if ( pszLast == NULL )
pszLast = psz;
@@ -1722,7 +1722,7 @@ public:
if ( pszLast != NULL )
{
// truncate at trailing space start
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1737,20 +1737,20 @@ public:
PCXSTR psz = this->GetString();
- while( StringTraits::IsSpace( *psz ) )
+ while( StringTraits::IsSpace( *psz ))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1805,7 +1805,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1816,7 +1816,7 @@ public:
CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
@@ -1846,7 +1846,7 @@ public:
if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1864,15 +1864,15 @@ public:
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1883,26 +1883,26 @@ public:
CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if ( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0))
{
return *this;
}
PCXSTR psz = this->GetString();
- while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL) )
+ while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1946,14 +1946,14 @@ public:
if (nCount < 0)
nCount = 0;
- if ( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength())
nCount = this->GetLength()-iFirst;
- if ( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength())
nCount = 0;
// optimize case of returning entire string
- if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()))
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -2030,13 +2030,13 @@ public:
// Allocate a BSTR containing a copy of the string
BSTR AllocSysString() const
{
- BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength() );
+ BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength());
return bstrResult;
}
BSTR SetSysString( BSTR* pbstr ) const
{
- StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength() );
+ StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength());
return *pbstr;
}
@@ -2075,7 +2075,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength());
return strResult;
}
@@ -2084,7 +2084,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return strResult;
}
@@ -2093,7 +2093,7 @@ public:
{
CMStringT strResult;
- Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength());
return strResult;
}
@@ -2123,7 +2123,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
@@ -2133,7 +2133,7 @@ public:
CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 983ad4daea..e750288a01 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -268,7 +268,7 @@ extern "C" int __declspec( dllexport ) Load( PLUGINLINK *link )
if ( JabberAlphaBlend == NULL && ( hDll = LoadLibraryA("msimg32.dll" )))
JabberAlphaBlend = (BOOL (WINAPI *)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION)) GetProcAddress(hDll, "AlphaBlend");
- if ( IsWinVerXPPlus() ) {
+ if ( IsWinVerXPPlus()) {
if ( hDll = GetModuleHandleA("uxtheme")) {
JabberDrawThemeParentBackground = (HRESULT (WINAPI *)(HWND,HDC,RECT *))GetProcAddress(hDll, "DrawThemeParentBackground");
JabberIsThemeActive = (BOOL (WINAPI *)())GetProcAddress(hDll, "IsThemeActive");
diff --git a/protocols/JabberG/jabber_adhoc.cpp b/protocols/JabberG/jabber_adhoc.cpp
index 0221e95d11..cb398fa5f7 100644
--- a/protocols/JabberG/jabber_adhoc.cpp
+++ b/protocols/JabberG/jabber_adhoc.cpp
@@ -143,7 +143,7 @@ int CJabberProto::AdHoc_ExecuteCommand( HWND hwndDlg, TCHAR*, JabberAdHocData* d
<< XCHILDNS( _T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR( _T("node"), node ) << XATTR( _T("action"), _T("execute")));
EnableDlgItem( hwndDlg, IDC_SUBMIT, FALSE );
- SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ) );
+ SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ));
} }
xi.destroyNode( dat->CommandsNode ); dat->CommandsNode = NULL;
@@ -155,7 +155,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
{
int nodeIdx = 0;
const TCHAR * type = xmlGetAttrValue( iqNode, _T("type"));
- if ( !type || !_tcscmp( type, _T( "error" ) ) ) {
+ if ( !type || !_tcscmp( type, _T( "error" )) ) {
// error occurred here
TCHAR buff[255];
const TCHAR* code = NULL;
@@ -166,10 +166,10 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
code = xmlGetAttrValue( errorNode, _T("code"));
description = xmlGetText( errorNode );
}
- _sntprintf( buff, SIZEOF(buff), TranslateT( "Error %s %s" ), (code) ? code : _T(""), (description) ? description : _T("") );
+ _sntprintf( buff, SIZEOF(buff), TranslateT( "Error %s %s" ), (code) ? code : _T(""), (description) ? description : _T(""));
JabberFormSetInstruction( hwndDlg, buff );
}
- else if ( !_tcscmp( type, _T("result") ) ) {
+ else if ( !_tcscmp( type, _T("result")) ) {
BOOL validResponse = FALSE;
EnumChildWindows( GetDlgItem( hwndDlg, IDC_FRAME ), sttDeleteChildWindowsProc, 0 );
dat->CurrentHeight = 0;
@@ -180,8 +180,8 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T( "xmlns" ));
const TCHAR* node = xmlGetAttrValue( queryNode, _T( "node" ));
if ( xmlns && node
- && !_tcscmp( xmlns, _T( JABBER_FEAT_DISCO_ITEMS ) )
- && !_tcscmp( node, _T( JABBER_FEAT_COMMANDS ) ) )
+ && !_tcscmp( xmlns, _T( JABBER_FEAT_DISCO_ITEMS ))
+ && !_tcscmp( node, _T( JABBER_FEAT_COMMANDS )) )
validResponse = TRUE;
}
if ( queryNode && xmlGetChild( queryNode ,0) && validResponse ) {
@@ -201,12 +201,12 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult( HWND hwndDlg, HXML iqNode, Jabb
} }
if (nodeIdx>1) {
- JabberFormSetInstruction( hwndDlg, TranslateT("Select Command") );
+ JabberFormSetInstruction( hwndDlg, TranslateT("Select Command"));
ShowDlgItem( hwndDlg, IDC_FRAME, SW_SHOW);
ShowDlgItem( hwndDlg, IDC_VSCROLL, SW_SHOW);
EnableDlgItem( hwndDlg, IDC_SUBMIT, TRUE);
} else {
- JabberFormSetInstruction(hwndDlg, TranslateT("Not supported") );
+ JabberFormSetInstruction(hwndDlg, TranslateT("Not supported"));
} }
JabberAdHoc_RefreshFrameScroll( hwndDlg, dat );
@@ -227,7 +227,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
const TCHAR *type;
if (( type = xmlGetAttrValue( workNode, _T("type"))) == NULL ) return TRUE;
- if ( !lstrcmp( type, _T("result") ) ) {
+ if ( !lstrcmp( type, _T("result")) ) {
// wParam = <iq/> node from responder as a result of command execution
HXML commandNode, xNode, n;
if (( commandNode = xmlGetChild( dat->AdHocNode, _T("command"))) == NULL )
@@ -241,11 +241,11 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
HWND hFrame = GetDlgItem( hwndDlg, IDC_FRAME );
ShowWindow( GetDlgItem( hwndDlg, IDC_FRAME_TEXT ), SW_HIDE );
if (( n = xmlGetChild( xNode , "instructions" )) != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else if (( n = xmlGetChild( xNode , "title" )) != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else
- JabberFormSetInstruction(hwndDlg, TranslateTS(status) );
+ JabberFormSetInstruction(hwndDlg, TranslateTS(status));
JabberFormCreateUI( hFrame, xNode, &dat->CurrentHeight );
ShowDlgItem( hwndDlg, IDC_FRAME , SW_SHOW);
}
@@ -259,7 +259,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
if (noteNode)
noteText = xmlGetText( noteNode );
- JabberFormSetInstruction(hwndDlg, noteText ? noteText : TranslateTS(status) );
+ JabberFormSetInstruction(hwndDlg, noteText ? noteText : TranslateTS(status));
}
//check actions
@@ -425,7 +425,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc( HWND hwndDlg, UINT msg, WPAR
<< XATTR( _T("node"), pStartupParams->m_szNode ) << XATTR( _T("action"), _T("execute")));
EnableDlgItem( hwndDlg, IDC_SUBMIT, FALSE );
- SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ) );
+ SetDlgItemText( hwndDlg, IDC_SUBMIT, TranslateT( "OK" ));
TCHAR Caption[ 512 ];
_sntprintf(Caption, SIZEOF(Caption), _T("%s %s"), TranslateT("Sending Ad-Hoc command to"), dat->ResponderJID );
@@ -595,7 +595,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam )
if (!item || selected) {
CJabberAdhocStartupParams* pStartupParams = new CJabberAdhocStartupParams( this, jid, NULL );
- CreateDialogParam( hInst, MAKEINTRESOURCE( IDD_FORM ), NULL, JabberAdHoc_CommandDlgProc, ( LPARAM )(pStartupParams) );
+ CreateDialogParam( hInst, MAKEINTRESOURCE( IDD_FORM ), NULL, JabberAdHoc_CommandDlgProc, ( LPARAM )(pStartupParams));
}
JFreeVariant( &dbv );
diff --git a/protocols/JabberG/jabber_agent.cpp b/protocols/JabberG/jabber_agent.cpp
index 35337568b9..144527430f 100644
--- a/protocols/JabberG/jabber_agent.cpp
+++ b/protocols/JabberG/jabber_agent.cpp
@@ -157,7 +157,7 @@ public:
// use new jabber:x:data form
HXML n = xmlGetChild( xNode , "instructions" );
if ( n != NULL && xmlGetText( n )!=NULL )
- JabberFormSetInstruction( m_hwnd, xmlGetText( n ) );
+ JabberFormSetInstruction( m_hwnd, xmlGetText( n ));
JabberFormCreateUI( hFrame, xNode, &m_formHeight /*dummy*/ );
}
@@ -169,9 +169,9 @@ public:
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("instructions"))) {
- JabberFormSetInstruction( m_hwnd, xmlGetText( n ) );
+ JabberFormSetInstruction( m_hwnd, xmlGetText( n ));
}
else if ( !lstrcmp( xmlGetName( n ), _T("key")) || !lstrcmp( xmlGetName( n ), _T("registered"))) {
// do nothing
@@ -256,13 +256,13 @@ public:
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("key"))) {
// field that must be passed along with the registration
- if ( xmlGetText( n ) )
- xmlAddChild( query, xmlGetName( n ), xmlGetText( n ) );
+ if ( xmlGetText( n ))
+ xmlAddChild( query, xmlGetName( n ), xmlGetText( n ));
else
- xmlAddChild( query, xmlGetName( n ) );
+ xmlAddChild( query, xmlGetName( n ));
}
else if ( !lstrcmp( xmlGetName( n ), _T("registered")) || !lstrcmp( xmlGetName( n ), _T("instructions"))) {
// do nothing, we will skip these
diff --git a/protocols/JabberG/jabber_bookmarks.cpp b/protocols/JabberG/jabber_bookmarks.cpp
index 1dbc42868b..096b8bf55f 100644
--- a/protocols/JabberG/jabber_bookmarks.cpp
+++ b/protocols/JabberG/jabber_bookmarks.cpp
@@ -49,7 +49,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc( HWND hwndDlg, UINT msg, WPARAM
param->ppro->m_hwndJabberAddBookmark = hwndDlg;
TranslateDialogDefault( hwndDlg );
if ( item = param->m_item ) {
- if ( !lstrcmp( item->type, _T("conference") )) {
+ if ( !lstrcmp( item->type, _T("conference"))) {
if (!_tcschr( item->jid, _T( '@' ))) { //no room name - consider it is transport
SendDlgItemMessage(hwndDlg, IDC_AGENT_RADIO, BM_SETCHECK, BST_CHECKED, 0);
EnableWindow( GetDlgItem( hwndDlg, IDC_NICK ), FALSE );
@@ -85,9 +85,9 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc( HWND hwndDlg, UINT msg, WPARAM
return TRUE;
case WM_COMMAND:
- switch ( HIWORD(wParam) ) {
+ switch ( HIWORD(wParam)) {
case BN_CLICKED:
- switch (LOWORD (wParam) ) {
+ switch (LOWORD (wParam)) {
case IDC_ROOM_RADIO:
EnableWindow( GetDlgItem( hwndDlg, IDC_NICK ), TRUE );
EnableWindow( GetDlgItem( hwndDlg, IDC_PASSWORD ), TRUE );
diff --git a/protocols/JabberG/jabber_caps.cpp b/protocols/JabberG/jabber_caps.cpp
index 9c3f69b31f..00f2a2bc68 100644
--- a/protocols/JabberG/jabber_caps.cpp
+++ b/protocols/JabberG/jabber_caps.cpp
@@ -91,7 +91,7 @@ const JabberFeatCapPair g_JabberFeatCapPairsExt[] = {
void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
if ( !r )
return;
@@ -103,42 +103,42 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
// XEP-0232 support
HXML xform;
for ( int i = 1; ( xform = xmlGetNthChild( query, _T("x"), i)) != NULL; i++ ) {
- TCHAR *szFormTypeValue = XPath( xform, _T("field[@var='FORM_TYPE']/value") );
- if ( szFormTypeValue && !_tcscmp( szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo") )) {
+ TCHAR *szFormTypeValue = XPath( xform, _T("field[@var='FORM_TYPE']/value"));
+ if ( szFormTypeValue && !_tcscmp( szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
if ( r->pSoftwareInfo )
delete r->pSoftwareInfo;
r->pSoftwareInfo = new JABBER_XEP0232_SOFTWARE_INFO;
if ( r->pSoftwareInfo ) {
- TCHAR *szTmp = XPath( xform, _T("field[@var='os']/value") );
+ TCHAR *szTmp = XPath( xform, _T("field[@var='os']/value"));
if ( szTmp )
r->pSoftwareInfo->szOs = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='os_version']/value") );
+ szTmp = XPath( xform, _T("field[@var='os_version']/value"));
if ( szTmp )
r->pSoftwareInfo->szOsVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='software']/value") );
+ szTmp = XPath( xform, _T("field[@var='software']/value"));
if ( szTmp )
r->pSoftwareInfo->szSoftware = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='software_version']/value") );
+ szTmp = XPath( xform, _T("field[@var='software_version']/value"));
if ( szTmp )
r->pSoftwareInfo->szSoftwareVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-version']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-version']/value"));
if ( szTmp )
r->pSoftwareInfo->szXMirandaCoreVersion = mir_tstrdup( szTmp );
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-unicode']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-unicode']/value"));
if ( !szTmp ) // old deprecated format
- szTmp = XPath( xform, _T("field[@var='x-miranda-is-unicode']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-is-unicode']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsUnicode = TRUE;
- szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-alpha']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-core-is-alpha']/value"));
if ( !szTmp ) // old deprecated format
- szTmp = XPath( xform, _T("field[@var='x-miranda-is-alpha']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-is-alpha']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsAlpha = TRUE;
- szTmp = XPath( xform, _T("field[@var='x-miranda-jabber-is-debug']/value") );
+ szTmp = XPath( xform, _T("field[@var='x-miranda-jabber-is-debug']/value"));
if ( szTmp && _ttoi( szTmp ))
r->pSoftwareInfo->bXMirandaIsDebug = TRUE;
}
- JabberUserInfoUpdate( pInfo->GetHContact() );
+ JabberUserInfoUpdate( pInfo->GetHContact());
}
}
}
@@ -146,7 +146,7 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI( HXML, CJabberIqInfo* pInfo )
void CJabberProto::OnIqResultCapsDiscoInfo( HXML, CJabberIqInfo* pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
HXML query = pInfo->GetChildNode();
if ( pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query ) {
@@ -171,7 +171,7 @@ void CJabberProto::OnIqResultCapsDiscoInfo( HXML, CJabberIqInfo* pInfo )
if (!m_clientCapsManager.SetClientCaps( pInfo->GetIqId(), jcbCaps ))
if ( r )
r->jcbCachedCaps = jcbCaps;
- JabberUserInfoUpdate( pInfo->GetHContact() );
+ JabberUserInfoUpdate( pInfo->GetHContact());
}
else {
// no version info support and no XEP-0115 support?
@@ -243,7 +243,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo *pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->szCapsNode, r->szCapsVer, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->szCapsNode, r->szCapsVer, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
r->dwDiscoInfoRequestTime = pInfo->GetRequestTime();
TCHAR queryNode[512];
@@ -260,7 +260,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
if ( jcbMainCaps != JABBER_RESOURCE_CAPS_TIMEOUT && r->szCapsExt ) {
TCHAR *caps = mir_tstrdup( r->szCapsExt );
- TCHAR *token = _tcstok( caps, _T(" ") );
+ TCHAR *token = _tcstok( caps, _T(" "));
while ( token ) {
switch ( jcbExtCaps = m_clientCapsManager.GetClientCaps( r->szCapsNode, token )) {
case JABBER_RESOURCE_CAPS_ERROR:
@@ -272,7 +272,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->szCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->szCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
TCHAR queryNode[512];
mir_sntprintf( queryNode, SIZEOF(queryNode), _T("%s#%s"), r->szCapsNode, token );
@@ -290,7 +290,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
jcbCaps |= jcbExtCaps;
}
- token = _tcstok( NULL, _T(" ") );
+ token = _tcstok( NULL, _T(" "));
}
mir_free(caps);
@@ -357,7 +357,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps( r->software, r->version );
if ( jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR ) {
// Bombus hack:
- if ( !_tcscmp( r->software, _T( "Bombus" )) || !_tcscmp( r->software, _T( "BombusMod" )) ) {
+ if ( !_tcscmp( r->software, _T( "Bombus" )) || !_tcscmp( r->software, _T( "BombusMod" ))) {
jcbMainCaps = JABBER_CAPS_SI|JABBER_CAPS_SI_FT|JABBER_CAPS_IBB|JABBER_CAPS_MESSAGE_EVENTS|JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY|JABBER_CAPS_DATA_FORMS|JABBER_CAPS_LAST_ACTIVITY|JABBER_CAPS_VERSION|JABBER_CAPS_COMMANDS|JABBER_CAPS_VCARD_TEMP;
m_clientCapsManager.SetClientCaps( r->software, r->version, jcbMainCaps );
}
@@ -377,7 +377,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites( const TCHAR *jid, BOOL appe
CJabberIqInfo *pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultCapsDiscoInfo, JABBER_IQ_TYPE_GET, fullJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE );
pInfo->SetTimeout( JABBER_RESOURCE_CAPS_QUERY_TIMEOUT );
- m_clientCapsManager.SetClientCaps( r->software, r->version, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId() );
+ m_clientCapsManager.SetClientCaps( r->software, r->version, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
r->dwDiscoInfoRequestTime = pInfo->GetRequestTime();
XmlNodeIq iq( pInfo );
@@ -515,7 +515,7 @@ BOOL CJabberClientCaps::SetPartialCaps( int nIqId, JabberCapsBits jcbCaps ) {
CJabberClientPartialCaps *pCaps = FindById( nIqId );
if ( !pCaps )
return FALSE;
- if ( !(jcbCaps & JABBER_RESOURCE_CAPS_ERROR) && m_szNode && pCaps->GetVersion() ) {
+ if ( !(jcbCaps & JABBER_RESOURCE_CAPS_ERROR) && m_szNode && pCaps->GetVersion()) {
if ( !_tcscmp( m_szNode, _T( "http://miranda-im.org/caps" )) && !_tcscmp( pCaps->GetVersion(), _T( "0.7.0.13" )))
jcbCaps = jcbCaps & ( ~JABBER_CAPS_MESSAGE_RECEIPTS );
}
@@ -702,14 +702,14 @@ BOOL CJabberClientCapsManager::HandleInfoRequest( HXML, CJabberIqInfo* pInfo, co
form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-version")) << XCHILD( _T("value"), szCoreVersion );
#ifdef _DEBUG
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-jabber-is-debug")) << XCHILD( _T("value"), _T("1") );
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-jabber-is-debug")) << XCHILD( _T("value"), _T("1"));
#endif
char szMirandaVersion[100];
if (!JCallService( MS_SYSTEM_GETVERSIONTEXT, sizeof( szMirandaVersion ), ( LPARAM )szMirandaVersion )) {
_strlwr( szMirandaVersion );
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-unicode")) << XCHILD( _T("value"), strstr( szMirandaVersion, "unicode" ) ? _T("1") : _T("0") );
- form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-alpha")) << XCHILD( _T("value"), strstr( szMirandaVersion, "alpha" ) ? _T("1") : _T("0") );
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-unicode")) << XCHILD( _T("value"), strstr( szMirandaVersion, "unicode" ) ? _T("1") : _T("0"));
+ form << XCHILD( _T("field")) << XATTR( _T("var"), _T("x-miranda-core-is-alpha")) << XCHILD( _T("value"), strstr( szMirandaVersion, "alpha" ) ? _T("1") : _T("0"));
}
}
diff --git a/protocols/JabberG/jabber_captcha.cpp b/protocols/JabberG/jabber_captcha.cpp
index c090499cd2..5808cd285c 100644
--- a/protocols/JabberG/jabber_captcha.cpp
+++ b/protocols/JabberG/jabber_captcha.cpp
@@ -53,7 +53,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
LPCTSTR hint = params->hint;
if ( hint == NULL )
hint = TranslateT("Enter the text you see");
- SetDlgItemText( hwndDlg, IDC_INSTRUCTION, TranslateTS( hint ) );
+ SetDlgItemText( hwndDlg, IDC_INSTRUCTION, TranslateTS( hint ));
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, ( LONG )params );
return TRUE;
@@ -95,7 +95,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
return TRUE;
case IDC_SUBMIT:
- GetDlgItemText( hwndDlg, IDC_VALUE, params->Result, SIZEOF(params->Result) );
+ GetDlgItemText( hwndDlg, IDC_VALUE, params->Result, SIZEOF(params->Result));
EndDialog( hwndDlg, 1 );
return TRUE;
}
diff --git a/protocols/JabberG/jabber_chat.cpp b/protocols/JabberG/jabber_chat.cpp
index b90ce80d6a..fc2662f94c 100644
--- a/protocols/JabberG/jabber_chat.cpp
+++ b/protocols/JabberG/jabber_chat.cpp
@@ -775,7 +775,7 @@ public:
CSuper::OnInitDialog();
TCHAR buf[256];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_room, TranslateT("Send groupchat invitation.") );
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_room, TranslateT("Send groupchat invitation."));
SetDlgItemText(m_hwnd, IDC_HEADERBAR, buf);
WindowSetIcon(m_hwnd, m_proto, "group");
@@ -984,7 +984,7 @@ static LRESULT CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
switch (value)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( dat->him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( dat->him->szRealJid, szBareJid, SIZEOF(szBareJid));
case AFFILIATION_NONE:
if (dat->him->szRealJid)
dat->ppro->AdminSet(dat->item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
@@ -1181,7 +1181,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
}
else
@@ -1194,7 +1194,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("member"));
}
else
@@ -1207,7 +1207,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("admin"));
}
else
@@ -1220,7 +1220,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if (him->szRealJid)
{
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid) );
+ JabberStripJid( him->szRealJid, szBareJid, SIZEOF(szBareJid));
ppro->AdminSet(item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("owner"));
}
else
@@ -1232,7 +1232,7 @@ static void sttNickListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL) {
if ( him->szRealJid && *him->szRealJid ) {
TCHAR szVictimBareJid[ JABBER_MAX_JID_LEN ];
- JabberStripJid( him->szRealJid, szVictimBareJid, SIZEOF(szVictimBareJid) );
+ JabberStripJid( him->szRealJid, szVictimBareJid, SIZEOF(szVictimBareJid));
mir_sntprintf( szBuffer, SIZEOF(szBuffer), _T("%s: "), me->resourceName );
mir_sntprintf( szTitle, SIZEOF(szTitle), _T("%s %s"), TranslateT( "Reason to ban" ), him->resourceName );
@@ -1455,7 +1455,7 @@ static void sttLogListHook( CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK*
case IDM_PRESENCE_DND:
case IDM_PRESENCE_FREE4CHAT:
{
- if ( HANDLE h = ppro->HContactFromJID( item->jid ) )
+ if ( HANDLE h = ppro->HContactFromJID( item->jid ))
ppro->OnMenuHandleDirectPresence( (WPARAM)h, 0, gch->dwData );
break;
}
@@ -1568,7 +1568,7 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////////////
void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR* str , TCHAR* rsn)
{
- const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@') ) ? _T("jid") : _T("nick");
+ const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@')) ? _T("jid") : _T("nick");
TCHAR* roomJid = jidListInfo->roomJid;
if ( jidListInfo->type == MUC_BANLIST ) {
AdminSetReason( roomJid, xmlnsAdmin, field, str, _T("affiliation"), _T("outcast"), rsn);
@@ -1577,7 +1577,7 @@ void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR*
void CJabberProto::AddMucListItem( JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR* str )
{
- const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@') ) ? _T("jid") : _T("nick");
+ const TCHAR* field = ( jidListInfo->type == MUC_BANLIST || _tcschr(str,'@')) ? _T("jid") : _T("nick");
TCHAR* roomJid = jidListInfo->roomJid;
switch (jidListInfo->type) {
diff --git a/protocols/JabberG/jabber_console.cpp b/protocols/JabberG/jabber_console.cpp
index 9772446e4d..4214e67563 100644
--- a/protocols/JabberG/jabber_console.cpp
+++ b/protocols/JabberG/jabber_console.cpp
@@ -88,7 +88,7 @@ static void sttRtfAppendXml(StringBuf *buf, HXML node, DWORD flags, int indent);
void CJabberProto::OnConsoleProcessXml(HXML node, DWORD flags)
{
if ( node && m_pDlgConsole ) {
- if ( xmlGetName( node ) ) {
+ if ( xmlGetName( node )) {
if ( FilterXml( node, flags )) {
StringBuf buf = {0};
sttAppendBufRaw(&buf, RTF_HEADER);
@@ -243,7 +243,7 @@ static void sttRtfAppendXml(StringBuf *buf, HXML node, DWORD flags, int indent)
sttAppendBufRaw(buf, RTF_ENDATTRNAME);
sttAppendBufRaw(buf, "=\"");
sttAppendBufRaw(buf, RTF_BEGINATTRVAL);
- sttAppendBufT(buf, ( TCHAR* )xmlGetAttr( node, i) );
+ sttAppendBufT(buf, ( TCHAR* )xmlGetAttr( node, i));
sttAppendBufRaw(buf, "\"");
sttAppendBufRaw(buf, RTF_ENDATTRVAL);
}
@@ -712,7 +712,7 @@ void CJabberProto::ConsoleUninit()
INT_PTR __cdecl CJabberProto::OnMenuHandleConsole(WPARAM, LPARAM)
{
if ( m_pDlgConsole )
- SetForegroundWindow( m_pDlgConsole->GetHwnd() );
+ SetForegroundWindow( m_pDlgConsole->GetHwnd());
else
if ( m_hThreadConsole )
PostThreadMessage( m_dwConsoleThreadId, WM_CREATECONSOLE, 0, 0 );
diff --git a/protocols/JabberG/jabber_disco.cpp b/protocols/JabberG/jabber_disco.cpp
index 236ce274c6..e44f3613f9 100644
--- a/protocols/JabberG/jabber_disco.cpp
+++ b/protocols/JabberG/jabber_disco.cpp
@@ -201,7 +201,7 @@ void CJabberProto::OnIqResultServiceDiscoveryInfo( HXML iqNode, CJabberIqInfo* p
pNode->SetInfoRequestErrorText( str );
mir_free( str );
}
- else pNode->SetInfoRequestErrorText( TranslateT("request timeout.") );
+ else pNode->SetInfoRequestErrorText( TranslateT("request timeout."));
pNode->SetInfoRequestId( JABBER_DISCO_RESULT_ERROR );
}
@@ -245,7 +245,7 @@ void CJabberProto::OnIqResultServiceDiscoveryItems( HXML iqNode, CJabberIqInfo*
mir_free( str );
}
else {
- pNode->SetItemsRequestErrorText( _T("request timeout.") );
+ pNode->SetItemsRequestErrorText( _T("request timeout."));
}
pNode->SetItemsRequestId( JABBER_DISCO_RESULT_ERROR );
}
@@ -312,15 +312,15 @@ BOOL CJabberProto::SendInfoRequest(CJabberSDNode* pNode, HXML parent)
return FALSE;
// disco#info
- if ( !pNode->GetInfoRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetInfoRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetInfoRequestId( pInfo->GetIqId() );
+ pNode->SetInfoRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_INFO));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -342,15 +342,15 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode* pNode, HXML parent)
return FALSE;
// disco#info
- if ( !pNode->GetInfoRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetInfoRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryInfo, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetInfoRequestId( pInfo->GetIqId() );
+ pNode->SetInfoRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_INFO));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -359,15 +359,15 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode* pNode, HXML parent)
}
// disco#items
- if ( !pNode->GetItemsRequestId() ) {
- CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryItems, JABBER_IQ_TYPE_GET, pNode->GetJid() );
+ if ( !pNode->GetItemsRequestId()) {
+ CJabberIqInfo* pInfo = m_iqManager.AddHandler( &CJabberProto::OnIqResultServiceDiscoveryItems, JABBER_IQ_TYPE_GET, pNode->GetJid());
pInfo->SetTimeout( 30000 );
- pNode->SetItemsRequestId( pInfo->GetIqId() );
+ pNode->SetItemsRequestId( pInfo->GetIqId());
XmlNodeIq iq( pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_DISCO_ITEMS));
- if ( pNode->GetNode() )
- xmlAddAttr( query, _T("node"), pNode->GetNode() );
+ if ( pNode->GetNode())
+ xmlAddAttr( query, _T("node"), pNode->GetNode());
if ( parent )
xmlAddChild( parent, iq );
@@ -550,7 +550,7 @@ BOOL CJabberProto::SyncTree(HTREELISTITEM hIndex, CJabberSDNode* pNode)
CJabberSDNode* pTmp = pNode;
while (pTmp) {
- if ( !pTmp->GetTreeItemHandle() ) {
+ if ( !pTmp->GetTreeItemHandle()) {
HTREELISTITEM hNewItem = TreeList_AddItem(
GetDlgItem(m_pDlgServiceDiscovery->GetHwnd(), IDC_TREE_DISCO), hIndex,
pTmp->GetName() ? pTmp->GetName() : pTmp->GetJid(),
@@ -566,8 +566,8 @@ BOOL CJabberProto::SyncTree(HTREELISTITEM hIndex, CJabberSDNode* pNode)
ApplyNodeIcon(pNode->GetTreeItemHandle(), pNode);
- if ( pTmp->GetFirstChildNode() )
- SyncTree( pTmp->GetTreeItemHandle(), pTmp->GetFirstChildNode() );
+ if ( pTmp->GetFirstChildNode())
+ SyncTree( pTmp->GetTreeItemHandle(), pTmp->GetFirstChildNode());
pTmp = pTmp->GetNext();
}
@@ -642,11 +642,11 @@ void CJabberDlgDiscovery::OnInitDialog()
if ( m_jid ) {
SetDlgItemText( m_hwnd, IDC_COMBO_JID, m_jid );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
m_focusEditAfterBrowse = false;
} else {
SetDlgItemTextA( m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->server );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
m_focusEditAfterBrowse = true;
}
@@ -804,7 +804,7 @@ void CJabberDlgDiscovery::btnViewAsList_OnClick(CCtrlButton *)
void CJabberDlgDiscovery::btnGoHome_OnClick(CCtrlButton *)
{
SetDlgItemTextA( m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->server );
- SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T("") );
+ SetDlgItemText( m_hwnd, IDC_COMBO_NODE, _T(""));
PostMessage( m_hwnd, WM_COMMAND, MAKEWPARAM( IDC_BUTTON_BROWSE, 0 ), 0 );
}
@@ -989,8 +989,8 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
CJabberSDNode* pNode = m_proto->m_SDManager.GetPrimaryNode();
while (pNode)
{
- if ( pNode->GetJid() ) {
- if ( !pNode->GetTreeItemHandle() ) {
+ if ( pNode->GetJid()) {
+ if ( !pNode->GetTreeItemHandle()) {
HTREELISTITEM hNewItem = TreeList_AddItem(
GetDlgItem( m_hwnd, IDC_TREE_DISCO), NULL,
pNode->GetName() ? pNode->GetName() : pNode->GetJid(),
@@ -1413,12 +1413,12 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
case SD_ACT_BOOKMARK:
{
- JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid());
if ( item == NULL ) {
- item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid() );
+ item = ListGetItemPtr( LIST_BOOKMARK, pNode->GetJid());
if ( item == NULL ) {
- item = ListAdd( LIST_ROOM, pNode->GetJid() );
- item->name = mir_tstrdup( pNode->GetName() );
+ item = ListAdd( LIST_ROOM, pNode->GetJid());
+ item->name = mir_tstrdup( pNode->GetName());
}
if ( item != NULL ) {
item->type = _T("conference");
@@ -1429,10 +1429,10 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
case SD_ACT_USERMENU:
{
- HANDLE hContact = HContactFromJID( pNode->GetJid() );
+ HANDLE hContact = HContactFromJID( pNode->GetJid());
if ( !hContact ) {
hContact = DBCreateContact( pNode->GetJid(), pNode->GetName(), TRUE, FALSE );
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
}
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
@@ -1453,7 +1453,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
hContact = ( HANDLE )CallProtoService( m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, ( LPARAM )&jsr );
}
if ( ListGetItemPtr( LIST_VCARD_TEMP, pNode->GetJid()) == NULL ) {
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
if ( item->resource == NULL )
ListAddResource( LIST_VCARD_TEMP, jid, ID_STATUS_OFFLINE, NULL, 0);
@@ -1466,7 +1466,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
{
HANDLE hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
DBDeleteContactSetting( hContact, "CList", "NotOnList" );
- JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid() );
+ JABBER_LIST_ITEM* item = ListAdd( LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
break;
}
@@ -1477,7 +1477,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
break;
case SD_ACT_UNREGISTER:
- m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), pNode->GetJid() ) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
+ m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), pNode->GetJid()) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext()) << XQUERY( _T(JABBER_FEAT_IQ_ROSTER))
<< XCHILD( _T("item")) << XATTR( _T("jid"), pNode->GetJid()) << XATTR( _T("subscription"), _T("remove")));
@@ -1496,7 +1496,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
void CJabberProto::LaunchServiceDiscovery(TCHAR *jid)
{
if ( m_pDlgServiceDiscovery ) {
- SetForegroundWindow( m_pDlgServiceDiscovery->GetHwnd() );
+ SetForegroundWindow( m_pDlgServiceDiscovery->GetHwnd());
if (jid) {
SetDlgItemText( m_pDlgServiceDiscovery->GetHwnd(), IDC_COMBO_JID, jid);
SetDlgItemTextA( m_pDlgServiceDiscovery->GetHwnd(), IDC_COMBO_NODE, "");
diff --git a/protocols/JabberG/jabber_disco.h b/protocols/JabberG/jabber_disco.h
index 372a9b1379..3c34dfab5f 100644
--- a/protocols/JabberG/jabber_disco.h
+++ b/protocols/JabberG/jabber_disco.h
@@ -379,16 +379,16 @@ public:
CJabberSDIdentity *pIdentity = m_pIdentities;
while ( pIdentity ) {
- if ( pIdentity->GetName() )
+ if ( pIdentity->GetName())
mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s (%s: %s, %s: %s)\r\n"),
CHR_BULLET, pIdentity->GetName(),
TranslateT("category"), pIdentity->GetCategory(),
- TranslateT("type"), pIdentity->GetType() );
+ TranslateT("type"), pIdentity->GetType());
else
mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s: %s, %s: %s\r\n"),
CHR_BULLET,
TranslateT("Category"), pIdentity->GetCategory(),
- TranslateT("Type"), pIdentity->GetType() );
+ TranslateT("Type"), pIdentity->GetType());
AppendString( &szBuffer, szTmp );
@@ -402,7 +402,7 @@ public:
CJabberSDFeature *pFeature = m_pFeatures;
while ( pFeature ) {
- mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar() );
+ mir_sntprintf( szTmp, SIZEOF( szTmp ), _T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar());
AppendString( &szBuffer, szTmp );
@@ -484,7 +484,7 @@ public:
CJabberSDNode *pTmpNode = NULL;
pNode = m_pPrimaryNodes;
while ( pNode ) {
- if ( pTmpNode = pNode->FindByIqId( nIqId, bInfoId ) )
+ if ( pTmpNode = pNode->FindByIqId( nIqId, bInfoId ))
return pTmpNode;
pNode = pNode->GetNext();
}
diff --git a/protocols/JabberG/jabber_events.cpp b/protocols/JabberG/jabber_events.cpp
index 722f55f6b4..591bff3c96 100644
--- a/protocols/JabberG/jabber_events.cpp
+++ b/protocols/JabberG/jabber_events.cpp
@@ -53,7 +53,7 @@ int CJabberProto::OnContactDeleted( WPARAM wParam, LPARAM )
if ( ListExist( LIST_ROSTER, dbv.ptszVal )) {
if ( !_tcschr( dbv.ptszVal, _T( '@' ))) {
TCHAR szStrippedJid[JABBER_MAX_JID_LEN];
- JabberStripJid( m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid) );
+ JabberStripJid( m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid));
TCHAR *szDog = _tcschr( szStrippedJid, _T('@'));
if ( szDog && _tcsicmp( szDog + 1, dbv.ptszVal ))
m_ThreadInfo->send( XmlNodeIq( _T("set"), SerialNext(), dbv.ptszVal ) << XQUERY( _T(JABBER_FEAT_REGISTER)) << XCHILD( _T("remove")));
diff --git a/protocols/JabberG/jabber_form.cpp b/protocols/JabberG/jabber_form.cpp
index 64fe2ea5cd..797001e630 100644
--- a/protocols/JabberG/jabber_form.cpp
+++ b/protocols/JabberG/jabber_form.cpp
@@ -471,7 +471,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
TCHAR *labelStr, *valueStr, *p;
RECT frameRect;
- if ( xNode==NULL || xmlGetName( xNode )==NULL || lstrcmp( xmlGetName( xNode ), _T("x") ) || hwndStatic==NULL ) return;
+ if ( xNode==NULL || xmlGetName( xNode )==NULL || lstrcmp( xmlGetName( xNode ), _T("x")) || hwndStatic==NULL ) return;
GetClientRect( hwndStatic, &frameRect );
@@ -490,7 +490,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !n )
break;
- if ( xmlGetName( n ) ) {
+ if ( xmlGetName( n )) {
if ( !lstrcmp( xmlGetName( n ), _T("field"))) {
varStr = xmlGetAttrValue( n, _T("var"));
if (( typeName = xmlGetAttrValue( n, _T("type"))) != NULL ) {
@@ -514,8 +514,8 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
v = xmlGetChild( n ,j);
if ( !v )
break;
- if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ) )
- size += _tcslen( xmlGetText( v ) ) + 2;
+ if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ))
+ size += _tcslen( xmlGetText( v )) + 2;
}
valueStr = ( TCHAR* )mir_alloc( sizeof(TCHAR)*size );
valueStr[0] = '\0';
@@ -523,10 +523,10 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
v = xmlGetChild( n ,j);
if ( !v )
break;
- if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v ) ) {
+ if ( xmlGetName( v ) && !lstrcmp( xmlGetName( v ), _T("value")) && xmlGetText( v )) {
if ( valueStr[0] )
_tcscat( valueStr, _T("\r\n"));
- _tcscat( valueStr, xmlGetText( v ) );
+ _tcscat( valueStr, xmlGetText( v ));
} }
}
} else
@@ -546,12 +546,12 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !o )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str = xmlGetAttrValue( o, _T("label"))) == NULL )
str = xmlGetText( v );
if (( p = mir_tstrdup( str )) != NULL ) {
bool selected = false;
- if ( valueText != NULL && !_tcscmp( valueText, xmlGetText( v ) ))
+ if ( valueText != NULL && !_tcscmp( valueText, xmlGetText( v )))
selected = true;
JabberFormAddListItem(item, p, selected);
mir_free( p );
@@ -564,7 +564,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
if ( !o )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str = xmlGetAttrValue( o, _T("label"))) == NULL )
str = xmlGetText( v );
if (( p = mir_tstrdup( str )) != NULL ) {
@@ -573,7 +573,7 @@ void JabberFormCreateUI( HWND hwndStatic, HXML xNode, int *formHeight, BOOL bCom
vs = xmlGetChild( n ,k);
if ( !vs )
break;
- if ( !lstrcmp( xmlGetName( vs ), _T("value")) && xmlGetText( vs ) && !_tcscmp( xmlGetText( vs ), xmlGetText( v ) ))
+ if ( !lstrcmp( xmlGetName( vs ), _T("value")) && xmlGetText( vs ) && !_tcscmp( xmlGetText( vs ), xmlGetText( v )))
{
selected = true;
break;
@@ -661,7 +661,7 @@ HXML JabberFormGetData( HWND hwndStatic, HXML xNode )
break;
if ( !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( str2 = xmlGetAttrValue( o, _T("label"))) == NULL )
str2 = xmlGetText( v );
if ( !lstrcmp( str2, str ))
@@ -688,12 +688,12 @@ HXML JabberFormGetData( HWND hwndStatic, HXML xNode )
break;
if ( xmlGetName( o ) && !lstrcmp( xmlGetName( o ), _T("option"))) {
- if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v ) ) {
+ if (( v = xmlGetChild( o , "value" )) != NULL && xmlGetText( v )) {
if (( labelText = xmlGetAttrValue( o, _T("label"))) == NULL )
labelText = xmlGetText( v );
if ( !lstrcmp( labelText, str ))
- field << XCHILD( _T("value"), xmlGetText( v ) );
+ field << XCHILD( _T("value"), xmlGetText( v ));
} } }
mir_free( str );
} } }
@@ -748,16 +748,16 @@ static INT_PTR CALLBACK JabberFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
if ( jfi != NULL ) {
// Set dialog title
if ( jfi->xNode!=NULL && ( n = xmlGetChild( jfi->xNode , "title" )) != NULL && xmlGetText( n ) != NULL )
- SetWindowText( hwndDlg, xmlGetText( n ) );
+ SetWindowText( hwndDlg, xmlGetText( n ));
else if ( jfi->defTitle != NULL )
SetWindowText( hwndDlg, TranslateTS( jfi->defTitle ));
// Set instruction field
if ( jfi->xNode!=NULL && ( n = xmlGetChild( jfi->xNode , "instructions" )) != NULL && xmlGetText( n ) != NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else
{
if ( jfi->xNode != NULL && ( n = xmlGetChild( jfi->xNode , "title" )) != NULL && xmlGetText( n ) != NULL )
- JabberFormSetInstruction( hwndDlg, xmlGetText( n ) );
+ JabberFormSetInstruction( hwndDlg, xmlGetText( n ));
else if ( jfi->defTitle != NULL )
JabberFormSetInstruction( hwndDlg, TranslateTS( jfi->defTitle ));
}
diff --git a/protocols/JabberG/jabber_ft.cpp b/protocols/JabberG/jabber_ft.cpp
index 4f1450cf17..dda0a69455 100644
--- a/protocols/JabberG/jabber_ft.cpp
+++ b/protocols/JabberG/jabber_ft.cpp
@@ -333,7 +333,7 @@ void CJabberProto::FtHandleSiRequest( HXML iqNode )
break;
if ( !lstrcmp( xmlGetName( optionNode ), _T("option"))) {
- if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n ) ) {
+ if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n )) {
if ( !_tcscmp( xmlGetText( n ), _T(JABBER_FEAT_BYTESTREAMS))) {
ftType = FT_BYTESTREAM;
break;
@@ -347,7 +347,7 @@ void CJabberProto::FtHandleSiRequest( HXML iqNode )
break;
if ( !lstrcmp( xmlGetName( optionNode ), _T("option"))) {
- if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n ) ) {
+ if (( n = xmlGetChild( optionNode , "value" )) != NULL && xmlGetText( n )) {
if ( !_tcscmp( xmlGetText( n ), _T(JABBER_FEAT_IBB))) {
ftType = FT_IBB;
break;
diff --git a/protocols/JabberG/jabber_groupchat.cpp b/protocols/JabberG/jabber_groupchat.cpp
index de458a46e9..8fef909be5 100644
--- a/protocols/JabberG/jabber_groupchat.cpp
+++ b/protocols/JabberG/jabber_groupchat.cpp
@@ -331,7 +331,7 @@ void CJabberProto::GroupchatJoinRoom( const TCHAR* server, const TCHAR* room, co
TCHAR lasteventdate[40];
mir_sntprintf(lasteventdate, SIZEOF(lasteventdate), _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
time->tm_year+1900, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec);
- x << XCHILD( _T("history") ) << XATTR( _T("since"), lasteventdate);
+ x << XCHILD( _T("history")) << XATTR( _T("since"), lasteventdate);
}
}
@@ -562,7 +562,7 @@ void CJabberDlgGcJoin::OnInitDialog()
{
mir_sntprintf(jid, SIZEOF(jid), _T("%s@%s (%s)"),
info.room, info.server,
- info.nick ? info.nick : TranslateT("<no nick>") );
+ info.nick ? info.nick : TranslateT("<no nick>"));
SetDlgItemText(m_hwnd, IDC_RECENT1+i, jid);
} else
{
@@ -1002,7 +1002,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
char priority = 0;
if (( priorityNode = xmlGetChild( node , "priority" )) != NULL && xmlGetText( priorityNode ) != NULL )
- priority = (char)_ttoi( xmlGetText( priorityNode ) );
+ priority = (char)_ttoi( xmlGetText( priorityNode ));
if (JABBER_RESOURCE_STATUS *oldRes = ListFindResource(LIST_CHATROOM, from))
if ((oldRes->status != status) || lstrcmp_null(oldRes->statusMessage, str))
@@ -1037,7 +1037,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
else role = ROLE_NONE;
}
- if ( (role != ROLE_NONE) && (JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role)) ) {
+ if ( (role != ROLE_NONE) && (JabberGcGetStatus(r) != JabberGcGetStatus(affiliation, role))) {
GcLogUpdateMemberStatus( item, resource, nick, NULL, GC_EVENT_REMOVESTATUS, NULL );
if (!newRes) newRes = GC_EVENT_ADDSTATUS;
}
@@ -1087,7 +1087,7 @@ void CJabberProto::GroupchatProcessPresence( HXML node )
if ( roomCreated ||
(( n = xmlGetChild( node , "created" ))!=NULL &&
( str = xmlGetAttrValue( n, _T("xmlns")))!=NULL &&
- !_tcscmp( str, _T("http://jabber.org/protocol/muc#owner"))) ) {
+ !_tcscmp( str, _T("http://jabber.org/protocol/muc#owner")))) {
// A new room just created by me
// Request room config
int iqId = SerialNext();
@@ -1309,7 +1309,7 @@ public:
CSuper::OnInitDialog();
TCHAR buf[256];
- mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_info->roomJid, TranslateT("Incoming groupchat invitation.") );
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\n%s"), m_info->roomJid, TranslateT("Incoming groupchat invitation."));
SetDlgItemText( m_hwnd, IDC_HEADERBAR, buf );
SetDlgItemText( m_hwnd, IDC_FROM, m_info->from );
diff --git a/protocols/JabberG/jabber_icolib.cpp b/protocols/JabberG/jabber_icolib.cpp
index 9fab1d07e9..c85198a59c 100644
--- a/protocols/JabberG/jabber_icolib.cpp
+++ b/protocols/JabberG/jabber_icolib.cpp
@@ -267,7 +267,7 @@ void CJabberProto::IconsInit( void )
m_phIconLibItems = ( HANDLE* )mir_alloc( sizeof( HANDLE )*SIZEOF(iconList));
- mir_sntprintf( szRootSection, SIZEOF(szRootSection), _T("%s/%s/%s"), LPGENT("Protocols"), LPGENT("Jabber"), LPGENT("Accounts") );
+ mir_sntprintf( szRootSection, SIZEOF(szRootSection), _T("%s/%s/%s"), LPGENT("Protocols"), LPGENT("Jabber"), LPGENT("Accounts"));
for (i = 0; i < SIZEOF(iconList); i++ ) {
TCHAR tmp[100];
@@ -578,7 +578,7 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR* jid, HANDLE hContact
if ( m_lstTransports.getIndex( domain ) == -1 ) {
if ( isAgent ) {
- m_lstTransports.insert( mir_tstrdup(domain) );
+ m_lstTransports.insert( mir_tstrdup(domain));
JSetByte( hContact, "IsTransport", 1 );
} }
@@ -673,7 +673,7 @@ static void sttProcessIcons( int iAmount )
sid.pszDefaultFile = szFile;
char szRootSection[100];
- mir_snprintf( szRootSection, SIZEOF(szRootSection), "%s/%s", LPGEN("Protocols"), LPGEN("Jabber") );
+ mir_snprintf( szRootSection, SIZEOF(szRootSection), "%s/%s", LPGEN("Protocols"), LPGEN("Jabber"));
for ( int i = 0; i < iAmount; i++ ) {
char szSettingName[100], szSectionName[100];
diff --git a/protocols/JabberG/jabber_iq.cpp b/protocols/JabberG/jabber_iq.cpp
index db2a014b50..4f5a0cd049 100644
--- a/protocols/JabberG/jabber_iq.cpp
+++ b/protocols/JabberG/jabber_iq.cpp
@@ -235,7 +235,7 @@ void CJabberIqManager::ExpireInfo( CJabberIqInfo* pInfo, void*)
if (( pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT ) && ( pInfo->m_szFrom ))
pInfo->m_hContact = ppro->HContactFromJID( pInfo->m_szFrom , 3);
- ppro->Log( "Expiring iq id %d, sent to " TCHAR_STR_PARAM, pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server") );
+ ppro->Log( "Expiring iq id %d, sent to " TCHAR_STR_PARAM, pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL;
(ppro->*(pInfo->m_pHandler))( NULL, pInfo );
@@ -339,7 +339,7 @@ BOOL CJabberIqManager::HandleIqPermanent( HXML pNode )
if ( pInfo->m_nIqTypes & iqInfo.m_nIqType )
{
HXML pFirstChild = xmlGetChild( pNode , 0 );
- if ( !pFirstChild || !xmlGetName( pFirstChild ) )
+ if ( !pFirstChild || !xmlGetName( pFirstChild ))
break;
const TCHAR *szTagName = xmlGetName( pFirstChild );
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index ca1a69ad44..eb54b8fc6d 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -90,7 +90,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- if ( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) )
+ if ( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)))
return FALSE;
// Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
@@ -190,7 +190,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 )
{
- if ( GetSystemMetrics(SM_SERVERR2) )
+ if ( GetSystemMetrics(SM_SERVERR2))
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Server 2003 R2, "));
else if ( osvi.wSuiteMask==VER_SUITE_STORAGE_SERVER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Storage Server 2003"));
@@ -268,7 +268,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( _tcslen(osvi.szCSDVersion) > 0 )
{
- StringCchCat(pszOS, BUFSIZE, TEXT(" ") );
+ StringCchCat(pszOS, BUFSIZE, TEXT(" "));
StringCchCat(pszOS, BUFSIZE, osvi.szCSDVersion);
}
@@ -288,7 +288,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetFrom() )
+ if ( !pInfo->GetFrom())
return TRUE;
if ( !m_options.AllowVersionRequests )
@@ -296,8 +296,8 @@ BOOL CJabberProto::OnIqRequestVersion( HXML, CJabberIqInfo* pInfo )
XmlNodeIq iq( _T("result"), pInfo );
HXML query = iq << XQUERY( _T(JABBER_FEAT_VERSION));
- query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)") );
- query << XCHILD( _T("version"), _T(__VERSION_STRING) );
+ query << XCHILD( _T("name"), _T("Miranda IM Jabber (Unicode)"));
+ query << XCHILD( _T("version"), _T(__VERSION_STRING));
if ( m_options.ShowOSVersion )
{
@@ -391,7 +391,7 @@ BOOL CJabberProto::OnIqProcessIqOldTime( HXML, CJabberIqInfo *pInfo )
dtime[ 24 ] = 0;
XmlNodeIq iq( _T("result"), pInfo );
- HXML queryNode = iq << XQUERY( _T(JABBER_FEAT_ENTITY_TIME_OLD) );
+ HXML queryNode = iq << XQUERY( _T(JABBER_FEAT_ENTITY_TIME_OLD));
queryNode << XCHILD( _T("utc"), stime );
LPCTSTR szTZName = tmi.getTzName( NULL );
if ( szTZName )
@@ -464,8 +464,8 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
HXML queryNode = pInfo->GetChildNode();
// RFC 3921 #7.2 Business Rules
- if ( pInfo->GetFrom() ) {
- TCHAR* szFrom = JabberPrepareJid( pInfo->GetFrom() );
+ if ( pInfo->GetFrom()) {
+ TCHAR* szFrom = JabberPrepareJid( pInfo->GetFrom());
if ( !szFrom )
return TRUE;
@@ -475,10 +475,10 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
return TRUE;
}
- TCHAR* pDelimiter = _tcschr( szFrom, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szFrom, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
- pDelimiter = _tcschr( szTo, _T('/') );
+ pDelimiter = _tcschr( szTo, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
BOOL bRetVal = _tcscmp( szFrom, szTo ) == 0;
@@ -488,7 +488,7 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
// invalid JID
if ( !bRetVal ) {
- Log( "<iq/> attempt to hack via roster push from " TCHAR_STR_PARAM, pInfo->GetFrom() );
+ Log( "<iq/> attempt to hack via roster push from " TCHAR_STR_PARAM, pInfo->GetFrom());
return TRUE;
}
}
@@ -586,7 +586,7 @@ BOOL CJabberProto::OnRosterPushRequest( HXML, CJabberIqInfo *pInfo )
BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
{
- if ( !pInfo->GetFrom() || !pInfo->GetHContact() )
+ if ( !pInfo->GetFrom() || !pInfo->GetHContact())
return TRUE;
HXML n = xmlGetChild( pInfo->GetChildNode(), "url" );
@@ -607,7 +607,7 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
str = ( TCHAR* )xmlGetText( n ); // URL of the file to get
filetransfer* ft = new filetransfer( this );
ft->std.totalFiles = 1;
- ft->jid = mir_tstrdup( pInfo->GetFrom() );
+ ft->jid = mir_tstrdup( pInfo->GetFrom());
ft->std.hContact = pInfo->GetHContact();
ft->type = FT_OOB;
ft->httpHostName = NULL;
@@ -628,8 +628,8 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
ft->httpHostName = mir_t2a( text );
} } }
- if ( pInfo->GetIdStr() )
- ft->iqId = mir_tstrdup( pInfo->GetIdStr() );
+ if ( pInfo->GetIdStr())
+ ft->iqId = mir_tstrdup( pInfo->GetIdStr());
if ( ft->httpHostName && ft->httpPath ) {
TCHAR* desc = NULL;
@@ -671,7 +671,7 @@ BOOL CJabberProto::OnIqRequestOOB( HXML, CJabberIqInfo *pInfo )
BOOL CJabberProto::OnHandleDiscoInfoRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
const TCHAR* szNode = xmlGetAttrValue( pInfo->GetChildNode(), _T("node"));
@@ -693,7 +693,7 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest( HXML iqNode, CJabberIqInfo* pInfo )
BOOL CJabberProto::OnHandleDiscoItemsRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
// ad-hoc commands check:
@@ -737,7 +737,7 @@ BOOL CJabberProto::OnIqHttpAuth( HXML node, CJabberIqInfo* pInfo )
if ( !m_options.AcceptHttpAuth )
return TRUE;
- if ( !node || !pInfo->GetChildNode() || !pInfo->GetFrom() || !pInfo->GetIdStr() )
+ if ( !node || !pInfo->GetChildNode() || !pInfo->GetFrom() || !pInfo->GetIdStr())
return TRUE;
HXML pConfirm = xmlGetChild( node , "confirm" );
@@ -756,7 +756,7 @@ BOOL CJabberProto::OnIqHttpAuth( HXML node, CJabberIqInfo* pInfo )
return TRUE;
ZeroMemory( pParams, sizeof( CJabberHttpAuthParams ));
pParams->m_nType = CJabberHttpAuthParams::IQ;
- pParams->m_szFrom = mir_tstrdup( pInfo->GetFrom() );
+ pParams->m_szFrom = mir_tstrdup( pInfo->GetFrom());
pParams->m_szId = mir_tstrdup( szId );
pParams->m_szMethod = mir_tstrdup( szMethod );
pParams->m_szUrl = mir_tstrdup( szUrl );
diff --git a/protocols/JabberG/jabber_iqid.cpp b/protocols/JabberG/jabber_iqid.cpp
index 72ddcf6d4c..06939c21bf 100644
--- a/protocols/JabberG/jabber_iqid.cpp
+++ b/protocols/JabberG/jabber_iqid.cpp
@@ -43,7 +43,7 @@ void CJabberProto::OnIqResultServerDiscoInfo( HXML iqNode )
int i;
if ( !_tcscmp( type, _T("result"))) {
- HXML query = xmlGetChildByTag( iqNode, "query", "xmlns", _T(JABBER_FEAT_DISCO_INFO) );
+ HXML query = xmlGetChildByTag( iqNode, "query", "xmlns", _T(JABBER_FEAT_DISCO_INFO));
if ( !query )
return;
@@ -52,7 +52,7 @@ void CJabberProto::OnIqResultServerDiscoInfo( HXML iqNode )
const TCHAR *identityCategory = xmlGetAttrValue( identity, _T("category"));
const TCHAR *identityType = xmlGetAttrValue( identity, _T("type"));
const TCHAR *identityName = xmlGetAttrValue( identity, _T("name"));
- if ( identityCategory && identityType && !_tcscmp( identityCategory, _T("pubsub") ) && !_tcscmp( identityType, _T("pep")) ) {
+ if ( identityCategory && identityType && !_tcscmp( identityCategory, _T("pubsub")) && !_tcscmp( identityType, _T("pep"))) {
m_bPepSupported = TRUE;
EnableMenuItems( TRUE );
@@ -92,7 +92,7 @@ void CJabberProto::OnIqResultNestedRosterGroups( HXML iqNode, CJabberIqInfo* pIn
if ( iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT ) {
bPrivateStorageSupport = TRUE;
- szGroupDelimeter = XPathFmt( iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), _T(JABBER_FEAT_PRIVATE_STORAGE), _T( JABBER_FEAT_NESTED_ROSTER_GROUPS ) );
+ szGroupDelimeter = XPathFmt( iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), _T(JABBER_FEAT_PRIVATE_STORAGE), _T( JABBER_FEAT_NESTED_ROSTER_GROUPS ));
if ( szGroupDelimeter && !szGroupDelimeter[0] )
szGroupDelimeter = NULL; // "" as roster delimeter is not supported :)
}
@@ -102,13 +102,13 @@ void CJabberProto::OnIqResultNestedRosterGroups( HXML iqNode, CJabberIqInfo* pIn
return;
// is our default delimiter?
- if (( !szGroupDelimeter && bPrivateStorageSupport ) || ( szGroupDelimeter && _tcscmp( szGroupDelimeter, _T("\\") )))
+ if (( !szGroupDelimeter && bPrivateStorageSupport ) || ( szGroupDelimeter && _tcscmp( szGroupDelimeter, _T("\\"))))
m_ThreadInfo->send(
XmlNodeIq( _T("set"), SerialNext()) << XQUERY( _T(JABBER_FEAT_PRIVATE_STORAGE))
<< XCHILD( _T("roster"), _T("\\")) << XATTR( _T("xmlns"), _T(JABBER_FEAT_NESTED_ROSTER_GROUPS)));
// roster request
- TCHAR *szUserData = mir_tstrdup( szGroupDelimeter ? szGroupDelimeter : _T("\\") );
+ TCHAR *szUserData = mir_tstrdup( szGroupDelimeter ? szGroupDelimeter : _T("\\"));
m_ThreadInfo->send(
XmlNodeIq( m_iqManager.AddHandler( &CJabberProto::OnIqResultGetRoster, JABBER_IQ_TYPE_GET, NULL, 0, -1, (void *)szUserData ))
<< XCHILDNS( _T("query"), _T(JABBER_FEAT_IQ_ROSTER)));
@@ -418,7 +418,7 @@ void CJabberProto::OnIqResultGetRoster( HXML iqNode, CJabberIqInfo* pInfo )
if ( _tcschr( jid, '@' ) == NULL )
bIsTransport = TRUE;
- if (( name = xmlGetAttrValue( itemNode, _T("name") )) != NULL )
+ if (( name = xmlGetAttrValue( itemNode, _T("name"))) != NULL )
nick = mir_tstrdup( name );
else
nick = JabberNickFromJID( jid );
@@ -815,13 +815,13 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( !_tcscmp( xmlGetName( n ), _T("FN"))) {
if ( xmlGetText( n ) != NULL ) {
hasFn = TRUE;
- JSetStringT( hContact, "FullName", xmlGetText( n ) );
+ JSetStringT( hContact, "FullName", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("NICKNAME"))) {
if ( xmlGetText( n ) != NULL ) {
hasNick = TRUE;
- JSetStringT( hContact, "Nick", xmlGetText( n ) );
+ JSetStringT( hContact, "Nick", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("N"))) {
@@ -829,15 +829,15 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( !hasGiven && !hasFamily && !hasMiddle ) {
if (( m=xmlGetChild( n , "GIVEN" )) != NULL && xmlGetText( m )!=NULL ) {
hasGiven = TRUE;
- JSetStringT( hContact, "FirstName", xmlGetText( m ) );
+ JSetStringT( hContact, "FirstName", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "FAMILY" )) != NULL && xmlGetText( m )!=NULL ) {
hasFamily = TRUE;
- JSetStringT( hContact, "LastName", xmlGetText( m ) );
+ JSetStringT( hContact, "LastName", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "MIDDLE" )) != NULL && xmlGetText( m ) != NULL ) {
hasMiddle = TRUE;
- JSetStringT( hContact, "MiddleName", xmlGetText( m ) );
+ JSetStringT( hContact, "MiddleName", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("EMAIL"))) {
@@ -853,7 +853,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
sprintf( text, "e-mail%d", nEmail-1 );
}
else sprintf( text, "e-mail%d", nEmail );
- JSetStringT( hContact, text, xmlGetText( m ) );
+ JSetStringT( hContact, text, xmlGetText( m ));
if ( hContact == NULL ) {
sprintf( text, "e-mailFlag%d", nEmail );
@@ -888,7 +888,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
}
else {
hasBday = TRUE;
- JSetStringT( NULL, "BirthDate", xmlGetText( n ) );
+ JSetStringT( NULL, "BirthDate", xmlGetText( n ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("GENDER"))) {
@@ -902,7 +902,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
}
else {
hasGender = TRUE;
- JSetStringT( NULL, "GenderString", xmlGetText( n ) );
+ JSetStringT( NULL, "GenderString", xmlGetText( n ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("ADR"))) {
@@ -913,40 +913,40 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
hasHomeStreet = TRUE;
if ( hContact != NULL ) {
if (( o=xmlGetChild( n , "EXTADR" )) != NULL && xmlGetText( o ) != NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else if (( o=xmlGetChild( n , "EXTADD" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else
_tcsncpy( text, xmlGetText( m ), SIZEOF( text ));
text[SIZEOF(text)-1] = '\0';
JSetStringT( hContact, "Street", text );
}
else {
- JSetStringT( hContact, "Street", xmlGetText( m ) );
+ JSetStringT( hContact, "Street", xmlGetText( m ));
if (( m=xmlGetChild( n , "EXTADR" )) == NULL )
m = xmlGetChild( n , "EXTADD" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasHomeStreet2 = TRUE;
- JSetStringT( hContact, "Street2", xmlGetText( m ) );
+ JSetStringT( hContact, "Street2", xmlGetText( m ));
} } }
if (( m=xmlGetChild( n , "LOCALITY" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomeLocality = TRUE;
- JSetStringT( hContact, "City", xmlGetText( m ) );
+ JSetStringT( hContact, "City", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "REGION" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomeRegion = TRUE;
- JSetStringT( hContact, "State", xmlGetText( m ) );
+ JSetStringT( hContact, "State", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "PCODE" ))!=NULL && xmlGetText( m )!=NULL ) {
hasHomePcode = TRUE;
- JSetStringT( hContact, "ZIP", xmlGetText( m ) );
+ JSetStringT( hContact, "ZIP", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "CTRY" ))==NULL || xmlGetText( m )==NULL ) // Some bad client use <COUNTRY/> instead of <CTRY/>
m = xmlGetChild( n , "COUNTRY" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasHomeCtry = TRUE;
- JSetStringT( hContact, "Country", xmlGetText( m ) );
+ JSetStringT( hContact, "Country", xmlGetText( m ));
} }
if ( !hasWork && xmlGetChild( n , "WORK" )!=NULL ) {
@@ -956,40 +956,40 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
hasWorkStreet = TRUE;
if ( hContact != NULL ) {
if (( o=xmlGetChild( n , "EXTADR" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else if (( o=xmlGetChild( n , "EXTADD" ))!=NULL && xmlGetText( o )!=NULL )
- mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ) );
+ mir_sntprintf( text, SIZEOF( text ), _T("%s\r\n%s"), xmlGetText( m ), xmlGetText( o ));
else
_tcsncpy( text, xmlGetText( m ), SIZEOF( text ));
text[SIZEOF( text )-1] = '\0';
JSetStringT( hContact, "CompanyStreet", text );
}
else {
- JSetStringT( hContact, "CompanyStreet", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyStreet", xmlGetText( m ));
if (( m=xmlGetChild( n , "EXTADR" )) == NULL )
m = xmlGetChild( n , "EXTADD" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasWorkStreet2 = TRUE;
- JSetStringT( hContact, "CompanyStreet2", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyStreet2", xmlGetText( m ));
} } }
if (( m=xmlGetChild( n , "LOCALITY" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkLocality = TRUE;
- JSetStringT( hContact, "CompanyCity", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyCity", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "REGION" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkRegion = TRUE;
- JSetStringT( hContact, "CompanyState", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyState", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "PCODE" ))!=NULL && xmlGetText( m )!=NULL ) {
hasWorkPcode = TRUE;
- JSetStringT( hContact, "CompanyZIP", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyZIP", xmlGetText( m ));
}
if (( m=xmlGetChild( n , "CTRY" ))==NULL || xmlGetText( m )==NULL ) // Some bad client use <COUNTRY/> instead of <CTRY/>
m = xmlGetChild( n , "COUNTRY" );
if ( m!=NULL && xmlGetText( m )!=NULL ) {
hasWorkCtry = TRUE;
- JSetStringT( hContact, "CompanyCountry", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyCountry", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("TEL"))) {
@@ -998,11 +998,11 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
if ( hContact != NULL ) {
if ( !hasFax && xmlGetChild( n , "FAX" )!=NULL ) {
hasFax = TRUE;
- JSetStringT( hContact, "Fax", xmlGetText( m ) );
+ JSetStringT( hContact, "Fax", xmlGetText( m ));
}
if ( !hasCell && xmlGetChild( n , "CELL" )!=NULL ) {
hasCell = TRUE;
- JSetStringT( hContact, "Cellular", xmlGetText( m ) );
+ JSetStringT( hContact, "Cellular", xmlGetText( m ));
}
if ( !hasPhone &&
( xmlGetChild( n , "HOME" )!=NULL ||
@@ -1016,15 +1016,15 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
xmlGetChild( n , "BBS" )==NULL &&
xmlGetChild( n , "MODEM" )==NULL &&
xmlGetChild( n , "ISDN" )==NULL &&
- xmlGetChild( n , "PCS" )==NULL )) ) {
+ xmlGetChild( n , "PCS" )==NULL ))) {
hasPhone = TRUE;
- JSetStringT( hContact, "Phone", xmlGetText( m ) );
+ JSetStringT( hContact, "Phone", xmlGetText( m ));
}
}
else {
char text[ 100 ];
sprintf( text, "Phone%d", nPhone );
- JSetStringT( NULL, text, xmlGetText( m ) );
+ JSetStringT( NULL, text, xmlGetText( m ));
sprintf( text, "PhoneFlag%d", nPhone );
int nFlag = 0;
@@ -1048,36 +1048,36 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
// Homepage
if ( !hasUrl && xmlGetText( n )!=NULL ) {
hasUrl = TRUE;
- JSetStringT( hContact, "Homepage", xmlGetText( n ) );
+ JSetStringT( hContact, "Homepage", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("ORG"))) {
if ( !hasOrgname && !hasOrgunit ) {
if (( m=xmlGetChild( n ,"ORGNAME" ))!=NULL && xmlGetText( m )!=NULL ) {
hasOrgname = TRUE;
- JSetStringT( hContact, "Company", xmlGetText( m ) );
+ JSetStringT( hContact, "Company", xmlGetText( m ));
}
if (( m=xmlGetChild( n ,"ORGUNIT" ))!=NULL && xmlGetText( m )!=NULL ) { // The real vCard can have multiple <ORGUNIT/> but we will only display the first one
hasOrgunit = TRUE;
- JSetStringT( hContact, "CompanyDepartment", xmlGetText( m ) );
+ JSetStringT( hContact, "CompanyDepartment", xmlGetText( m ));
} }
}
else if ( !lstrcmp( xmlGetName( n ), _T("ROLE"))) {
if ( !hasRole && xmlGetText( n )!=NULL ) {
hasRole = TRUE;
- JSetStringT( hContact, "Role", xmlGetText( n ) );
+ JSetStringT( hContact, "Role", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("TITLE"))) {
if ( !hasTitle && xmlGetText( n )!=NULL ) {
hasTitle = TRUE;
- JSetStringT( hContact, "CompanyPosition", xmlGetText( n ) );
+ JSetStringT( hContact, "CompanyPosition", xmlGetText( n ));
}
}
else if ( !lstrcmp( xmlGetName( n ), _T("DESC"))) {
if ( !hasDesc && xmlGetText( n )!=NULL ) {
hasDesc = TRUE;
- TCHAR* szMemo = JabberUnixToDosT( xmlGetText( n ) );
+ TCHAR* szMemo = JabberUnixToDosT( xmlGetText( n ));
JSetStringT( hContact, "About", szMemo );
mir_free( szMemo );
}
@@ -1223,7 +1223,7 @@ void CJabberProto::OnIqResultGetVcard( HXML iqNode )
void CJabberProto::OnIqResultSetVcard( HXML iqNode )
{
Log( "<iq/> iqIdSetVcard" );
- if ( !xmlGetAttrValue( iqNode, _T("type") ))
+ if ( !xmlGetAttrValue( iqNode, _T("type")))
return;
WindowNotify(WM_JABBER_REFRESH_VCARD);
@@ -1393,7 +1393,7 @@ void CJabberProto::OnIqResultGetVCardAvatar( HXML iqNode )
if ( xmlGetChildCount( vCard ) == 0 ) {
JDeleteSetting( hContact, "AvatarHash" );
DBVARIANT dbv = {0};
- if ( !JGetStringT( hContact, "AvatarSaved", &dbv ) ) {
+ if ( !JGetStringT( hContact, "AvatarSaved", &dbv )) {
JFreeVariant( &dbv );
JDeleteSetting( hContact, "AvatarSaved" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL );
@@ -1427,7 +1427,7 @@ void CJabberProto::OnIqResultGetClientAvatar( HXML iqNode )
return;
HXML n = NULL;
- if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result")) ) {
+ if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result"))) {
HXML queryNode = xmlGetChild( iqNode , "query" );
if ( queryNode != NULL ) {
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T("xmlns"));
@@ -1475,11 +1475,11 @@ void CJabberProto::OnIqResultGetServerAvatar( HXML iqNode )
return;
HXML n = NULL;
- if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result")) ) {
+ if (( type = xmlGetAttrValue( iqNode, _T("type"))) != NULL && !_tcscmp( type, _T("result"))) {
HXML queryNode = xmlGetChild( iqNode , "query" );
if ( queryNode != NULL ) {
const TCHAR* xmlns = xmlGetAttrValue( queryNode, _T("xmlns"));
- if ( !lstrcmp( xmlns, _T(JABBER_FEAT_SERVER_AVATAR)) ) {
+ if ( !lstrcmp( xmlns, _T(JABBER_FEAT_SERVER_AVATAR))) {
n = xmlGetChild( queryNode , "data" );
}
}
@@ -1553,7 +1553,7 @@ LBL_ErrFormat:
sprintf( buffer+( i<<1 ), "%02x", digest[i] );
GetAvatarFileName( hContact, tszFileName, SIZEOF(tszFileName));
- _tcsncpy( AI.filename, tszFileName, SIZEOF(AI.filename) );
+ _tcsncpy( AI.filename, tszFileName, SIZEOF(AI.filename));
FILE* out = _tfopen( tszFileName, _T("wb"));
if ( out != NULL ) {
@@ -1593,7 +1593,7 @@ void CJabberProto::OnIqResultDiscoBookmarks( HXML iqNode )
HXML itemNode;
for ( int i = 0; itemNode = xmlGetChild( storageNode, i ); i++ ) {
if ( name = xmlGetName( itemNode)) {
- if ( !_tcscmp( name, _T("conference") ) && (jid = xmlGetAttrValue( itemNode, _T("jid") ))) {
+ if ( !_tcscmp( name, _T("conference")) && (jid = xmlGetAttrValue( itemNode, _T("jid")))) {
JABBER_LIST_ITEM* item = ListAdd( LIST_BOOKMARK, jid );
item->name = mir_tstrdup( xmlGetAttrValue( itemNode, _T("name")));
item->type = mir_tstrdup( _T( "conference" ));
@@ -1609,7 +1609,7 @@ void CJabberProto::OnIqResultDiscoBookmarks( HXML iqNode )
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") );
+ item->type = mir_tstrdup( _T("url"));
}
}
}
diff --git a/protocols/JabberG/jabber_list.cpp b/protocols/JabberG/jabber_list.cpp
index 2397e0bd73..155f9e2b60 100644
--- a/protocols/JabberG/jabber_list.cpp
+++ b/protocols/JabberG/jabber_list.cpp
@@ -147,7 +147,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd( JABBER_LIST list, const TCHAR* jid )
if ( !bUseResource && list== LIST_ROSTER )
{
//if it is a chat room keep resource and made it resource sensitive
- if ( ChatRoomHContactFromJID( s ) )
+ if ( ChatRoomHContactFromJID( s ))
{
if (q != NULL) *q='/';
bUseResource=TRUE;
@@ -192,7 +192,7 @@ void CJabberProto::ListRemoveList( JABBER_LIST list )
void CJabberProto::ListRemoveByIndex( int index )
{
EnterCriticalSection( &m_csLists );
- if ( index >= 0 && index < m_lstRoster.getCount() ) {
+ if ( index >= 0 && index < m_lstRoster.getCount()) {
JabberListFreeItemInternal( m_lstRoster[index] );
m_lstRoster.remove( index );
}
@@ -457,7 +457,7 @@ JABBER_LIST_ITEM *CJabberProto::ListGetItemPtr( JABBER_LIST list, const TCHAR* j
JABBER_LIST_ITEM *CJabberProto::ListGetItemPtrFromIndex( int index )
{
EnterCriticalSection( &m_csLists );
- if ( index >= 0 && index < m_lstRoster.getCount() ) {
+ if ( index >= 0 && index < m_lstRoster.getCount()) {
LeaveCriticalSection( &m_csLists );
return m_lstRoster[index];
}
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp
index e544102dec..b489a793d8 100644
--- a/protocols/JabberG/jabber_menu.cpp
+++ b/protocols/JabberG/jabber_menu.cpp
@@ -459,7 +459,7 @@ int CJabberProto::OnPrebuildContactMenu( WPARAM wParam, LPARAM )
int nMenuResourceItemsNew = m_nMenuResourceItems;
if ( m_nMenuResourceItems < item->resourceCount ) {
- m_phMenuResourceItems = (HANDLE *)mir_realloc( m_phMenuResourceItems, item->resourceCount * sizeof(HANDLE) );
+ m_phMenuResourceItems = (HANDLE *)mir_realloc( m_phMenuResourceItems, item->resourceCount * sizeof(HANDLE));
nMenuResourceItemsNew = item->resourceCount;
}
@@ -553,11 +553,11 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd( WPARAM wParam, LPARAM )
if ( ListGetItemPtr( LIST_ROSTER, roomID ) == NULL ) {
TCHAR *nick = 0;
TCHAR *group = 0;
- if ( !DBGetContactSettingTString( ( HANDLE ) wParam, "CList", "Group", &dbv ) ) {
+ if ( !DBGetContactSettingTString( ( HANDLE ) wParam, "CList", "Group", &dbv )) {
group = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
- if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv )) {
nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -572,7 +572,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd( WPARAM wParam, LPARAM )
ZeroMemory( item, sizeof( JABBER_LIST_ITEM ));
item->jid = mir_tstrdup(roomID);
item->name = mir_tstrdup(nick);
- if ( !JGetStringT( ( HANDLE ) wParam, "MyNick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "MyNick", &dbv )) {
item->nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -675,7 +675,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM )
JFreeVariant( &dbv );
if ( ListGetItemPtr( LIST_BOOKMARK, roomID ) == NULL ) {
TCHAR *nick = 0;
- if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv ) ) {
+ if ( !JGetStringT( ( HANDLE ) wParam, "Nick", &dbv )) {
nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
@@ -686,7 +686,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd( WPARAM wParam, LPARAM )
item->jid = mir_tstrdup(roomID);
item->name = ( TCHAR* )JCallService( MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR );
item->type = _T("conference");
- if ( !JGetStringT(( HANDLE ) wParam, "MyNick", &dbv ) ) {
+ if ( !JGetStringT(( HANDLE ) wParam, "MyNick", &dbv )) {
item->nick = mir_tstrdup(dbv.ptszVal);
JFreeVariant( &dbv );
}
diff --git a/protocols/JabberG/jabber_message_handlers.cpp b/protocols/JabberG/jabber_message_handlers.cpp
index 2339a8157c..d17e2b131d 100644
--- a/protocols/JabberG/jabber_message_handlers.cpp
+++ b/protocols/JabberG/jabber_message_handlers.cpp
@@ -33,11 +33,11 @@ BOOL CJabberProto::OnMessageError( HXML node, ThreadData *pThreadData, CJabberMe
{
// 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() );
+ item = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom());
if ( item != NULL ) { // yes, it is
- TCHAR *szErrText = JabberErrorMsg( pInfo->GetChildNode() );
+ TCHAR *szErrText = JabberErrorMsg( pInfo->GetChildNode());
if ( id != -1 ) {
char *errText = mir_t2a(szErrText);
JSendBroadcast( pInfo->GetHContact(), ACKTYPE_MESSAGE, ACKRESULT_FAILED, ( HANDLE ) id, (LPARAM)errText );
@@ -62,8 +62,8 @@ BOOL CJabberProto::OnMessageIbb( HXML node, ThreadData *pThreadData, CJabberMess
BOOL bOk = FALSE;
const TCHAR *sid = xmlGetAttrValue( pInfo->GetChildNode(), _T("sid"));
const TCHAR *seq = xmlGetAttrValue( pInfo->GetChildNode(), _T("seq"));
- if ( sid && seq && xmlGetText( pInfo->GetChildNode() ) ) {
- bOk = OnIbbRecvdData( xmlGetText( pInfo->GetChildNode() ), sid, seq );
+ if ( sid && seq && xmlGetText( pInfo->GetChildNode()) ) {
+ bOk = OnIbbRecvdData( xmlGetText( pInfo->GetChildNode()), sid, seq );
}
return TRUE;
}
@@ -76,7 +76,7 @@ BOOL CJabberProto::OnMessagePubsubEvent( HXML node, ThreadData *pThreadData, CJa
BOOL CJabberProto::OnMessageGroupchat( HXML node, ThreadData *pThreadData, CJabberMessageInfo* pInfo )
{
- JABBER_LIST_ITEM *chatItem = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom() );
+ JABBER_LIST_ITEM *chatItem = ListGetItemPtr( LIST_CHATROOM, pInfo->GetFrom());
if ( chatItem )
{ // process GC message
GroupchatProcessMessage( node );
diff --git a/protocols/JabberG/jabber_message_manager.cpp b/protocols/JabberG/jabber_message_manager.cpp
index 6a12f42086..b27c59e171 100644
--- a/protocols/JabberG/jabber_message_manager.cpp
+++ b/protocols/JabberG/jabber_message_manager.cpp
@@ -31,9 +31,9 @@ Last change by : $Author: dchervov $
BOOL CJabberMessageManager::FillPermanentHandlers()
{
- AddPermanentHandler( &CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error") );
- AddPermanentHandler( &CJabberProto::OnMessageIbb, 0, 0, _T(JABBER_FEAT_IBB), FALSE, _T("data") );
- AddPermanentHandler( &CJabberProto::OnMessagePubsubEvent, 0, 0, _T(JABBER_FEAT_PUBSUB_EVENT), FALSE, _T("event") );
+ AddPermanentHandler( &CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error"));
+ AddPermanentHandler( &CJabberProto::OnMessageIbb, 0, 0, _T(JABBER_FEAT_IBB), FALSE, _T("data"));
+ AddPermanentHandler( &CJabberProto::OnMessagePubsubEvent, 0, 0, _T(JABBER_FEAT_PUBSUB_EVENT), FALSE, _T("event"));
AddPermanentHandler( &CJabberProto::OnMessageGroupchat, JABBER_MESSAGE_TYPE_GROUPCHAT, JABBER_MESSAGE_PARSE_FROM, NULL, FALSE, NULL );
return TRUE;
}
diff --git a/protocols/JabberG/jabber_misc.cpp b/protocols/JabberG/jabber_misc.cpp
index 972542ea71..09e5d8f0ee 100644
--- a/protocols/JabberG/jabber_misc.cpp
+++ b/protocols/JabberG/jabber_misc.cpp
@@ -66,8 +66,8 @@ int JabberCompareJids( const TCHAR* jid1, const TCHAR* jid2 )
// match only node@domain part
TCHAR szTempJid1[ JABBER_MAX_JID_LEN ], szTempJid2[ JABBER_MAX_JID_LEN ];
return lstrcmpi(
- JabberStripJid( jid1, szTempJid1, SIZEOF(szTempJid1) ),
- JabberStripJid( jid2, szTempJid2, SIZEOF(szTempJid2)) );
+ JabberStripJid( jid1, szTempJid1, SIZEOF(szTempJid1)),
+ JabberStripJid( jid2, szTempJid2, SIZEOF(szTempJid2)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -510,7 +510,7 @@ void CJabberProto::FormatMirVer(JABBER_RESOURCE_STATUS *resource, TCHAR *buf, in
// search through known software list
for (i = 0; i < SIZEOF(sttCapsNodeToName_Map); ++i)
- if ( _tcsstr( resource->szCapsNode, sttCapsNodeToName_Map[i].node ) )
+ if ( _tcsstr( resource->szCapsNode, sttCapsNodeToName_Map[i].node ))
{
mir_sntprintf( buf, bufSize, _T("%s %s"), sttCapsNodeToName_Map[i].name, resource->szCapsVer );
break;
@@ -554,7 +554,7 @@ void CJabberProto::UpdateMirVer(HANDLE hContact, JABBER_RESOURCE_STATUS *resourc
if ( resource->resourceName )
mir_sntprintf( szFullJid, SIZEOF( szFullJid ), _T("%s/%s"), dbv.ptszVal, resource->resourceName );
else
- lstrcpyn( szFullJid, dbv.ptszVal, SIZEOF(szFullJid) );
+ lstrcpyn( szFullJid, dbv.ptszVal, SIZEOF(szFullJid));
JSetStringT( hContact, DBSETTING_DISPLAY_UID, szFullJid );
JFreeVariant( &dbv );
}
diff --git a/protocols/JabberG/jabber_notes.cpp b/protocols/JabberG/jabber_notes.cpp
index 03a274f0fb..4e40f25c7c 100644
--- a/protocols/JabberG/jabber_notes.cpp
+++ b/protocols/JabberG/jabber_notes.cpp
@@ -777,7 +777,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok)
int nMsgId = SerialNext();
XmlNode m(_T("message"));
- m << XATTR(_T("type"), _T("chat")) << XATTR( _T("to"), pNote->GetFrom() ) << XATTRID( nMsgId );
+ m << XATTR(_T("type"), _T("chat")) << XATTR( _T("to"), pNote->GetFrom()) << XATTRID( nMsgId );
m << XCHILD(_T("body"), buf);
HXML hXmlItem = m << XCHILDNS(_T("x"), _T(JABBER_FEAT_MIRANDA_NOTES)) << XCHILD(_T("note"));
hXmlItem << XATTR(_T("tags"), pNote->GetTagsStr());
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index f4e070271a..53feb71763 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -783,7 +783,7 @@ private:
TCHAR* buf = mir_a2t( result->pData );
XmlNode node( buf, NULL, NULL );
if ( node ) {
- HXML queryNode = xmlGetChild( node, _T("query") );
+ HXML queryNode = xmlGetChild( node, _T("query"));
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
}
@@ -1011,7 +1011,7 @@ static void _RosterListClear(HWND hwndDlg)
HWND hList=GetDlgItem(hwndDlg, IDC_ROSTER);
if (!hList) return;
ListView_DeleteAllItems(hList);
- while ( ListView_DeleteColumn( hList, 0) );
+ while ( ListView_DeleteColumn( hList, 0));
LV_COLUMN column={0};
column.mask=LVCF_TEXT;
@@ -1156,11 +1156,11 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
BOOL bPushed = itemRoster ? TRUE : FALSE;
if ( !bPushed ) {
const TCHAR *rosterName = xmlGetAttrValue( itemRoster, _T("name"));
- if ( (rosterName!=NULL || name[0]!=_T('\0')) && lstrcmpi(rosterName,name) )
+ if ( (rosterName!=NULL || name[0]!=_T('\0')) && lstrcmpi(rosterName,name))
bPushed=TRUE;
if ( !bPushed ) {
rosterName = xmlGetAttrValue( itemRoster, _T("subscription"));
- if ((rosterName!=NULL || subscr[0]!=_T('\0')) && lstrcmpi(rosterName,subscr) )
+ if ((rosterName!=NULL || subscr[0]!=_T('\0')) && lstrcmpi(rosterName,subscr))
bPushed=TRUE;
}
if ( !bPushed ) {
@@ -1168,7 +1168,7 @@ void CJabberProto::_RosterHandleGetRequest( HXML node )
const TCHAR* rosterGroup=NULL;
if (groupNode != NULL)
rosterGroup = xmlGetText( groupNode );
- if ((rosterGroup!=NULL || group[0]!=_T('\0')) && lstrcmpi(rosterGroup,group) )
+ if ((rosterGroup!=NULL || group[0]!=_T('\0')) && lstrcmpi(rosterGroup,group))
bPushed=TRUE;
}
}
@@ -1372,7 +1372,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg)
int nBytesProcessed = 0;
XmlNode node( newBuf, &nBytesProcessed, NULL );
if ( node ) {
- HXML Workbook = xmlGetChild( node, _T("Workbook") );
+ HXML Workbook = xmlGetChild( node, _T("Workbook"));
if ( Workbook ) {
HXML Worksheet = xmlGetChild( Workbook , "Worksheet");
if ( Worksheet ) {
@@ -1450,7 +1450,7 @@ static BOOL CALLBACK _RosterNewListProc( HWND hList, UINT msg, WPARAM wParam, LP
RECT rc;
TCHAR buff[260];
ListView_GetSubItemRect(hList, lvhti.iItem, lvhti.iSubItem, LVIR_BOUNDS,&rc);
- ListView_GetItemText(hList, lvhti.iItem, lvhti.iSubItem, buff, SIZEOF(buff) );
+ ListView_GetItemText(hList, lvhti.iItem, lvhti.iSubItem, buff, SIZEOF(buff));
HWND hEditor=CreateWindow(TEXT("EDIT"),buff,WS_CHILD|ES_AUTOHSCROLL,rc.left+3, rc.top+2, rc.right-rc.left-3, rc.bottom - rc.top-3,hList, NULL, hInst, NULL);
SendMessage(hEditor,WM_SETFONT,(WPARAM)SendMessage(hList,WM_GETFONT,0,0),0);
ShowWindow(hEditor,SW_SHOW);
@@ -2269,7 +2269,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg)
TCHAR* ptszText = mir_a2t( result->pData );
XmlNode node( ptszText, NULL, NULL );
if ( node ) {
- HXML queryNode = xmlGetChild( node, _T("query") );
+ HXML queryNode = xmlGetChild( node, _T("query"));
if ( queryNode && IsWindow(hwnd)) {
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
diff --git a/protocols/JabberG/jabber_privacy.cpp b/protocols/JabberG/jabber_privacy.cpp
index ada79a9c52..1b9196943b 100644
--- a/protocols/JabberG/jabber_privacy.cpp
+++ b/protocols/JabberG/jabber_privacy.cpp
@@ -195,15 +195,15 @@ void CJabberProto::OnIqResultPrivacyListActive( HXML iqNode, CJabberIqInfo* pInf
m_privacyListManager.Lock();
if ( !_tcscmp( type, _T("result"))) {
if ( pList ) {
- m_privacyListManager.SetActiveListName( pList->GetListName() );
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as active"), pList->GetListName() );
+ m_privacyListManager.SetActiveListName( pList->GetListName());
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as active"), pList->GetListName());
}
else {
m_privacyListManager.SetActiveListName( NULL );
mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Active privacy list successfully declined"));
}
}
- else mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting active list") );
+ else mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting active list"));
m_privacyListManager.Unlock();
@@ -235,8 +235,8 @@ void CJabberProto::OnIqResultPrivacyListDefault( HXML iqNode, CJabberIqInfo* pIn
m_privacyListManager.Lock();
if ( !_tcscmp( type, _T("result"))) {
if ( pList ) {
- m_privacyListManager.SetDefaultListName( pList->GetListName() );
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as default"), pList->GetListName() );
+ m_privacyListManager.SetDefaultListName( pList->GetListName());
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Privacy list %s set as default"), pList->GetListName());
}
else {
m_privacyListManager.SetDefaultListName( NULL );
@@ -244,7 +244,7 @@ void CJabberProto::OnIqResultPrivacyListDefault( HXML iqNode, CJabberIqInfo* pIn
}
}
else {
- mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting default list") );
+ mir_sntprintf( szText, SIZEOF( szText ), TranslateT("Error occurred while setting default list"));
}
m_privacyListManager.Unlock();
@@ -415,7 +415,7 @@ public:
SendDlgItemMessage( m_hwnd, IDC_CHECK_PRESENCE_OUT, BM_SETCHECK, BST_CHECKED, 0 );
if ( m_pRule->GetValue() && ( m_pRule->GetType() == Jid || m_pRule->GetType() == Group ))
- SetDlgItemText( m_hwnd, IDC_EDIT_VALUE, m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_EDIT_VALUE, m_pRule->GetValue());
}
void cbType_OnChange(CCtrlData*)
@@ -461,10 +461,10 @@ public:
}
// FIXME: ugly code :)
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue() );
- LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue());
+ LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue());
if ( nSelPos != CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_SETCURSEL, nSelPos, 0 );
}
@@ -483,7 +483,7 @@ public:
for ( int i = 0; ; i++ )
{
mir_snprintf(buf, 20, "%d", i);
- if ( DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv) )
+ if ( DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv))
break;
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, (LPARAM)&dbv.ptszVal[1] );
@@ -491,10 +491,10 @@ public:
}
// FIXME: ugly code :)
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue() );
- LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue() );
+ SetDlgItemText( m_hwnd, IDC_COMBO_VALUES, m_pRule->GetValue());
+ LRESULT nSelPos = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_FINDSTRINGEXACT , -1, (LPARAM)m_pRule->GetValue());
if ( nSelPos != CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUES, CB_SETCURSEL, nSelPos, 0 );
}
@@ -506,9 +506,9 @@ public:
ShowWindow( GetDlgItem( m_hwnd, IDC_COMBO_VALUES ), SW_HIDE );
ShowWindow( GetDlgItem( m_hwnd, IDC_COMBO_VALUE ), SW_SHOW );
- if ( m_pRule->GetValue() )
+ if ( m_pRule->GetValue())
{
- LRESULT nSelected = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SELECTSTRING, -1, (LPARAM)TranslateTS(m_pRule->GetValue()) );
+ LRESULT nSelected = SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SELECTSTRING, -1, (LPARAM)TranslateTS(m_pRule->GetValue()));
if ( nSelected == CB_ERR )
SendDlgItemMessage( m_hwnd, IDC_COMBO_VALUE, CB_SETCURSEL, 0, 0 );
}
@@ -540,7 +540,7 @@ public:
case Group:
{
TCHAR szText[ 512 ];
- GetDlgItemText( m_hwnd, IDC_COMBO_VALUES, szText, SIZEOF(szText) );
+ GetDlgItemText( m_hwnd, IDC_COMBO_VALUES, szText, SIZEOF(szText));
m_pRule->SetValue( szText );
break;
}
@@ -933,8 +933,8 @@ void CJabberDlgPrivacyLists::OnProtoRefresh(WPARAM, LPARAM)
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
while ( pList ) {
- if ( !pList->IsDeleted() ) {
- nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)pList->GetListName() );
+ if ( !pList->IsDeleted()) {
+ nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)pList->GetListName());
SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, (LPARAM)pList );
}
pList = pList->GetNext();
@@ -1042,15 +1042,15 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
while ( pRule ) {
bListEmpty = FALSE;
TCHAR szTypeValue[ 512 ];
- switch ( pRule->GetType() ) {
+ switch ( pRule->GetType()) {
case Jid:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If jabber id is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If jabber id is '%s' then" ), pRule->GetValue());
break;
case Group:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If group is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If group is '%s' then" ), pRule->GetValue());
break;
case Subscription:
- mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If subscription is '%s' then" ), pRule->GetValue() );
+ mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "If subscription is '%s' then" ), pRule->GetValue());
break;
case Else:
mir_sntprintf( szTypeValue, SIZEOF( szTypeValue ), _T( "Else"));
@@ -1064,24 +1064,24 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList)
if ( !dwPackets )
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if ( dwPackets == JABBER_PL_RULE_TYPE_ALL )
- _tcscpy( szPackets, _T("all") );
+ _tcscpy( szPackets, _T("all"));
else {
if ( dwPackets & JABBER_PL_RULE_TYPE_MESSAGE )
- _tcscat( szPackets, _T("messages") );
+ _tcscat( szPackets, _T("messages"));
if ( dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("presence-in") );
+ _tcscat( szPackets, _T("presence-in"));
}
if ( dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("presence-out") );
+ _tcscat( szPackets, _T("presence-out"));
}
if ( dwPackets & JABBER_PL_RULE_TYPE_IQ ) {
if ( _tcslen( szPackets ))
_tcscat( szPackets, _T(", "));
- _tcscat( szPackets, _T("queries") );
+ _tcscat( szPackets, _T("queries"));
} }
TCHAR szListItem[ 512 ];
@@ -1211,7 +1211,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis)
rc.bottom -= (rc.bottom - rc.top) / 2;
rc.left += 25;
- switch ( pRule->GetType() )
+ switch ( pRule->GetType())
{
case Jid:
{
@@ -1694,7 +1694,7 @@ void CJabberDlgPrivacyLists::EnableEditorControls()
EnableWindow( GetDlgItem( m_hwnd, IDC_APPLY ), bListsLoaded && bListsModified );
if (bListsLoaded)
- SetStatusText( TranslateT("Ready.") );
+ SetStatusText( TranslateT("Ready."));
}
LRESULT CALLBACK CJabberDlgPrivacyLists::LstListsSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1799,14 +1799,14 @@ void CJabberDlgPrivacyLists::btnActivate_OnClick(CCtrlButton *)
{
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = GetSelectedList(m_hwnd);
- if ( pList && pList->IsModified() ) {
+ if ( pList && pList->IsModified()) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateT("Please save list before activating"), TranslateT("First, save the list"), MB_OK | MB_ICONSTOP );
return;
}
EnableWindow( GetDlgItem( m_hwnd, IDC_ACTIVATE ), FALSE );
SetWindowLongPtr( GetDlgItem( m_hwnd, IDC_ACTIVATE ), GWLP_USERDATA, (LONG_PTR)pList );
- XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
HXML active = query << XCHILD( _T("active"));
if ( pList )
@@ -1825,7 +1825,7 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *)
{
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = GetSelectedList(m_hwnd);
- if ( pList && pList->IsModified() ) {
+ if ( pList && pList->IsModified()) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateT("Please save list before you make it the default list"), TranslateT("First, save the list"), MB_OK | MB_ICONSTOP );
return;
@@ -1833,11 +1833,11 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *)
EnableWindow( GetDlgItem( m_hwnd, IDC_SET_DEFAULT ), FALSE );
SetWindowLongPtr( GetDlgItem( m_hwnd, IDC_SET_DEFAULT ), GWLP_USERDATA, (LONG_PTR)pList );
- XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS ));
HXML defaultTag = query << XCHILD( _T("default"));
if ( pList )
- xmlAddAttr( defaultTag, _T("name"), pList->GetListName() );
+ xmlAddAttr( defaultTag, _T("name"), pList->GetListName());
m_proto->m_privacyListManager.Unlock();
SetStatusText(TranslateT( JABBER_PL_BUSY_MSG ));
@@ -2001,7 +2001,7 @@ void CJabberDlgPrivacyLists::btnAddList_OnClick(CCtrlButton *)
// FIXME: line length is hard coded in dialog procedure
CJabberDlgPrivacyAddList dlgPrivacyAddList(m_proto, m_hwnd);
int nRetVal = dlgPrivacyAddList.DoModal();
- if ( nRetVal && _tcslen( dlgPrivacyAddList.szLine ) ) {
+ if ( nRetVal && _tcslen( dlgPrivacyAddList.szLine )) {
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.FindList( dlgPrivacyAddList.szLine );
if ( !pList ) {
@@ -2033,7 +2033,7 @@ void CJabberDlgPrivacyLists::btnRemoveList_OnClick(CCtrlButton *)
if ( pList ) {
TCHAR *szListName = pList->GetListName();
if ( ( m_proto->m_privacyListManager.GetActiveListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetActiveListName()))
- || ( m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetDefaultListName()) )) {
+ || ( m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp( szListName, m_proto->m_privacyListManager.GetDefaultListName()))) {
m_proto->m_privacyListManager.Unlock();
MessageBox( m_hwnd, TranslateTS(_T("Can't remove active or default list")), TranslateTS(_T("Sorry")), MB_OK | MB_ICONSTOP );
return;
@@ -2061,11 +2061,11 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
CPrivacyListModifyUserParam *pUserData = NULL;
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
while ( pList ) {
- if ( pList->IsModified() ) {
+ if ( pList->IsModified()) {
CPrivacyListRule* pRule = pList->GetFirstRule();
if ( !pRule )
pList->SetDeleted();
- if ( pList->IsDeleted() ) {
+ if ( pList->IsDeleted()) {
pList->RemoveAllRules();
pRule = NULL;
}
@@ -2078,11 +2078,11 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
XmlNodeIq iq( m_proto->m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListModify, JABBER_IQ_TYPE_SET, NULL, 0, -1, pUserData ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS ));
- HXML listTag = query << XCHILD( _T("list")) << XATTR( _T("name"), pList->GetListName() );
+ HXML listTag = query << XCHILD( _T("list")) << XATTR( _T("name"), pList->GetListName());
while ( pRule ) {
HXML itemTag = listTag << XCHILD( _T("item"));
- switch ( pRule->GetType() ) {
+ switch ( pRule->GetType()) {
case Jid:
itemTag << XATTR( _T("type"), _T("jid"));
break;
@@ -2094,12 +2094,12 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *)
break;
}
if ( pRule->GetType() != Else )
- itemTag << XATTR( _T("value"), pRule->GetValue() );
- if ( pRule->GetAction() )
+ itemTag << XATTR( _T("value"), pRule->GetValue());
+ if ( pRule->GetAction())
itemTag << XATTR( _T("action"), _T("allow"));
else
itemTag << XATTR( _T("action"), _T("deny"));
- itemTag << XATTRI( _T("order"), pRule->GetOrder() );
+ itemTag << XATTRI( _T("order"), pRule->GetOrder());
DWORD dwPackets = pRule->GetPackets();
if ( dwPackets != JABBER_PL_RULE_TYPE_ALL ) {
if ( dwPackets & JABBER_PL_RULE_TYPE_IQ )
@@ -2216,7 +2216,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandlePrivacyLists( WPARAM, LPARAM )
void CJabberProto::QueryPrivacyLists( ThreadData *pThreadInfo )
{
- XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyLists ) );
+ XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyLists ));
iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
if ( pThreadInfo )
pThreadInfo->send( iq );
@@ -2239,11 +2239,11 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList( WPARAM, LPARAM, LPARAM iList )
pList = pList->GetNext();
}
- XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ) );
+ XmlNodeIq iq( m_iqManager.AddHandler( &CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList ));
HXML query = iq << XQUERY( _T(JABBER_FEAT_PRIVACY_LISTS));
HXML active = query << XCHILD( _T("active"));
if ( pList )
- active << XATTR( _T("name"), pList->GetListName() );
+ active << XATTR( _T("name"), pList->GetListName());
m_privacyListManager.Unlock();
m_ThreadInfo->send( iq );
diff --git a/protocols/JabberG/jabber_privacy.h b/protocols/JabberG/jabber_privacy.h
index 84cef9e22e..7eda283a94 100644
--- a/protocols/JabberG/jabber_privacy.h
+++ b/protocols/JabberG/jabber_privacy.h
@@ -228,9 +228,9 @@ public:
}
CPrivacyListRule *pRule = m_pRules;
- while ( pRule->GetNext() ) {
+ while ( pRule->GetNext()) {
if ( pRule->GetNext() == pRuleToRemove ) {
- pRule->SetNext( pRule->GetNext()->GetNext() );
+ pRule->SetNext( pRule->GetNext()->GetNext());
pRuleToRemove->SetNext( NULL );
delete pRuleToRemove;
return TRUE;
@@ -244,7 +244,7 @@ public:
// 0 or 1 rules?
if ( !m_pRules )
return TRUE;
- if ( !m_pRules->GetNext() ) {
+ if ( !m_pRules->GetNext()) {
m_pRules->SetOrder( 100 );
return TRUE;
}
@@ -273,7 +273,7 @@ public:
CPrivacyListRule *pTmp;
for ( i = 0; i < dwCount; i++ ) {
for ( j = dwCount - 1; j > i; j-- ) {
- if ( pRules[j - 1]->GetOrder() > pRules[j]->GetOrder() ) {
+ if ( pRules[j - 1]->GetOrder() > pRules[j]->GetOrder()) {
pTmp = pRules[j - 1];
pRules[j - 1] = pRules[j];
pRules[j] = pTmp;
@@ -418,7 +418,7 @@ public:
return TRUE;
CPrivacyList *pList = m_pLists;
while ( pList ) {
- if ( pList->IsModified() )
+ if ( pList->IsModified())
return TRUE;
pList = pList->GetNext();
}
@@ -428,7 +428,7 @@ public:
{
CPrivacyList *pList = m_pLists;
while ( pList ) {
- if ( !pList->IsLoaded() )
+ if ( !pList->IsLoaded())
return FALSE;
pList = pList->GetNext();
}
diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp
index 46042c7640..cfe4c40a23 100644
--- a/protocols/JabberG/jabber_proto.cpp
+++ b/protocols/JabberG/jabber_proto.cpp
@@ -480,7 +480,7 @@ int CJabberProto::Authorize( HANDLE hContact )
if ( !m_bJabberOnline )
return 1;
- memset( &dbei, 0, sizeof( dbei ) );
+ memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hContact, 0 )) == ( DWORD )( -1 ))
return 1;
@@ -533,7 +533,7 @@ int CJabberProto::AuthDeny( HANDLE hDbEvent, const TCHAR* /*szReason*/ )
return 1;
Log( "Entering AuthDeny" );
- memset( &dbei, 0, sizeof( dbei ) );
+ memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
if (( dbei.cbBlob=JCallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return 1;
@@ -758,7 +758,7 @@ int __cdecl CJabberProto::GetInfo( HANDLE hContact, int /*infoType*/ )
int result = 1;
DBVARIANT dbv;
- if ( JGetByte( hContact, "ChatRoom" , 0) )
+ if ( JGetByte( hContact, "ChatRoom" , 0))
return 1;
if ( !JGetStringT( hContact, "jid", &dbv )) {
@@ -783,7 +783,7 @@ int __cdecl CJabberProto::GetInfo( HANDLE hContact, int /*infoType*/ )
if ( !item ) {
TCHAR szBareJid[ JABBER_MAX_JID_LEN ];
_tcsncpy( szBareJid, dbv.ptszVal, SIZEOF( szBareJid ));
- TCHAR* pDelimiter = _tcschr( szBareJid, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szBareJid, _T('/'));
if ( pDelimiter ) {
*pDelimiter = 0;
pDelimiter++;
@@ -877,7 +877,7 @@ HANDLE __cdecl CJabberProto::SearchBasic( const TCHAR* szJid )
Log( "JabberBasicSearch called with lParam = '%s'", szJid );
JABBER_SEARCH_BASIC *jsb;
- if ( !m_bJabberOnline || ( jsb=( JABBER_SEARCH_BASIC * ) mir_alloc( sizeof( JABBER_SEARCH_BASIC )) )==NULL )
+ if ( !m_bJabberOnline || ( jsb=( JABBER_SEARCH_BASIC * ) mir_alloc( sizeof( JABBER_SEARCH_BASIC )))==NULL )
return 0;
if ( _tcschr( szJid, '@' ) == NULL ) {
@@ -1007,7 +1007,7 @@ int __cdecl CJabberProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* evt )
int nDbEvent = JCallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
EnterCriticalSection( &m_csLastResourceMap );
- if (IsLastResourceExists( (void *)evt->lParam) ) {
+ if (IsLastResourceExists( (void *)evt->lParam)) {
m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )nDbEvent;
m_ulpResourceToDbEventMap[ m_dwResourceMapPointer++ ] = ( ULONG_PTR )evt->lParam;
if ( m_dwResourceMapPointer >= SIZEOF( m_ulpResourceToDbEventMap ))
@@ -1116,7 +1116,7 @@ HANDLE __cdecl CJabberProto::SendFile( HANDLE hContact, const TCHAR* szDescripti
// caps not already received
|| ( jcb == JABBER_RESOURCE_CAPS_NONE )
// XEP-0096 and OOB not supported?
- || !(jcb & ( JABBER_CAPS_SI_FT | JABBER_CAPS_OOB ) )
+ || !(jcb & ( JABBER_CAPS_SI_FT | JABBER_CAPS_OOB ))
) {
JFreeVariant( &dbv );
MsgPopup( hContact, TranslateT("No compatible file transfer machanism exist"), item->jid );
@@ -1514,7 +1514,7 @@ int __cdecl CJabberProto::SetAwayMsg( int status, const TCHAR* msg )
TCHAR* newModeMsg = mir_tstrdup( msg );
if (( *szMsg == NULL && newModeMsg == NULL ) ||
- ( *szMsg != NULL && newModeMsg != NULL && !lstrcmp( *szMsg, newModeMsg )) ) {
+ ( *szMsg != NULL && newModeMsg != NULL && !lstrcmp( *szMsg, newModeMsg ))) {
// Message is the same, no update needed
mir_free( newModeMsg );
LeaveCriticalSection( &m_csModeMsgMutex );
diff --git a/protocols/JabberG/jabber_rc.cpp b/protocols/JabberG/jabber_rc.cpp
index 55e7779045..312db4bac4 100644
--- a/protocols/JabberG/jabber_rc.cpp
+++ b/protocols/JabberG/jabber_rc.cpp
@@ -45,15 +45,15 @@ CJabberAdhocSession::CJabberAdhocSession( CJabberProto* global )
BOOL CJabberProto::IsRcRequestAllowedByACL( CJabberIqInfo* pInfo )
{
- if ( !pInfo || !pInfo->GetFrom() )
+ if ( !pInfo || !pInfo->GetFrom())
return FALSE;
- return IsMyOwnJID( pInfo->GetFrom() );
+ return IsMyOwnJID( pInfo->GetFrom());
}
BOOL CJabberProto::HandleAdhocCommandRequest( HXML iqNode, CJabberIqInfo* pInfo )
{
- if ( !pInfo->GetChildNode() )
+ if ( !pInfo->GetChildNode())
return TRUE;
if ( !m_options.EnableRemoteControl || !IsRcRequestAllowedByACL( pInfo )) {
@@ -277,7 +277,7 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
HXML fieldNode = xNode << XCHILD( _T("field")) << XATTR( _T("label"), TranslateT("Status"))
<< XATTR( _T("type"), _T("list-single")) << XATTR( _T("var"), _T("status"));
- fieldNode << XCHILD( _T("required") );
+ fieldNode << XCHILD( _T("required"));
int status = JCallService( MS_CLIST_GETSTATUSMODE, 0, 0 );
switch ( status ) {
@@ -339,16 +339,16 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
else if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
- HXML fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status") );
+ HXML fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status"));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML valueNode = xmlGetChild( fieldNode , "value" );
- if ( !valueNode || !xmlGetText( valueNode ) )
+ if ( !valueNode || !xmlGetText( valueNode ))
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int status = 0;
@@ -366,19 +366,19 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
int priority = -9999;
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-priority") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-priority"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- priority = _ttoi( xmlGetText( valueNode ) );
+ if ( xmlGetText( valueNode ))
+ priority = _ttoi( xmlGetText( valueNode ));
}
if ( priority >= -128 && priority <= 127 )
JSetWord( NULL, "Priority", (WORD)priority );
const TCHAR* szStatusMessage = NULL;
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-message") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-message"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
+ if ( xmlGetText( valueNode ))
szStatusMessage = xmlGetText( valueNode );
}
@@ -388,9 +388,9 @@ int CJabberProto::AdhocSetStatusHandler( HXML, CJabberIqInfo* pInfo, CJabberAdho
DBWriteContactSettingTString( NULL, "SRAway", StatusModeToDbSetting( status, "Msg" ), szStatusMessage ? szStatusMessage : _T( "" ));
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-global") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("status-global"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
JCallService( MS_CLIST_SETSTATUSMODE, status, NULL );
else
CallProtoService( m_szModuleName, PS_SETSTATUS, status, NULL );
@@ -445,30 +445,30 @@ int CJabberProto::AdhocOptionsHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML fieldNode, valueNode;
// Automatically Accept File Transfers
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("auto-files") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("auto-files"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- DBWriteContactSettingByte( NULL, "SRFile", "AutoAccept", (BYTE)_ttoi( xmlGetText( valueNode ) ) );
+ if ( xmlGetText( valueNode ))
+ DBWriteContactSettingByte( NULL, "SRFile", "AutoAccept", (BYTE)_ttoi( xmlGetText( valueNode )) );
}
// Use sounds
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("sounds") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("sounds"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) )
- DBWriteContactSettingByte( NULL, "Skin", "UseSound", (BYTE)_ttoi( xmlGetText( valueNode ) ) );
+ if ( xmlGetText( valueNode ))
+ DBWriteContactSettingByte( NULL, "Skin", "UseSound", (BYTE)_ttoi( xmlGetText( valueNode )) );
}
// Disable remote controlling
- fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("enable-rc") );
+ fieldNode = xmlGetChildByTag( xNode, "field", "var", _T("enable-rc"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
m_options.EnableRemoteControl = 0;
}
@@ -519,7 +519,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 0 ) {
int nUnreadEvents = RcGetUnreadEventsCount();
if ( !nUnreadEvents ) {
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no messages to forward") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no messages to forward"));
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -550,7 +550,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
// remove clist events
xNode << XCHILD( _T("field")) << XATTR( _T("label"), TranslateT("Mark messages as read")) << XATTR( _T("type"), _T("boolean"))
<< XATTR( _T("var"), _T("remove-clist-events")) << XCHILD( _T("value"),
- m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0") );
+ m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0"));
m_ThreadInfo->send( iq );
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -559,7 +559,7 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
@@ -568,9 +568,9 @@ int CJabberProto::AdhocForwardHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocS
BOOL bRemoveCListEvents = TRUE;
// remove clist events
- fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("remove-clist-events") );
+ fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("remove-clist-events"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" ))) {
- if ( xmlGetText( valueNode ) && !_ttoi( xmlGetText( valueNode ) ) ) {
+ if ( xmlGetText( valueNode ) && !_ttoi( xmlGetText( valueNode )) ) {
bRemoveCListEvents = FALSE;
}
}
@@ -658,7 +658,7 @@ typedef BOOL (WINAPI *LWS )( VOID );
int CJabberProto::AdhocLockWSHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSession* pSession )
{
BOOL bOk = FALSE;
- HMODULE hLibrary = LoadLibrary( _T("user32.dll") );
+ HMODULE hLibrary = LoadLibrary( _T("user32.dll"));
if ( hLibrary ) {
LWS pLws = (LWS)GetProcAddress( hLibrary, "LockWorkStation" );
if ( pLws )
@@ -668,9 +668,9 @@ int CJabberProto::AdhocLockWSHandler( HXML, CJabberIqInfo* pInfo, CJabberAdhocSe
TCHAR szMsg[ 1024 ];
if ( bOk )
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Workstation successfully locked") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Workstation successfully locked"));
else
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Error %d occured during workstation lock"), GetLastError() );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("Error %d occured during workstation lock"), GetLastError());
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -716,16 +716,16 @@ int CJabberProto::AdhocQuitMirandaHandler( HXML, CJabberIqInfo* pInfo, CJabberAd
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
HXML fieldNode, valueNode;
// I Agree checkbox
- fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("allow-shutdown") );
+ fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("allow-shutdown"));
if ( fieldNode && (valueNode = xmlGetChild( fieldNode , "value" )))
- if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode ) ))
+ if ( xmlGetText( valueNode ) && _ttoi( xmlGetText( valueNode )))
mir_forkthread( JabberQuitMirandaIMThread, NULL );
return JABBER_ADHOC_HANDLER_STATUS_COMPLETED;
@@ -751,7 +751,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler( HXML, CJabberIqInfo* pInfo, CJabb
ListUnlock();
if ( !nChatsCount ) {
- mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no groupchats to leave") );
+ mir_sntprintf( szMsg, SIZEOF(szMsg), TranslateT("There is no groupchats to leave"));
m_ThreadInfo->send(
XmlNodeIq( _T("result"), pInfo )
@@ -796,12 +796,12 @@ int CJabberProto::AdhocLeaveGroupchatsHandler( HXML, CJabberIqInfo* pInfo, CJabb
if ( pSession->GetStage() == 1 ) {
// result form here
HXML commandNode = pInfo->GetChildNode();
- HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS) );
+ HXML xNode = xmlGetChildByTag( commandNode, "x", "xmlns", _T(JABBER_FEAT_DATA_FORMS));
if ( !xNode )
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
// Groupchat list here:
- HXML fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("groupchats") );
+ HXML fieldNode = xmlGetChildByTag( xNode,"field", "var", _T("groupchats"));
if ( fieldNode ) {
for ( i = 0; i < xmlGetChildCount( fieldNode ); i++ ) {
HXML valueNode = xmlGetChild( fieldNode, i );
diff --git a/protocols/JabberG/jabber_rc.h b/protocols/JabberG/jabber_rc.h
index 394b905fbf..a83db38ab4 100644
--- a/protocols/JabberG/jabber_rc.h
+++ b/protocols/JabberG/jabber_rc.h
@@ -216,9 +216,9 @@ protected:
}
CJabberAdhocSession* pTmp = m_pSessions;
- while ( pTmp->GetNext() ) {
+ while ( pTmp->GetNext()) {
if ( pTmp->GetNext() == pSession ) {
- pTmp->SetNext( pSession->GetNext() );
+ pTmp->SetNext( pSession->GetNext());
pSession->SetNext( NULL );
delete pSession;
return TRUE;
@@ -241,10 +241,10 @@ protected:
return TRUE;
}
- while ( pSession->GetNext() ) {
+ while ( pSession->GetNext()) {
if ( pSession->GetNext()->GetSessionStartTime() < dwExpireTime ) {
CJabberAdhocSession* pRetVal = pSession->GetNext();
- pSession->SetNext( pSession->GetNext()->GetNext() );
+ pSession->SetNext( pSession->GetNext()->GetNext());
pRetVal->SetNext( NULL );
delete pRetVal;
return TRUE;
@@ -289,7 +289,7 @@ public:
m_pNodes = pNode;
else {
CJabberAdhocNode* pTmp = m_pNodes;
- while ( pTmp->GetNext() )
+ while ( pTmp->GetNext())
pTmp = pTmp->GetNext();
pTmp->SetNext( pNode );
}
diff --git a/protocols/JabberG/jabber_search.cpp b/protocols/JabberG/jabber_search.cpp
index de2c0121a5..fddcc5617d 100644
--- a/protocols/JabberG/jabber_search.cpp
+++ b/protocols/JabberG/jabber_search.cpp
@@ -162,7 +162,7 @@ void CJabberProto::OnIqResultGetSearchFields( HXML iqNode )
if ( !_tcsicmp( xmlGetName( chNode ), _T("instructions")) && xmlGetText( chNode ))
SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,TranslateTS(xmlGetText( chNode )));
- else if ( xmlGetName( chNode ) ) {
+ else if ( xmlGetName( chNode )) {
Data *MyData=(Data*)malloc(sizeof(Data));
memset(MyData,0,sizeof(Data));
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp
index 37cc368549..8b51b63e48 100644
--- a/protocols/JabberG/jabber_svc.cpp
+++ b/protocols/JabberG/jabber_svc.cpp
@@ -432,7 +432,7 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText( WPARAM wParam, LPARAM lPar
bool bIsTipper = DBGetContactSettingByte(NULL, "Tab_SRMsg", "adv_TipperTooltip", 1) && ServiceExists("mToolTip/HideTip");
//JID:
- if ( _tcschr(info->resourceName, _T('@') ) != NULL )
+ if ( _tcschr(info->resourceName, _T('@')) != NULL )
appendString(bIsTipper, _T("JID:"), info->resourceName, outBuf, SIZEOF(outBuf));
else if (lParam) { //or simple nick
appendString(bIsTipper, _T("Nick:"), (TCHAR*) lParam, outBuf, SIZEOF(outBuf));
@@ -614,7 +614,7 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge( WPARAM wParam, LPARAM )
m_ThreadInfo->send(
XmlNode( _T("message")) << XATTR( _T("type"), _T("headline")) << XATTR( _T("to"), tszJid )
<< XCHILDNS( _T("attention"),
- jcb & JABBER_CAPS_ATTENTION ? _T(JABBER_FEAT_ATTENTION) : _T(JABBER_FEAT_ATTENTION_0 )) );
+ jcb & JABBER_CAPS_ATTENTION ? _T(JABBER_FEAT_ATTENTION) : _T(JABBER_FEAT_ATTENTION_0 )));
}
return 0;
}
@@ -1120,7 +1120,7 @@ LPTSTR CJabberNetInterface::GetResourceFeatures( LPCTSTR jid )
}
// allocate memory and fill it
- LPTSTR str = (LPTSTR)mir_alloc( iLen * sizeof(TCHAR) );
+ LPTSTR str = (LPTSTR)mir_alloc( iLen * sizeof(TCHAR));
LPTSTR p = str;
for ( i = 0; g_JabberFeatCapPairs[i].szFeature; i++ ) {
if ( jcb & g_JabberFeatCapPairs[i].jcbCap ) {
diff --git a/protocols/JabberG/jabber_thread.cpp b/protocols/JabberG/jabber_thread.cpp
index 116328250f..5635c10a57 100644
--- a/protocols/JabberG/jabber_thread.cpp
+++ b/protocols/JabberG/jabber_thread.cpp
@@ -683,7 +683,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( m_AuthMechs.isSpnegoAvailable ) {
m_AuthMechs.isSpnegoAvailable = false;
auth = new TNtlmAuth( info, "GSS-SPNEGO" );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} }
@@ -691,7 +691,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( auth == NULL && m_AuthMechs.isNtlmAvailable ) {
m_AuthMechs.isNtlmAvailable = false;
auth = new TNtlmAuth( info, "NTLM" );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} }
@@ -699,7 +699,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( auth == NULL && m_AuthMechs.isKerberosAvailable ) {
m_AuthMechs.isKerberosAvailable = false;
auth = new TNtlmAuth( info, "GSSAPI", m_AuthMechs.m_gssapiHostName );
- if ( !auth->isValid() ) {
+ if ( !auth->isValid()) {
delete auth;
auth = NULL;
} else {
@@ -749,7 +749,7 @@ void CJabberProto::PerformAuthentication( ThreadData* info )
if ( !request ) request = auth->getInitialRequest();
info->send( XmlNode( _T("auth"), _A2T(request)) << XATTR( _T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl"))
- << XATTR( _T("mechanism"), _A2T(auth->getName() )));
+ << XATTR( _T("mechanism"), _A2T(auth->getName())));
mir_free( request );
}
@@ -857,7 +857,7 @@ void CJabberProto::OnProcessFailure( HXML node, ThreadData* info )
const TCHAR* type;
//failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"
if (( type = xmlGetAttrValue( node, _T("xmlns"))) == NULL ) return;
- if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl") )) {
+ if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
PerformAuthentication( info );
} }
@@ -906,7 +906,7 @@ void CJabberProto::OnProcessSuccess( HXML node, ThreadData* info )
if (( type = xmlGetAttrValue( node, _T("xmlns"))) == NULL )
return;
- if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl") )) {
+ if ( !_tcscmp( type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
DBVARIANT dbv;
if ( !info->auth->validateLogin( xmlGetText( node ))) {
@@ -1044,7 +1044,7 @@ void CJabberProto::OnProcessPubsubEvent( HXML node )
return;
}
- HXML tuneNode = XPath( itemsNode, _T("item/tune[@xmlns='") _T(JABBER_FEAT_USER_TUNE) _T("']") );
+ HXML tuneNode = XPath( itemsNode, _T("item/tune[@xmlns='") _T(JABBER_FEAT_USER_TUNE) _T("']"));
if ( !tuneNode )
return;
@@ -1157,15 +1157,15 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
HXML bodyNode = xmlGetChildByTag( node , "body", "xml:lang", m_tszSelectedLang );
if ( bodyNode == NULL )
bodyNode = xmlGetChild( node , "body" );
- if ( bodyNode != NULL && xmlGetText( bodyNode ) )
+ if ( bodyNode != NULL && xmlGetText( bodyNode ))
szMessage = xmlGetText( bodyNode );
if (( subjectNode = xmlGetChild( node , "subject" )) && xmlGetText( subjectNode ) && xmlGetText( subjectNode )[0] != _T('\0')) {
- size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( subjectNode ) ) + 128;
+ size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( subjectNode )) + 128;
TCHAR* szTmp = ( TCHAR * )alloca( sizeof(TCHAR) * cbLen );
szTmp[0] = _T('\0');
if ( szMessage )
_tcscat( szTmp, _T("Subject: "));
- _tcscat( szTmp, xmlGetText( subjectNode ) );
+ _tcscat( szTmp, xmlGetText( subjectNode ));
if ( szMessage ) {
_tcscat( szTmp, _T("\r\n"));
_tcscat( szTmp, szMessage );
@@ -1174,7 +1174,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
}
if ( szMessage && (n = xmlGetChildByTag( node, "addresses", "xmlns", _T(JABBER_FEAT_EXT_ADDRESSING)))) {
- HXML addressNode = xmlGetChildByTag( n, "address", "type", _T("ofrom") );
+ HXML addressNode = xmlGetChildByTag( n, "address", "type", _T("ofrom"));
if ( addressNode ) {
const TCHAR* szJid = xmlGetAttrValue( addressNode, _T("jid"));
if ( szJid ) {
@@ -1228,14 +1228,14 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
}
// XEP-0203 delay support
- if ( n = xmlGetChildByTag( node, "delay", "xmlns", _T("urn:xmpp:delay") ) ) {
+ if ( n = xmlGetChildByTag( node, "delay", "xmlns", _T("urn:xmpp:delay")) ) {
const TCHAR* ptszTimeStamp = xmlGetAttrValue( n, _T("stamp"));
if ( ptszTimeStamp != NULL ) {
// skip '-' chars
TCHAR* szStamp = mir_tstrdup( ptszTimeStamp );
int si = 0, sj = 0;
while (1) {
- if ( szStamp[si] == _T('-') )
+ if ( szStamp[si] == _T('-'))
si++;
else
if ( !( szStamp[sj++] = szStamp[si++] ))
@@ -1248,7 +1248,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
// XEP-0224 support (Attention/Nudge)
if ( xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION )) ||
- xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION_0 )) ) {
+ xmlGetChildByTag( node, "attention", "xmlns", _T( JABBER_FEAT_ATTENTION_0 ))) {
if ( !hContact )
hContact = CreateTemporaryContact( from, chatItem );
if ( hContact )
@@ -1285,7 +1285,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
pParams->m_szFrom = mir_tstrdup( from );
HXML pThreadNode = xmlGetChild( node , "thread" );
if ( pThreadNode && xmlGetText( pThreadNode ) && xmlGetText( pThreadNode )[0] )
- pParams->m_szThreadId = mir_tstrdup( xmlGetText( pThreadNode ) );
+ pParams->m_szThreadId = mir_tstrdup( xmlGetText( pThreadNode ));
pParams->m_szId = mir_tstrdup( szId );
pParams->m_szMethod = mir_tstrdup( szMethod );
pParams->m_szUrl = mir_tstrdup( szUrl );
@@ -1318,10 +1318,10 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
TCHAR* prolog = _T("-----BEGIN PGP MESSAGE-----\r\n\r\n");
TCHAR* epilog = _T("\r\n-----END PGP MESSAGE-----\r\n");
- TCHAR* tempstring = ( TCHAR* )alloca( sizeof( TCHAR ) * ( _tcslen( prolog ) + _tcslen( xmlGetText( xNode ) ) + _tcslen( epilog ) + 3 ));
+ TCHAR* tempstring = ( TCHAR* )alloca( sizeof( TCHAR ) * ( _tcslen( prolog ) + _tcslen( xmlGetText( xNode )) + _tcslen( epilog ) + 3 ));
_tcsncpy( tempstring, prolog, _tcslen( prolog ) + 1 );
- _tcsncpy( tempstring + _tcslen( prolog ), xmlGetText( xNode ), _tcslen( xmlGetText( xNode ) ) + 1);
- _tcsncpy( tempstring + _tcslen( prolog ) + _tcslen(xmlGetText( xNode ) ), epilog, _tcslen( epilog ) + 1);
+ _tcsncpy( tempstring + _tcslen( prolog ), xmlGetText( xNode ), _tcslen( xmlGetText( xNode )) + 1);
+ _tcsncpy( tempstring + _tcslen( prolog ) + _tcslen(xmlGetText( xNode )), epilog, _tcslen( epilog ) + 1);
szMessage = tempstring;
}
else if ( !_tcscmp( ptszXmlns, _T(JABBER_FEAT_DELAY)) && msgTime == 0 ) {
@@ -1336,7 +1336,7 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if ( jcbCaps & JABBER_RESOURCE_CAPS_ERROR )
jcbCaps = JABBER_RESOURCE_CAPS_NONE;
// FIXME: disabled due to expired XEP-0022 and problems with bombus delivery checks
-// if ( jcbCaps && resourceStatus && (!(jcbCaps & JABBER_CAPS_MESSAGE_EVENTS)) )
+// if ( jcbCaps && resourceStatus && (!(jcbCaps & JABBER_CAPS_MESSAGE_EVENTS)))
// resourceStatus->jcbManualDiscoveredCaps |= (JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY);
if ( bodyNode == NULL ) {
@@ -1344,8 +1344,8 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
if ( xmlGetChild( xNode , "delivered" ) != NULL || xmlGetChild( xNode , "offline" ) != NULL ) {
int id = -1;
if ( idNode != NULL && xmlGetText( idNode ) != NULL )
- if ( !_tcsncmp( xmlGetText( idNode ), _T(JABBER_IQID), strlen( JABBER_IQID )) )
- id = _ttoi(( xmlGetText( idNode ) )+strlen( JABBER_IQID ));
+ if ( !_tcsncmp( xmlGetText( idNode ), _T(JABBER_IQID), strlen( JABBER_IQID )))
+ id = _ttoi(( xmlGetText( idNode ))+strlen( JABBER_IQID ));
if ( id != -1 )
JSendBroadcast( hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, ( HANDLE ) id, 0 );
@@ -1379,9 +1379,9 @@ void CJabberProto::OnProcessMessage( HXML node, ThreadData* info )
else if ( !_tcscmp( ptszXmlns, _T(JABBER_FEAT_OOB2))) {
HXML urlNode;
if ( ((urlNode = xmlGetChild( xNode , "url" )) != NULL) && xmlGetText( urlNode ) && xmlGetText( urlNode )[0] != _T('\0')) {
- size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( urlNode ) ) + 32;
+ size_t cbLen = (szMessage ? _tcslen( szMessage ) : 0) + _tcslen( xmlGetText( urlNode )) + 32;
TCHAR* szTmp = ( TCHAR * )alloca( sizeof(TCHAR) * cbLen );
- _tcscpy( szTmp, xmlGetText( urlNode ) );
+ _tcscpy( szTmp, xmlGetText( urlNode ));
if ( szMessage ) {
_tcscat( szTmp, _T("\r\n"));
_tcscat( szTmp, szMessage );
@@ -1667,7 +1667,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
DBCheckIsTransportedContact( from, hContact );
int status = ID_STATUS_ONLINE;
if (( showNode = xmlGetChild( node , "show" )) != NULL ) {
- if (( show = xmlGetText( showNode ) ) != NULL ) {
+ if (( show = xmlGetText( showNode )) != NULL ) {
if ( !_tcscmp( show, _T("away"))) status = ID_STATUS_AWAY;
else if ( !_tcscmp( show, _T("xa"))) status = ID_STATUS_NA;
else if ( !_tcscmp( show, _T("dnd"))) status = ID_STATUS_DND;
@@ -1676,7 +1676,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
char priority = 0;
if (( priorityNode = xmlGetChild( node , "priority" )) != NULL && xmlGetText( priorityNode ) != NULL )
- priority = (char)_ttoi( xmlGetText( priorityNode ) );
+ priority = (char)_ttoi( xmlGetText( priorityNode ));
if (( statusNode = xmlGetChild( node , "status" )) != NULL && xmlGetText( statusNode ) != NULL )
p = xmlGetText( statusNode );
@@ -1706,11 +1706,11 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
if (( xNode = xmlGetChild( xNode , "hash" )) != NULL && xmlGetText( xNode ) != NULL ) {
JDeleteSetting(hContact,"AvatarXVcard");
Log( "AvatarXVcard deleted" );
- JSetStringT( hContact, "AvatarHash", xmlGetText( xNode ) );
+ JSetStringT( hContact, "AvatarHash", xmlGetText( xNode ));
hasAvatar = true;
DBVARIANT dbv;
int result = JGetStringT( hContact, "AvatarSaved", &dbv );
- if ( result || lstrcmp( dbv.ptszVal, xmlGetText( xNode ) )) {
+ if ( result || lstrcmp( dbv.ptszVal, xmlGetText( xNode ))) {
Log( "Avatar was changed" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, NULL );
} else Log( "Not broadcasting avatar changed" );
@@ -1746,7 +1746,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
Log( "Has no avatar" );
JDeleteSetting( hContact, "AvatarHash" );
DBVARIANT dbv = {0};
- if ( !JGetStringT( hContact, "AvatarSaved", &dbv ) ) {
+ if ( !JGetStringT( hContact, "AvatarSaved", &dbv )) {
JFreeVariant( &dbv );
JDeleteSetting( hContact, "AvatarSaved" );
JSendBroadcast( hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, NULL );
@@ -1771,8 +1771,8 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
if ( !item->resourceCount )
{
item->itemResource.status = ID_STATUS_OFFLINE;
- if ((( statusNode = xmlGetChild( node , "status" )) != NULL ) && xmlGetText( statusNode ) )
- replaceStr( item->itemResource.statusMessage, xmlGetText( statusNode ) );
+ if ((( statusNode = xmlGetChild( node , "status" )) != NULL ) && xmlGetText( statusNode ))
+ replaceStr( item->itemResource.statusMessage, xmlGetText( statusNode ));
else
replaceStr( item->itemResource.statusMessage, NULL );
}
@@ -1809,7 +1809,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
}
else {
HXML n = xmlGetChild( node , "nick" );
- nick = ( n == NULL ) ? JabberNickFromJID( from ) : mir_tstrdup( xmlGetText( n ) );
+ nick = ( n == NULL ) ? JabberNickFromJID( from ) : mir_tstrdup( xmlGetText( n ));
if ( nick != NULL ) {
Log( TCHAR_STR_PARAM " ( " TCHAR_STR_PARAM " ) requests authorization", nick, from );
DBAddAuthRequest( from, nick );
@@ -1854,7 +1854,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
void CJabberProto::OnIqResultVersion( HXML /*node*/, CJabberIqInfo *pInfo )
{
- JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom() );
+ JABBER_RESOURCE_STATUS *r = ResourceInfoFromJID( pInfo->GetFrom());
if ( r == NULL ) return;
r->dwVersionRequestTime = -1;
@@ -1867,16 +1867,16 @@ void CJabberProto::OnIqResultVersion( HXML /*node*/, CJabberIqInfo *pInfo )
if ( pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && queryNode) {
HXML n;
- if (( n = xmlGetChild( queryNode , "name" ))!=NULL && xmlGetText( n ) )
- r->software = mir_tstrdup( xmlGetText( n ) );
- if (( n = xmlGetChild( queryNode , "version" ))!=NULL && xmlGetText( n ) )
- r->version = mir_tstrdup( xmlGetText( n ) );
- if (( n = xmlGetChild( queryNode , "os" ))!=NULL && xmlGetText( n ) )
- r->system = mir_tstrdup( xmlGetText( n ) );
+ if (( n = xmlGetChild( queryNode , "name" ))!=NULL && xmlGetText( n ))
+ r->software = mir_tstrdup( xmlGetText( n ));
+ if (( n = xmlGetChild( queryNode , "version" ))!=NULL && xmlGetText( n ))
+ r->version = mir_tstrdup( xmlGetText( n ));
+ if (( n = xmlGetChild( queryNode , "os" ))!=NULL && xmlGetText( n ))
+ r->system = mir_tstrdup( xmlGetText( n ));
}
GetResourceCapabilites( pInfo->GetFrom(), TRUE );
- if ( pInfo->GetHContact() )
+ if ( pInfo->GetHContact())
UpdateMirVer( pInfo->GetHContact(), r );
JabberUserInfoUpdate(pInfo->GetHContact());
@@ -1889,11 +1889,11 @@ BOOL CJabberProto::OnProcessJingle( HXML node )
if ( child ) {
if (( type=xmlGetAttrValue( node, _T("type"))) == NULL ) return FALSE;
- if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set") ))) {
+ if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set")))) {
LPCTSTR szAction = xmlGetAttrValue( child, _T("action"));
LPCTSTR idStr = xmlGetAttrValue( node, _T("id"));
LPCTSTR from = xmlGetAttrValue( node, _T("from"));
- if ( szAction && !_tcscmp( szAction, _T("session-initiate")) ) {
+ if ( szAction && !_tcscmp( szAction, _T("session-initiate"))) {
// if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications"
m_ThreadInfo->send( XmlNodeIq( _T("result"), idStr, from ));
@@ -1958,7 +1958,7 @@ void CJabberProto::OnProcessIq( HXML node )
/////////////////////////////////////////////////////////////////////////
// OLD MATCH BY ID
/////////////////////////////////////////////////////////////////////////
- if ( ( !_tcscmp( type, _T("result")) || !_tcscmp( type, _T("error")) ) && (( pfunc=JabberIqFetchFunc( id )) != NULL )) {
+ if ( ( !_tcscmp( type, _T("result")) || !_tcscmp( type, _T("error"))) && (( pfunc=JabberIqFetchFunc( id )) != NULL )) {
Log( "Handling iq request for id=%d", id );
(this->*pfunc)( node );
return;
@@ -1977,8 +1977,8 @@ void CJabberProto::OnProcessIq( HXML node )
SetEvent( item->ft->hFileEvent ); // Simulate the termination of file server connection
}
} }
- else if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set") ))) {
- XmlNodeIq iq( _T("error"), idStr, xmlGetAttrValue( node, _T("from")) );
+ else if (( !_tcscmp( type, _T("get")) || !_tcscmp( type, _T("set")))) {
+ XmlNodeIq iq( _T("error"), idStr, xmlGetAttrValue( node, _T("from")));
HXML pFirstChild = xmlGetChild( node , 0 );
if ( pFirstChild )
diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp
index dc433f9b93..3ba8bfa57e 100644
--- a/protocols/JabberG/jabber_userinfo.cpp
+++ b/protocols/JabberG/jabber_userinfo.cpp
@@ -256,7 +256,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
// Resource priority
TCHAR szPriority[128];
mir_sntprintf( szPriority, SIZEOF( szPriority ), _T("%d"), (int)res->priority );
- sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT( "Resource priority" ), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY) );
+ sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT( "Resource priority" ), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY));
// Idle
if ( res->idleStartTime > 0 ) {
@@ -269,7 +269,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
else
lstrcpyn(buf, TranslateT( "<not specified>" ), SIZEOF( buf ));
- sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE) );
+ sttFillInfoLine( hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE));
// caps
mir_sntprintf( buf, SIZEOF(buf), _T("%s/%s"), item->jid, res->resourceName );
@@ -285,7 +285,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s (%s)"), TranslateTS(g_JabberFeatCapPairs[i].szDescription), g_JabberFeatCapPairs[i].szFeature );
else
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s"), g_JabberFeatCapPairs[i].szFeature );
- sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i) );
+ sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i));
}
for ( int j = 0; j < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); j++, i++ )
@@ -295,7 +295,7 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s (%s)"), TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature );
else
mir_sntprintf( szDescription, SIZEOF( szDescription ), _T("%s"), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature );
- sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i) );
+ sttFillInfoLine( hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i));
}
}
@@ -304,18 +304,18 @@ static void sttFillResourceInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM ht
HTREEITEM htiSoftwareInfo = sttFillInfoLine( hwndTree, htiResource, ppro->LoadIconEx( "main" ), NULL, TranslateT( "Software information" ), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION));
int nLineId = 0;
if ( res->pSoftwareInfo->szOs )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system"), res->pSoftwareInfo->szOs, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system"), res->pSoftwareInfo->szOs, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szOsVersion )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system version"), res->pSoftwareInfo->szOsVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Operating system version"), res->pSoftwareInfo->szOsVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szSoftware )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software"), res->pSoftwareInfo->szSoftware, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software"), res->pSoftwareInfo->szSoftware, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szSoftwareVersion )
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software version"), res->pSoftwareInfo->szSoftwareVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Software version"), res->pSoftwareInfo->szSoftwareVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
if ( res->pSoftwareInfo->szXMirandaCoreVersion ) {
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda IM core version"), res->pSoftwareInfo->szXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Unicode build"), res->pSoftwareInfo->bXMirandaIsUnicode ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Alpha build"), res->pSoftwareInfo->bXMirandaIsAlpha ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
- sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Debug build"), res->pSoftwareInfo->bXMirandaIsDebug ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++) );
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda IM core version"), res->pSoftwareInfo->szXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Unicode build"), res->pSoftwareInfo->bXMirandaIsUnicode ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Alpha build"), res->pSoftwareInfo->bXMirandaIsAlpha ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
+ sttFillInfoLine( hwndTree, htiSoftwareInfo, NULL, TranslateT("Debug build"), res->pSoftwareInfo->bXMirandaIsDebug ? TranslateT("Yes") : TranslateT("No"), sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
}
}
}
@@ -405,7 +405,7 @@ static void sttFillUserInfo( CJabberProto* ppro, HWND hwndTree, JABBER_LIST_ITEM
for (int i = 0; i < item->resourceCount; ++i)
sttFillResourceInfo( ppro, hwndTree, htiRoot, item, i+1 );
}
- else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE) )
+ else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE))
sttFillResourceInfo( ppro, hwndTree, htiRoot, item, 0 );
sttCleanupInfo(hwndTree, 1);
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc( HWND hwndDlg, UINT msg, WPARAM wP
TreeView_DeleteAllItems( hwndTree );
HTREEITEM htiRoot = sttFillInfoLine( hwndTree, NULL, dat->ppro->LoadIconEx( "main" ), _T( "JID" ), dbv.ptszVal, sttInfoLineId(0, INFOLINE_NAME), true );
sttFillInfoLine( hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL,
- TranslateT("Please switch online to see more details.") );
+ TranslateT("Please switch online to see more details."));
JFreeVariant(&dbv);
break;
diff --git a/protocols/JabberG/jabber_util.cpp b/protocols/JabberG/jabber_util.cpp
index 7c9867a377..9df7bd2620 100644
--- a/protocols/JabberG/jabber_util.cpp
+++ b/protocols/JabberG/jabber_util.cpp
@@ -206,7 +206,7 @@ TCHAR* JabberPrepareJid( LPCTSTR jid )
if ( !jid ) return NULL;
TCHAR* szNewJid = mir_tstrdup( jid );
if ( !szNewJid ) return NULL;
- TCHAR* pDelimiter = _tcschr( szNewJid, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szNewJid, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
CharLower( szNewJid );
if ( pDelimiter ) *pDelimiter = _T('/');
@@ -453,7 +453,7 @@ WCHAR* __stdcall JabberUnixToDosW( const WCHAR* str )
if ( *p == '\n' )
extra++;
}
- if (( res = ( WCHAR* )mir_alloc( sizeof( WCHAR )*( wcslen( str ) + extra + 1 )) ) != NULL ) {
+ if (( res = ( WCHAR* )mir_alloc( sizeof( WCHAR )*( wcslen( str ) + extra + 1 ))) != NULL ) {
for ( p = str,q=res; *p!='\0'; p++,q++ ) {
if ( *p == '\n' ) {
*q = '\r';
@@ -492,7 +492,7 @@ void __stdcall JabberHttpUrlDecode( TCHAR* str )
if ( str == NULL ) return;
for ( p = q = ( TCHAR* )str; *p!='\0'; p++,q++ ) {
- if ( *p=='%' && *( p+1 )!='\0' && isxdigit( *( p+1 )) && *( p+2 )!='\0' && isxdigit( *( p+2 )) ) {
+ if ( *p=='%' && *( p+1 )!='\0' && isxdigit( *( p+1 )) && *( p+2 )!='\0' && isxdigit( *( p+2 ))) {
_stscanf(( TCHAR* )p+1, _T("%2x"), &code );
*q = ( unsigned char ) code;
p += 2;
@@ -818,42 +818,42 @@ void CJabberProto::SendPresenceTo( int status, TCHAR* to, HXML extra, const TCHA
TCHAR szExtCaps[ 512 ] = _T("");
if ( m_bGoogleTalk )
- _tcscat( szExtCaps, _T(JABBER_EXT_GTALK_PMUC) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_GTALK_PMUC));
if ( bSecureIM ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_SECUREIM) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_SECUREIM));
}
if ( m_options.EnableRemoteControl ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_COMMANDS) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_COMMANDS));
}
if ( m_options.EnableUserMood ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_MOOD) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_MOOD));
}
if ( m_options.EnableUserTune ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_TUNE) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_TUNE));
}
if ( m_options.EnableUserActivity ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_USER_ACTIVITY) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_USER_ACTIVITY));
}
if ( m_options.AcceptNotes ) {
if ( szExtCaps[0] )
_tcscat( szExtCaps, _T(" "));
- _tcscat( szExtCaps, _T(JABBER_EXT_MIR_NOTES) );
+ _tcscat( szExtCaps, _T(JABBER_EXT_MIR_NOTES));
}
// add features enabled through IJabberNetInterface::AddFeatures()
@@ -1669,10 +1669,10 @@ BOOL CJabberProto::IsMyOwnJID( LPCTSTR szJID )
return FALSE;
}
- TCHAR* pDelimiter = _tcschr( szFrom, _T('/') );
+ TCHAR* pDelimiter = _tcschr( szFrom, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
- pDelimiter = _tcschr( szTo, _T('/') );
+ pDelimiter = _tcschr( szTo, _T('/'));
if ( pDelimiter ) *pDelimiter = _T('\0');
BOOL bRetVal = _tcscmp( szFrom, szTo ) == 0;
diff --git a/protocols/JabberG/jabber_vcard.cpp b/protocols/JabberG/jabber_vcard.cpp
index f8edc245ae..70213922f8 100644
--- a/protocols/JabberG/jabber_vcard.cpp
+++ b/protocols/JabberG/jabber_vcard.cpp
@@ -93,7 +93,7 @@ static INT_PTR CALLBACK PersonalDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_COMMAND:
if (( ( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE ) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_GENDER ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_GENDER ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
@@ -156,7 +156,7 @@ static INT_PTR CALLBACK HomeDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_COMMAND:
if ((( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
@@ -222,7 +222,7 @@ static INT_PTR CALLBACK WorkDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_COMMAND:
if ((( HWND )lParam==GetFocus() && HIWORD( wParam )==EN_CHANGE) ||
- (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )) )
+ (( HWND )lParam==GetDlgItem( hwndDlg, IDC_COUNTRY ) && ( HIWORD( wParam )==CBN_EDITCHANGE||HIWORD( wParam )==CBN_SELCHANGE )))
{
ppro->m_vCardUpdates |= (1UL<<iPageId);
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
diff --git a/protocols/JabberG/jabber_xml.cpp b/protocols/JabberG/jabber_xml.cpp
index 70898199c9..158882c195 100644
--- a/protocols/JabberG/jabber_xml.cpp
+++ b/protocols/JabberG/jabber_xml.cpp
@@ -67,8 +67,8 @@ XmlNodeIq::XmlNodeIq( CJabberIqInfo* pInfo ) :
{
if ( pInfo ) {
if ( pInfo->GetCharIqType() != NULL ) *this << XATTR( _T("type"), _A2T(pInfo->GetCharIqType()));
- if ( pInfo->GetReceiver() != NULL ) *this << XATTR( _T("to"), pInfo->GetReceiver() );
- if ( pInfo->GetIqId() != -1 ) *this << XATTRID( pInfo->GetIqId() );
+ if ( pInfo->GetReceiver() != NULL ) *this << XATTR( _T("to"), pInfo->GetReceiver());
+ if ( pInfo->GetIqId() != -1 ) *this << XATTRID( pInfo->GetIqId());
}
}
@@ -77,8 +77,8 @@ XmlNodeIq::XmlNodeIq( const TCHAR* type, CJabberIqInfo* pInfo ) :
{
if ( type != NULL ) *this << XATTR( _T("type"), type );
if ( pInfo ) {
- if ( pInfo->GetFrom() != NULL ) *this << XATTR( _T("to"), pInfo->GetFrom() );
- if ( pInfo->GetIdStr() != NULL ) *this << XATTR( _T("id"), pInfo->GetIdStr() );
+ if ( pInfo->GetFrom() != NULL ) *this << XATTR( _T("to"), pInfo->GetFrom());
+ if ( pInfo->GetIdStr() != NULL ) *this << XATTR( _T("id"), pInfo->GetIdStr());
}
}
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp
index efdb377edc..d35c5a4b88 100644
--- a/protocols/JabberG/jabber_xstatus.cpp
+++ b/protocols/JabberG/jabber_xstatus.cpp
@@ -679,7 +679,7 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode)
return;
}
- HXML n, moodNode = XPath( itemsNode, _T("item/mood[@xmlns='") _T(JABBER_FEAT_USER_MOOD) _T("']") );
+ HXML n, moodNode = XPath( itemsNode, _T("item/mood[@xmlns='") _T(JABBER_FEAT_USER_MOOD) _T("']"));
if ( !moodNode ) return;
LPCTSTR moodType = NULL, moodText = NULL;
@@ -1097,7 +1097,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode)
return;
}
- HXML actNode = XPath( itemsNode, _T("item/activity[@xmlns='") _T(JABBER_FEAT_USER_ACTIVITY) _T("']") );
+ HXML actNode = XPath( itemsNode, _T("item/activity[@xmlns='") _T(JABBER_FEAT_USER_ACTIVITY) _T("']"));
if ( !actNode ) return;
LPCTSTR szText = XPathT( actNode, "text" );
@@ -1217,7 +1217,7 @@ void CPepActivity::ShowSetDialog(BYTE bQuiet)
CJabberDlgPepSimple dlg(m_proto, TranslateT("Set Activity"));
for (int i = 0; i < SIZEOF(g_arrActivities); ++i)
if (g_arrActivities[i].szFirst || g_arrActivities[i].szSecond)
- dlg.AddStatusMode(i, ActivityGetId(i), m_icons.GetIcon(returnActivity(i)), TranslateTS(g_arrActivities[i].szTitle), (g_arrActivities[i].szSecond != NULL) );
+ dlg.AddStatusMode(i, ActivityGetId(i), m_icons.GetIcon(returnActivity(i)), TranslateTS(g_arrActivities[i].szTitle), (g_arrActivities[i].szSecond != NULL));
dlg.SetActiveStatus(m_mode, m_text);
dlg.DoModal();
@@ -1306,7 +1306,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusIcon( WPARAM wParam, LPARAM lParam )
if ( !wParam )
wParam = ((CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)))->m_mode;
- if ( wParam < 1 || wParam >= SIZEOF(g_arrMoods) )
+ if ( wParam < 1 || wParam >= SIZEOF(g_arrMoods))
return 0;
int flags = 0;
@@ -1324,7 +1324,7 @@ BOOL CJabberProto::SendPepTune( TCHAR* szArtist, TCHAR* szLength, TCHAR* szSourc
if ( !m_bJabberOnline || !m_bPepSupported )
return FALSE;
- XmlNodeIq iq( _T("set"), SerialNext() );
+ XmlNodeIq iq( _T("set"), SerialNext());
HXML tuneNode = iq << XCHILDNS( _T("pubsub"), _T(JABBER_FEAT_PUBSUB))
<< XCHILD( _T("publish")) << XATTR( _T("node"), _T(JABBER_FEAT_USER_TUNE))
<< XCHILD( _T("item")) << XCHILDNS( _T("tune"), _T(JABBER_FEAT_USER_TUNE));
@@ -1365,7 +1365,7 @@ void CJabberProto::SetContactTune( HANDLE hContact, LPCTSTR szArtist, LPCTSTR sz
}
else {
szListeningTo = (TCHAR *) mir_alloc( 2048 * sizeof( TCHAR ));
- mir_sntprintf( szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T("") );
+ mir_sntprintf( szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T(""));
}
JSetStringT( hContact, "ListeningTo", szListeningTo );
@@ -1402,7 +1402,7 @@ void overrideStr( TCHAR*& dest, const TCHAR* src, BOOL unicode, const TCHAR* def
INT_PTR __cdecl CJabberProto::OnSetListeningTo( WPARAM, LPARAM lParam )
{
LISTENINGTOINFO *cm = (LISTENINGTOINFO *)lParam;
- if ( !cm || cm->cbSize != sizeof(LISTENINGTOINFO) ) {
+ if ( !cm || cm->cbSize != sizeof(LISTENINGTOINFO)) {
SendPepTune( NULL, NULL, NULL, NULL, NULL, NULL );
JDeleteSetting( NULL, "ListeningTo" );
}
@@ -1430,7 +1430,7 @@ INT_PTR __cdecl CJabberProto::OnSetListeningTo( WPARAM, LPARAM lParam )
while ( szTmp[0] ) {
result += ( _ttoi( szTmp ) * multiplier );
multiplier /= 60;
- szTmp = _tcschr( szTmp, _T(':') );
+ szTmp = _tcschr( szTmp, _T(':'));
if ( !szTmp )
break;
szTmp++;
diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp
index 4386a02a53..eb91ecb74b 100644
--- a/protocols/JabberG/ui_utils.cpp
+++ b/protocols/JabberG/ui_utils.cpp
@@ -554,7 +554,7 @@ CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, HICON hIcon, const char*
CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, int iCoreIcon, const char* tooltip ) :
CCtrlButton( dlg, ctrlId ),
- m_hIcon( LoadSkinnedIcon(iCoreIcon) ),
+ m_hIcon( LoadSkinnedIcon(iCoreIcon)),
m_toolTip( tooltip )
{
}
diff --git a/protocols/MRA/MraAntiSpam.cpp b/protocols/MRA/MraAntiSpam.cpp
index 20be25d33a..002aa3cd08 100644
--- a/protocols/MRA/MraAntiSpam.cpp
+++ b/protocols/MRA/MraAntiSpam.cpp
@@ -195,7 +195,7 @@ INT_PTR CALLBACK MraAntiSpamDlgProcOpts(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
MraAntiSpamLoadBadWordsW();
}
- if ((LOWORD(wParam)==IDC_EDIT_BAD_WORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(0);
+ if ((LOWORD(wParam)==IDC_EDIT_BAD_WORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(0);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
@@ -444,7 +444,7 @@ DWORD MraAntiSpamReceivedMessageW(LPSTR lpszEMail,SIZE_T dwEMailSize,DWORD dwMes
dwRet=MESSAGE_NOT_SPAM;
}else{// temp contact
if (DB_Mra_GetByte(NULL,"AntiSpamCheckTempContacts",MRA_ANTISPAM_DEFAULT_CHK_TEMP_CONTACTS)==FALSE ||
- (((dwMessageFlags&MESSAGE_FLAG_AUTHORIZE) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsers",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsersDisableSPAMCheck",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS_DISABLE_SPAM_CHECK))) )
+ (((dwMessageFlags&MESSAGE_FLAG_AUTHORIZE) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsers",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS) && DB_Mra_GetByte(NULL,"AutoAuthGrandNewUsersDisableSPAMCheck",MRA_DEFAULT_AUTO_AUTH_GRAND_NEW_USERS_DISABLE_SPAM_CHECK))))
{// ïðîâåðêà âðåìåííîãî êîíòàêòà
bCheckMessage=FALSE;
dwRet=MESSAGE_NOT_SPAM;
diff --git a/protocols/MRA/MraAvatars.cpp b/protocols/MRA/MraAvatars.cpp
index ad147b09a6..786e930392 100644
--- a/protocols/MRA/MraAvatars.cpp
+++ b/protocols/MRA/MraAvatars.cpp
@@ -806,7 +806,7 @@ INT_PTR CALLBACK MraAvatarsQueueDlgProcOpts(HWND hWndDlg,UINT msg,WPARAM wParam,
SetDlgItemInt(hWndDlg,IDC_SERVERPORT,MRA_AVT_DEFAULT_SERVER_PORT,FALSE);
}
- if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT || LOWORD(wParam)==IDC_UPD_CHECK_INTERVAL) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT || LOWORD(wParam)==IDC_UPD_CHECK_INTERVAL) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/MraFilesQueue.cpp b/protocols/MRA/MraFilesQueue.cpp
index 09e052c822..75b25a4f78 100644
--- a/protocols/MRA/MraFilesQueue.cpp
+++ b/protocols/MRA/MraFilesQueue.cpp
@@ -135,7 +135,7 @@ INT_PTR CALLBACK MraFilesQueueDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam,
EnableWindow(GetDlgItem(hWndDlg,IDC_FILE_SEND_EXTRA_ADDRESS),IS_DLG_BUTTON_CHECKED(hWndDlg,IDC_FILE_SEND_ADD_EXTRA_ADDRESS));
}
- if ((LOWORD(wParam)==IDC_FILE_SEND_EXTRA_ADDRESS || LOWORD(wParam)==IDC_FILE_SEND_BLOCK_SIZE) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_FILE_SEND_EXTRA_ADDRESS || LOWORD(wParam)==IDC_FILE_SEND_BLOCK_SIZE) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/MraPopUp.cpp b/protocols/MRA/MraPopUp.cpp
index ec3893aea5..79a8664e01 100644
--- a/protocols/MRA/MraPopUp.cpp
+++ b/protocols/MRA/MraPopUp.cpp
@@ -112,7 +112,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TIMEOUT), bEnabled);
}
default:
- if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) )
+ if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return(FALSE);
SendMessage(GetParent(hWndDlg), PSM_CHANGED, 0, 0);
}
diff --git a/protocols/MRA/Mra_options.cpp b/protocols/MRA/Mra_options.cpp
index 97e1aa1b91..137b347f1c 100644
--- a/protocols/MRA/Mra_options.cpp
+++ b/protocols/MRA/Mra_options.cpp
@@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg,UINT msg,WPARAM wParam,LPARAM l
CallService(MS_UTILS_OPENURL,TRUE,(LPARAM)MRA_FORGOT_PASSWORD_URL);
return(TRUE);
}
- if ((LOWORD(wParam)==IDC_LOGIN || LOWORD(wParam)==IDC_PASSWORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return 0;
+ if ((LOWORD(wParam)==IDC_LOGIN || LOWORD(wParam)==IDC_PASSWORD) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
@@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
break;
}
- if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus()) ) return(FALSE);
+ if ((LOWORD(wParam)==IDC_SERVER || LOWORD(wParam)==IDC_SERVERPORT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return(FALSE);
SendMessage(GetParent(hWndDlg),PSM_CHANGED,0,0);
break;
case WM_NOTIFY:
diff --git a/protocols/MRA/Mra_svcs.cpp b/protocols/MRA/Mra_svcs.cpp
index cb194fb575..896d33ae82 100644
--- a/protocols/MRA/Mra_svcs.cpp
+++ b/protocols/MRA/Mra_svcs.cpp
@@ -983,7 +983,7 @@ INT_PTR MraSetListeningTo(WPARAM wParam,LPARAM lParam)
{
LISTENINGTOINFO *pliInfo=(LISTENINGTOINFO*)lParam;
- if ( pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO) )
+ if ( pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO))
{
MraSendCommand_ChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC,NULL,0,0);
DB_Mra_DeleteValue(NULL,DBSETTING_BLOGSTATUSMUSIC);
@@ -1744,7 +1744,7 @@ INT_PTR MraAddToListByEvent(WPARAM wParam,LPARAM lParam)
LPSTR lpszRequestReason;
MRA_LPS lpsEMail,lpsNick,lpsFirstName,lpsLastName;
- lpsNick.lpszData=(LPSTR)(dbei.pBlob+ ((dbei.eventType==EVENTTYPE_AUTHREQUEST)?(sizeof(DWORD)*2):0) );
+ lpsNick.lpszData=(LPSTR)(dbei.pBlob+ ((dbei.eventType==EVENTTYPE_AUTHREQUEST)?(sizeof(DWORD)*2):0));
lpsNick.dwSize=lstrlenA(lpsNick.lpszData);
lpsFirstName.lpszData=lpsNick.lpszData+lpsNick.dwSize+1;
lpsFirstName.dwSize=lstrlenA(lpsFirstName.lpszData);
diff --git a/protocols/MRA/Readme_MRA.txt b/protocols/MRA/Readme_MRA.txt
index a0904565a9..d94ee81399 100644
--- a/protocols/MRA/Readme_MRA.txt
+++ b/protocols/MRA/Readme_MRA.txt
@@ -330,7 +330,7 @@ Version 1.8.0.27 // 2007.02.24
Version 1.8.0.25 // 2007.02.20
- Èïîëüçóþòñÿ íîâûå ñåðâèñû ìèðàíäû (ìèíèìóì 0.6.0.100 âåðñèÿ)
- Óëó÷øåíà ðàáîòà ñ ñåòüþ: äîáàâëåíû òàéìàóòû îïåðàöèé
- - Äîáàâëåíà ïîääåðæêà èãð (ñîáåñåäíèê ïîëó÷àåò îòêàç àâòîìàòè÷åñêè :) )
+ - Äîáàâëåíà ïîääåðæêà èãð (ñîáåñåäíèê ïîëó÷àåò îòêàç àâòîìàòè÷åñêè :))
- Äîáàâëåíû óâåäîìëåíèÿ, â òîì ÷èñëå çàòðàãèâàþùèå íåâèäèìîñòü
- Äîáàâëåíà îïöèÿ: Smart RTF - Óìíàÿ îòïðàâêà (òîëüêî åñëè êëèåíò ïîíèìàåò RTF)
- Äîáàâëåíû êîäû è ïîäðîáíûå îïèñàíèÿ îøèáîê
diff --git a/protocols/MSN/msn_proto.cpp b/protocols/MSN/msn_proto.cpp
index 10d2ba701d..d10a5b2905 100644
--- a/protocols/MSN/msn_proto.cpp
+++ b/protocols/MSN/msn_proto.cpp
@@ -86,11 +86,8 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
CreateProtoService(MSN_GETUNREAD_EMAILCOUNT, &CMsnProto::GetUnreadEmailCount);
- // service to get from protocol chat buddy info
-// CreateProtoService(MS_GC_PROTO_GETTOOLTIPTEXT, &CMsnProto::GCGetToolTipText);
-
+ // event hooks
HookProtoEvent(ME_MSG_WINDOWPOPUP, &CMsnProto::OnWindowPopup);
-// HookProtoEvent(ME_MSG_WINDOWEVENT, &CMsnProto::OnWindowEvent);
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMsnProto::OnGroupChange);
HookProtoEvent(ME_OPT_INITIALISE, &CMsnProto::OnOptionsInit);
HookProtoEvent(ME_CLIST_DOUBLECLICKED, &CMsnProto::OnContactDoubleClicked);
@@ -106,7 +103,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
deleteSetting(hContact, "IdleTS");
deleteSetting(hContact, "p2pMsgId");
deleteSetting(hContact, "AccList");
-// DBDeleteContactSetting(hContact, "CList", "StatusMsg");
}
hContact = (HANDLE)MSN_CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact, 0);
}
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp
index 27c6dce34f..cad76293e0 100644
--- a/protocols/NewsAggregator/Src/Utils.cpp
+++ b/protocols/NewsAggregator/Src/Utils.cpp
@@ -322,7 +322,7 @@ time_t __stdcall DateToUnixTime(TCHAR* stamp, BOOL FeedType)
// skip '-' chars
int si = 0, sj = 0;
while (1) {
- if ( p[si] == _T('-') )
+ if ( p[si] == _T('-'))
si++;
else
if ( !( p[sj++] = p[si++] ))
diff --git a/protocols/Omegle/chat.cpp b/protocols/Omegle/chat.cpp
index b69a41bf50..7b16ccdfc3 100644
--- a/protocols/Omegle/chat.cpp
+++ b/protocols/Omegle/chat.cpp
@@ -106,7 +106,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
if (params.empty()) {
// Load last question
DBVARIANT dbv;
- if ( !getU8String( OMEGLE_KEY_LAST_QUESTION,&dbv ) ) {
+ if ( !getU8String( OMEGLE_KEY_LAST_QUESTION,&dbv )) {
params = dbv.pszVal;
DBFreeVariant(&dbv);
}
@@ -119,7 +119,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
// Save actual question as last question
if (strlen(params.c_str()) >= OMEGLE_QUESTION_MIN_LENGTH)
{
- setU8String( OMEGLE_KEY_LAST_QUESTION, params.c_str() );
+ setU8String( OMEGLE_KEY_LAST_QUESTION, params.c_str());
}
}
@@ -137,7 +137,7 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam)
else if (!stricmp(command.c_str(), "asl"))
{
DBVARIANT dbv;
- if ( !getU8String( OMEGLE_KEY_ASL,&dbv ) ) {
+ if ( !getU8String( OMEGLE_KEY_ASL,&dbv )) {
text = dbv.pszVal;
DBFreeVariant(&dbv);
} else {
@@ -299,10 +299,10 @@ int OmegleProto::OnJoinChat(WPARAM,LPARAM suppress)
gcd.iType = GC_EVENT_ADDGROUP;
gce.ptszStatus = _T("Admin");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
gce.ptszStatus = _T("Normal");
- CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce) );
+ CallServiceSync( MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
SetTopic();
@@ -367,7 +367,7 @@ void OmegleProto::SetChatStatus(int status)
// Load actual name from database
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, m_szModuleName, OMEGLE_KEY_NAME, &dbv) )
+ if ( !DBGetContactSettingTString(NULL, m_szModuleName, OMEGLE_KEY_NAME, &dbv))
{
facy.nick_ = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/communication.cpp b/protocols/Omegle/communication.cpp
index fc3f12d5e0..4177eeae77 100644
--- a/protocols/Omegle/communication.cpp
+++ b/protocols/Omegle/communication.cpp
@@ -237,8 +237,8 @@ std::string Omegle_client::choose_action( int request_type, std::string* data, s
std::string Omegle_client::choose_request_url( int request_type, std::string* data, std::string* get_data )
{
std::string url = "";
- url.append( choose_server( request_type, data, get_data ) );
- url.append( choose_action( request_type, data, get_data ) );
+ url.append( choose_server( request_type, data, get_data ));
+ url.append( choose_action( request_type, data, get_data ));
return url;
}
@@ -263,7 +263,7 @@ NETLIBHTTPHEADER* Omegle_client::get_request_headers( int request_type, int* hea
break;
}
- NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ) );
+ NETLIBHTTPHEADER* headers = ( NETLIBHTTPHEADER* )utils::mem::allocate( sizeof( NETLIBHTTPHEADER )*( *headers_count ));
switch ( request_type )
{
@@ -300,7 +300,7 @@ void Omegle_client::store_headers( http::response* resp, NETLIBHTTPHEADER* heade
std::string header_value = headers[i].szValue;
// TODO RM: (un)comment
- //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str() );
+ //parent->Log("----- Got header '%s': %s", header_name.c_str(), header_value.c_str());
resp->headers[header_name] = header_value;
}
}
@@ -330,7 +330,7 @@ bool Omegle_client::start()
data += DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_REUSE_QUESTION, 0) ? "1" : "0";
}
}
- else if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_MEET_COMMON, 0) )
+ else if ( DBGetContactSettingByte(NULL, parent->m_szModuleName, OMEGLE_KEY_MEET_COMMON, 0))
{
DBVARIANT dbv;
if (!DBGetContactSettingUTF8String(NULL, parent->m_szModuleName, OMEGLE_KEY_INTERESTS, &dbv))
@@ -404,7 +404,7 @@ bool Omegle_client::start()
case HTTP_CODE_FAKE_DISCONNECTED:
{
// If is is only timeout error, try login once more
- if ( handle_error( "start" ) )
+ if ( handle_error( "start" ))
return start();
else
return false;
@@ -429,7 +429,7 @@ bool Omegle_client::start()
bool Omegle_client::stop( )
{
- if ( parent->isOffline() )
+ if ( parent->isOffline())
return true;
handle_entry( "stop" );
@@ -498,7 +498,7 @@ bool Omegle_client::events( )
// We got info about count of connected people there
pos += 9;
- std::string count = utils::text::trim( resp.data.substr(pos, resp.data.find("]", pos) - pos) );
+ std::string count = utils::text::trim( resp.data.substr(pos, resp.data.find("]", pos) - pos));
char str[255];
mir_snprintf(str, sizeof(str), Translate("On whole Omegle are %s strangers online now."), count.c_str());
@@ -543,7 +543,7 @@ bool Omegle_client::events( )
std::string question = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
TCHAR *msg = mir_a2t_cp(question.c_str(),CP_UTF8);
parent->SetTopic(msg);
@@ -571,7 +571,7 @@ bool Omegle_client::events( )
std::string message = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
if (state_ == STATE_ACTIVE) {
TCHAR *msg = mir_a2t_cp(message.c_str(),CP_UTF8);
@@ -592,7 +592,7 @@ bool Omegle_client::events( )
message = utils::text::trim(
utils::text::special_expressions_decode(
- utils::text::slashu_to_utf8( message ) ) );
+ utils::text::slashu_to_utf8( message )) );
stranger = Translate(stranger.c_str());
@@ -623,7 +623,7 @@ bool Omegle_client::events( )
std::string stranger = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
char str[255];
mir_snprintf(str, sizeof(str), Translate("%s disconnected."), Translate(stranger.c_str()));
@@ -659,7 +659,7 @@ bool Omegle_client::events( )
std::string error = utils::text::trim(
utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(
- resp.data.substr(pos, resp.data.find("\"]", pos) - pos) ) ) );
+ resp.data.substr(pos, resp.data.find("\"]", pos) - pos) )) );
error = Translate("Error: ") + error;
@@ -670,9 +670,9 @@ bool Omegle_client::events( )
if (newStranger && state_ != STATE_SPY) {
// We got new stranger in this event, lets say him "Hi message" if enabled
- if ( DBGetContactSettingByte( NULL, parent->m_szModuleName, OMEGLE_KEY_HI_ENABLED, 0 ) ) {
+ if ( DBGetContactSettingByte( NULL, parent->m_szModuleName, OMEGLE_KEY_HI_ENABLED, 0 )) {
DBVARIANT dbv;
- if ( !DBGetContactSettingUTF8String( NULL, parent->m_szModuleName, OMEGLE_KEY_HI, &dbv ) ) {
+ if ( !DBGetContactSettingUTF8String( NULL, parent->m_szModuleName, OMEGLE_KEY_HI, &dbv )) {
std::string *message = new std::string(dbv.pszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/connection.cpp b/protocols/Omegle/connection.cpp
index f5c3b9d6b6..1ce07385d9 100644
--- a/protocols/Omegle/connection.cpp
+++ b/protocols/Omegle/connection.cpp
@@ -34,7 +34,7 @@ void OmegleProto::SignOn(void*)
m_iStatus = m_iDesiredStatus;
ProtoBroadcastAck(m_szModuleName,0,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)old_status,m_iStatus);
- setDword( "LogonTS", (DWORD)time(NULL) );
+ setDword( "LogonTS", (DWORD)time(NULL));
ClearChat();
OnJoinChat(0,false);
@@ -167,9 +167,9 @@ void OmegleProto::EventsLoop(void *)
time_t tim = ::time(NULL);
LOG( ">>>>> Entering Omegle::EventsLoop[%d]", tim );
- while ( facy.events() )
+ while ( facy.events())
{
- if ( facy.state_ == STATE_INACTIVE || facy.state_ == STATE_DISCONNECTING || !isOnline() )
+ if ( facy.state_ == STATE_INACTIVE || facy.state_ == STATE_DISCONNECTING || !isOnline())
break;
LOG( "***** OmegleProto::EventsLoop[%d] refreshing...", tim );
}
diff --git a/protocols/Omegle/dialogs.cpp b/protocols/Omegle/dialogs.cpp
index c96f46dffa..8045ea2e43 100644
--- a/protocols/Omegle/dialogs.cpp
+++ b/protocols/Omegle/dialogs.cpp
@@ -39,7 +39,7 @@ static BOOL StoreDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const ch
static void LoadDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting)
{
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, ppro->m_szModuleName, szSetting, &dbv) )
+ if ( !DBGetContactSettingTString(NULL, ppro->m_szModuleName, szSetting, &dbv))
{
SetDlgItemText(hwnd, idCtrl, dbv.ptszVal);
DBFreeVariant(&dbv);
diff --git a/protocols/Omegle/main.cpp b/protocols/Omegle/main.cpp
index aa34e0eeaf..14a5cb4426 100644
--- a/protocols/Omegle/main.cpp
+++ b/protocols/Omegle/main.cpp
@@ -97,7 +97,7 @@ static int protoUninit(PROTO_INTERFACE* proto)
int OnModulesLoaded(WPARAM,LPARAM)
{
- if ( ServiceExists( MS_UPDATE_REGISTER ) )
+ if ( ServiceExists( MS_UPDATE_REGISTER ))
{
Update upd = {sizeof(upd)};
char curr_version[30];
@@ -113,7 +113,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
#else
upd.szBetaUpdateURL = "http://robyer.info/stahni/omegle.zip";
#endif
- upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>(CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -132,7 +132,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/protocols/Omegle/messages.cpp b/protocols/Omegle/messages.cpp
index 7d2418f3e6..b90ff67579 100644
--- a/protocols/Omegle/messages.cpp
+++ b/protocols/Omegle/messages.cpp
@@ -86,7 +86,7 @@ int OmegleProto::SendMsg(HANDLE hContact, int flags, const char *msg)
msg = mir_utf8encode(msg);
facy.msgid_ = (facy.msgid_ % 1024)+1;
- ForkThread( &OmegleProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_) );
+ ForkThread( &OmegleProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_));
return facy.msgid_;*/
return 0;
}
diff --git a/protocols/Omegle/proto.cpp b/protocols/Omegle/proto.cpp
index b91cc72f23..51e4bdf599 100644
--- a/protocols/Omegle/proto.cpp
+++ b/protocols/Omegle/proto.cpp
@@ -61,9 +61,9 @@ OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username)
facy.set_handle(m_hNetlibUser);
- SkinAddNewSoundExT( "StrangerTyp", m_tszUserName, LPGENT( "Stranger typing" ) );
- SkinAddNewSoundExT( "StrangerTypStop", m_tszUserName, LPGENT( "Stranger stopped typing" ) );
- SkinAddNewSoundExT( "StrangerChange", m_tszUserName, LPGENT( "Changing stranger" ) );
+ SkinAddNewSoundExT( "StrangerTyp", m_tszUserName, LPGENT( "Stranger typing" ));
+ SkinAddNewSoundExT( "StrangerTypStop", m_tszUserName, LPGENT( "Stranger stopped typing" ));
+ SkinAddNewSoundExT( "StrangerChange", m_tszUserName, LPGENT( "Changing stranger" ));
}
OmegleProto::~OmegleProto( )
@@ -245,7 +245,7 @@ int OmegleProto::OnContactDeleted(WPARAM wparam,LPARAM)
/*bool OmegleProto::IsMyContact(HANDLE hContact, bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if ( proto && strcmp(m_szModuleName,proto) == 0 )
{
diff --git a/protocols/Omegle/theme.cpp b/protocols/Omegle/theme.cpp
index 740d16277e..73ef80a46c 100644
--- a/protocols/Omegle/theme.cpp
+++ b/protocols/Omegle/theme.cpp
@@ -95,7 +95,7 @@ HANDLE GetIconHandle(const char* name)
static OmegleProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if (!proto)
return 0;
diff --git a/protocols/Omegle/utils.cpp b/protocols/Omegle/utils.cpp
index 975ab7df4c..f524dcfba1 100644
--- a/protocols/Omegle/utils.cpp
+++ b/protocols/Omegle/utils.cpp
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string utils::url::encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
@@ -36,7 +36,7 @@ void utils::text::replace_first( std::string* data, std::string from, std::strin
{
std::string::size_type position = 0;
- if ( ( position = data->find(from, position) ) != std::string::npos )
+ if ( ( position = data->find(from, position)) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -47,7 +47,7 @@ void utils::text::replace_all( std::string* data, std::string from, std::string
{
std::string::size_type position = 0;
- while ( ( position = data->find( from, position ) ) != std::string::npos )
+ while ( ( position = data->find( from, position )) != std::string::npos )
{
data->replace( position, from.size(), to );
position++;
@@ -77,14 +77,14 @@ std::string utils::text::slashu_to_utf8( std::string data )
if ( udn >= 128 && udn <= 2047 )
{ // U+0080 .. U+07FF
- new_string += ( char )( 192 + ( udn / 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 192 + ( udn / 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn >= 2048 && udn <= 65535 )
{ // U+0800 .. U+FFFF
- new_string += ( char )( 224 + ( udn / 4096 ) );
- new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ) );
- new_string += ( char )( 128 + ( udn % 64 ) );
+ new_string += ( char )( 224 + ( udn / 4096 ));
+ new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ));
+ new_string += ( char )( 128 + ( udn % 64 ));
}
else if ( udn <= 127 )
{ // U+0000 .. U+007F (should not appear)
@@ -115,7 +115,7 @@ int utils::debug::log(std::string file_name, std::string text)
char szFile[MAX_PATH];
GetModuleFileNameA(g_hInstance, szFile, SIZEOF(szFile));
std::string path = szFile;
- path = path.substr( 0, path.rfind( "\\" ) );
+ path = path.substr( 0, path.rfind( "\\" ));
path = path.substr( 0, path.rfind( "\\" ) + 1 );
path = path + file_name.c_str() + ".txt";
diff --git a/protocols/Twitter/chat.cpp b/protocols/Twitter/chat.cpp
index d00261b41d..f430bdf5d0 100644
--- a/protocols/Twitter/chat.cpp
+++ b/protocols/Twitter/chat.cpp
@@ -44,7 +44,7 @@ void TwitterProto::UpdateChat(const twitter_user &update)
DBVARIANT nick;
HANDLE hContact = UsernameToHContact(update.username.c_str());
- if(hContact && !DBGetContactSettingString(hContact,"CList","MyHandle",&nick) )
+ if(hContact && !DBGetContactSettingString(hContact,"CList","MyHandle",&nick))
{
gce.ptszNick = mir_a2t(nick.pszVal);
DBFreeVariant(&nick);
@@ -88,7 +88,7 @@ int TwitterProto::OnChatOutgoing(WPARAM wParam,LPARAM lParam)
case GC_USER_PRIVMESS:
text = mir_t2a(hook->ptszUID);
CallService(MS_MSG_SENDMESSAGE,reinterpret_cast<WPARAM>(
- UsernameToHContact(text) ),0);
+ UsernameToHContact(text)),0);
mir_free(text);
break;
}
@@ -205,16 +205,16 @@ void TwitterProto::SetChatStatus(int status)
// Add all friends to contact list
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT uid,nick;
- if( DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&uid) )
+ if( DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&uid))
continue;
- if( !DBGetContactSettingString(hContact,"CList","MyHandle",&nick) )
+ if( !DBGetContactSettingString(hContact,"CList","MyHandle",&nick))
AddChatContact(uid.pszVal,nick.pszVal);
else
AddChatContact(uid.pszVal);
diff --git a/protocols/Twitter/connection.cpp b/protocols/Twitter/connection.cpp
index 02d2244081..3a91be3243 100644
--- a/protocols/Twitter/connection.cpp
+++ b/protocols/Twitter/connection.cpp
@@ -135,7 +135,7 @@ bool TwitterProto::NegotiateConnection()
}
- if((oauthToken.size() <= 1) || (oauthTokenSecret.size() <= 1) ) {
+ if((oauthToken.size() <= 1) || (oauthTokenSecret.size() <= 1)) {
// first, reset all the keys so we can start fresh
resetOAuthKeys();
LOG( _T("**NegotiateConnection - Reset OAuth Keys"));
@@ -294,7 +294,7 @@ bool TwitterProto::NegotiateConnection()
}
}
-/* if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_PASS,&dbv) ) {
+/* if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_PASS,&dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
pass = dbv.pszVal;
@@ -305,7 +305,7 @@ bool TwitterProto::NegotiateConnection()
return false;
}*/
- if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_BASEURL,&dbv))
{
ScopedLock s(twitter_lock_);
twit_.set_base_url(dbv.pszVal);
@@ -423,7 +423,7 @@ void TwitterProto::UpdateAvatarWorker(void *p)
{
if(p == 0)
return;
- std::auto_ptr<update_avatar> data( static_cast<update_avatar*>(p) );
+ std::auto_ptr<update_avatar> data( static_cast<update_avatar*>(p));
DBVARIANT dbv;
if(DBGetContactSettingTString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
@@ -472,7 +472,7 @@ void TwitterProto::UpdateAvatar(HANDLE hContact,const std::string &url,bool forc
if( !force &&
( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_AV_URL,&dbv) &&
- url == dbv.pszVal) )
+ url == dbv.pszVal))
{
LOG( _T("***** Avatar already up-to-date: %s"), url.c_str());
}
@@ -527,7 +527,7 @@ void TwitterProto::UpdateFriends()
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating friends list, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating friends list: %s"), e.what());
}
@@ -554,7 +554,7 @@ void TwitterProto::ShowContactPopup(HANDLE hContact,const std::string &text)
DBVARIANT dbv;
if( !DBGetContactSettingString(hContact,"CList","MyHandle",&dbv) ||
- !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
mbcs_to_tcs(CP_UTF8,dbv.pszVal,popup.lptzContactName,MAX_CONTACTNAME);
DBFreeVariant(&dbv);
@@ -623,7 +623,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg)
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating status messages, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating status messages: %s"), e.what());
}
}
@@ -675,7 +675,7 @@ void TwitterProto::UpdateMessages(bool pre_read)
catch(const std::exception &e)
{
ShowPopup( (std::string("While updating direct messages, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error updating direct messages: %s"), e.what());
}
}
diff --git a/protocols/Twitter/contacts.cpp b/protocols/Twitter/contacts.cpp
index a2245c021a..ec75795694 100644
--- a/protocols/Twitter/contacts.cpp
+++ b/protocols/Twitter/contacts.cpp
@@ -61,7 +61,7 @@ void TwitterProto::UpdateInfoWorker(void *hContact)
std::string username;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
username = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -129,7 +129,7 @@ void TwitterProto::DoSearch(void *p)
catch(const std::exception &e)
{
ShowPopup( (std::string("While searching for contacts, an error occurred: ")
- +e.what()).c_str() );
+ +e.what()).c_str());
LOG( _T("***** Error searching for contacts: %s"), e.what());
}
@@ -195,7 +195,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
return 0;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
if(in_chat_)
DeleteChatContact(dbv.pszVal);
@@ -212,7 +212,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
bool TwitterProto::IsMyContact(HANDLE hContact,bool include_chat)
{
const char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(proto && strcmp(m_szModuleName,proto) == 0)
{
@@ -229,13 +229,13 @@ HANDLE TwitterProto::UsernameToHContact(const char *name)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
if(strcmp(name,dbv.pszVal) == 0)
{
@@ -274,7 +274,7 @@ HANDLE TwitterProto::AddToClientList(const char *name,const char *status)
DBWriteContactSettingString (hContact,m_szModuleName,"Homepage",url.c_str());
DBVARIANT dbv;
- if( !DBGetContactSettingTString(NULL,m_szModuleName,TWITTER_KEY_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(NULL,m_szModuleName,TWITTER_KEY_GROUP,&dbv))
{
DBWriteContactSettingTString(hContact,"CList","Group",dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -294,7 +294,7 @@ void TwitterProto::SetAllContactStatuses(int status)
{
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact))
continue;
diff --git a/protocols/Twitter/http.cpp b/protocols/Twitter/http.cpp
index ef295f4ab0..877399cc11 100644
--- a/protocols/Twitter/http.cpp
+++ b/protocols/Twitter/http.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string http::url_encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(s.c_str())));
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp
index 1aeac73b83..2c3c663156 100644
--- a/protocols/Twitter/main.cpp
+++ b/protocols/Twitter/main.cpp
@@ -109,7 +109,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
upd.cpbBetaVersionPrefix = (int)strlen(reinterpret_cast<char*>(upd.pbBetaVersionPrefix));
upd.szBetaUpdateURL = "http://twosx.net/mim/twitter/updater/twitter.zip";
- upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPluginEx(&pluginInfo,curr_version) );
+ upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPluginEx(&pluginInfo,curr_version));
upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
@@ -129,7 +129,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
- MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)) );
+ MS_CLIST_RETRIEVE_INTERFACE,0,reinterpret_cast<LPARAM>(g_hInstance)));
PROTOCOLDESCRIPTOR pd = {sizeof(pd)};
pd.szName = "Twitter";
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp
index 60f802d77c..d81fe8163c 100644
--- a/protocols/Twitter/proto.cpp
+++ b/protocols/Twitter/proto.cpp
@@ -167,7 +167,7 @@ void TwitterProto::SendSuccess(void *p)
send_direct *data = static_cast<send_direct*>(p);
DBVARIANT dbv;
- if( !DBGetContactSettingString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(data->hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
ScopedLock s(twitter_lock_);
twit_.send_direct(dbv.pszVal,data->msg);
@@ -283,7 +283,7 @@ int TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM lParam)
(HWND)0,tweet_proc,reinterpret_cast<LPARAM>(this));
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
SendMessage(hDlg,WM_SETREPLY,reinterpret_cast<WPARAM>(dbv.pszVal),0);
DBFreeVariant(&dbv);
@@ -299,7 +299,7 @@ int TwitterProto::VisitHomepage(WPARAM wParam,LPARAM lParam)
HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
DBVARIANT dbv;
- if( !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,"Homepage",&dbv))
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>(dbv.pszVal));
DBFreeVariant(&dbv);
@@ -307,7 +307,7 @@ int TwitterProto::VisitHomepage(WPARAM wParam,LPARAM lParam)
else
{
// TODO: remove this
- if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(hContact,m_szModuleName,TWITTER_KEY_UN,&dbv))
{
std::string url = profile_base_url(twit_.get_base_url())+
http::url_encode(dbv.pszVal);
@@ -560,7 +560,7 @@ void TwitterProto::UpdateSettings()
for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
hContact;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0) )
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{
if(!IsMyContact(hContact,true))
continue;
diff --git a/protocols/Twitter/theme.cpp b/protocols/Twitter/theme.cpp
index d6f0be38bb..f17e7d700a 100644
--- a/protocols/Twitter/theme.cpp
+++ b/protocols/Twitter/theme.cpp
@@ -104,7 +104,7 @@ static HANDLE g_hMenuEvts[3];
static TwitterProto * GetInstanceByHContact(HANDLE hContact)
{
char *proto = reinterpret_cast<char*>( CallService(MS_PROTO_GETCONTACTBASEPROTO,
- reinterpret_cast<WPARAM>(hContact),0) );
+ reinterpret_cast<WPARAM>(hContact),0));
if(!proto)
return 0;
diff --git a/protocols/Twitter/twitter.cpp b/protocols/Twitter/twitter.cpp
index ff260f9fbd..b9a6c7242b 100644
--- a/protocols/Twitter/twitter.cpp
+++ b/protocols/Twitter/twitter.cpp
@@ -65,14 +65,14 @@ static T retrieve(const js::object &o,const std::string &key,bool allow_null = f
js::object::const_iterator i = o.find(key);
if(i == o.end())
- throw std::exception( ("unable to retrieve key '"+key+"'").c_str() );
+ throw std::exception( ("unable to retrieve key '"+key+"'").c_str());
try
{
return cast_and_decode<T>(*i->second,allow_null);
}
catch(const boost::bad_any_cast &)
{
- throw std::exception( ("unable to cast key '"+key+"' to target type").c_str() );
+ throw std::exception( ("unable to cast key '"+key+"' to target type").c_str());
}
}
@@ -128,7 +128,7 @@ std::vector<twitter_user> twitter::get_friends()
if(resp.code != 200)
throw bad_response();
- const js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ const js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -173,7 +173,7 @@ bool twitter::get_info(const std::string &name,twitter_user *info)
if(resp.code != 200)
throw bad_response();
- const js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ const js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() == typeid(js::object))
{
const js::object &user_info = boost::any_cast<js::object>(*var);
@@ -201,7 +201,7 @@ bool twitter::get_info_by_email(const std::string &email,twitter_user *info)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() == typeid(js::object))
{
const js::object &user_info = boost::any_cast<js::object>(*var);
@@ -227,7 +227,7 @@ twitter_user twitter::add_friend(const std::string &name)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::object))
throw std::exception("unable to parse response");
@@ -293,7 +293,7 @@ std::vector<twitter_user> twitter::get_statuses(int count,twitter_id id)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -347,7 +347,7 @@ std::vector<twitter_user> twitter::get_direct(twitter_id id)
if(resp.code != 200)
throw bad_response();
- js::variant var = json::parse( resp.data.begin(),resp.data.end() );
+ js::variant var = json::parse( resp.data.begin(),resp.data.end());
if(var->type() != typeid(js::array))
throw std::exception("unable to parse response");
@@ -392,7 +392,7 @@ string twitter::urlencode(const string &c)
else
{
escaped.append("%");
- escaped.append( char2hex(c[i]) );//converts char 255 to string "FF"
+ escaped.append( char2hex(c[i]));//converts char 255 to string "FF"
}
}
return escaped;
diff --git a/protocols/Twitter/twitter.h b/protocols/Twitter/twitter.h
index 54baa768f7..10c1115967 100644
--- a/protocols/Twitter/twitter.h
+++ b/protocols/Twitter/twitter.h
@@ -101,7 +101,7 @@ public:
protected:
virtual http::response slurp(const std::string &,http::method,
- OAuthParameters postParams = OAuthParameters() ) = 0;
+ OAuthParameters postParams = OAuthParameters()) = 0;
std::string username_;
std::string password_;
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp
index 872d5feb1e..149c0b2780 100644
--- a/protocols/Twitter/ui.cpp
+++ b/protocols/Twitter/ui.cpp
@@ -42,7 +42,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
DBVARIANT dbv;
- if( !DBGetContactSettingTString(0,proto->ModuleName(),TWITTER_KEY_GROUP,&dbv) )
+ if( !DBGetContactSettingTString(0,proto->ModuleName(),TWITTER_KEY_GROUP,&dbv))
{
SetDlgItemText(hwndDlg,IDC_GROUP,dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -52,13 +52,13 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
SetDlgItemText(hwndDlg,IDC_GROUP,L"Twitter");
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_USERNAME,dbv.pszVal);
DBFreeVariant(&dbv);
}
- /*if ( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv) )
+ /*if ( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -71,7 +71,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
SendDlgItemMessage(hwndDlg,IDC_SERVER,CB_ADDSTRING,0,
reinterpret_cast<LPARAM>(sites[i]));
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_SERVER,dbv.pszVal);
DBFreeVariant(&dbv);
@@ -86,7 +86,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
if(LOWORD(wParam) == IDC_NEWACCOUNTLINK)
{
CallService(MS_UTILS_OPENURL,1,reinterpret_cast<LPARAM>
- ("http://twitter.com/signup") );
+ ("http://twitter.com/signup"));
return true;
}
@@ -218,13 +218,13 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
proto = reinterpret_cast<TwitterProto*>(lParam);
DBVARIANT dbv;
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_UN,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_UN,dbv.pszVal);
DBFreeVariant(&dbv);
}
- /*if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv) )
+ /*if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_PASS,&dbv))
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv.pszVal)+1,
reinterpret_cast<LPARAM>(dbv.pszVal));
@@ -241,7 +241,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
reinterpret_cast<LPARAM>(sites[i]));
}
- if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv) )
+ if( !DBGetContactSettingString(0,proto->ModuleName(),TWITTER_KEY_BASEURL,&dbv))
{
SetDlgItemTextA(hwndDlg,IDC_BASEURL,dbv.pszVal);
DBFreeVariant(&dbv);
@@ -253,7 +253,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
char pollrate_str[32];
mir_snprintf(pollrate_str,sizeof(pollrate_str),"%d",
- DBGetContactSettingDword(0,proto->ModuleName(),TWITTER_KEY_POLLRATE,80) );
+ DBGetContactSettingDword(0,proto->ModuleName(),TWITTER_KEY_POLLRATE,80));
SetDlgItemTextA(hwndDlg,IDC_POLLRATE,pollrate_str);
CheckDlgButton(hwndDlg,IDC_TWEET_MSG,DBGetContactSettingByte(0,
@@ -440,9 +440,9 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
proto = reinterpret_cast<TwitterProto*>(lParam);
CheckAndUpdateDlgButton(hwndDlg,IDC_SHOWPOPUPS,
- db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0) );
+ db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,0));
CheckDlgButton(hwndDlg,IDC_NOSIGNONPOPUPS,
- !db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0) );
+ !db_byte_get(0,proto->ModuleName(),TWITTER_KEY_POPUP_SIGNON,0));
// ***** Get color information
@@ -491,7 +491,7 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
{
case IDC_SHOWPOPUPS:
EnableWindow(GetDlgItem(hwndDlg,IDC_NOSIGNONPOPUPS),
- IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS) );
+ IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS));
break;
case IDC_COL_CUSTOM:
diff --git a/protocols/Twitter/utility.cpp b/protocols/Twitter/utility.cpp
index 3b98944bba..090bfebf09 100644
--- a/protocols/Twitter/utility.cpp
+++ b/protocols/Twitter/utility.cpp
@@ -132,7 +132,7 @@ http::response mir_twitter::slurp(const std::string &url,http::method meth,
http::response resp_data;
LOG("**SLURP - just before calling HTTPTRANSACTION");
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(handle_), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(handle_), reinterpret_cast<LPARAM>(&req)));
LOG("**SLURP - HTTPTRANSACTION complete.");
if(resp)
{
@@ -182,7 +182,7 @@ bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename
req.szUrl = const_cast<char*>(url.c_str());
resp = reinterpret_cast<NETLIBHTTPREQUEST*>(CallService( MS_NETLIB_HTTPTRANSACTION,
- reinterpret_cast<WPARAM>(hNetlib), reinterpret_cast<LPARAM>(&req) ));
+ reinterpret_cast<WPARAM>(hNetlib), reinterpret_cast<LPARAM>(&req)));
if (resp)
{
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp
index ad51c93a01..6fc059caa6 100644
--- a/protocols/Weather/weather.cpp
+++ b/protocols/Weather/weather.cpp
@@ -280,8 +280,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
DBWriteContactSettingString(NULL, "KnownModules", "Weather Protocol", "Weather,WeatherCondition,Current");
// add sound event
- SkinAddNewSound("weatherupdated", Translate("Weather Condition Changed"), "");
- SkinAddNewSound("weatheralert", Translate("Weather Alert Issued"), "");
+ SkinAddNewSoundEx("weatherupdated", NULL, LPGEN("Weather Condition Changed"));
+ SkinAddNewSoundEx("weatheralert", NULL, LPGEN("Weather Alert Issued"));
// window needed for popup commands
TCHAR SvcFunc[100];
diff --git a/protocols/YAMN/browser/mailbrowser.cpp b/protocols/YAMN/browser/mailbrowser.cpp
index 82f4d7eac0..02766e983c 100644
--- a/protocols/YAMN/browser/mailbrowser.cpp
+++ b/protocols/YAMN/browser/mailbrowser.cpp
@@ -405,7 +405,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags)
if ( (nflags & YAMN_ACC_POP) &&
(ActualAccount->Flags & YAMN_ACC_POPN) &&
- (MN.Real.PopUpNC+MN.Virtual.PopUpNC) ) //if some popups with mails are needed to show
+ (MN.Real.PopUpNC+MN.Virtual.PopUpNC)) //if some popups with mails are needed to show
RunPopUps=TRUE;
else RunPopUps=FALSE;
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp
index 184fe0e3e1..e876465609 100644
--- a/protocols/YAMN/main.cpp
+++ b/protocols/YAMN/main.cpp
@@ -54,22 +54,6 @@ PLUGININFOEX pluginInfo = {
};
-SKINSOUNDDESC NewMailSound =
-{
- sizeof(SKINSOUNDDESC),
- YAMN_NEWMAILSOUND, //name to refer to sound when playing and in db
- YAMN_NEWMAILSNDDESC, //description for options dialog
- "", //default sound file to use, without path
-};
-
-SKINSOUNDDESC ConnectFailureSound =
-{
- sizeof(SKINSOUNDDESC),
- YAMN_CONNECTFAILSOUND, //name to refer to sound when playing and in db
- YAMN_CONNECTFAILSNDDESC, //description for options dialog
- "", //default sound file to use, without path
-};
-
HANDLE hNewMailHook;
HANDLE NoWriterEV;
HANDLE hTTButton, hTButton;
@@ -468,9 +452,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
if (NULL == (ExitEV = CreateEvent(NULL, TRUE, FALSE, NULL)))
return 1;
- NewMailSound.pszDescription = Translate(YAMN_NEWMAILSNDDESC);
- ConnectFailureSound.pszDescription = Translate(YAMN_CONNECTFAILSNDDESC);
-
PosX = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBPOSX, 0);
PosY = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBPOSY, 0);
SizeX = DBGetContactSettingDword(NULL, YAMN_DBMODULE, YAMN_DBSIZEX, 800);
@@ -498,8 +479,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
CreateServiceFunctions();
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&NewMailSound);
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ConnectFailureSound);
+ SkinAddNewSoundEx(YAMN_NEWMAILSOUND, YAMN_DBMODULE, YAMN_NEWMAILSNDDESC);
+ SkinAddNewSoundEx(YAMN_CONNECTFAILSOUND, YAMN_DBMODULE, YAMN_CONNECTFAILSNDDESC);
HookEvents();
diff --git a/protocols/YAMN/proto/pop3/pop3comm.cpp b/protocols/YAMN/proto/pop3/pop3comm.cpp
index dcd38ee2c8..f3120096bf 100644
--- a/protocols/YAMN/proto/pop3/pop3comm.cpp
+++ b/protocols/YAMN/proto/pop3/pop3comm.cpp
@@ -590,7 +590,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp)
DebugLog(CommFile,"<--------Communication-------->\n");
#endif
// if we are already connected, we have open session (another thread left us open session), so we don't need to login
- // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :) )
+ // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :))
if ((MyClient->NetClient==NULL) || !MyClient->NetClient->Connected())
{
SetAccountStatus(ActualAccount,TranslateT("Connecting to server"));
diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp
index 254acfd07f..3f263bf4c5 100644
--- a/protocols/Yahoo/avatar.cpp
+++ b/protocols/Yahoo/avatar.cpp
@@ -554,7 +554,7 @@ void CYahooProto::ext_got_picture_upload(const char *me, const char *url,unsigne
SetString(NULL, "AvatarURL", url);
//YAHOO_SetDword("AvatarExpires", ts);
- if (!GetString("AvatarInv", &dbv) ) {
+ if (!GetString("AvatarInv", &dbv)) {
LOG(("[ext_yahoo_got_picture_upload] Buddy: %s told us this is bad??", dbv.pszVal));
LOG(("[ext_yahoo_got_picture] Sending url: %s checksum: %d to '%s'!", url, cksum, dbv.pszVal));
diff --git a/protocols/Yahoo/file_transfer.cpp b/protocols/Yahoo/file_transfer.cpp
index 038ba3ea05..85f091b81c 100644
--- a/protocols/Yahoo/file_transfer.cpp
+++ b/protocols/Yahoo/file_transfer.cpp
@@ -653,7 +653,7 @@ void ext_yahoo_send_file7info(int id, const char *me, const char *who, const cha
PHOSTENT he = gethostbyname("relay.msg.yahoo.com");
if (he) {
- ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0]) );
+ ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0]));
LOG(("Got Relay IP: %s", ft->relay));
} else {
ft->relay = strdup( "98.136.112.33" );
diff --git a/protocols/Yahoo/http_gateway.cpp b/protocols/Yahoo/http_gateway.cpp
index 7d7cb37a73..e62219f108 100644
--- a/protocols/Yahoo/http_gateway.cpp
+++ b/protocols/Yahoo/http_gateway.cpp
@@ -21,7 +21,7 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE
DebugLog("YAHOO_httpGatewayInit!!!");
- ZeroMemory(&nlhpi, sizeof(nlhpi) );
+ ZeroMemory(&nlhpi, sizeof(nlhpi));
nlhpi.cbSize = sizeof(nlhpi);
nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";
@@ -71,7 +71,7 @@ PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, i
if (len == 4) {
*outBufLen = 0;
return buf;
- } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G') ) {
+ } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) {
MoveMemory( buf, buf + 4, len - 4);
*outBufLen = len-4;// we take off 4 bytes from the beginning
diff --git a/protocols/Yahoo/libyahoo2/libyahoo2.c b/protocols/Yahoo/libyahoo2/libyahoo2.c
index 558a355e94..77802f4ca2 100644
--- a/protocols/Yahoo/libyahoo2/libyahoo2.c
+++ b/protocols/Yahoo/libyahoo2/libyahoo2.c
@@ -406,7 +406,7 @@ const char *dbg_key(int key)
{
int i=0;
- while ((packet_keys[i].key >=0) && (packet_keys[i].key != key) )
+ while ((packet_keys[i].key >=0) && (packet_keys[i].key != key))
i++;
if (packet_keys[i].key != key)
@@ -419,7 +419,7 @@ const char *dbg_service(int key)
{
int i=0;
- while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key) )
+ while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key))
i++;
if (ymsg_service_vals[i].key != key)
@@ -1008,7 +1008,7 @@ static void yahoo_send_packet(struct yahoo_input_data *yid, struct yahoo_packet
( yid->type == YAHOO_CONNECTION_PAGER &&
( pkt->service == YAHOO_SERVICE_KEEPALIVE ||
pkt->service == YAHOO_SERVICE_PING ||
- pkt->service == YAHOO_SERVICE_LOGOFF) )
+ pkt->service == YAHOO_SERVICE_LOGOFF))
) {
yahoo_send_data(yid->fd, (const char *)data, len);
} else {
diff --git a/protocols/Yahoo/libyahoo2/yahoo_httplib.c b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
index c7bcb55858..7305157d83 100644
--- a/protocols/Yahoo/libyahoo2/yahoo_httplib.c
+++ b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
@@ -158,7 +158,7 @@ char *yahoo_urlencode(const char *instr)
char *str = NULL;
int len = strlen(instr);
- if (!(str = y_new(char, 3*len + 1) ))
+ if (!(str = y_new(char, 3*len + 1)))
return "";
while(instr[ipos]) {
@@ -188,7 +188,7 @@ char *yahoo_urldecode(const char *instr)
unsigned dec;
int len = strlen(instr);
- if (!(str = y_new(char, len+1) ))
+ if (!(str = y_new(char, len+1)))
return "";
while(instr[ipos]) {
@@ -235,7 +235,7 @@ char *yahoo_xmldecode(const char *instr)
unsigned dec;
int len = strlen(instr);
- if (!(str = y_new(char, len+1) ))
+ if (!(str = y_new(char, len+1)))
return "";
while(instr[ipos]) {
@@ -398,14 +398,14 @@ static void yahoo_got_url_fd(int id, int fd, int error, void *data)
break;
if ( !strncasecmp(buff, "Content-length:",
- strlen("Content-length:")) ) {
+ strlen("Content-length:"))) {
tmp = strrchr(buff, ' ');
if(tmp)
filesize = atol(tmp);
}
if ( !strncasecmp(buff, "Content-disposition:",
- strlen("Content-disposition:")) ) {
+ strlen("Content-disposition:"))) {
tmp = strstr(buff, "name=");
if(tmp) {
tmp+=strlen("name=");
diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp
index 6acd8c0dca..8ed3168650 100644
--- a/protocols/Yahoo/options.cpp
+++ b/protocols/Yahoo/options.cpp
@@ -182,7 +182,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar
SetDlgItemInt( hwndDlg, IDC_YAHOOPORT, ppro->GetWord( NULL, YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT ), FALSE );
- SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) );
+ SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ));
return TRUE;
case WM_COMMAND:
diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp
index 268bdc7358..1fc2ef8af8 100644
--- a/protocols/Yahoo/proto.cpp
+++ b/protocols/Yahoo/proto.cpp
@@ -198,7 +198,7 @@ HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDL
blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ),
last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
*/
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE));
+ memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
if (hContact != NULL) {
DebugLog("Temp Buddy found at: %p ", hContact);
@@ -236,7 +236,7 @@ int CYahooProto::Authorize( HANDLE hdbe )
return 1;
HANDLE hContact;
- memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE));
+ memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE));
/* Need to remove the buddy from our Miranda Lists */
@@ -848,7 +848,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
DBFreeVariant(&dbv);
}
- SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) );
+ SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ));
return TRUE;
}
diff --git a/protocols/Yahoo/server.cpp b/protocols/Yahoo/server.cpp
index 0de8fe2f5d..0a6886e037 100644
--- a/protocols/Yahoo/server.cpp
+++ b/protocols/Yahoo/server.cpp
@@ -144,7 +144,7 @@ void __cdecl CYahooProto::server_main(void *empty)
DebugLog("[SERVER] Got packets: %d", ylad->rpkts);
if ( m_bLoggedIn && ( (ylad->rpkts > 0 && (time(NULL) - lLastSend) >=3) ||
- ( (time(NULL) - lLastSend) >= 13) ) ) {
+ ( (time(NULL) - lLastSend) >= 13)) ) {
LOG(("[TIMER] Sending an idle message..."));
yahoo_send_idle_packet(m_id);
diff --git a/protocols/Yahoo/services.cpp b/protocols/Yahoo/services.cpp
index a6e7fa5012..363c000ad2 100644
--- a/protocols/Yahoo/services.cpp
+++ b/protocols/Yahoo/services.cpp
@@ -130,8 +130,8 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam
CYahooProto* ppro = ( CYahooProto* )lParam;
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam );
- SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true ) );
- SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" ) );
+ SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true ));
+ SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" ));
if ( !DBGetContactSettingString( NULL, ppro->m_szModuleName, YAHOO_CUSTSTATDB, &dbv )) {
SetDlgItemTextA( hwndDlg, IDC_CUSTSTAT, dbv. pszVal );
diff --git a/protocols/Yahoo/util.cpp b/protocols/Yahoo/util.cpp
index 197bc37497..6be9439380 100644
--- a/protocols/Yahoo/util.cpp
+++ b/protocols/Yahoo/util.cpp
@@ -29,7 +29,7 @@ void CYahooProto::YCreateService( const char* szService, YServiceFunc servicePro
len = snprintf(str, sizeof(str), "%s%s", m_szModuleName, szService);
- if (len >= sizeof(str) ) {
+ if (len >= sizeof(str)) {
DebugLog("[YCreateService] Failed Registering Service: %s. Reason: buffer too small?", szService);
return;
}
@@ -162,7 +162,7 @@ int CYahooProto::SendBroadcast( HANDLE hContact, int type, int result, HANDLE hP
{
ACKDATA ack;
- ZeroMemory(&ack, sizeof(ack) );
+ ZeroMemory(&ack, sizeof(ack));
ack.cbSize = sizeof( ACKDATA );
ack.szModule = m_szModuleName;
@@ -247,7 +247,7 @@ int CYahooProto::ShowPopup( const char* nickname, const char* msg, const char *s
if ( !ServiceExists( MS_POPUP_ADDPOPUPEX ))
return 0;
- ZeroMemory(&ppd, sizeof(ppd) );
+ ZeroMemory(&ppd, sizeof(ppd));
lstrcpyA( ppd.lpzContactName, nickname );
lstrcpyA( ppd.lpzText, msg );
diff --git a/src/core/miranda.h b/src/core/miranda.h
index 8f747ee86b..edd32bfb25 100644
--- a/src/core/miranda.h
+++ b/src/core/miranda.h
@@ -111,11 +111,11 @@ extern LPFN_FREEADDRINFO MyFreeaddrinfo;
extern LPFN_WSASTRINGTOADDRESSA MyWSAStringToAddress;
extern LPFN_WSAADDRESSTOSTRINGA MyWSAAddressToString;
-/**** file.c ***************************************************************************/
+/**** file.cpp *************************************************************************/
void PushFileEvent(HANDLE hContact, HANDLE hdbe, LPARAM lParam);
-/**** memory.c *************************************************************************/
+/**** memory.cpp ***********************************************************************/
#ifdef _STATIC
void* mir_alloc(size_t);
@@ -137,13 +137,13 @@ char* mir_u2a_cp(const wchar_t* src, int codepage);
char* mir_u2a(const wchar_t* src);
#endif
-/**** miranda.c ************************************************************************/
+/**** miranda.cpp **********************************************************************/
extern HINSTANCE hMirandaInst;
extern HANDLE hOkToExitEvent, hModulesLoadedEvent;
extern pfnExceptionFilter pMirandaExceptFilter;
-/**** modules.c ************************************************************************/
+/**** modules.cpp **********************************************************************/
int CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM wParam, LPARAM lParam);
void KillModuleEventHooks(HINSTANCE);
@@ -153,7 +153,7 @@ void KillObjectEventHooks(void* pObject);
void KillObjectServices(void* pObject);
void KillObjectThreads(void* pObject);
-/**** utf.c ****************************************************************************/
+/**** utf.cpp **************************************************************************/
char* Utf8Decode(char* str, wchar_t** ucs2);
char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2);
@@ -178,7 +178,7 @@ int Ucs2toUtf8Len(const wchar_t *src);
#define Utf8DecodeT Utf8DecodeUcs2
#define Utf8EncodeT Utf8EncodeUcs2
-/**** langpack.c ***********************************************************************/
+/**** langpack.cpp *********************************************************************/
int LangPackGetDefaultCodePage();
int LangPackGetDefaultLocale();
@@ -204,19 +204,26 @@ __inline unsigned int hashstr(const wchar_t * key)
}
#pragma optimize("", on)
-/**** path.c ***************************************************************************/
+/**** options.cpp **********************************************************************/
+
+HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name);
+
+/**** path.cpp *************************************************************************/
-int pathToAbsolute(const char *pSrc, char *pOut, char* base);
void CreatePathToFile(char* wszFilePath);
-int CreateDirectoryTree(const char *szDir);
void CreatePathToFileW(WCHAR* wszFilePath);
+
+int CreateDirectoryTree(const char *szDir);
int CreateDirectoryTreeW(const WCHAR *szDir);
+
+int pathToAbsolute(const char *pSrc, char *pOut, char* base);
int pathToAbsoluteW(const TCHAR *pSrc, TCHAR *pOut, TCHAR* base);
+
#define pathToAbsoluteT pathToAbsoluteW
#define CreatePathToFileT CreatePathToFileW
#define CreateDirectoryTreeT CreateDirectoryTreeW
-/**** skin2icons.c *********************************************************************/
+/**** skin2icons.cpp *******************************************************************/
HANDLE IcoLib_AddNewIcon(SKINICONDESC* sid);
HICON IcoLib_GetIcon(const char* pszIconName, bool big);
@@ -224,7 +231,7 @@ HICON IcoLib_GetIconByHandle(HANDLE hItem, bool big);
HANDLE IcoLib_IsManaged(HICON hIcon);
int IcoLib_ReleaseIcon(HICON hIcon, char* szIconName, bool big);
-/**** skinicons.c **********************************************************************/
+/**** skinicons.cpp ********************************************************************/
HICON LoadSkinProtoIcon(const char* szProto, int status, bool big = false);
HICON LoadSkinIcon(int idx, bool big = false);
@@ -248,7 +255,7 @@ void Window_FreeIcon_IcoLib(HWND hWnd);
#define IconLib_ReleaseIcon(hIcon, szName) IcoLib_ReleaseIcon(hIcon, szName, false);
#define Safe_DestroyIcon(hIcon) if (hIcon) DestroyIcon(hIcon)
-/**** clistmenus.c **********************************************************************/
+/**** clistmenus.cpp ********************************************************************/
extern HANDLE hMainMenuObject, hContactMenuObject, hStatusMenuObject;
extern HANDLE hPreBuildMainMenuEvent, hPreBuildContactMenuEvent;
@@ -259,7 +266,7 @@ extern const int skinIconStatusFlags[ MAX_STATUS_COUNT ];
int TryProcessDoubleClick(HANDLE hContact);
-/**** protocols.c ***********************************************************************/
+/**** protocols.cpp *********************************************************************/
#define OFFSET_PROTOPOS 200
#define OFFSET_VISIBLE 400
@@ -295,7 +302,7 @@ __inline static INT_PTR CallProtoService(const char* szModule, const char* szSer
return CallProtoServiceInt(NULL, szModule, szService, wParam, lParam);
}
-/**** utils.c **************************************************************************/
+/**** utils.cpp ************************************************************************/
char* __fastcall rtrim(char* str);
TCHAR* __fastcall rtrim(TCHAR* str);
diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp
index 3d20a4b85b..efa7e5da9b 100644
--- a/src/modules/langpack/langpack.cpp
+++ b/src/modules/langpack/langpack.cpp
@@ -398,6 +398,7 @@ static int LoadLangPack(const TCHAR *szLangPack)
LoadLangPackFile(fp, line, fileCp);
fclose(fp);
+ pCurrentMuuid = NULL;
qsort(langPack.entry, langPack.entryCount, sizeof(LangPackEntry), (int(*)(const void*, const void*))SortLangPackHashesProc);
return 0;
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index b603f93f25..aa6180a972 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -101,7 +101,7 @@ struct OptionsDlgData
HANDLE hPluginLoad, hPluginUnload;
};
-static HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name)
+HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name)
{
TVITEM tvi;
TCHAR str[128];
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index d535ad3769..6408bcda7d 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -568,6 +568,20 @@ static void sttOptionsDeleteHotkey(HWND hwndList, int idx, THotkeyItem *item)
item->rootHotkey->OptChanged = TRUE;
}
+static int sttAlphaSort(const THotkeyItem *p1, const THotkeyItem *p2)
+{
+ int res;
+ if (res = lstrcmp(p1->getSection(), p2->getSection()))
+ return res;
+ if (res = lstrcmp(p1->getDescr(), p2->getDescr()))
+ return res;
+ if (!p1->rootHotkey && p2->rootHotkey)
+ return -1;
+ if (p1->rootHotkey && !p2->rootHotkey)
+ return 1;
+ return 0;
+}
+
static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
TCHAR title1[256] = {0}, title2[256] = {0};
@@ -593,7 +607,7 @@ static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lP
return lstrcmp(title1, title2);
if ( !item1) {
- if (res = lstrcmp(title1, item1->getSection()))
+ if (res = lstrcmp(title1, item2->getSection()))
return res;
return -1;
}
@@ -603,7 +617,7 @@ static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lP
return res;
return 1;
}
- return sttCompareHotkeys(item1, item2);
+ return sttAlphaSort(item1, item2);
}
static void sttOptionsAddHotkey(HWND hwndList, THotkeyItem *item)
@@ -684,19 +698,24 @@ static void sttOptionsSaveItem(THotkeyItem *item)
DBWriteContactSettingDword(NULL, DBMODULENAME, buf, item->nSubHotkeys);
}
-static void sttBuildHotkeyList(HWND hwndList, TCHAR *section)
+static void sttBuildHotkeyList(HWND hwndList)
{
int i, nItems=0;
ListView_DeleteAllItems(hwndList);
- for (i = 0; i < hotkeys.getCount(); i++) {
+ // create the temporary list with language-dependent sort order
+ LIST<THotkeyItem> tmpList(hotkeys.getCount(), sttAlphaSort);
+ for (i = 0; i < hotkeys.getCount(); i++)
+ tmpList.insert( hotkeys[i] );
+
+ for (i = 0; i < tmpList.getCount(); i++) {
LVITEM lvi = {0};
- THotkeyItem *item = hotkeys[i];
+ THotkeyItem *item = tmpList[i];
- if (item->OptDeleted) continue;
- if (section && lstrcmp(section, item->ptszSection)) continue;
+ if (item->OptDeleted)
+ continue;
- if ( !section && ( !i || lstrcmp(item->ptszSection, ((THotkeyItem *)hotkeys[i-1])->ptszSection))) {
+ if ( !i || lstrcmp(item->ptszSection, tmpList[i-1]->ptszSection)) {
lvi.mask = LVIF_TEXT|LVIF_PARAM;
lvi.iItem = nItems++;
lvi.iSubItem = 0;
@@ -713,11 +732,8 @@ static void sttBuildHotkeyList(HWND hwndList, TCHAR *section)
lvi.iSubItem = 0;
}
- lvi.mask = LVIF_PARAM;
- if ( !section) {
- lvi.mask |= LVIF_INDENT;
- lvi.iIndent = 1;
- }
+ lvi.mask = LVIF_PARAM | LVIF_INDENT;
+ lvi.iIndent = 1;
lvi.iItem = nItems++;
lvi.lParam = (LPARAM)item;
ListView_InsertItem(hwndList, &lvi);
@@ -769,66 +785,59 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
switch (msg) {
case WM_INITDIALOG:
- {
- int i;
- LVCOLUMN lvc;
- RECT rc;
- HIMAGELIST hIml;
-
initialized = FALSE;
TranslateDialogDefault(hwndDlg);
sttHotkeyEditCreate(GetDlgItem(hwndDlg, IDC_HOTKEY));
-
- hIml = ImageList_Create(16, 16, ILC_MASK + (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 3, 1);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_WINDOWS);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_MIRANDA);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_WINDOW);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_ADDCONTACT);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_DELETE);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_UNDO);
-
- // This is added to use for drawing operation only
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_GROUPOPEN);
- ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_GROUPSHUT);
-
- ListView_SetImageList(hwndHotkey, hIml, LVSIL_SMALL);
-
+ {
+ HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK + (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 3, 1);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_WINDOWS);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_MIRANDA);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_WINDOW);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_ADDCONTACT);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_DELETE);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_UNDO);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_GROUPOPEN);
+ ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_GROUPSHUT);
+ ListView_SetImageList(hwndHotkey, hIml, LVSIL_SMALL);
+ }
ListView_SetExtendedListViewStyle(hwndHotkey, LVS_EX_CHECKBOXES|LVS_EX_SUBITEMIMAGES|LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER|LVS_EX_INFOTIP);
+ {
+ RECT rc;
+ GetClientRect(hwndHotkey, &rc);
+ colWidth = rc.right - GetSystemMetrics(SM_CXHTHUMB) - 3*GetSystemMetrics(SM_CXSMICON) - 5;
+
+ LVCOLUMN lvc;
+ lvc.mask = LVCF_WIDTH;
+ lvc.cx = colWidth * 2 / 3;
+ ListView_InsertColumn(hwndHotkey, COL_NAME, &lvc);
+ lvc.cx = GetSystemMetrics(SM_CXSMICON);
+ ListView_InsertColumn(hwndHotkey, COL_TYPE, &lvc);
+ lvc.cx = colWidth / 3;
+ ListView_InsertColumn(hwndHotkey, COL_KEY, &lvc);
+ lvc.cx = GetSystemMetrics(SM_CXSMICON);
+ ListView_InsertColumn(hwndHotkey, COL_RESET, &lvc);
+ lvc.cx = GetSystemMetrics(SM_CXSMICON);
+ ListView_InsertColumn(hwndHotkey, COL_ADDREMOVE, &lvc);
+
+ for (int i = 0; i < hotkeys.getCount(); i++) {
+ THotkeyItem *item = hotkeys[i];
- GetClientRect(hwndHotkey, &rc);
- colWidth = rc.right - GetSystemMetrics(SM_CXHTHUMB) - 3*GetSystemMetrics(SM_CXSMICON) - 5;
-
- lvc.mask = LVCF_WIDTH;
- lvc.cx = colWidth * 2 / 3;
- ListView_InsertColumn(hwndHotkey, COL_NAME, &lvc);
- lvc.cx = GetSystemMetrics(SM_CXSMICON);
- ListView_InsertColumn(hwndHotkey, COL_TYPE, &lvc);
- lvc.cx = colWidth / 3;
- ListView_InsertColumn(hwndHotkey, COL_KEY, &lvc);
- lvc.cx = GetSystemMetrics(SM_CXSMICON);
- ListView_InsertColumn(hwndHotkey, COL_RESET, &lvc);
- lvc.cx = GetSystemMetrics(SM_CXSMICON);
- ListView_InsertColumn(hwndHotkey, COL_ADDREMOVE, &lvc);
-
- for (i = 0; i < hotkeys.getCount(); i++) {
- THotkeyItem *item = hotkeys[i];
+ item->OptChanged = FALSE;
+ item->OptDeleted = item->OptNew = FALSE;
+ item->OptEnabled = item->Enabled;
+ item->OptHotkey = item->Hotkey;
+ item->OptType = item->type;
+ }
- item->OptChanged = FALSE;
- item->OptDeleted = item->OptNew = FALSE;
- item->OptEnabled = item->Enabled;
- item->OptHotkey = item->Hotkey;
- item->OptType = item->type;
+ currentLanguage = LOWORD(GetKeyboardLayout(0));
+ sttBuildHotkeyList(hwndHotkey);
}
-
- currentLanguage = LOWORD(GetKeyboardLayout(0));
- sttBuildHotkeyList(hwndHotkey, NULL);
SetTimer(hwndDlg, 1024, 1000, NULL);
-
initialized = TRUE;
-
- { /* load group states */
+ {
+ /* load group states */
int count = ListView_GetItemCount(hwndHotkey);
TCHAR buf[128];
LVITEM lvi = {0};
@@ -856,9 +865,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
}
g_hwndOptions = hwndDlg;
-
break;
- }
case WM_DESTROY:
{
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 9dedbdf4d5..f499a39a4d 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -22,72 +22,75 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "..\..\core\commonheaders.h"
-#define SKINSOUNDDESC_SIZE_V1 (offsetof(SKINSOUNDDESCEX, pszSection))
-#define SKINSOUNDDESC_SIZE_V2 (offsetof(SKINSOUNDDESCEX, dwFlags))
-
struct SoundItem
{
char* name;
- TCHAR* section;
- TCHAR* description;
- char* tempFile;
+ TCHAR* ptszSection;
+ TCHAR* ptszDescription;
+ TCHAR* ptszTempFile;
+ int hLangpack;
+
+ __inline TCHAR* getSection() const { return LangPackTranslateStringT(hLangpack, ptszSection); }
+ __inline TCHAR* getDescr() const { return LangPackTranslateStringT(hLangpack, ptszDescription); }
+
+ __inline ~SoundItem()
+ {
+ mir_free(name);
+ mir_free(ptszSection);
+ mir_free(ptszDescription);
+ mir_free(ptszTempFile);
+ }
};
+static int CompareSounds(const SoundItem* p1, const SoundItem* p2)
+{
+ return lstrcmpA(p1->name, p2->name);
+}
+
+static OBJLIST<SoundItem> arSounds(10, CompareSounds);
+
static BOOL bModuleInitialized = FALSE;
-static struct SoundItem *soundList = NULL;
-static int soundCount;
static HANDLE hPlayEvent = NULL;
-static INT_PTR ServiceSkinAddNewSound(WPARAM, LPARAM lParam)
+static INT_PTR ServiceSkinAddNewSound(WPARAM wParam, LPARAM lParam)
{
SKINSOUNDDESCEX *ssd = (SKINSOUNDDESCEX*)lParam;
- switch(ssd->cbSize) {
- case sizeof(SKINSOUNDDESCEX):
- case SKINSOUNDDESC_SIZE_V1:
- case SKINSOUNDDESC_SIZE_V2:
- break;
-
- default:
+ if (ssd->cbSize != sizeof(SKINSOUNDDESCEX) || ssd->pszName == NULL || ssd->pszDescription == NULL)
return 1;
- }
- if (ssd->pszName == NULL || ssd->pszDescription == NULL)
- return 1;
-
- DBVARIANT dbv;
- DWORD dwFlags = (ssd->cbSize == sizeof(SKINSOUNDDESCEX)) ? ssd->dwFlags : 0;
-
- soundList=(struct SoundItem*)mir_realloc(soundList, sizeof(struct SoundItem)*(soundCount+1));
- SoundItem* item = &soundList[soundCount++];
+ SoundItem* item = new SoundItem; // due to OBJLIST
item->name = mir_strdup(ssd->pszName);
- item->tempFile = NULL;
+ item->ptszTempFile = NULL;
+ item->hLangpack = (int)wParam;
+ arSounds.insert(item);
- TCHAR* ptszDefaultFile;
- if (dwFlags & SSDF_UNICODE) {
- item->description = mir_tstrdup(TranslateTS(ssd->ptszDescription));
- item->section = mir_tstrdup(TranslateTS(ssd->cbSize != SKINSOUNDDESC_SIZE_V1 && ssd->pszSection != NULL ? ssd->ptszSection : _T("Other")));
- ptszDefaultFile = mir_tstrdup(ssd->ptszDefaultFile);
- }
- else {
- item->description = LangPackPcharToTchar(ssd->pszDescription);
- item->section = LangPackPcharToTchar(ssd->cbSize != SKINSOUNDDESC_SIZE_V1 && ssd->pszSection != NULL ? ssd->pszSection : "Other");
- ptszDefaultFile = mir_a2t(ssd->pszDefaultFile);
- }
+ TCHAR* ptszDefaultFile;
+ if (ssd->dwFlags & SSDF_UNICODE) {
+ item->ptszDescription = mir_tstrdup(ssd->ptszDescription);
+ item->ptszSection = mir_tstrdup((ssd->pszSection != NULL) ? ssd->ptszSection : _T("Other"));
+ ptszDefaultFile = mir_tstrdup(ssd->ptszDefaultFile);
+ }
+ else {
+ item->ptszDescription = mir_a2t(ssd->pszDescription);
+ item->ptszSection = mir_a2t((ssd->pszSection != NULL) ? ssd->pszSection : "Other");
+ ptszDefaultFile = mir_a2t(ssd->pszDefaultFile);
+ }
- if (ptszDefaultFile) {
- if (DBGetContactSettingString(NULL, "SkinSounds", item->name, &dbv))
- DBWriteContactSettingTString(NULL, "SkinSounds", item->name, ptszDefaultFile);
- else
- DBFreeVariant(&dbv);
- mir_free(ptszDefaultFile);
- }
+ if (ptszDefaultFile) {
+ DBVARIANT dbv;
+ if (DBGetContactSettingString(NULL, "SkinSounds", item->name, &dbv))
+ DBWriteContactSettingTString(NULL, "SkinSounds", item->name, ptszDefaultFile);
+ else
+ DBFreeVariant(&dbv);
+ mir_free(ptszDefaultFile);
+ }
return 0;
}
static int SkinPlaySoundDefault(WPARAM wParam, LPARAM lParam)
{
- char * pszFile = (char *) lParam;
+ char* pszFile = (char *) lParam;
if (pszFile && (DBGetContactSettingByte(NULL, "Skin", "UseSound", 0) || (int)wParam == 1))
PlaySoundA(pszFile, NULL, SND_ASYNC | SND_FILENAME | SND_NOWAIT);
@@ -97,57 +100,35 @@ static int SkinPlaySoundDefault(WPARAM wParam, LPARAM lParam)
static INT_PTR ServiceSkinPlaySound(WPARAM, LPARAM lParam)
{
char* pszSoundName = (char*)lParam;
- int j;
-
- for (j=0; j<soundCount; j++) {
- if (pszSoundName && strcmp(soundList[j].name, pszSoundName) == 0) {
- if (DBGetContactSettingByte(NULL, "SkinSoundsOff", pszSoundName, 0) == 0) {
- DBVARIANT dbv;
+ if (pszSoundName == NULL)
+ return 1;
- if (DBGetContactSettingString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
- char szFull[MAX_PATH];
+ SoundItem tmp = { pszSoundName };
+ int idx = arSounds.getIndex( &tmp );
+ if (idx == -1)
+ return 1;
- pathToAbsolute(dbv.pszVal, szFull, NULL);
- NotifyEventHooks(hPlayEvent, 0, (LPARAM)szFull);
- DBFreeVariant(&dbv);
- }
- }
- return 0;
+ if ( DBGetContactSettingByte(NULL, "SkinSoundsOff", pszSoundName, 0) == 0) {
+ DBVARIANT dbv;
+ if ( DBGetContactSettingTString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
+ TCHAR szFull[MAX_PATH];
+ pathToAbsoluteT(dbv.ptszVal, szFull, NULL);
+ NotifyEventHooks(hPlayEvent, 0, (LPARAM)szFull);
+ DBFreeVariant(&dbv);
}
}
return 1;
}
-static HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name)
-{
- TVITEM tvi;
- TCHAR str[128];
-
- tvi.mask = TVIF_TEXT;
- tvi.pszText = str;
- tvi.cchTextMax = SIZEOF(str);
- tvi.hItem = TreeView_GetRoot(hwndTree);
- while (tvi.hItem != NULL) {
- TreeView_GetItem(hwndTree, &tvi);
- if ( !_tcsicmp(str, name))
- return tvi.hItem;
-
- tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
- }
- return NULL;
-}
-
#define DM_REBUILD_STREE (WM_USER+1)
#define DM_HIDEPANE (WM_USER+2)
#define DM_SHOWPANE (WM_USER+3)
#define DM_CHECKENABLED (WM_USER+4)
+
INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static HWND hwndTree = NULL;
switch (msg) {
- case WM_DESTROY:
- ImageList_Destroy(TreeView_GetImageList(hwndTree, TVSIL_STATE));
- break;
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
hwndTree = GetDlgItem(hwndDlg, IDC_SOUNDTREE);
@@ -165,30 +146,30 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TreeView_DeleteAllItems(hwndTree);
{
TVINSERTSTRUCT tvis;
- int i;
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_SORT;
tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
- for (i=0; i < soundCount; i++) {
+ for (int i=0; i < arSounds.getCount(); i++) {
tvis.item.stateMask = TVIS_EXPANDED;
tvis.item.state = TVIS_EXPANDED;
- tvis.hParent = FindNamedTreeItemAtRoot(hwndTree, soundList[i].section);
+ tvis.hParent = FindNamedTreeItemAtRoot(hwndTree, arSounds[i].getSection());
if (tvis.hParent == NULL) {
tvis.item.lParam = -1;
- tvis.item.pszText = soundList[i].section;
+ tvis.item.pszText = arSounds[i].getSection();
tvis.hParent = tvis.item.hItem = TreeView_InsertItem(hwndTree, &tvis);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK(0);
TreeView_SetItem(hwndTree, &tvis.item);
}
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK( !DBGetContactSettingByte(NULL, "SkinSoundsOff", soundList[i].name, 0)?2:1);
+ tvis.item.state = INDEXTOSTATEIMAGEMASK( !DBGetContactSettingByte(NULL, "SkinSoundsOff", arSounds[i].name, 0)?2:1);
tvis.item.lParam = i;
- tvis.item.pszText = soundList[i].description;
+ tvis.item.pszText = arSounds[i].getDescr();
TreeView_InsertItem(hwndTree, &tvis);
} }
- { TVITEM tvi;
+ {
+ TVITEM tvi;
tvi.hItem = TreeView_GetRoot(hwndTree);
while (tvi.hItem != NULL) {
tvi.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
@@ -237,125 +218,134 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage(hwndDlg, DM_CHECKENABLED, 0, 0);
if (LOWORD(wParam) == IDC_PREVIEW) {
- TVITEM tvi;
- HTREEITEM hti;
+ HTREEITEM hti = TreeView_GetSelection(hwndTree);
+ if (hti == NULL)
+ break;
- ZeroMemory(&tvi, sizeof(tvi));
- ZeroMemory(&hti, sizeof(hti));
- hti=TreeView_GetSelection(hwndTree);
- if (hti == NULL) break;
- tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT;
+ TVITEM tvi = { 0 };
+ tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM | TVIF_TEXT;
tvi.hItem = hti;
- if (TreeView_GetItem(hwndTree, &tvi) == FALSE) break;
- if (tvi.lParam == -1) break;
- if (soundList[tvi.lParam].tempFile)
- NotifyEventHooks(hPlayEvent, 1, (LPARAM)soundList[tvi.lParam].tempFile);
+ if (TreeView_GetItem(hwndTree, &tvi) == FALSE)
+ break;
+ if (tvi.lParam == -1)
+ break;
+
+ if (arSounds[tvi.lParam].ptszTempFile)
+ NotifyEventHooks(hPlayEvent, 1, (LPARAM)arSounds[tvi.lParam].ptszTempFile);
else {
DBVARIANT dbv;
- if ( !DBGetContactSettingString(NULL, "SkinSounds", soundList[tvi.lParam].name, &dbv)) {
- char szPathFull[MAX_PATH];
-
- pathToAbsolute(dbv.pszVal, szPathFull, NULL);
+ if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
+ TCHAR szPathFull[MAX_PATH];
+ pathToAbsoluteT(dbv.ptszVal, szPathFull, NULL);
NotifyEventHooks(hPlayEvent, 1, (LPARAM)szPathFull);
DBFreeVariant(&dbv);
- } }
+ }
+ }
break;
}
+
if (LOWORD(wParam) == IDC_CHANGE) {
- char str[MAX_PATH] = "", strFull[MAX_PATH], strdir[MAX_PATH]="", filter[MAX_PATH];
- OPENFILENAMEA ofn;
- TVITEM tvi;
- HTREEITEM hti;
+ HTREEITEM hti = TreeView_GetSelection(hwndTree);
+ if (hti == NULL)
+ break;
- ZeroMemory(&tvi, sizeof(tvi));
- ZeroMemory(&hti, sizeof(hti));
- hti=TreeView_GetSelection(hwndTree);
- if (hti == NULL) break;
- tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT;
+ TVITEM tvi = { 0 };
+ tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT;
tvi.hItem = hti;
- if (TreeView_GetItem(hwndTree, &tvi) == FALSE) break;
- if (tvi.lParam == -1) break;
- if (soundList[tvi.lParam].tempFile)
- mir_snprintf(strFull, SIZEOF(strFull), "%s", soundList[tvi.lParam].tempFile);
+ if (TreeView_GetItem(hwndTree, &tvi) == FALSE)
+ break;
+ if (tvi.lParam == -1)
+ break;
+
+ SoundItem& snd = arSounds[tvi.lParam];
+
+ TCHAR str[MAX_PATH], strFull[MAX_PATH], strdir[MAX_PATH], filter[MAX_PATH];
+ if (snd.ptszTempFile)
+ _tcsncpy(strFull, snd.ptszTempFile, SIZEOF(strFull));
else {
- if (DBGetContactSettingByte(NULL, "SkinSoundsOff", soundList[tvi.lParam].name, 0) == 0) {
+ if (DBGetContactSettingByte(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
DBVARIANT dbv;
-
- if (DBGetContactSettingString(NULL, "SkinSounds", soundList[tvi.lParam].name, &dbv) == 0) {
- pathToAbsolute(dbv.pszVal, strdir, NULL);
+ if (DBGetContactSettingTString(NULL, "SkinSounds", snd.name, &dbv) == 0) {
+ pathToAbsoluteT(dbv.ptszVal, strdir, NULL);
DBFreeVariant(&dbv);
} } }
- mir_snprintf(strFull, SIZEOF(strFull), "%s", soundList[tvi.lParam].tempFile?soundList[tvi.lParam].tempFile:"");
- pathToAbsolute(strFull, strdir, NULL);
+ mir_sntprintf(strFull, SIZEOF(strFull), _T("%s"), snd.ptszTempFile ? snd.ptszTempFile : _T(""));
+ pathToAbsoluteT(strFull, strdir, NULL);
+
+ OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(ofn));
- mir_snprintf(filter, SIZEOF(filter), "%s (*.wav; *.mp3; *.ogg; *.flac)%c*.WAV; *.MP3; *.OGG; *.FLAC%c%s (*)%c*%c", Translate("Sound Files"), 0, 0, Translate("All Files"), 0, 0);
+ mir_sntprintf(filter, SIZEOF(filter), _T("%s (*.wav; *.mp3; *.ogg; *.flac)%c*.WAV; *.MP3; *.OGG; *.FLAC%c%s (*)%c*%c"), TranslateT("Sound Files"), 0, 0, TranslateT("All Files"), 0, 0);
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = GetParent(hwndDlg);
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
- { char* slash = strrchr(strdir, '\\');
- if (slash) {
- *slash = 0;
- ofn.lpstrInitialDir = strdir;
- }
+
+ TCHAR* slash = _tcsrchr(strdir, '\\');
+ if (slash) {
+ *slash = 0;
+ ofn.lpstrInitialDir = strdir;
}
+
+ str[0] = 0;
ofn.lpstrFile = str;
ofn.Flags = OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_EXPLORER|OFN_LONGNAMES|OFN_NOCHANGEDIR;
ofn.nMaxFile = SIZEOF(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = "wav";
- if ( !GetOpenFileNameA(&ofn)) break;
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)str, (LPARAM)strFull);
- soundList[tvi.lParam].tempFile = mir_strdup(strFull);
- SetDlgItemTextA(hwndDlg, IDC_LOCATION, strFull);
+ ofn.lpstrDefExt = _T("wav");
+ if ( !GetOpenFileName(&ofn))
+ break;
+
+ CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)str, (LPARAM)strFull);
+ snd.ptszTempFile = mir_tstrdup(strFull);
+ SetDlgItemText(hwndDlg, IDC_LOCATION, strFull);
}
if (LOWORD(wParam) == IDC_GETMORE) {
CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://addons.miranda-im.org/index.php?action=display&id=5");
break;
}
- if (LOWORD(wParam) == IDC_LOCATION) {
- break;
- }
+ if (LOWORD(wParam) == IDC_LOCATION)
+ break;
+
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case WM_NOTIFY:
switch(((LPNMHDR)lParam)->idFrom) {
case 0:
- if (((LPNMHDR)lParam)->code == PSN_APPLY)
- {
- int i;
-
- DBWriteContactSettingByte(NULL, "Skin", "UseSound", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
- for (i=0; i < soundCount; i++)
- if (soundList[i].tempFile)
- DBWriteContactSettingString(NULL, "SkinSounds", soundList[i].name, soundList[i].tempFile);
- {
- TVITEM tvi, tvic;
- tvi.hItem = TreeView_GetRoot(hwndTree);
- while (tvi.hItem != NULL) {
- tvi.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
- TreeView_GetItem(hwndTree, &tvi);
- if (tvi.lParam == -1) {
- tvic.hItem = TreeView_GetChild(hwndTree, tvi.hItem);
- while (tvic.hItem != NULL) {
- tvic.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
- TreeView_GetItem(hwndTree, &tvic);
- if (((tvic.state & TVIS_STATEIMAGEMASK) >> 12 == 2)) {
- DBCONTACTGETSETTING cgs;
- cgs.szModule = "SkinSoundsOff";
- cgs.szSetting = soundList[tvic.lParam].name;
- CallService(MS_DB_CONTACT_DELETESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cgs);
- }
- else DBWriteContactSettingByte(NULL, "SkinSoundsOff", soundList[tvic.lParam].name, 1);
- tvic.hItem=TreeView_GetNextSibling(hwndTree, tvic.hItem);
- } }
-
- tvi.hItem=TreeView_GetNextSibling(hwndTree, tvi.hItem);
- } }
+ if (((LPNMHDR)lParam)->code == PSN_APPLY) {
+ DBWriteContactSettingByte(NULL, "Skin", "UseSound", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
+
+ for (int i=0; i < arSounds.getCount(); i++)
+ if (arSounds[i].ptszTempFile)
+ DBWriteContactSettingTString(NULL, "SkinSounds", arSounds[i].name, arSounds[i].ptszTempFile);
+
+ TVITEM tvi, tvic;
+ tvi.hItem = TreeView_GetRoot(hwndTree);
+ while (tvi.hItem != NULL) {
+ tvi.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
+ TreeView_GetItem(hwndTree, &tvi);
+ if (tvi.lParam == -1) {
+ tvic.hItem = TreeView_GetChild(hwndTree, tvi.hItem);
+ while (tvic.hItem != NULL) {
+ tvic.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
+ TreeView_GetItem(hwndTree, &tvic);
+ if (((tvic.state & TVIS_STATEIMAGEMASK) >> 12 == 2)) {
+ DBCONTACTGETSETTING cgs;
+ cgs.szModule = "SkinSoundsOff";
+ cgs.szSetting = arSounds[tvic.lParam].name;
+ CallService(MS_DB_CONTACT_DELETESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cgs);
+ }
+ else DBWriteContactSettingByte(NULL, "SkinSoundsOff", arSounds[tvic.lParam].name, 1);
+ tvic.hItem = TreeView_GetNextSibling(hwndTree, tvic.hItem);
+ } }
+
+ tvi.hItem=TreeView_GetNextSibling(hwndTree, tvi.hItem);
+ }
return TRUE;
}
break;
+
case IDC_SOUNDTREE:
switch(((NMHDR*)lParam)->code) {
case TVN_SELCHANGEDA:
@@ -363,22 +353,22 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
NMTREEVIEW *pnmtv = (NMTREEVIEW*)lParam;
TVITEM tvi = pnmtv->itemNew;
- if (tvi.lParam == -1) {
+ if (tvi.lParam == -1)
SendMessage(hwndDlg, DM_HIDEPANE, 0, 0);
- }
else {
TCHAR buf[256];
- DBVARIANT dbv;
-
- mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s"), soundList[tvi.lParam].section, soundList[tvi.lParam].description);
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s: %s"), arSounds[tvi.lParam].ptszSection, arSounds[tvi.lParam].ptszDescription);
SetDlgItemText(hwndDlg, IDC_NAMEVAL, buf);
- if (soundList[tvi.lParam].tempFile)
- SetDlgItemTextA(hwndDlg, IDC_LOCATION, soundList[tvi.lParam].tempFile);
- else if ( !DBGetContactSettingString(NULL, "SkinSounds", soundList[tvi.lParam].name, &dbv)) {
- SetDlgItemTextA(hwndDlg, IDC_LOCATION, dbv.pszVal);
- DBFreeVariant(&dbv);
+ if (arSounds[tvi.lParam].ptszTempFile)
+ SetDlgItemText(hwndDlg, IDC_LOCATION, arSounds[tvi.lParam].ptszTempFile);
+ else {
+ DBVARIANT dbv;
+ if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_LOCATION, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ }
+ else SetDlgItemText(hwndDlg, IDC_LOCATION, TranslateT("<not specified>"));
}
- else SetDlgItemText(hwndDlg, IDC_LOCATION, TranslateT("<not specified>"));
SendMessage(hwndDlg, DM_SHOWPANE, 0, 0);
}
}
@@ -398,15 +388,18 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
hti.pt.y=(short)HIWORD(GetMessagePos());
ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
- if (hti.flags&TVHT_ONITEM)
- if (hti.flags&TVHT_ONITEMSTATEICON)
- if (TreeView_GetParent(hwndTree, hti.hItem) != NULL)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ if (hti.flags & (TVHT_ONITEM | TVHT_ONITEMSTATEICON))
+ if (TreeView_GetParent(hwndTree, hti.hItem) != NULL)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
} }
break;
}
break;
+
+ case WM_DESTROY:
+ ImageList_Destroy(TreeView_GetImageList(hwndTree, TVSIL_STATE));
+ break;
}
return FALSE;
}
@@ -438,27 +431,15 @@ int LoadSkinSounds(void)
{
bModuleInitialized = TRUE;
- soundList=NULL;
- soundCount=0;
- CreateServiceFunction(MS_SKIN_ADDNEWSOUND, ServiceSkinAddNewSound);
+ CreateServiceFunction("Skin/Sounds/AddNew", ServiceSkinAddNewSound);
CreateServiceFunction(MS_SKIN_PLAYSOUND, ServiceSkinPlaySound);
HookEvent(ME_SYSTEM_MODULESLOADED, SkinSystemModulesLoaded);
- hPlayEvent=CreateHookableEvent(ME_SKIN_PLAYINGSOUND);
+ hPlayEvent = CreateHookableEvent(ME_SKIN_PLAYINGSOUND);
SetHookDefaultForHookableEvent(hPlayEvent, SkinPlaySoundDefault);
return 0;
}
void UnloadSkinSounds(void)
{
- int i;
-
- if ( !bModuleInitialized) return;
-
- for (i=0;i<soundCount;i++) {
- mir_free(soundList[i].name);
- mir_free(soundList[i].section);
- mir_free(soundList[i].description);
- if (soundList[i].tempFile) mir_free(soundList[i].tempFile);
- }
- if (soundCount) mir_free(soundList);
+ arSounds.destroy();
}
diff --git a/src/modules/srauth/auth.cpp b/src/modules/srauth/auth.cpp
index d0fbe24de5..c8257c3e20 100644
--- a/src/modules/srauth/auth.cpp
+++ b/src/modules/srauth/auth.cpp
@@ -122,8 +122,8 @@ int LoadSendRecvAuthModule(void)
CreateServiceFunction(MS_AUTH_SHOWADDED, ShowAddedWindow);
HookEvent(ME_DB_EVENT_ADDED, AuthEventAdded);
- SkinAddNewSoundEx("AuthRequest", "Alerts", "Authorization request");
- SkinAddNewSoundEx("AddedEvent", "Alerts", "Added event");
+ SkinAddNewSoundEx("AuthRequest", LPGEN("Alerts"), LPGEN("Authorization request"));
+ SkinAddNewSoundEx("AddedEvent", LPGEN("Alerts"), LPGEN("Added event"));
return 0;
}
diff --git a/src/modules/srfile/file.cpp b/src/modules/srfile/file.cpp
index 9d142fcdbe..6f3b3e0ddf 100644
--- a/src/modules/srfile/file.cpp
+++ b/src/modules/srfile/file.cpp
@@ -360,9 +360,9 @@ int LoadSendRecvFileModule(void)
CreateServiceFunction("SRFile/OpenContRecDir", openContRecDir);
CreateServiceFunction("SRFile/OpenRecDir", openRecDir);
- SkinAddNewSoundEx("RecvFile", "File", "Incoming");
- SkinAddNewSoundEx("FileDone", "File", "Complete");
- SkinAddNewSoundEx("FileFailed", "File", "Error");
- SkinAddNewSoundEx("FileDenied", "File", "Denied");
+ SkinAddNewSoundEx("RecvFile", LPGEN("File"), LPGEN("Incoming"));
+ SkinAddNewSoundEx("FileDone", LPGEN("File"), LPGEN("Complete"));
+ SkinAddNewSoundEx("FileFailed", LPGEN("File"), LPGEN("Error"));
+ SkinAddNewSoundEx("FileDenied", LPGEN("File"), LPGEN("Denied"));
return 0;
}
diff --git a/src/modules/srurl/url.cpp b/src/modules/srurl/url.cpp
index 9a7c6b3c32..4eafff94a2 100644
--- a/src/modules/srurl/url.cpp
+++ b/src/modules/srurl/url.cpp
@@ -177,6 +177,6 @@ int LoadSendRecvUrlModule(void)
HookEvent(ME_SYSTEM_PRESHUTDOWN, SRUrlShutdown);
CreateServiceFunction(MS_URL_SENDURL, SendUrlCommand);
CreateServiceFunction("SRUrl/ReadUrl", ReadUrlCommand);
- SkinAddNewSoundEx("RecvUrl", "URL", "Incoming");
+ SkinAddNewSoundEx("RecvUrl", LPGEN("URL"), LPGEN("Incoming"));
return 0;
}
diff --git a/src/modules/useronline/useronline.cpp b/src/modules/useronline/useronline.cpp
index bc41bb2a69..d89dddb2ac 100644
--- a/src/modules/useronline/useronline.cpp
+++ b/src/modules/useronline/useronline.cpp
@@ -112,6 +112,6 @@ int LoadUserOnlineModule(void)
HookEvent(ME_PROTO_ACK, UserOnlineAck);
HookEvent(ME_SYSTEM_MODULESLOADED, UserOnlineModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, UserOnlineAccountsChanged);
- SkinAddNewSoundEx("UserOnline", "Alerts", "Online");
+ SkinAddNewSoundEx("UserOnline", LPGEN("Alerts"), LPGEN("Online"));
return 0;
}
diff --git a/tools/dbtool/eventchain.cpp b/tools/dbtool/eventchain.cpp
index c48ab1b821..8760363287 100644
--- a/tools/dbtool/eventchain.cpp
+++ b/tools/dbtool/eventchain.cpp
@@ -44,7 +44,7 @@ static void ConvertOldEvent( DBEvent*& dbei )
break;
} } }
else {
- if( !is_utf8_string(( char* )dbei->blob) )
+ if( !is_utf8_string(( char* )dbei->blob))
dbei->flags &= ~DBEF_UTF;
}
diff --git a/tools/dbtool/selectdb.cpp b/tools/dbtool/selectdb.cpp
index d8fa36ed75..5bfd817cf5 100644
--- a/tools/dbtool/selectdb.cpp
+++ b/tools/dbtool/selectdb.cpp
@@ -74,7 +74,7 @@ static int AddDatabaseToList(HWND hwndList, TCHAR* filename, TCHAR* dir)
_tcscpy(szName,dir);
_tcscat(szName,pName);
pDot = _tcsrchr( szName, '.' );
- if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")) )
+ if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")))
*pDot=0;
lvi.iItem = 0;
@@ -181,7 +181,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
// search in profile dir (using ini file)
- if( lstrcmpi(szProfileDir,szMirandaProfiles) )
+ if( lstrcmpi(szProfileDir,szMirandaProfiles))
FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
@@ -191,7 +191,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
// search in profile dir (using registry path + ini file)
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) {
if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) {
- if( lstrcmp(szProfileDir,szMirandaPath) ) {
+ if( lstrcmp(szProfileDir,szMirandaPath)) {
GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
}
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
}
// select
if ( opts.filename[0] )
- i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T("") );
+ i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T(""));
if ( i == -1 )
i = 0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
@@ -250,7 +250,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
ofn.nMaxFileTitle = MAX_PATH;
if ( GetOpenFileName( &ofn )) {
int i;
- i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T("") );
+ i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T(""));
if ( i == -1 )
i=0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );