From 056d2be888a4235a109a123b7b2a715aa3ff72ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Mar 2013 14:55:49 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4225 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 2 +- plugins/UserInfoEx/src/Flags/svc_flags.h | 2 +- plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp | 4 +- plugins/UserInfoEx/src/Flags/svc_flagsicons.h | 6 +- plugins/UserInfoEx/src/classMAnnivDate.cpp | 195 ++++++++++----------- plugins/UserInfoEx/src/classMAnnivDate.h | 74 ++++---- plugins/UserInfoEx/src/classMTime.cpp | 50 +++--- plugins/UserInfoEx/src/classMTime.h | 74 ++++---- plugins/UserInfoEx/src/classPsTree.cpp | 82 ++++----- plugins/UserInfoEx/src/classPsTreeItem.cpp | 28 +-- plugins/UserInfoEx/src/commonheaders.h | 28 +-- plugins/UserInfoEx/src/ctrl_annivedit.cpp | 34 ++-- plugins/UserInfoEx/src/ctrl_annivedit.h | 32 ++-- plugins/UserInfoEx/src/ctrl_base.cpp | 10 +- plugins/UserInfoEx/src/ctrl_base.h | 18 +- plugins/UserInfoEx/src/ctrl_button.cpp | 48 ++--- plugins/UserInfoEx/src/ctrl_button.h | 4 +- plugins/UserInfoEx/src/ctrl_combo.cpp | 28 +-- plugins/UserInfoEx/src/ctrl_combo.h | 18 +- plugins/UserInfoEx/src/ctrl_contact.cpp | 96 +++++----- plugins/UserInfoEx/src/ctrl_contact.h | 14 +- plugins/UserInfoEx/src/ctrl_edit.cpp | 18 +- plugins/UserInfoEx/src/ctrl_edit.h | 10 +- plugins/UserInfoEx/src/ctrl_tzcombo.cpp | 26 +-- plugins/UserInfoEx/src/ctrl_tzcombo.h | 16 +- plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 64 +++---- plugins/UserInfoEx/src/dlg_anniversarylist.h | 4 +- plugins/UserInfoEx/src/dlg_msgbox.cpp | 18 +- plugins/UserInfoEx/src/dlg_propsheet.cpp | 94 +++++----- plugins/UserInfoEx/src/dlg_propsheet.h | 130 +++++++------- .../src/ex_import/classExImContactBase.cpp | 22 +-- .../src/ex_import/classExImContactBase.h | 42 ++--- .../src/ex_import/classExImContactXML.cpp | 64 +++---- .../UserInfoEx/src/ex_import/classExImContactXML.h | 34 ++-- .../UserInfoEx/src/ex_import/dlg_ExImModules.cpp | 10 +- plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h | 2 +- .../src/ex_import/dlg_ExImOpenSaveFile.cpp | 16 +- .../src/ex_import/dlg_ExImOpenSaveFile.h | 4 +- .../UserInfoEx/src/ex_import/dlg_ExImProgress.cpp | 18 +- .../UserInfoEx/src/ex_import/dlg_ExImProgress.h | 12 +- plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h | 4 +- plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp | 20 +-- plugins/UserInfoEx/src/ex_import/svc_ExImINI.h | 4 +- plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp | 56 +++--- plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h | 42 ++--- plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 14 +- plugins/UserInfoEx/src/ex_import/svc_ExImXML.h | 14 +- plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp | 8 +- plugins/UserInfoEx/src/ex_import/svc_ExImport.h | 2 +- plugins/UserInfoEx/src/init.cpp | 13 +- plugins/UserInfoEx/src/mir_contactqueue.cpp | 48 ++--- plugins/UserInfoEx/src/mir_contactqueue.h | 40 ++--- plugins/UserInfoEx/src/mir_db.cpp | 38 ++-- plugins/UserInfoEx/src/mir_db.h | 26 +-- plugins/UserInfoEx/src/mir_icolib.cpp | 14 +- plugins/UserInfoEx/src/mir_icolib.h | 8 +- plugins/UserInfoEx/src/mir_menuitems.cpp | 14 +- plugins/UserInfoEx/src/mir_menuitems.h | 12 +- plugins/UserInfoEx/src/psp_anniversary.cpp | 4 +- plugins/UserInfoEx/src/psp_base.cpp | 2 +- plugins/UserInfoEx/src/psp_base.h | 2 +- plugins/UserInfoEx/src/psp_general.cpp | 2 +- plugins/UserInfoEx/src/psp_options.cpp | 80 ++++----- plugins/UserInfoEx/src/psp_options.h | 2 +- plugins/UserInfoEx/src/psp_profile.cpp | 72 ++++---- plugins/UserInfoEx/src/svc_avatar.cpp | 14 +- plugins/UserInfoEx/src/svc_avatar.h | 4 +- plugins/UserInfoEx/src/svc_constants.cpp | 12 +- plugins/UserInfoEx/src/svc_constants.h | 6 +- plugins/UserInfoEx/src/svc_contactinfo.cpp | 6 +- plugins/UserInfoEx/src/svc_contactinfo.h | 2 +- plugins/UserInfoEx/src/svc_email.cpp | 22 +-- plugins/UserInfoEx/src/svc_email.h | 10 +- plugins/UserInfoEx/src/svc_gender.cpp | 12 +- plugins/UserInfoEx/src/svc_gender.h | 6 +- plugins/UserInfoEx/src/svc_homepage.cpp | 18 +- plugins/UserInfoEx/src/svc_homepage.h | 8 +- plugins/UserInfoEx/src/svc_phone.cpp | 14 +- plugins/UserInfoEx/src/svc_phone.h | 8 +- plugins/UserInfoEx/src/svc_refreshci.cpp | 60 +++---- plugins/UserInfoEx/src/svc_refreshci.h | 2 +- plugins/UserInfoEx/src/svc_reminder.cpp | 56 +++--- plugins/UserInfoEx/src/svc_reminder.h | 14 +- plugins/UserInfoEx/src/svc_timezone.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone.h | 2 +- plugins/UserInfoEx/src/svc_timezone_old.cpp | 36 ++-- plugins/UserInfoEx/src/svc_timezone_old.h | 6 +- 87 files changed, 1146 insertions(+), 1166 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 6056d3d9be..7f068b1e00 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -288,7 +288,7 @@ static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam) return 0; } -VOID SvcFlagsEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB) +void SvcFlagsEnableExtraIcons(BYTE bColumn, BYTE bUpdateDB) { gFlagsOpts.bShowExtraImgFlag = (bColumn!=((BYTE)-1)); if (bUpdateDB) diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.h b/plugins/UserInfoEx/src/Flags/svc_flags.h index bf4f9a12d6..19229be687 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.h +++ b/plugins/UserInfoEx/src/Flags/svc_flags.h @@ -79,7 +79,7 @@ typedef void (CALLBACK *BUFFEREDPROC)(LPARAM lParam); #endif void EnsureExtraImages(); -VOID SvcFlagsEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB); +void SvcFlagsEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB); void CALLBACK UpdateStatusIcons(LPARAM lParam); void SvcFlagsLoadModule(); diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index 3e08ee1232..2dd4b1ce73 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -285,7 +285,7 @@ static INT_PTR ServiceCreateMergedFlagIcon(WPARAM wParam,LPARAM lParam) /************************* Misc ***********************************/ -VOID InitIcons() +void InitIcons() { HIMAGELIST himl = {0}; HBITMAP hScrBM = 0; @@ -433,7 +433,7 @@ VOID InitIcons() CreateServiceFunction(MS_FLAGS_CREATEMERGEDFLAGICON,ServiceCreateMergedFlagIcon); } -VOID UninitIcons() +void UninitIcons() { for(int i=0;i 1600 && @@ -122,7 +122,7 @@ __inline BOOLEAN MAnnivDate::IsValid() const * param: mt - MTime to compare with * return: number of days the mt differs from the class value **/ -INT MAnnivDate::CompareDays(MTime mt) const +int MAnnivDate::CompareDays(MTime mt) const { mt.Year(Year()); return DayOfYear() - mt.DayOfYear(); @@ -135,7 +135,7 @@ INT MAnnivDate::CompareDays(MTime mt) const * param: st - SYSTEMTIME to compare with * return: number of days the st differs from the class value **/ -BOOLEAN MAnnivDate::IsEqual(const SYSTEMTIME &st) const +BYTE MAnnivDate::IsEqual(const SYSTEMTIME &st) const { return ( Day() == st.wDay && @@ -170,7 +170,7 @@ DWORD MAnnivDate::DateStamp() const * param: dwStamp - the dword encoded date * return: nothing **/ -VOID MAnnivDate::DateStamp(const DWORD dwStamp) +void MAnnivDate::DateStamp(const DWORD dwStamp) { Day((const WORD)((dwStamp & 0xFF000000) >> 24)); Month((const WORD)((dwStamp & 0x00FF0000) >> 16)); @@ -184,9 +184,9 @@ VOID MAnnivDate::DateStamp(const DWORD dwStamp) * param: pNow - optional pointer to a MTime class to specify a certain time to use for age calculation * return: number of years the anniversary differs from now **/ -INT MAnnivDate::Age(MTime *pNow) +int MAnnivDate::Age(MTime *pNow) { - INT age = 0; + int age = 0; MTime now; if (!IsValid()) return -1; @@ -253,7 +253,7 @@ MZodiac MAnnivDate::Zodiac() * param: hContact - handle to a contact to read the date from * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBGetReminderOpts(HANDLE hContact) +int MAnnivDate::DBGetReminderOpts(HANDLE hContact) { if (!hContact || hContact == INVALID_HANDLE_VALUE) return 1; @@ -285,7 +285,7 @@ INT MAnnivDate::DBGetReminderOpts(HANDLE hContact) * param: hContact - handle to a contact to read the date from * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBWriteReminderOpts(HANDLE hContact) +int MAnnivDate::DBWriteReminderOpts(HANDLE hContact) { if (!hContact || hContact == INVALID_HANDLE_VALUE) return 1; @@ -326,7 +326,7 @@ INT MAnnivDate::DBWriteReminderOpts(HANDLE hContact) * szYear - setting of the year to read * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) +int MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) { WORD wtmp; @@ -363,7 +363,7 @@ INT MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCST * szYear - setting of the year to read * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) +int MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) { return ( DB::Setting::WriteByte(hContact, pszModule, szDay, (BYTE)Day()) || @@ -383,9 +383,9 @@ INT MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPC * szYear - setting of the year to read * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const +int MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const { - INT ret; + int ret; ret = DB::Setting::Delete(hContact, pszModule, szDay); ret &= DB::Setting::Delete(hContact, pszModule, szMonth); @@ -406,7 +406,7 @@ INT MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LP * pszSetting - key used to identify the datestamp * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) +int MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) { DBVARIANT dbv; @@ -429,7 +429,7 @@ INT MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSett * pszSetting - key used to save the datestamp * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) +int MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) { DWORD dwStamp = DateStamp(); @@ -455,7 +455,7 @@ INT MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSe * pszProto - basic protocol module * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto) +int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto) { Clear(); @@ -478,7 +478,7 @@ INT MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto) // try to get birthday date from metacontact's subcontact else if (DB::Module::IsMetaAndScan(pszProto)) { - const INT def = DB::MetaContact::SubDefNum(hContact); + const int def = DB::MetaContact::SubDefNum(hContact); HANDLE hSubContact; // try to get setting from the default subcontact first @@ -495,11 +495,11 @@ INT MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto) // scan all subcontacts for the setting if (_wFlags == 0) { - const INT cnt = DB::MetaContact::SubCount(hContact); + const int cnt = DB::MetaContact::SubCount(hContact); if (cnt < INT_MAX) { - INT i; + int i; for (i = 0; i < cnt; i++) { if (i != def) @@ -532,7 +532,7 @@ INT MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto) * return: 0 on success, 1 otherwise **/ // -INT MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew) { +int MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew) { Clear(); switch(bOld) { case 0: //MOD_MBIRTHDAY @@ -566,9 +566,9 @@ INT MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew) { * pszProto - basic protocol module * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBWriteBirthDate(HANDLE hContact) +int MAnnivDate::DBWriteBirthDate(HANDLE hContact) { - INT rc = 0; + int rc = 0; LPCSTR pszModule = SvcReminderGetMyBirthdayModule(); rc = DBWriteDate(hContact, pszModule, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR); @@ -614,7 +614,7 @@ INT MAnnivDate::DBWriteBirthDate(HANDLE hContact) * pszProto - basic protocol module * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBDeleteBirthDate(HANDLE hContact) +int MAnnivDate::DBDeleteBirthDate(HANDLE hContact) { return DBDeleteDate(hContact, Module(), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR); } @@ -631,11 +631,11 @@ INT MAnnivDate::DBDeleteBirthDate(HANDLE hContact) * pszProto - basic protocol module * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex) +int MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex) { CHAR szStamp[MAXSETTING]; DBVARIANT dbv; - INT rc; + int rc; Clear(); @@ -667,9 +667,9 @@ INT MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex) * pszProto - basic protocol module * return: 0 on success, 1 otherwise **/ -INT MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex) +int MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex) { - INT ret = 0; + int ret = 0; // date can only be written to db as anniversary if it is not marked as birthday if (wIndex <= ANID_LAST && _wID != ANID_BIRTHDAY) @@ -730,97 +730,78 @@ static WORD AskUser(HANDLE hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNe * pszProto - basic protocol module * return: 0 if backup was done, 1 otherwise **/ -INT MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BOOLEAN bDontIgnoreAnything, PWORD lastAnswer) +int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer) { - if (hContact) - { - // This birthday is a protocol based or metasubcontact's anniversary and no custom information exist, - // so directly back it up under all circumstances! - if ((_wFlags & MADF_HASPROTO) || (_wFlags & MADF_HASMETA)) - { + if (!hContact) + return 1; + + // This birthday is a protocol based or metasubcontact's anniversary and no custom information exist, + // so directly back it up under all circumstances! + if ( _wFlags & (MADF_HASPROTO | MADF_HASMETA)) { + if (lastAnswer == NULL) { DBWriteDateStamp(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); DBWriteBirthDate(hContact); } - // A custom birthday was set by user before and is not to be ignored - else if ((_wFlags & MADF_HASCUSTOM) && (bDontIgnoreAnything || !lastAnswer || (*lastAnswer != IDNONE))) - { - if (!pszProto) - { - pszProto = DB::Contact::Proto(hContact); - } - if (pszProto) - { - BOOLEAN bIsMeta = DB::Module::IsMeta(pszProto); - BOOLEAN bIsMetaSub = !bIsMeta && DB::MetaContact::IsSub(hContact); - BOOLEAN bWantBackup = FALSE; - MAnnivDate mdbNewProto; - MAnnivDate mdbIgnore; - HANDLE hSubContact; - - const INT nSubContactCount = (bIsMeta) ? DB::MetaContact::SubCount(hContact) : 0; - - bWantBackup = !mdbNewProto.DBGetDate(hContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR) - && !IsEqual(mdbNewProto.SystemTime()) - && (bDontIgnoreAnything || (DB::Setting::GetDWord(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED, 0) != mdbNewProto.DateStamp())) - && !bIsMetaSub; + return 1; + } - // allow backup only, if the custom setting differs from all meta subcontacts' protocol based settings, too. - for (INT i = 0; (i < nSubContactCount) && bWantBackup && bIsMeta; i++) - { - hSubContact = DB::MetaContact::Sub(hContact, i); - if (hSubContact && !mdbIgnore.DBGetDate(hSubContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) - { - bWantBackup = bWantBackup - && !IsEqual(mdbIgnore.SystemTime()) - && (bDontIgnoreAnything || (DB::Setting::GetDWord(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED, 0) != mdbIgnore.DateStamp())); + // A custom birthday was set by user before and is not to be ignored + if ((_wFlags & MADF_HASCUSTOM) && (bDontIgnoreAnything || !lastAnswer || (*lastAnswer != IDNONE))) { + if (!pszProto) + pszProto = DB::Contact::Proto(hContact); + + if (pszProto) { + BYTE bIsMeta = DB::Module::IsMeta(pszProto); + BYTE bIsMetaSub = !bIsMeta && DB::MetaContact::IsSub(hContact); + MAnnivDate mdbNewProto; + MAnnivDate mdbIgnore; + + const int nSubContactCount = (bIsMeta) ? DB::MetaContact::SubCount(hContact) : 0; + + BYTE bWantBackup = !mdbNewProto.DBGetDate(hContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR) + && !IsEqual(mdbNewProto.SystemTime()) + && (bDontIgnoreAnything || (DB::Setting::GetDWord(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED, 0) != mdbNewProto.DateStamp())) + && !bIsMetaSub; + + // allow backup only, if the custom setting differs from all meta subcontacts' protocol based settings, too. + for (int i = 0; (i < nSubContactCount) && bWantBackup && bIsMeta; i++) { + HANDLE hSubContact = DB::MetaContact::Sub(hContact, i); + if (hSubContact && !mdbIgnore.DBGetDate(hSubContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) + bWantBackup = bWantBackup + && !IsEqual(mdbIgnore.SystemTime()) + && (bDontIgnoreAnything || (DB::Setting::GetDWord(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED, 0) != mdbIgnore.DateStamp())); + } + if (bWantBackup) { + if (!lastAnswer || *lastAnswer != IDALL) { + WORD rc = AskUser(hContact, this, &mdbNewProto); + if (lastAnswer) + *lastAnswer = rc; + + if (IDYES != rc && IDALL != rc) { + // special handling for metasubcontacts required?! + mdbNewProto.DBWriteDateStamp(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); + bWantBackup = FALSE; } } - if (bWantBackup) - { - if (!lastAnswer || *lastAnswer != IDALL) - { - WORD rc = AskUser(hContact, this, &mdbNewProto); - if (lastAnswer) - { - *lastAnswer = rc; - } - if (IDYES != rc && IDALL != rc) - { - // special handling for metasubcontacts required?! - mdbNewProto.DBWriteDateStamp(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); - bWantBackup = FALSE; - } - } - if (bWantBackup) - { - Set(mdbNewProto); - DBWriteDateStamp(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); - DBWriteBirthDate(hContact); + if (bWantBackup) { + Set(mdbNewProto); + DBWriteDateStamp(hContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); + DBWriteBirthDate(hContact); - // update metasubcontacts - for (INT i = 0; i < nSubContactCount; i++) - { - hSubContact = DB::MetaContact::Sub(hContact, i); - if (hSubContact != NULL) - { - if (!mdbIgnore.DBGetDate(hSubContact, DB::Contact::Proto(hSubContact), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) - { - mdbIgnore.DBWriteDateStamp(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); - } - DBWriteBirthDate(hSubContact); - } + // update metasubcontacts + for (int i = 0; i < nSubContactCount; i++) { + HANDLE hSubContact = DB::MetaContact::Sub(hContact, i); + if (hSubContact != NULL) { + if (!mdbIgnore.DBGetDate(hSubContact, DB::Contact::Proto(hSubContact), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) + mdbIgnore.DBWriteDateStamp(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED); + + DBWriteBirthDate(hSubContact); } - return 0; } + return 0; } } } - /* - else if (mir_stricmp(Module(), SvcReminderGetMyBirthdayModule())) - { - DBWriteBirthDate(hContact); - } - */ } return 1; } \ No newline at end of file diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index 85d81a69fd..acc3790b96 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -50,8 +50,8 @@ private: BYTE _bRemind; // per user setting for reminder (0 - disabled, 1 - use local offset, 2 - use global offset) WORD _wDaysEarlier; // number of days to the anniversary the user wants to be reminded of this anniversary - INT DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear); - INT DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const; + int DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear); + int DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const; public: MAnnivDate(); @@ -59,65 +59,65 @@ public: // basic access to attributes __inline LPCTSTR Description() const { return _strDesc.c_str(); }; - __inline VOID Description(LPCTSTR pszDesc) { if (pszDesc) _strDesc = pszDesc; }; + __inline void Description(LPCTSTR pszDesc) { if (pszDesc) _strDesc = pszDesc; }; __inline LPCSTR Module() const { return _strModule.c_str(); }; - __inline VOID Module(LPCSTR pszModule) { if (pszModule) _strModule = pszModule; else _strModule.clear(); }; + __inline void Module(LPCSTR pszModule) { if (pszModule) _strModule = pszModule; else _strModule.clear(); }; __inline BYTE RemindOption() const { return _bRemind; }; - __inline VOID RemindOption(BYTE bRemind) { if (bRemind <= BST_INDETERMINATE) _bRemind = bRemind; }; + __inline void RemindOption(BYTE bRemind) { if (bRemind <= BST_INDETERMINATE) _bRemind = bRemind; }; __inline WORD RemindOffset() const { return _wDaysEarlier; }; - __inline VOID RemindOffset(WORD wOffset) { _wDaysEarlier = wOffset; }; + __inline void RemindOffset(WORD wOffset) { _wDaysEarlier = wOffset; }; __inline WORD Id() const { return _wID; }; - __inline VOID Id(WORD wId) { if (_wID == ANID_NONE) _wID = wId; }; + __inline void Id(WORD wId) { if (_wID == ANID_NONE) _wID = wId; }; DWORD DateStamp() const; - VOID DateStamp(const DWORD dwStamp); + void DateStamp(const DWORD dwStamp); // basic checks - __inline BOOLEAN IsValid() const; - __inline BOOLEAN IsChanged() const { return (_wFlags & MADF_CHANGED); }; - __inline BOOLEAN IsReminderChanged() const { return (_wFlags & MADF_REMINDER_CHANGED); }; - __inline BOOLEAN IsEqual(const MAnnivDate &mda) const { return IsEqual(mda.SystemTime()); }; - BOOLEAN IsEqual(const SYSTEMTIME &st) const; + __inline BYTE IsValid() const; + __inline BYTE IsChanged() const { return (_wFlags & MADF_CHANGED); }; + __inline BYTE IsReminderChanged() const { return (_wFlags & MADF_REMINDER_CHANGED); }; + __inline BYTE IsEqual(const MAnnivDate &mda) const { return IsEqual(mda.SystemTime()); }; + BYTE IsEqual(const SYSTEMTIME &st) const; // handling flags __inline WORD Flags() const { return _wFlags; }; - __inline VOID Flags(WORD wFlags) { _wFlags = wFlags; }; - __inline VOID SetFlags(WORD wFlag) { _wFlags |= wFlag; }; - __inline VOID RemoveFlags(WORD wFlag) { _wFlags &= ~wFlag; }; + __inline void Flags(WORD wFlags) { _wFlags = wFlags; }; + __inline void SetFlags(WORD wFlag) { _wFlags |= wFlag; }; + __inline void RemoveFlags(WORD wFlag) { _wFlags &= ~wFlag; }; // return diffence of days, ignoring the date - INT CompareDays(MTime mt) const; + int CompareDays(MTime mt) const; MZodiac Zodiac(); - INT Age(MTime *pNow = NULL); - VOID Clear(); + int Age(MTime *pNow = NULL); + void Clear(); // read date from database - INT DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear); - INT DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); - INT DBGetAnniversaryDate(HANDLE hContact, WORD iIndex); - INT DBGetBirthDate(HANDLE hContact, LPSTR pszProto = NULL); - INT DBGetReminderOpts(HANDLE hContact); + int DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear); + int DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); + int DBGetAnniversaryDate(HANDLE hContact, WORD iIndex); + int DBGetBirthDate(HANDLE hContact, LPSTR pszProto = NULL); + int DBGetReminderOpts(HANDLE hContact); // write date to database - INT DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); - INT DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex); - INT DBWriteBirthDate(HANDLE hContact); - INT DBWriteReminderOpts(HANDLE hContact); + int DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); + int DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex); + int DBWriteBirthDate(HANDLE hContact); + int DBWriteReminderOpts(HANDLE hContact); // delete date from database - INT DBDeleteBirthDate(HANDLE hContact); + int DBDeleteBirthDate(HANDLE hContact); - INT DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew); - INT BackupBirthday (HANDLE hContact, LPSTR pszProto = NULL, const BOOLEAN bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL); + int DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew); + int BackupBirthday (HANDLE hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL); // setting values - VOID SetDate(SYSTEMTIME &st); - VOID SetDate(MAnnivDate &mda); + void SetDate(SYSTEMTIME &st); + void SetDate(MAnnivDate &mda); - BOOLEAN operator == (const SYSTEMTIME &st) { return IsEqual(st); }; - BOOLEAN operator == (const MAnnivDate &mda) { return IsEqual(mda); }; + BYTE operator == (const SYSTEMTIME &st) { return IsEqual(st); }; + BYTE operator == (const MAnnivDate &mda) { return IsEqual(mda); }; - VOID operator = (SYSTEMTIME &st) { SetDate(st); }; - VOID operator = (MAnnivDate &mda) { SetDate(mda); }; + void operator = (SYSTEMTIME &st) { SetDate(st); }; + void operator = (MAnnivDate &mda) { SetDate(mda); }; }; diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 27a1f53305..cfd1bd7562 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -38,19 +38,19 @@ MTime::MTime() ZeroDate(); } -MTime::MTime(SYSTEMTIME &st, const BOOLEAN bIsLocal) +MTime::MTime(SYSTEMTIME &st, const BYTE bIsLocal) { _SysTime = st; _isLocal = bIsLocal != FALSE; } -MTime::MTime(FILETIME &ft, const BOOLEAN bIsLocal) +MTime::MTime(FILETIME &ft, const BYTE bIsLocal) { ZeroDate(); Set(ft, bIsLocal); } -MTime::MTime(LARGE_INTEGER &li, const BOOLEAN bIsLocal) +MTime::MTime(LARGE_INTEGER &li, const BYTE bIsLocal) { ZeroDate(); Set(li, bIsLocal); @@ -67,7 +67,7 @@ MTime::MTime(const MTime& mtime) Set(mtime); } -VOID MTime::ZeroDate() +void MTime::ZeroDate() { _isLocal = FALSE; ZeroMemory(&_SysTime, sizeof(_SysTime)); @@ -77,7 +77,7 @@ VOID MTime::ZeroDate() * validation / checks *********************************************/ -BOOLEAN MTime::IsValid() const +BYTE MTime::IsValid() const { return ( _SysTime.wYear > 1600 && @@ -88,7 +88,7 @@ BOOLEAN MTime::IsValid() const _SysTime.wSecond < 60 ); } -BOOLEAN MTime::IsLeapYear() const +BYTE MTime::IsLeapYear() const { return (!(((_SysTime.wYear) % 4 != 0) || (((_SysTime.wYear) % 100 == 0) && ((_SysTime.wYear) % 400 != 0)))); } @@ -164,7 +164,7 @@ LONG MTime::Compare(const MTime &mt) const * conversions *********************************************/ -VOID MTime::UTCToLocal() +void MTime::UTCToLocal() { if (!IsLocal()) { TIME_ZONE_INFORMATION tzInfo; @@ -175,7 +175,7 @@ VOID MTime::UTCToLocal() } } -VOID MTime::UTCToTzSpecificLocal(INT tzh) +void MTime::UTCToTzSpecificLocal(int tzh) { TIME_ZONE_INFORMATION tzInfo; @@ -214,7 +214,7 @@ LONG MTime::_Offset(TIME_ZONE_INFORMATION *tzi) return offset; } -VOID MTime::UTCToTzSpecificLocal(TIME_ZONE_INFORMATION *tzi) +void MTime::UTCToTzSpecificLocal(TIME_ZONE_INFORMATION *tzi) { LARGE_INTEGER liFiletime; @@ -226,7 +226,7 @@ VOID MTime::UTCToTzSpecificLocal(TIME_ZONE_INFORMATION *tzi) } } -VOID MTime::TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi) +void MTime::TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi) { LARGE_INTEGER liFiletime; @@ -238,7 +238,7 @@ VOID MTime::TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi) } } -VOID MTime::LocalToUTC() +void MTime::LocalToUTC() { TIME_ZONE_INFORMATION tzInfo; @@ -295,7 +295,7 @@ WORD MTime::DaysInMonth(const WORD &wMonth) const return (IsLeapYear() && wMonth == 2) ? wDaysInMonth[wMonth] + 1 : wDaysInMonth[wMonth]; } -WORD MTime::DaysInYear(BOOLEAN bIgnoreLeap) const +WORD MTime::DaysInYear(BYTE bIgnoreLeap) const { return ((!bIgnoreLeap && IsLeapYear()) ? 366 : 365); }; @@ -311,9 +311,9 @@ WORD MTime::DayOfYear() const return daysResult; } -WORD MTime::AdjustYear(const INT nDiffDays) +WORD MTime::AdjustYear(const int nDiffDays) { - const INT nDay = DayOfYear() + nDiffDays; + const int nDay = DayOfYear() + nDiffDays; if (nDay > DaysInYear()) return _SysTime.wYear + 1; @@ -359,56 +359,56 @@ WORD MTime::DateFormatLong(LPTSTR ptszTimeFormat, WORD cchTimeFormat) * set class value *********************************************/ -VOID MTime::FromStampAsUTC(const DWORD dwTimeStamp) +void MTime::FromStampAsUTC(const DWORD dwTimeStamp) { LARGE_INTEGER li; li.QuadPart = (dwTimeStamp + 11644473600i64) * 10000000i64; Set(li, FALSE); } -VOID MTime::FromStampAsLocal(const DWORD dwTimeStamp) +void MTime::FromStampAsLocal(const DWORD dwTimeStamp) { FromStampAsUTC(dwTimeStamp); UTCToLocal(); } -VOID MTime::Set(LARGE_INTEGER liFileTime, const BOOLEAN bIsLocal) +void MTime::Set(LARGE_INTEGER liFileTime, const BYTE bIsLocal) { if (liFileTime.QuadPart < 0i64) liFileTime.QuadPart = 0; FileTimeToSystemTime((LPFILETIME)&liFileTime, &_SysTime); _isLocal = bIsLocal != FALSE; } -VOID MTime::Set(FILETIME &ftFileTime, const BOOLEAN bIsLocal) +void MTime::Set(FILETIME &ftFileTime, const BYTE bIsLocal) { FileTimeToSystemTime(&ftFileTime, &_SysTime); _isLocal = bIsLocal != FALSE; } -VOID MTime::Set(const MTime &mt) +void MTime::Set(const MTime &mt) { Set(mt.SystemTime(), mt.IsLocal()); } -VOID MTime::Set(SYSTEMTIME &st, const BOOLEAN bIsLocal) +void MTime::Set(SYSTEMTIME &st, const BYTE bIsLocal) { memcpy(&_SysTime, &st, sizeof(SYSTEMTIME)); _isLocal = bIsLocal != FALSE; } -VOID MTime::GetTimeUTC() +void MTime::GetTimeUTC() { _isLocal = FALSE; ::GetSystemTime(&_SysTime); } -VOID MTime::GetLocalTime() +void MTime::GetLocalTime() { _isLocal = TRUE; ::GetLocalTime(&_SysTime); } -VOID MTime::GetLocalTime(HANDLE hContact) +void MTime::GetLocalTime(HANDLE hContact) { TIME_ZONE_INFORMATION tzi; @@ -423,7 +423,7 @@ VOID MTime::GetLocalTime(HANDLE hContact) * read and write time to miranda's database *********************************************/ -INT MTime::DBGetStamp (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) +int MTime::DBGetStamp (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) { DWORD dwTimeStamp; @@ -446,7 +446,7 @@ INT MTime::DBGetStamp (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) return 0; } -INT MTime::DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) +int MTime::DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) { if (hContact == INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index ff176a0186..99706578aa 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -23,23 +23,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class MTime { SYSTEMTIME _SysTime; - BOOLEAN _isLocal; + BYTE _isLocal; LONG _Offset(TIME_ZONE_INFORMATION *tzi); public: // contruction MTime(); - MTime(SYSTEMTIME &st, const BOOLEAN bIsLocal); - MTime(FILETIME &ft, const BOOLEAN bIsLocal); - MTime(LARGE_INTEGER &li, const BOOLEAN bIsLocal); + MTime(SYSTEMTIME &st, const BYTE bIsLocal); + MTime(FILETIME &ft, const BYTE bIsLocal); + MTime(LARGE_INTEGER &li, const BYTE bIsLocal); MTime(DWORD dwStamp); MTime(const MTime& mtime); // checks - __inline BOOLEAN IsLocal() const { return _isLocal; }; - BOOLEAN IsValid() const; - BOOLEAN IsLeapYear() const; + __inline BYTE IsLocal() const { return _isLocal; }; + BYTE IsValid() const; + BYTE IsLeapYear() const; // compare by seconds LONG Compare(SYSTEMTIME st) const; @@ -53,9 +53,9 @@ public: DWORD TimeStamp() const; SYSTEMTIME SystemTime() const { return _SysTime; }; WORD DaysInMonth(const WORD &wMonth) const; - WORD DaysInYear(BOOLEAN bIgnoreLeap = FALSE) const; + WORD DaysInYear(BYTE bIgnoreLeap = FALSE) const; WORD DayOfYear() const; - WORD AdjustYear(const INT nDiffDays); + WORD AdjustYear(const int nDiffDays); WORD TimeFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat); WORD TimeFormat(tstring& str); @@ -72,46 +72,46 @@ public: __inline WORD Second() const { return _SysTime.wSecond; }; // set single values - __inline VOID Minute(const WORD wMinute) { if (wMinute <= 59) _SysTime.wMinute = wMinute; }; - __inline VOID Hour(const WORD wHour) { if (wHour <= 24) _SysTime.wHour = wHour; }; - __inline VOID Day(const WORD wDay) { if (wDay <= 31) _SysTime.wDay = wDay; }; - __inline VOID Month(const WORD wMonth) { if (wMonth <= 12) _SysTime.wMonth = wMonth; }; - __inline VOID Year(const WORD wYear) { _SysTime.wYear = wYear; }; + __inline void Minute(const WORD wMinute) { if (wMinute <= 59) _SysTime.wMinute = wMinute; }; + __inline void Hour(const WORD wHour) { if (wHour <= 24) _SysTime.wHour = wHour; }; + __inline void Day(const WORD wDay) { if (wDay <= 31) _SysTime.wDay = wDay; }; + __inline void Month(const WORD wMonth) { if (wMonth <= 12) _SysTime.wMonth = wMonth; }; + __inline void Year(const WORD wYear) { _SysTime.wYear = wYear; }; // set value to class - VOID ZeroDate(); - VOID FromStampAsUTC(const DWORD dwTimeStamp); - VOID FromStampAsLocal(const DWORD dwTimeStamp); - VOID Set(FILETIME &ftFileTime, const BOOLEAN bIsLocal); - VOID Set(LARGE_INTEGER liFileTime, const BOOLEAN bIsLocal); - VOID Set(SYSTEMTIME &st, const BOOLEAN bIsLocal); - VOID Set(const MTime &mt); + void ZeroDate(); + void FromStampAsUTC(const DWORD dwTimeStamp); + void FromStampAsLocal(const DWORD dwTimeStamp); + void Set(FILETIME &ftFileTime, const BYTE bIsLocal); + void Set(LARGE_INTEGER liFileTime, const BYTE bIsLocal); + void Set(SYSTEMTIME &st, const BYTE bIsLocal); + void Set(const MTime &mt); // get current time - VOID GetTimeUTC(); - VOID GetLocalTime(); - VOID GetLocalTime(HANDLE hContact); + void GetTimeUTC(); + void GetLocalTime(); + void GetLocalTime(HANDLE hContact); // conversions - VOID UTCToLocal(); - VOID UTCToTzSpecificLocal(INT tzh); - VOID UTCToTzSpecificLocal(TIME_ZONE_INFORMATION *tzi); - VOID LocalToUTC(); - VOID TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi); + void UTCToLocal(); + void UTCToTzSpecificLocal(int tzh); + void UTCToTzSpecificLocal(TIME_ZONE_INFORMATION *tzi); + void LocalToUTC(); + void TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi); // read and write from and to db - INT DBGetStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); - INT DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); + int DBGetStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); + int DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); // operatoren - VOID operator = (DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); }; - VOID operator = (FILETIME &ftFileTime) { Set(ftFileTime, FALSE); }; - VOID operator = (LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); }; - VOID operator = (SYSTEMTIME &st) { Set(st, FALSE); }; - VOID operator = (const MTime &mt) { Set(mt); }; + void operator = (DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); }; + void operator = (FILETIME &ftFileTime) { Set(ftFileTime, FALSE); }; + void operator = (LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); }; + void operator = (SYSTEMTIME &st) { Set(st, FALSE); }; + void operator = (const MTime &mt) { Set(mt); }; }; /** * prototypes **/ -VOID UserTime_LoadModule(VOID); +void UserTime_LoadModule(void); diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index 17a4b8da78..b1564eb650 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -62,7 +62,7 @@ CPsTree::~CPsTree() } if (_pItems) { - for (INT i = 0; i < _numItems; i++) + for (int i = 0; i < _numItems; i++) { if (_pItems[i]) { @@ -85,9 +85,9 @@ CPsTree::~CPsTree() * param: none * return: none **/ -BOOLEAN CPsTree::Create(HWND hWndTree, CPsHdr* pPsh) +BYTE CPsTree::Create(HWND hWndTree, CPsHdr* pPsh) { - BOOLEAN rc; + BYTE rc; if (hWndTree && pPsh->_hImages && pPsh->_pPages && pPsh->_numPages) { @@ -116,7 +116,7 @@ BOOLEAN CPsTree::Create(HWND hWndTree, CPsHdr* pPsh) * param: pszGroup - utf8 encoded string of the item to add * return: index of the new item or -1 if failed to add **/ -INT CPsTree::AddDummyItem(LPCSTR pszGroup) +int CPsTree::AddDummyItem(LPCSTR pszGroup) { if (mir_stricmp(pszGroup, TREE_ROOTITEM)) { @@ -150,9 +150,9 @@ INT CPsTree::AddDummyItem(LPCSTR pszGroup) * param: needWidth - width to expand the tree by * return: TRUE if initialization is ok, FALSE otherwise **/ -BOOLEAN CPsTree::InitTreeItems(LPWORD needWidth) +BYTE CPsTree::InitTreeItems(LPWORD needWidth) { - INT i; + int i; DBVARIANT dbv; if (!_hWndTree || !_pItems) @@ -180,7 +180,7 @@ BOOLEAN CPsTree::InitTreeItems(LPWORD needWidth) { if (_pItems[i] && (pszGroup = _pItems[i]->ParentItemName()) != NULL) { - INT iParent = FindItemIndexByName(pszGroup); + int iParent = FindItemIndexByName(pszGroup); // need to add an empty parent item if (iParent == -1) @@ -220,9 +220,9 @@ BOOLEAN CPsTree::InitTreeItems(LPWORD needWidth) * param: hItem - handle of the treeview's treeitem * return: HTREEITEM if item exists or NULL otherwise **/ -INT CPsTree::FindItemIndexByHandle(HTREEITEM hItem) +int CPsTree::FindItemIndexByHandle(HTREEITEM hItem) { - INT i; + int i; for (i = 0; i < _numItems; i++) { if (_pItems[i] && hItem == _pItems[i]->Hti()) @@ -240,9 +240,9 @@ INT CPsTree::FindItemIndexByHandle(HTREEITEM hItem) * param: hItem - handle of the treeview's treeitem * return: HTREEITEM if item exists or NULL otherwise **/ -INT CPsTree::FindItemIndexByName(LPCSTR pszName) +int CPsTree::FindItemIndexByName(LPCSTR pszName) { - INT i; + int i; for (i = 0; i < _numItems; i++) { if (_pItems[i] && _pItems[i]->HasName(pszName)) @@ -262,7 +262,7 @@ INT CPsTree::FindItemIndexByName(LPCSTR pszName) **/ CPsTreeItem* CPsTree::FindItemByHandle(HTREEITEM hItem) { - INT i; + int i; if ((i = FindItemIndexByHandle(hItem)) > -1) { @@ -280,7 +280,7 @@ CPsTreeItem* CPsTree::FindItemByHandle(HTREEITEM hItem) **/ CPsTreeItem* CPsTree::FindItemByName(LPCSTR pszName) { - INT i; + int i; if ((i = FindItemIndexByName(pszName)) > -1) { @@ -296,9 +296,9 @@ CPsTreeItem* CPsTree::FindItemByName(LPCSTR pszName) * param: hItem - handle of the treeview's treeitem * return: HTREEITEM if item exists or NULL otherwise **/ -CPsTreeItem* CPsTree::FindItemByResource(HINSTANCE hInst, INT idDlg) +CPsTreeItem* CPsTree::FindItemByResource(HINSTANCE hInst, int idDlg) { - INT i; + int i; for (i = 0; i < _numItems; i++) { if (_pItems[i] && _pItems[i]->Inst() == hInst && _pItems[i]->DlgId() == idDlg) @@ -319,7 +319,7 @@ CPsTreeItem* CPsTree::FindItemByResource(HINSTANCE hInst, INT idDlg) **/ HTREEITEM CPsTree::FindItemHandleByName(LPCSTR pszName) { - INT i; + int i; if ((i = FindItemIndexByName(pszName)) > -1) { @@ -340,7 +340,7 @@ HTREEITEM CPsTree::FindItemHandleByName(LPCSTR pszName) * param: iPageIndex - the index of the treeitem in the array. * return: nothing **/ -VOID CPsTree::HideItem(const INT iPageIndex) +void CPsTree::HideItem(const int iPageIndex) { if (IsIndexValid(iPageIndex)) { @@ -358,7 +358,7 @@ VOID CPsTree::HideItem(const INT iPageIndex) * needWidth - gives and takes the width, the treeview must have to show all items properly * return: TRUE if item was added successfully, FALSE otherwise **/ -HTREEITEM CPsTree::ShowItem(const INT iPageIndex, LPWORD needWidth) +HTREEITEM CPsTree::ShowItem(const int iPageIndex, LPWORD needWidth) { TVINSERTSTRUCT tvii; CPsTreeItem *pti; @@ -377,7 +377,7 @@ HTREEITEM CPsTree::ShowItem(const INT iPageIndex, LPWORD needWidth) if ((tvii.itemex.hItem = pti->Hti()) == NULL) { RECT rc; - const INT iParent = pti->Parent(); + const int iParent = pti->Parent(); // init the rest of the treeitem tvii.hParent = IsIndexValid(iParent) ? ShowItem(iParent, needWidth) : NULL; @@ -418,11 +418,11 @@ HTREEITEM CPsTree::ShowItem(const INT iPageIndex, LPWORD needWidth) * bAsChild - tells, whether to try to add hItem as child of hInsertAfter or not * return: handle to new (moved) treeitem if successful or NULL otherwise **/ -HTREEITEM CPsTree::MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild) +HTREEITEM CPsTree::MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, BYTE bAsChild) { TVINSERTSTRUCT tvis; HTREEITEM hParent, hChild, hNewItem; - INT iItemIndex; + int iItemIndex; if (!hItem || !hInsertAfter) return NULL; @@ -501,7 +501,7 @@ HTREEITEM CPsTree::MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAs * iItem - index of the current item for position saving * return: 0 on success or 1 otherwise **/ -WORD CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, INT& iItem) +WORD CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem) { TVITEMEX tvi; WORD numErrors = 0; @@ -529,13 +529,13 @@ WORD CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, INT& iItem) * param: none * return: nothing **/ -VOID CPsTree::SaveState() +void CPsTree::SaveState() { CPsTreeItem *pti = CurrentItem(); if (_hWndTree && (_dwFlags & (PSTVF_LABEL_CHANGED|PSTVF_POS_CHANGED|PSTVF_STATE_CHANGED))) { SHORT i; - INT iItem = 0; + int iItem = 0; // save all visible items WORD numErrors = SaveItemsState(TREE_ROOTITEM, TVGN_ROOT, iItem); @@ -568,13 +568,13 @@ VOID CPsTree::SaveState() * iItem - index of the current item for position saving * return: 0 on success or 1 otherwise **/ -VOID CPsTree::DBResetState() +void CPsTree::DBResetState() { DB::CEnumList Settings; if (!Settings.EnumSettings(NULL, MODNAME)) { - INT i; + int i; LPSTR s; LPCSTR p; INT_PTR c; @@ -635,7 +635,7 @@ static LRESULT CALLBACK TPropsheetTree_LabelEditProc(HWND hwnd, UINT uMsg, WPARA * param: hItem - handle of the treeitm whose label to edit * return: 0 **/ -INT CPsTree::BeginLabelEdit(HTREEITEM hItem) +int CPsTree::BeginLabelEdit(HTREEITEM hItem) { CPsTreeItem* pti; @@ -685,7 +685,7 @@ INT CPsTree::BeginLabelEdit(HTREEITEM hItem) * bSave - tell whether to save changes or not * return: 0 **/ -INT CPsTree::EndLabelEdit(const BOOLEAN bSave) +int CPsTree::EndLabelEdit(const BYTE bSave) { TCHAR szEdit[MAX_TINAME]; TVITEM tvi; @@ -716,14 +716,14 @@ INT CPsTree::EndLabelEdit(const BOOLEAN bSave) * public methods for handling other commands ***********************************************************************************************************/ -VOID CPsTree::PopupMenu() +void CPsTree::PopupMenu() { HMENU hPopup; MENUITEMINFO mii; TVHITTESTINFO hti; TVITEM tvi; POINT pt; - INT iItem, i; + int iItem, i; // init popup menu if (!(hPopup = CreatePopupMenu())) @@ -822,9 +822,9 @@ VOID CPsTree::PopupMenu() * param: none * return: nothing **/ -VOID CPsTree::OnIconsChanged() +void CPsTree::OnIconsChanged() { - for (INT i = 0; i < _numItems; i++) { + for (int i = 0; i < _numItems; i++) { _pItems[i]->OnIconsChanged(this); } } @@ -836,10 +836,10 @@ VOID CPsTree::OnIconsChanged() * param: none * return: TRUE if any page holds changed information **/ -BOOLEAN CPsTree::OnInfoChanged() +BYTE CPsTree::OnInfoChanged() { PSHNOTIFY pshn; - INT i; + int i; BYTE bChanged = 0; pshn.hdr.idFrom = 0; @@ -865,7 +865,7 @@ BOOLEAN CPsTree::OnInfoChanged() * param: none * return: nothing **/ -BOOLEAN CPsTree::OnSelChanging() +BYTE CPsTree::OnSelChanging() { CPsTreeItem *pti = CurrentItem(); @@ -894,12 +894,12 @@ BOOLEAN CPsTree::OnSelChanging() * param: lpnmtv - notification structure * return: nothing **/ -VOID CPsTree::OnSelChanged(LPNMTREEVIEW lpnmtv) +void CPsTree::OnSelChanged(LPNMTREEVIEW lpnmtv) { CPsTreeItem *oldPage = CurrentItem(); CPsTreeItem *pti; - _curItem = (INT)lpnmtv->itemNew.lParam; + _curItem = (int)lpnmtv->itemNew.lParam; if (pti = CurrentItem()) { if (pti->Wnd() == NULL) { pti->CreateWnd(_pPs); @@ -921,10 +921,10 @@ VOID CPsTree::OnSelChanged(LPNMTREEVIEW lpnmtv) * param: none * return: nothing **/ -VOID CPsTree::OnCancel() +void CPsTree::OnCancel() { PSHNOTIFY pshn; - INT i; + int i; pshn.hdr.idFrom = 0; pshn.hdr.code = PSN_RESET; @@ -944,13 +944,13 @@ VOID CPsTree::OnCancel() * param: none * return: 0 if ready to continue, 1 if need to abort **/ -INT CPsTree::OnApply() +int CPsTree::OnApply() { CPsTreeItem *pti = CurrentItem(); if (pti != NULL) { PSHNOTIFY pshn; - INT i; + int i; pshn.hdr.idFrom = 0; pshn.hdr.code = PSN_KILLACTIVE; diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 6ed8311520..348f468031 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -167,7 +167,7 @@ LPSTR CPsTreeItem::ParentItemName() if (p) { - INT cchGroup = p - _pszName + 1; + int cchGroup = p - _pszName + 1; result = mir_strncpy((LPSTR)mir_alloc(cchGroup), _pszName, cchGroup); } else @@ -186,7 +186,7 @@ LPSTR CPsTreeItem::ParentItemName() * bIsUnicode - if TRUE the title is unicode * return: 0 on success, 1 to 4 indicating the failed operation **/ -INT CPsTreeItem::Name(LPTSTR ptszTitle, const BOOLEAN bIsUnicode) +int CPsTreeItem::Name(LPTSTR ptszTitle, const BYTE bIsUnicode) { // convert title to utf8 _pszName = (bIsUnicode) ? mir_utf8encodeW((LPWSTR)ptszTitle) : mir_utf8encode((LPSTR)ptszTitle); @@ -212,7 +212,7 @@ INT CPsTreeItem::Name(LPTSTR ptszTitle, const BOOLEAN bIsUnicode) * params: pszName - the name to match the item with * return: nothing **/ -BOOLEAN CPsTreeItem::HasName(const LPCSTR pszName) const +BYTE CPsTreeItem::HasName(const LPCSTR pszName) const { return !mir_stricmp(_pszName, pszName); }; @@ -224,7 +224,7 @@ BOOLEAN CPsTreeItem::HasName(const LPCSTR pszName) const * params: pszLabel - the desired new label * return: nothing **/ -VOID CPsTreeItem::Rename(const LPTSTR pszLabel) +void CPsTreeItem::Rename(const LPTSTR pszLabel) { if(pszLabel && *pszLabel) { @@ -258,7 +258,7 @@ VOID CPsTreeItem::Rename(const LPTSTR pszLabel) * param: pszName - uniquely identifiing string for a propertypage encoded with utf8 (e.g.: {group\item}) * return: Label in a newly allocated piece of memory **/ -INT CPsTreeItem::ItemLabel(const BOOLEAN bReadDBValue) +int CPsTreeItem::ItemLabel(const BYTE bReadDBValue) { DBVARIANT dbv; @@ -303,7 +303,7 @@ INT CPsTreeItem::ItemLabel(const BOOLEAN bReadDBValue) HICON CPsTreeItem::ProtoIcon() { PROTOACCOUNT **pa; - INT ProtoCount, i; + int ProtoCount, i; if (!CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&ProtoCount, (LPARAM)&pa)) { @@ -338,7 +338,7 @@ HICON CPsTreeItem::ProtoIcon() * hDefaultIcon - default icon to use * return: nothing **/ -INT CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BOOLEAN bInitIconsOnly) +int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOnly) { HICON hIcon; @@ -415,9 +415,9 @@ INT CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BOOLEAN bInitIcon * odp - OPTIONSDIALOGPAGE structure with the information about the page to add * return: 0 on success, 1 on failure **/ -INT CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) +int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) { - INT err; + int err; TCHAR szTitle[ MAXSETTING ]; // check parameter @@ -481,7 +481,7 @@ INT CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) // load custom order if (!(pPsh->_dwFlags & PSTVF_SORTTREE)) { - _iPosition = (INT)DB::Setting::GetByte(PropertyKey(SET_ITEM_POS), odp->position); + _iPosition = (int)DB::Setting::GetByte(PropertyKey(SET_ITEM_POS), odp->position); if ((_iPosition < 0) && (_iPosition > 0x800000A)) _iPosition = 0; } @@ -529,7 +529,7 @@ INT CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) * dwFlags - tells what to save * return: handle to new (moved) treeitem if successful or NULL otherwise **/ -WORD CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, INT iItemPosition, UINT iState, DWORD dwFlags) +WORD CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags) { WORD numErrors = 0; @@ -613,7 +613,7 @@ HWND CPsTreeItem::CreateWnd(LPPS pPs) * params: none * return: nothing **/ -VOID CPsTreeItem::OnInfoChanged() +void CPsTreeItem::OnInfoChanged() { if (_hWnd) { PSHNOTIFY pshn; @@ -635,7 +635,7 @@ VOID CPsTreeItem::OnInfoChanged() * params: none * return: nothing **/ -VOID CPsTreeItem::OnPageIconsChanged() +void CPsTreeItem::OnPageIconsChanged() { if (_hWnd) { PSHNOTIFY pshn; @@ -655,7 +655,7 @@ VOID CPsTreeItem::OnPageIconsChanged() * params: none * return: nothing **/ -VOID CPsTreeItem::OnIconsChanged(CPsTree *pTree) +void CPsTreeItem::OnIconsChanged(CPsTree *pTree) { HICON hIcon; RECT rc; diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h index 123d45ebfb..c660fe8a52 100644 --- a/plugins/UserInfoEx/src/commonheaders.h +++ b/plugins/UserInfoEx/src/commonheaders.h @@ -106,9 +106,9 @@ using namespace std; #define MIREXISTS(f) ((int)(f)!=CALLSERVICE_NOTFOUND) #define PtrIsValid(p) (((p)!=0)&&(((HANDLE)(p))!=INVALID_HANDLE_VALUE)) -#define FREE(p) {if (PtrIsValid(p)){free((VOID*)p);(p)=NULL;}} +#define FREE(p) {if (PtrIsValid(p)){free((void*)p);(p)=NULL;}} #define MIR_DELETE(p) {LPVOID ptr = (LPVOID)(p);if (PtrIsValid(ptr)){delete(ptr);(ptr)=NULL;}} -#define MIR_FREE(p) {if (PtrIsValid(p)){mir_free((VOID*)p);(p)=NULL;}} +#define MIR_FREE(p) {if (PtrIsValid(p)){mir_free((void*)p);(p)=NULL;}} #define GetUserData(p) GetWindowLongPtr((p), GWLP_USERDATA) #define SetUserData(p, l) SetWindowLongPtr((p), GWLP_USERDATA, (LONG_PTR) (l)) @@ -173,13 +173,13 @@ unsigned int hashSettingW_M2(const char * key); //new Murma2 hash typedef struct _MGLOBAL { DWORD mirandaVersion; // mirandaVersion - BOOLEAN CanChangeDetails : 1; // is service to upload own contact information for icq present? - BOOLEAN MsgAddIconExist : 1; // Messsage Window support status Icon - BOOLEAN TzIndexExist : 1; // Win Reg has Timzone Index Info - BOOLEAN PopUpActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist - BOOLEAN ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value - BOOLEAN WantAeroAdaption : 1; // reserved for later use - BOOLEAN UseDbxTree : 1; // use dbx_tree ? + BYTE CanChangeDetails : 1; // is service to upload own contact information for icq present? + BYTE MsgAddIconExist : 1; // Messsage Window support status Icon + BYTE TzIndexExist : 1; // Win Reg has Timzone Index Info + BYTE PopUpActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist + BYTE ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value + BYTE WantAeroAdaption : 1; // reserved for later use + BYTE UseDbxTree : 1; // use dbx_tree ? LPCSTR szMetaProto; } MGLOBAL, *LPMGLOBAL; @@ -202,10 +202,10 @@ extern struct CountryListEntry *countries; * **/ #define MIRANDA_CPP_PLUGIN_API(CCoreClass) \ - typedef INT (__cdecl CCoreClass::*EVENTHOOK)(WPARAM, LPARAM); \ - typedef INT (__cdecl CCoreClass::*EVENTHOOKPARAM)(WPARAM, LPARAM, LPARAM); \ - typedef INT (__cdecl CCoreClass::*SERVICEFUNC)(WPARAM, LPARAM); \ - typedef INT (__cdecl CCoreClass::*SERVICEFUNCPARAM)(WPARAM, LPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*EVENTHOOK)(WPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*EVENTHOOKPARAM)(WPARAM, LPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*SERVICEFUNC)(WPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*SERVICEFUNCPARAM)(WPARAM, LPARAM, LPARAM); \ \ HANDLE ThisHookEvent(const char* szEvent, EVENTHOOK pfnEvent) \ { return (HANDLE) ::HookEventObj(szEvent, (MIRANDAHOOKOBJ) (*(PVOID*) &pfnEvent), (PVOID)this);} \ @@ -240,7 +240,7 @@ static FORCEINLINE BOOL IsProtoAccountEnabled(PROTOACCOUNT *pAcc) typedef HRESULT (STDAPICALLTYPE *pfnDwmIsCompositionEnabled)(BOOL *); extern pfnDwmIsCompositionEnabled dwmIsCompositionEnabled; -static FORCEINLINE BOOLEAN IsAeroMode() +static FORCEINLINE BYTE IsAeroMode() { BOOL result; return myGlobals.WantAeroAdaption && dwmIsCompositionEnabled && (dwmIsCompositionEnabled(&result) == S_OK) && result; diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 2787757363..68f603547c 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -80,7 +80,7 @@ CAnnivEditCtrl::~CAnnivEditCtrl() } } -VOID CAnnivEditCtrl::Release() +void CAnnivEditCtrl::Release() { delete this; } @@ -93,7 +93,7 @@ VOID CAnnivEditCtrl::Release() * param: wIndex - index to desired item * return: TRUE if item is valid, FALSE otherwise **/ -BOOLEAN CAnnivEditCtrl::ItemValid(WORD wIndex) const +BYTE CAnnivEditCtrl::ItemValid(WORD wIndex) const { return (_pDates != NULL && wIndex < _numDates && _pDates[wIndex] != NULL); } @@ -105,7 +105,7 @@ BOOLEAN CAnnivEditCtrl::ItemValid(WORD wIndex) const * param: none * return: TRUE if item is valid, FALSE otherwise **/ -BOOLEAN CAnnivEditCtrl::CurrentItemValid() const +BYTE CAnnivEditCtrl::CurrentItemValid() const { return ItemValid(_curDate); } @@ -117,7 +117,7 @@ BOOLEAN CAnnivEditCtrl::CurrentItemValid() const * param: none * return: TRUE if item is valid, FALSE otherwise **/ -VOID CAnnivEditCtrl::EnableReminderCtrl(BOOLEAN bEnabled) +void CAnnivEditCtrl::EnableReminderCtrl(BYTE bEnabled) { bEnabled &= _ReminderEnabled != REMIND_OFF; EnableWindow(GetDlgItem(_hwndDlg, RADIO_REMIND1), bEnabled); @@ -135,7 +135,7 @@ VOID CAnnivEditCtrl::EnableReminderCtrl(BOOLEAN bEnabled) * param: none * return: nothing **/ -VOID CAnnivEditCtrl::EnableCurrentItem() +void CAnnivEditCtrl::EnableCurrentItem() { MAnnivDate *pCurrent = Current(); @@ -144,7 +144,7 @@ VOID CAnnivEditCtrl::EnableCurrentItem() PSGetContact(_hwndDlg, hContact); - const BOOLEAN bEnabled + const BYTE bEnabled = !hContact || (pCurrent->Flags() & CTRLF_HASCUSTOM) || !(pCurrent->Flags() & (CTRLF_HASPROTO|CTRLF_HASMETA)) || @@ -191,7 +191,7 @@ INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda) // if a date with wID exists, replace it if ((pmda = FindDateById(mda.Id())) != NULL) { - BOOLEAN bChanged = pmda->IsChanged(), + BYTE bChanged = pmda->IsChanged(), bRemindChanged = pmda->IsReminderChanged(); if (!bChanged) { @@ -295,7 +295,7 @@ INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HANDLE hContact) MAnnivDate mda; WORD i; - BOOLEAN bChanged = FALSE; + BYTE bChanged = FALSE; for (i = 0; i < ANID_LAST && !mda.DBGetAnniversaryDate(hContact, i); i++) { mda.DBGetReminderOpts(hContact); @@ -385,7 +385,7 @@ INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(HANDLE hContact) **/ INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex) { - BOOLEAN bEnabled = ItemValid(wIndex); + BYTE bEnabled = ItemValid(wIndex); EnableWindow(_hwndDate, bEnabled); EnableWindow(_hBtnEdit, bEnabled); @@ -428,7 +428,7 @@ INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex) * param: none * return: nothing **/ -VOID CAnnivEditCtrl::OnMenuPopup() +void CAnnivEditCtrl::OnMenuPopup() { POINT pt = { 0, 0 }; RECT rc; @@ -469,7 +469,7 @@ VOID CAnnivEditCtrl::OnMenuPopup() * param: none * return: nothing **/ -VOID CAnnivEditCtrl::OnDateChanged(LPNMDATETIMECHANGE lpChange) +void CAnnivEditCtrl::OnDateChanged(LPNMDATETIMECHANGE lpChange) { MAnnivDate *pCurrent = Current(); @@ -501,7 +501,7 @@ VOID CAnnivEditCtrl::OnDateChanged(LPNMDATETIMECHANGE lpChange) * param: none * return: nothing **/ -VOID CAnnivEditCtrl::OnRemindEditChanged() +void CAnnivEditCtrl::OnRemindEditChanged() { MAnnivDate *pCurrent = Current(); @@ -524,11 +524,11 @@ VOID CAnnivEditCtrl::OnRemindEditChanged() * param: none * return: nothing **/ -VOID CAnnivEditCtrl::OnReminderChecked() +void CAnnivEditCtrl::OnReminderChecked() { HANDLE hContact; LPCSTR pszProto; - INT state; + int state; TCHAR buf[6]; MAnnivDate *pCurrent = Current(); @@ -580,11 +580,11 @@ VOID CAnnivEditCtrl::OnReminderChecked() } } -VOID CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt) +void CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt) { if (PtrIsValid(mt)) { - INT age; + int age; MZodiac zod; zod = mt->Zodiac(); @@ -616,7 +616,7 @@ BOOL CAnnivEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) return bChanged; } -VOID CAnnivEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto) +void CAnnivEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto) { DBWriteBirthDay(hContact); DBWriteAnniversaries(hContact); diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h index b01278ef2c..ee6307f8ed 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.h +++ b/plugins/UserInfoEx/src/ctrl_annivedit.h @@ -33,14 +33,14 @@ class CAnnivEditCtrl : public CBaseCtrl HWND _hBtnAdd; // add anniversary button HWND _hBtnDel; // delete anniversary button - BOOLEAN _ReminderEnabled; + BYTE _ReminderEnabled; - MAnnivDate** _pDates; - WORD _numDates; - WORD _curDate; + MAnnivDate** _pDates; + WORD _numDates; + WORD _curDate; - BOOLEAN ItemValid(WORD wIndex) const; - BOOLEAN CurrentItemValid() const; + BYTE ItemValid(WORD wIndex) const; + BYTE CurrentItemValid() const; INT_PTR DBGetBirthDay(HANDLE hContact, LPCSTR pszProto); INT_PTR DBWriteBirthDay(HANDLE hContact); @@ -56,25 +56,25 @@ public: MAnnivDate* Current() { return CurrentItemValid() ? _pDates[_curDate] : NULL; }; WORD CurrentIndex() const { return _curDate; }; WORD NumDates() const { return _numDates; }; - BOOLEAN ReminderEnabled() const { return _ReminderEnabled; }; + BYTE ReminderEnabled() const { return _ReminderEnabled; }; MAnnivDate* FindDateById(const WORD wId); - VOID EnableCurrentItem(); - VOID EnableReminderCtrl(BOOLEAN bEnabled); + void EnableCurrentItem(); + void EnableReminderCtrl(BYTE bEnabled); INT_PTR SetCurSel(WORD wIndex); INT_PTR AddDate(MAnnivDate &mda); INT_PTR DeleteDate(WORD wIndex); - VOID SetZodiacAndAge(MAnnivDate *mt); + void SetZodiacAndAge(MAnnivDate *mt); // notification handlers - VOID OnMenuPopup(); - VOID OnDateChanged(LPNMDATETIMECHANGE lpChange); - VOID OnRemindEditChanged(); - VOID OnReminderChecked(); + void OnMenuPopup(); + void OnDateChanged(LPNMDATETIMECHANGE lpChange); + void OnRemindEditChanged(); + void OnReminderChecked(); /** * CBaseCtrl interface: @@ -86,9 +86,9 @@ public: static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting); - virtual VOID Release(); + virtual void Release(); virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto); + virtual void OnApply(HANDLE hContact, LPCSTR pszProto); }; #endif /* _UINFOEX_CTRLANNIVEDIT_H_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp index e6a9a9347b..d5d072a487 100644 --- a/plugins/UserInfoEx/src/ctrl_base.cpp +++ b/plugins/UserInfoEx/src/ctrl_base.cpp @@ -31,7 +31,7 @@ COLORREF clrCustom = -1; COLORREF clrNormal = -1; COLORREF clrMeta = -1; -VOID Ctrl_InitTextColours() +void Ctrl_InitTextColours() { clrBoth = DB::Setting::GetDWord(NULL, MODNAME, SET_PROPSHEET_CLRBOTH, RGB(0, 160, 10)); clrChanged = DB::Setting::GetDWord(NULL, MODNAME, SET_PROPSHEET_CLRCHANGED, RGB(190, 0, 0)); @@ -193,7 +193,7 @@ CCtrlList::~CCtrlList() * * **/ -VOID CCtrlList::Release() +void CCtrlList::Release() { delete this; } @@ -202,7 +202,7 @@ VOID CCtrlList::Release() * * **/ -VOID CCtrlList::OnReset() +void CCtrlList::OnReset() { INT_PTR i; @@ -238,7 +238,7 @@ BOOL CCtrlList::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) * * **/ -VOID CCtrlList::OnApply(HANDLE hContact, LPCSTR pszProto) +void CCtrlList::OnApply(HANDLE hContact, LPCSTR pszProto) { INT_PTR i; @@ -255,7 +255,7 @@ VOID CCtrlList::OnApply(HANDLE hContact, LPCSTR pszProto) * * **/ -VOID CCtrlList::OnChangedByUser(WORD idCtrl, WORD wChangedMsg) +void CCtrlList::OnChangedByUser(WORD idCtrl, WORD wChangedMsg) { // prefilter messages to avoid unessesary search operations switch (wChangedMsg) diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h index 8e422c53c8..d0bf2b50fb 100644 --- a/plugins/UserInfoEx/src/ctrl_base.h +++ b/plugins/UserInfoEx/src/ctrl_base.h @@ -48,7 +48,7 @@ typedef struct TCtrlInfo { } CTRL, *LPCTRL; // for compatibility with old styled controls -VOID Ctrl_InitTextColours(); +void Ctrl_InitTextColours(); INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, WORD wFlags); /*********************************************************************************************************** @@ -150,7 +150,7 @@ public: * * @return nothing **/ - virtual VOID Release() { } + virtual void Release() { } /** * This is a pure virtual method, which is the common interface @@ -174,7 +174,7 @@ public: * * @return nothing **/ - virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto) { } + virtual void OnApply(HANDLE hContact, LPCSTR pszProto) { } /** * This is a pure virtual method, which is called to set the @@ -185,9 +185,9 @@ public: * * @return nothing **/ - virtual VOID OnChangedByUser(WORD wChangedMsg) { } + virtual void OnChangedByUser(WORD wChangedMsg) { } - virtual VOID OnReset() { } + virtual void OnReset() { } INT_PTR OnSetTextColour(HDC hdc); }; @@ -218,11 +218,11 @@ public: static FORCEINLINE CCtrlList* GetObj(HWND hDlg) { return (CCtrlList*)GetUserData(hDlg); } - VOID Release(); - VOID OnReset(); + void Release(); + void OnReset(); BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto); - VOID OnApply(HANDLE hContact, LPCSTR pszProto); - VOID OnChangedByUser(WORD idCtrl, WORD wChangedMsg); + void OnApply(HANDLE hContact, LPCSTR pszProto); + void OnChangedByUser(WORD idCtrl, WORD wChangedMsg); INT_PTR OnSetTextColour(HWND hCtrl, HDC hdc); }; diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index d5d2773b67..5a1d648a6d 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -38,11 +38,11 @@ typedef struct TMBCtrl{ HFONT hFont; // font DWORD dwStyle; - BOOLEAN bFocus; + BYTE bFocus; - INT stateId; // button state - INT defbutton; // default button - INT pbState; + int stateId; // button state + int defbutton; // default button + int pbState; TCHAR cHot; } BTNCTRL, *LPBTNCTRL; @@ -54,11 +54,11 @@ static HMODULE themeAPIHandle = NULL; // theme procedures static HANDLE (WINAPI *OpenThemeData)(HWND,LPCWSTR); static HRESULT (WINAPI *CloseThemeData)(HANDLE); -static BOOL (WINAPI *IsThemeBackgroundPartiallyTransparent)(HANDLE,INT,INT); +static BOOL (WINAPI *IsThemeBackgroundPartiallyTransparent)(HANDLE,int,int); static HRESULT (WINAPI *DrawThemeParentBackground)(HWND,HDC,RECT *); -static HRESULT (WINAPI *DrawThemeBackground)(HANDLE,HDC,INT,INT,const RECT *,const RECT *); -static HRESULT (WINAPI *DrawThemeText)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,DWORD,const RECT *); -static HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,OPTIONAL const RECT*, RECT *); +static HRESULT (WINAPI *DrawThemeBackground)(HANDLE,HDC,int,int,const RECT *,const RECT *); +static HRESULT (WINAPI *DrawThemeText)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT *); +static HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,OPTIONAL const RECT*, RECT *); /** * name: ThemeSupport @@ -66,18 +66,18 @@ static HRESULT (WINAPI *GetThemeTextExtent)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD * param: none * return: TRUE if themes are supported, FALSE if not **/ -static BOOLEAN __fastcall ThemeSupport() { +static BYTE __fastcall ThemeSupport() { if (IsWinVerXPPlus()) { if (!themeAPIHandle) { themeAPIHandle = GetModuleHandleA("uxtheme"); if (themeAPIHandle) { OpenThemeData = (HANDLE (WINAPI *)(HWND,LPCWSTR))MGPROC("OpenThemeData"); CloseThemeData = (HRESULT (WINAPI *)(HANDLE))MGPROC("CloseThemeData"); - IsThemeBackgroundPartiallyTransparent = (BOOL (WINAPI *)(HANDLE,INT,INT))MGPROC("IsThemeBackgroundPartiallyTransparent"); + IsThemeBackgroundPartiallyTransparent = (BOOL (WINAPI *)(HANDLE,int,int))MGPROC("IsThemeBackgroundPartiallyTransparent"); DrawThemeParentBackground = (HRESULT (WINAPI *)(HWND,HDC,RECT *))MGPROC("DrawThemeParentBackground"); - DrawThemeBackground = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,const RECT *,const RECT *))MGPROC("DrawThemeBackground"); - DrawThemeText = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,DWORD,const RECT *))MGPROC("DrawThemeText"); - GetThemeTextExtent = (HRESULT (WINAPI *)(HANDLE,HDC,INT,INT,LPCWSTR,INT,DWORD,OPTIONAL const RECT*, RECT *))MGPROC("GetThemeTextExtent"); + DrawThemeBackground = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,const RECT *,const RECT *))MGPROC("DrawThemeBackground"); + DrawThemeText = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT *))MGPROC("DrawThemeText"); + GetThemeTextExtent = (HRESULT (WINAPI *)(HANDLE,HDC,int,int,LPCWSTR,int,DWORD,OPTIONAL const RECT*, RECT *))MGPROC("GetThemeTextExtent"); } } // Make sure all of these methods are valid (i would hope either all or none work) @@ -101,7 +101,7 @@ static BOOLEAN __fastcall ThemeSupport() { * param: ctl - BTNCTRL structure with the information about the theme to close * return: nothing **/ -static VOID __fastcall DestroyTheme(BTNCTRL *ctl) { +static void __fastcall DestroyTheme(BTNCTRL *ctl) { if (ctl->hThemeButton) { CloseThemeData(ctl->hThemeButton); ctl->hThemeButton = NULL; @@ -118,7 +118,7 @@ static VOID __fastcall DestroyTheme(BTNCTRL *ctl) { * param: ctl - BTNCTRL structure with the information about the theme to load * return: nothing **/ -static VOID __fastcall LoadTheme(BTNCTRL *ctl) { +static void __fastcall LoadTheme(BTNCTRL *ctl) { if (ThemeSupport()) { DestroyTheme(ctl); ctl->hThemeButton = OpenThemeData(ctl->hwnd,L"BUTTON"); @@ -132,7 +132,7 @@ static VOID __fastcall LoadTheme(BTNCTRL *ctl) { * param: state - state id for the normal theme button * return: stateID for the flat theme button **/ -static INT __fastcall TBStateConvert2Flat(INT state) { +static int __fastcall TBStateConvert2Flat(int state) { switch (state) { case PBS_NORMAL: return TS_NORMAL; case PBS_HOT: return TS_HOT; @@ -153,7 +153,7 @@ static INT __fastcall TBStateConvert2Flat(INT state) { * rcText - rectangle of the text to draw later on * return: nothing **/ -static VOID __fastcall PaintIcon(BTNCTRL *ctl, HDC hdcMem, LPWORD ccText, LPRECT rcClient, LPRECT rcText) +static void __fastcall PaintIcon(BTNCTRL *ctl, HDC hdcMem, LPWORD ccText, LPRECT rcClient, LPRECT rcText) { RECT rcImage; @@ -201,7 +201,7 @@ static VOID __fastcall PaintIcon(BTNCTRL *ctl, HDC hdcMem, LPWORD ccText, LPRECT * rcClient - rectangle of the whole button * return: nothing **/ -static VOID __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient) +static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient) { RECT rcText = { 0, 0, 0, 0 }; WCHAR wszText[MAX_PATH] = { 0 }; @@ -209,7 +209,7 @@ static VOID __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien // Draw the flat button if ((ctl->dwStyle & MBS_FLAT) && ctl->hThemeToolbar) { - INT state = IsWindowEnabled(ctl->hwnd) + int state = IsWindowEnabled(ctl->hwnd) ? (ctl->stateId == PBS_NORMAL && ctl->defbutton ? PBS_DEFAULTED : ctl->stateId) @@ -223,7 +223,7 @@ static VOID __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien else { // draw themed button background if (ctl->hThemeButton) { - INT state = IsWindowEnabled(ctl->hwnd) + int state = IsWindowEnabled(ctl->hwnd) ? (ctl->stateId == PBS_NORMAL && ctl->defbutton ? PBS_DEFAULTED : ctl->stateId) @@ -300,7 +300,7 @@ static VOID __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien * rcClient - rectangle of the whole button * return: nothing **/ -static VOID __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient) +static void __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient) { RECT rcText = { 0, 0, 0, 0 }; TCHAR szText[MAX_PATH] = { 0 }; @@ -636,7 +636,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L break; case WM_LBUTTONUP: if (bct->stateId != PBS_DISABLED) { // don't change states if disabled - BOOLEAN bPressed = bct->stateId == PBS_PRESSED; + BYTE bPressed = bct->stateId == PBS_PRESSED; if (bct->dwStyle & MBS_PUSHBUTTON) { if (bct->pbState) bct->pbState = 0; @@ -677,13 +677,13 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L return DefWindowProc(hwndBtn, uMsg, wParam, lParam); } -VOID CtrlButtonUnloadModule() +void CtrlButtonUnloadModule() { DeleteCriticalSection(&csTips); UnregisterClass(UINFOBUTTONCLASS, ghInst); } -VOID CtrlButtonLoadModule() +void CtrlButtonLoadModule() { WNDCLASSEX wc; diff --git a/plugins/UserInfoEx/src/ctrl_button.h b/plugins/UserInfoEx/src/ctrl_button.h index d015c54266..c6691c161d 100644 --- a/plugins/UserInfoEx/src/ctrl_button.h +++ b/plugins/UserInfoEx/src/ctrl_button.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_BOTTONS_H_INCLUDED_ #define _UINFOEX_BOTTONS_H_INCLUDED_ 1 -VOID CtrlButtonLoadModule(); -VOID CtrlButtonUnloadModule(); +void CtrlButtonLoadModule(); +void CtrlButtonUnloadModule(); #endif /* _UINFOEX_BOTTONS_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp index fea79fe997..e910d61b39 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.cpp +++ b/plugins/UserInfoEx/src/ctrl_combo.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * @return pointer of the newly created CCombo object. **/ -CBaseCtrl* CCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, INT nListCount) +CBaseCtrl* CCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount) { return new CCombo(hDlg, idCtrl, pszSetting, bDBDataType, pList, nListCount); } @@ -51,7 +51,7 @@ CBaseCtrl* CCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDB * * @return nothing **/ -CCombo::CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, INT nListCount) +CCombo::CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount) : CBaseCtrl(hDlg, idCtrl, pszSetting) { _curSel = CB_ERR; @@ -62,7 +62,7 @@ CCombo::CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPID // fill in data if (_pList && (_nList > 0)) { - for (INT i = 0; i < _nList; i++) + for (int i = 0; i < _nList; i++) { AddItem(_pList[i].ptszTranslated, (LPARAM)&_pList[i]); } @@ -77,9 +77,9 @@ CCombo::CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPID * @retval CB_ERR - item not found * @retval 0...n - index of the combobox item **/ -INT CCombo::Find(INT nID) const +int CCombo::Find(int nID) const { - INT i; + int i; LPIDSTRLIST pd; for (i = ComboBox_GetCount(_hwnd) - 1; i >= 0; i--) @@ -101,7 +101,7 @@ INT CCombo::Find(INT nID) const * @retval CB_ERR - item not found * @retval 0...n - index of the combobox item **/ -INT CCombo::Find(LPTSTR ptszItemLabel) const +int CCombo::Find(LPTSTR ptszItemLabel) const { return ComboBox_FindStringExact(_hwnd, 0, ptszItemLabel); } @@ -135,7 +135,7 @@ INT_PTR CCombo::AddItem(LPCTSTR pszText, LPARAM lParam) * * @return nothing **/ -VOID CCombo::Release() +void CCombo::Release() { delete this; } @@ -154,7 +154,7 @@ BOOL CCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) { DBVARIANT dbv; LPIDSTRLIST pItem = NULL; - INT iVal = CB_ERR; + int iVal = CB_ERR; _Flags.B.hasCustom = _Flags.B.hasProto = _Flags.B.hasMeta = 0; _Flags.W |= DB::Setting::GetTStringCtrl(hContact, USERINFO, USERINFO, pszProto, _pszSetting, &dbv); @@ -164,9 +164,9 @@ BOOL CCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) { switch (dbv.type) { - case DBVT_BYTE: iVal = Find((INT)dbv.bVal); break; - case DBVT_WORD: iVal = Find((INT)dbv.wVal); break; - case DBVT_DWORD: iVal = Find((INT)dbv.dVal); break; + case DBVT_BYTE: iVal = Find((int)dbv.bVal); break; + case DBVT_WORD: iVal = Find((int)dbv.wVal); break; + case DBVT_DWORD: iVal = Find((int)dbv.dVal); break; case DBVT_TCHAR: iVal = Find(TranslateTS(dbv.ptszVal)); if (iVal == CB_ERR) { @@ -196,7 +196,7 @@ BOOL CCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CCombo::OnApply(HANDLE hContact, LPCSTR pszProto) +void CCombo::OnApply(HANDLE hContact, LPCSTR pszProto) { if (_Flags.B.hasChanged) { @@ -247,11 +247,11 @@ VOID CCombo::OnApply(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CCombo::OnChangedByUser(WORD wChangedMsg) +void CCombo::OnChangedByUser(WORD wChangedMsg) { if (wChangedMsg == CBN_SELCHANGE) { - INT c = ComboBox_GetCurSel(_hwnd); + int c = ComboBox_GetCurSel(_hwnd); if (_curSel != c) { diff --git a/plugins/UserInfoEx/src/ctrl_combo.h b/plugins/UserInfoEx/src/ctrl_combo.h index 3d6accf853..5e0db3b196 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.h +++ b/plugins/UserInfoEx/src/ctrl_combo.h @@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/ class CCombo : public CBaseCtrl { - INT _curSel; + int _curSel; LPIDSTRLIST _pList; - INT _nList; + int _nList; BYTE _bDataType; /** @@ -40,10 +40,10 @@ class CCombo : public CBaseCtrl * * @return nothing **/ - CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, INT nListCount); + CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount); - INT Find(INT nIndex) const; - INT Find(LPTSTR ptszItemLabel) const; + int Find(int nIndex) const; + int Find(LPTSTR ptszItemLabel) const; INT_PTR AddItem(LPCTSTR pszText, LPARAM lParam); @@ -58,12 +58,12 @@ public: static FORCEINLINE CCombo* GetObj(HWND hDlg, WORD idCtrl) { return GetObj(GetDlgItem(hDlg, idCtrl)); } - static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, INT nListCount); + static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount); - virtual VOID Release(); + virtual void Release(); virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnChangedByUser(WORD wChangedMsg); + virtual void OnApply(HANDLE hContact, LPCSTR pszProto); + virtual void OnChangedByUser(WORD wChangedMsg); }; #endif /* _UI_CTRL_COMBO_INCLUDE_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index cfac895629..72b6d977e4 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -44,13 +44,13 @@ typedef struct TCbExItem typedef struct TComboEx { LPCBEXITEMINTERN pItems; - INT numItems; - INT numOther; - INT iSelectedItem; + int numItems; + int numOther; + int iSelectedItem; - BOOLEAN bIsChanged; - BOOLEAN bLocked; - BOOLEAN bIsEditChanged; + BYTE bIsChanged; + BYTE bLocked; + BYTE bIsEditChanged; HINSTANCE hInstance; HFONT hFont; @@ -63,15 +63,15 @@ typedef struct TComboEx } CBEX, *LPCBEX; -static INT compareProc(LPCVOID cbi1, LPCVOID cbi2) +static int compareProc(LPCVOID cbi1, LPCVOID cbi2) { return _tcscmp(((LPCBEXITEMINTERN)cbi1)->szCat, ((LPCBEXITEMINTERN)cbi2)->szCat); } -static INT CheckPhoneSyntax(LPTSTR pszSrc, LPTSTR szNumber, WORD cchNumber, INT& errorPos) +static int CheckPhoneSyntax(LPTSTR pszSrc, LPTSTR szNumber, WORD cchNumber, int& errorPos) { - INT lenNum = 0; - BOOLEAN hasLeftBreaket = FALSE, + int lenNum = 0; + BYTE hasLeftBreaket = FALSE, hasRightBreaket = FALSE; if (!szNumber || !pszSrc || !*pszSrc || !cchNumber) return 0; @@ -293,7 +293,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam case WM_COMMAND: { - static INT noRecursion=0; + static int noRecursion=0; switch (LOWORD(wParam)) { if (HIWORD(wParam) == BN_CLICKED) { @@ -301,7 +301,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam { LPCBEXITEM cbi = (LPCBEXITEM)GetUserData(hDlg); TCHAR szText[MAXDATASIZE]; - INT errorPos; + int errorPos; if (!GetDlgItemText(hDlg, EDIT_PHONE, szText, MAXDATASIZE) || !CheckPhoneSyntax(szText, cbi->pszVal, cbi->ccVal, errorPos) || errorPos > -1) { MsgErr(hDlg, TranslateT("The phone number should start with a + and consist of\nnumbers, spaces, brackets and hyphens only.")); @@ -343,7 +343,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam EnableWindow(GetDlgItem(hDlg, IDOK), TRUE); { TCHAR szPhone[MAXDATASIZE], szArea[32], szData[64]; - INT nCurSel = SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_GETCURSEL, 0, 0); + int nCurSel = SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_GETCURSEL, 0, 0); UINT nCountry = (nCurSel != CB_ERR) ? SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_GETITEMDATA, nCurSel, 0) : 0; GetDlgItemText(hDlg, EDIT_AREA, szArea, SIZEOF(szArea)); @@ -361,11 +361,11 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam noRecursion = 1; { TCHAR szText[MAXDATASIZE], *pText, *pArea, *pNumber; - INT isValid = 1; + int isValid = 1; GetDlgItemText(hDlg, EDIT_PHONE, szText, SIZEOF(szText)); if (szText[0] != '+') isValid = 0; if (isValid) { - INT i,country = _tcstol(szText + 1, &pText, 10); + int i,country = _tcstol(szText + 1, &pText, 10); if (pText - szText > 4) isValid = 0; else { @@ -599,7 +599,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case WM_SETICON: { HICON hIcon; - INT i; + int i; hIcon = IcoLib_GetIcon(ICO_BTN_ADD); SendMessage(cbex->hBtnAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); @@ -630,7 +630,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L POINT pt = { 0, 0 }; RECT rc; MENUITEMINFO mii; - INT i, nItems; + int i, nItems; HMENU hMenu; if (!(hMenu = CreatePopupMenu())) return 0; @@ -850,7 +850,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case EN_UPDATE: { TCHAR szVal[MAXDATASIZE] = { 0 }; - INT ccVal; + int ccVal; HANDLE hContact; HWND hDlgDetails = GetParent(GetParent(hwnd)); @@ -866,7 +866,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L switch (GetWindowLongPtr(hwnd, GWLP_ID)) { case EDIT_PHONE: { - INT errorPos; + int errorPos; TCHAR szEdit[MAXDATASIZE]; if (ccVal = GetWindowText(cbex->hEdit, szEdit, MAXDATASIZE)) { @@ -899,7 +899,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L } case EN_KILLFOCUS: { - INT ccText; + int ccText; if (!cbex->pItems || cbex->iSelectedItem < 0 || cbex->iSelectedItem >= cbex->numItems) return 1; if (!(cbex->pItems[cbex->iSelectedItem].wFlags & CTRLF_CHANGED)) return 0; @@ -943,7 +943,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // if an item with the id of pItem exists, change it instead of adding a new one // but only if it has not been changed by the user yet. if ((pItem->wMask & CBEXIM_ID) && cbex->pItems && pItem->dwID != 0) { - INT iIndex; + int iIndex; for (iIndex = 0; iIndex < cbex->numItems; iIndex++) { if (cbex->pItems[iIndex].dwID == pItem->dwID) { @@ -1051,7 +1051,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // try to find item by id if ((pItem->wMask & CBEXIM_ID) && pItem->dwID != 0) { - INT i; + int i; for (i = 0; i < cbex->numItems; i++) { if (cbex->pItems[i].dwID == pItem->dwID) @@ -1100,12 +1100,12 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L **/ case CBEXM_DELITEM: { - if (!cbex->pItems || (INT)lParam < 0 || (INT)lParam >= cbex->numItems || (cbex->pItems[lParam].wFlags & CBEXIF_CATREADONLY)) + if (!cbex->pItems || (int)lParam < 0 || (int)lParam >= cbex->numItems || (cbex->pItems[lParam].wFlags & CBEXIF_CATREADONLY)) return FALSE; - MIR_FREE(cbex->pItems[(INT)lParam].pszVal); - memmove(cbex->pItems + (INT)lParam, - cbex->pItems + (INT)lParam + 1, - (cbex->numItems - (INT)lParam - 1) * sizeof(CBEXITEMINTERN)); + MIR_FREE(cbex->pItems[(int)lParam].pszVal); + memmove(cbex->pItems + (int)lParam, + cbex->pItems + (int)lParam + 1, + (cbex->numItems - (int)lParam - 1) * sizeof(CBEXITEMINTERN)); cbex->numItems--; ZeroMemory(cbex->pItems + cbex->numItems, sizeof(CBEXITEMINTERN)); CtrlContactWndProc(hwnd, CBEXM_SETCURSEL, lParam - 1, FALSE); @@ -1121,7 +1121,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L **/ case CBEXM_DELALLITEMS: { - INT i; + int i; if (PtrIsValid(cbex)) { if (PtrIsValid(cbex->pItems)) { @@ -1150,7 +1150,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case CBEXM_ENABLEITEM: if (cbex->iSelectedItem >= 0 && cbex->iSelectedItem < cbex->numItems) { HANDLE hContact; - BOOLEAN bEnabled; + BYTE bEnabled; PSGetContact(GetParent(hwnd), hContact); @@ -1190,21 +1190,21 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L * name: CBEXM_SETCURSEL * desc: selects a certain item * param: wParam - index of the item to select - * lParam - (BOOLEAN)bValid - if TRUE, the next item with a value is selected + * lParam - (BYTE)bValid - if TRUE, the next item with a value is selected * return: always FALSE **/ case CBEXM_SETCURSEL: { - INT i; + int i; if (!cbex->pItems) return 1; - if ((INT)wParam < 0 || (INT)wParam >= cbex->numItems) wParam = max(cbex->iSelectedItem, 0); + if ((int)wParam < 0 || (int)wParam >= cbex->numItems) wParam = max(cbex->iSelectedItem, 0); cbex->bLocked = 1; - if ((BOOLEAN)lParam == TRUE) { - INT i = (INT)wParam; + if ((BYTE)lParam == TRUE) { + int i = (int)wParam; - cbex->iSelectedItem = (INT)wParam; + cbex->iSelectedItem = (int)wParam; while (i < cbex->numItems) { if (cbex->pItems[i].pszVal && *cbex->pItems[i].pszVal) { cbex->iSelectedItem = i; @@ -1215,10 +1215,10 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L } else { // search for the next none deleted item - for (i = (INT)wParam; i < cbex->numItems && *cbex->pItems[i].szCat == 0; i++); - if (i == cbex->numItems && (INT)wParam > 0) { - for (i = 0; i < (INT)wParam && *cbex->pItems[i].szCat == 0; i++); - cbex->iSelectedItem = i == (INT)wParam ? 0 : i; + for (i = (int)wParam; i < cbex->numItems && *cbex->pItems[i].szCat == 0; i++); + if (i == cbex->numItems && (int)wParam > 0) { + for (i = 0; i < (int)wParam && *cbex->pItems[i].szCat == 0; i++); + cbex->iSelectedItem = i == (int)wParam ? 0 : i; } else cbex->iSelectedItem = i; @@ -1255,7 +1255,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L * lParam - not used * return: always 0 **/ -INT CtrlContactUnLoadModule() +int CtrlContactUnLoadModule() { UnregisterClass(UINFOCOMBOEXCLASS, ghInst); return 0; @@ -1267,7 +1267,7 @@ INT CtrlContactUnLoadModule() * param: none * return: always 0 **/ -INT CtrlContactLoadModule() +int CtrlContactLoadModule() { WNDCLASSEX wc; @@ -1298,7 +1298,7 @@ INT CtrlContactLoadModule() * return: TRUE - if the item is not updated, because its changed flag is set * FALSE - if item is added or updated successfully **/ -INT CtrlContactAddItemFromDB( +int CtrlContactAddItemFromDB( HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, @@ -1351,7 +1351,7 @@ INT CtrlContactAddItemFromDB( * return: TRUE - if one of the items was not updated, because its changed flag is set * FALSE - if all items were added or updated successfully **/ -INT CtrlContactAddMyItemsFromDB( +int CtrlContactAddMyItemsFromDB( HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, @@ -1366,7 +1366,7 @@ INT CtrlContactAddMyItemsFromDB( CHAR pszSetting[MAXSETTING]; WORD i; LPTSTR sms; - INT bAnyItemIsChanged = 0; + int bAnyItemIsChanged = 0; ZeroMemory(&cbi, sizeof(cbi)); cbi.iItem = -1; @@ -1429,7 +1429,7 @@ INT CtrlContactAddMyItemsFromDB( * param: none * return: always 0 **/ -INT CtrlContactWriteItemToDB( +int CtrlContactWriteItemToDB( HWND hCtrl, HANDLE hContact, LPCSTR pszModule, @@ -1470,9 +1470,9 @@ INT CtrlContactWriteItemToDB( * param: none * return: always 0 **/ -INT CtrlContactWriteMyItemsToDB( +int CtrlContactWriteMyItemsToDB( HWND hCtrl, - INT iFirstItem, + int iFirstItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, @@ -1485,7 +1485,7 @@ INT CtrlContactWriteMyItemsToDB( LPTSTR pszOther; CBEXITEM cbi; INT_PTR ccOther; - INT i = 0; + int i = 0; if (!CtrlContactWndProc(hCtrl, CBEXM_ISCHANGED, NULL, NULL)) return 1; if (!hContact && !(pszModule = pszProto)) return 1; diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 7d71248842..69b57bac0a 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.h +++ b/plugins/UserInfoEx/src/ctrl_contact.h @@ -58,7 +58,7 @@ typedef struct TComboExItem { WORD wMask; // determines which element of this structure is valid WORD wFlags; // standard control flags - INT iItem; // position of the item in the data array + int iItem; // position of the item in the data array DWORD dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0 LPTSTR pszCat; // pointer to a descriptive category string to set or retrieve for the data entry WORD ccCat; @@ -67,11 +67,11 @@ typedef struct TComboExItem LPCSTR pszIcon; } CBEXITEM, *LPCBEXITEM; -INT CtrlContactLoadModule(); -INT CtrlContactUnLoadModule(); -INT CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal); -INT CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal); -INT CtrlContactWriteItemToDB(HWND hCtrl, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting); -INT CtrlContactWriteMyItemsToDB(HWND hCtrl, INT iFirstItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal); +int CtrlContactLoadModule(); +int CtrlContactUnLoadModule(); +int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal); +int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal); +int CtrlContactWriteItemToDB(HWND hCtrl, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting); +int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal); #endif /* _UI_CTRL_INCLUDE_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 7bd5491c1c..bbe614247d 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -82,7 +82,7 @@ CEditCtrl::CEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting * * @return nothing **/ -VOID CEditCtrl::Release() +void CEditCtrl::Release() { delete this; } @@ -91,7 +91,7 @@ VOID CEditCtrl::Release() * * */ -VOID CEditCtrl::OnReset() +void CEditCtrl::OnReset() { } @@ -165,7 +165,7 @@ BOOL CEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto) +void CEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto) { if (_Flags.B.hasChanged) { @@ -244,7 +244,7 @@ VOID CEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CEditCtrl::OnChangedByUser(WORD wChangedMsg) +void CEditCtrl::OnChangedByUser(WORD wChangedMsg) { if ((wChangedMsg == EN_UPDATE) || (wChangedMsg == EN_CHANGE)) { @@ -254,7 +254,7 @@ VOID CEditCtrl::OnChangedByUser(WORD wChangedMsg) _Flags.B.hasCustom = (cch > 0); if (!_Flags.B.hasChanged && _Flags.B.hasCustom) { - BOOLEAN need_free = 0; + BYTE need_free = 0; LPTSTR szText; __try @@ -285,11 +285,11 @@ VOID CEditCtrl::OnChangedByUser(WORD wChangedMsg) /** * Opens the url given in a editbox in the users default browser **/ -VOID CEditCtrl::OpenUrl() +void CEditCtrl::OpenUrl() { - INT lenUrl = 1 + Edit_GetTextLength(_hwnd); + int lenUrl = 1 + Edit_GetTextLength(_hwnd); LPSTR szUrl; - BOOLEAN need_free = 0; + BYTE need_free = 0; __try { @@ -326,7 +326,7 @@ LRESULT CEditCtrl::LinkNotificationHandler(ENLINK* lnk) if (lnk) { TEXTRANGE tr; - BOOLEAN need_free = 0; + BYTE need_free = 0; // do not call function if user selected some chars of the url string SendMessage(_hwnd, EM_EXGETSEL, NULL, (LPARAM) &tr.chrg); diff --git a/plugins/UserInfoEx/src/ctrl_edit.h b/plugins/UserInfoEx/src/ctrl_edit.h index 0e4281d4b7..de95a46226 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.h +++ b/plugins/UserInfoEx/src/ctrl_edit.h @@ -55,13 +55,13 @@ public: static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE dbType); static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting, BYTE dbType); - virtual VOID Release(); - virtual VOID OnReset(); + virtual void Release(); + virtual void OnReset(); virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnChangedByUser(WORD wChangedMsg); + virtual void OnApply(HANDLE hContact, LPCSTR pszProto); + virtual void OnChangedByUser(WORD wChangedMsg); - VOID OpenUrl(); + void OpenUrl(); LRESULT LinkNotificationHandler(ENLINK* lnk); }; diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp index 5de03e19d5..b9ac970183 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp @@ -21,11 +21,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" -static INT_PTR EnumNamesProc(CTimeZone *pTimeZone, INT index, LPARAM lParam) +static INT_PTR EnumNamesProc(CTimeZone *pTimeZone, int index, LPARAM lParam) { if (pTimeZone && pTimeZone->ptszDisplay) { - INT added = ComboBox_AddString((HWND)lParam, pTimeZone->ptszDisplay); + int added = ComboBox_AddString((HWND)lParam, pTimeZone->ptszDisplay); if (SUCCEEDED(added)) { if (FAILED(ComboBox_SetItemData((HWND)lParam, added, pTimeZone))) @@ -102,10 +102,10 @@ CTzCombo::CTzCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting) * @retval CB_ERR - item not found * @retval 0...n - index of the combobox item **/ -INT CTzCombo::Find(CTimeZone *pTimeZone) const +int CTzCombo::Find(CTimeZone *pTimeZone) const { - INT nItemIndex; - INT nItemCount = ComboBox_GetCount(_hwnd); + int nItemIndex; + int nItemCount = ComboBox_GetCount(_hwnd); for (nItemIndex = 0; nItemIndex < nItemCount; nItemIndex++) { @@ -124,10 +124,10 @@ INT CTzCombo::Find(CTimeZone *pTimeZone) const * @retval CB_ERR - item not found * @retval 0...n - index of the combobox item **/ -INT CTzCombo::Find(LPTIME_ZONE_INFORMATION pTimeZone) const +int CTzCombo::Find(LPTIME_ZONE_INFORMATION pTimeZone) const { - INT nItemIndex; - INT nItemCount = ComboBox_GetCount(_hwnd); + int nItemIndex; + int nItemCount = ComboBox_GetCount(_hwnd); for (nItemIndex = 0; nItemIndex < nItemCount; nItemIndex++) { if (pTimeZone == tmi.getTzi((HANDLE)ComboBox_GetItemData(_hwnd, nItemIndex))) @@ -143,7 +143,7 @@ INT CTzCombo::Find(LPTIME_ZONE_INFORMATION pTimeZone) const * * @return nothing **/ -VOID CTzCombo::Release() +void CTzCombo::Release() { delete this; } @@ -198,7 +198,7 @@ BOOL CTzCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CTzCombo::OnApply(HANDLE hContact, LPCSTR pszProto) +void CTzCombo::OnApply(HANDLE hContact, LPCSTR pszProto) { if (_Flags.B.hasChanged) { @@ -247,10 +247,10 @@ VOID CTzCombo::OnApply(HANDLE hContact, LPCSTR pszProto) * * @return nothing **/ -VOID CTzCombo::OnChangedByUser(WORD wChangedMsg) +void CTzCombo::OnChangedByUser(WORD wChangedMsg) { if (wChangedMsg == CBN_SELCHANGE) { - INT c = ComboBox_GetCurSel(_hwnd); + int c = ComboBox_GetCurSel(_hwnd); if (_curSel != c) { if (!_Flags.B.hasChanged) { @@ -273,7 +273,7 @@ VOID CTzCombo::OnChangedByUser(WORD wChangedMsg) * * @return nothing **/ -VOID CTzCombo::GetTime(LPTSTR szTime, WORD cchTime) +void CTzCombo::GetTime(LPTSTR szTime, WORD cchTime) { //use new core tz interface if(tmi.printDateTime) { diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.h b/plugins/UserInfoEx/src/ctrl_tzcombo.h index f3c279f681..7c87c0ce2b 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.h +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.h @@ -27,13 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/ class CTzCombo : public CBaseCtrl { - INT _curSel; //selectet combo index + int _curSel; //selectet combo index CTzCombo(); CTzCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting); - INT Find(CTimeZone *pTimeZone) const; //old UIEX method - INT Find(LPTIME_ZONE_INFORMATION pTimeZone) const; //new core tz interface + int Find(CTimeZone *pTimeZone) const; //old UIEX method + int Find(LPTIME_ZONE_INFORMATION pTimeZone) const; //new core tz interface public: @@ -44,13 +44,13 @@ public: static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting); - virtual VOID Release(); -// virtual VOID OnReset() {}; + virtual void Release(); +// virtual void OnReset() {}; virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto); - virtual VOID OnChangedByUser(WORD wChangedMsg); + virtual void OnApply(HANDLE hContact, LPCSTR pszProto); + virtual void OnChangedByUser(WORD wChangedMsg); - VOID GetTime(LPTSTR szTime, WORD cchTime); + void GetTime(LPTSTR szTime, WORD cchTime); }; #endif /* _UI_CTRL_TZ_COMBO_INCLUDE_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 6c031103a8..2bb666f10e 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -47,14 +47,14 @@ class CAnnivList SIZE _sizeMin; RECT _rcWin; SHORT _sortOrder; - INT _sortHeader; - INT _curSel; - INT _numRows; + int _sortHeader; + int _curSel; + int _numRows; BYTE _bRemindEnable; HANDLE _mHookExit; bool _wmINIT; - typedef INT (CALLBACK* CMPPROC)(LPARAM, LPARAM LPARAM); + typedef int (CALLBACK* CMPPROC)(LPARAM, LPARAM LPARAM); enum EColumn { @@ -142,7 +142,7 @@ class CAnnivList HDWP _hdWnds; RECT _rcParent; - VOID _ScreenToClient(HWND hWnd, LPRECT rc) + void _ScreenToClient(HWND hWnd, LPRECT rc) { POINT pt = { rc->left, rc->top }; @@ -153,7 +153,7 @@ class CAnnivList rc->top = pt.y; } - VOID _MoveWindow(HWND hWnd, INT anchors) + void _MoveWindow(HWND hWnd, int anchors) { if (!(_wndPos->flags & SWP_NOSIZE)) { @@ -162,7 +162,7 @@ class CAnnivList } } - RECT _CalcPos(HWND hWnd, INT anchors) + RECT _CalcPos(HWND hWnd, int anchors) { RECT rcc; @@ -171,8 +171,8 @@ class CAnnivList if (!(_wndPos->flags & SWP_NOSIZE)) { // calculate difference between new and old size - const INT cx = _wndPos->cx - _rcParent.right + _rcParent.left; - const INT cy = _wndPos->cy - _rcParent.bottom + _rcParent.top; + const int cx = _wndPos->cx - _rcParent.right + _rcParent.left; + const int cy = _wndPos->cy - _rcParent.bottom + _rcParent.top; if (cx != 0 || cy != 0) { @@ -217,7 +217,7 @@ class CAnnivList EndDeferWindowPos(_hdWnds); } - VOID MoveCtrl(WORD idCtrl, INT anchors) + void MoveCtrl(WORD idCtrl, int anchors) { if (!(_wndPos->flags & SWP_NOSIZE)) { @@ -246,9 +246,9 @@ class CAnnivList * * @return This function returns a number indicating comparison result. **/ - static INT CALLBACK cmpProc(INT iItem1, INT iItem2, CAnnivList* pDlg) + static int CALLBACK cmpProc(int iItem1, int iItem2, CAnnivList* pDlg) { - INT result; + int result; if (pDlg) { TCHAR szText1[MAX_PATH]; @@ -313,7 +313,7 @@ class CAnnivList { case WM_INITDIALOG: { - INT i = 0; + int i = 0; HWND hCtrl; HICON hIcon; RECT rc; @@ -494,7 +494,7 @@ class CAnnivList case CHECK_REMIND: { if (pDlg->_bRemindEnable && HIWORD(wParam) == BN_CLICKED) { - BOOLEAN checkState = Button_GetCheck((HWND)lParam); + BYTE checkState = Button_GetCheck((HWND)lParam); EnableWindow(GetDlgItem(hDlg, EDIT_REMIND), checkState == BST_CHECKED); EnableWindow(GetDlgItem(hDlg, SPIN_REMIND), checkState == BST_CHECKED); @@ -524,7 +524,7 @@ class CAnnivList case CHECK_DAYS: { if (HIWORD(wParam) == BN_CLICKED) { - BOOLEAN isChecked = Button_GetCheck((HWND)lParam); + BYTE isChecked = Button_GetCheck((HWND)lParam); EnableWindow(GetDlgItem(hDlg, EDIT_DAYS), isChecked); EnableWindow(GetDlgItem(hDlg, TXT_DAYS), isChecked); pDlg->_filter.wDaysBefore = isChecked ? GetDlgItemInt(hDlg, EDIT_DAYS, NULL, FALSE) : (WORD)-1; @@ -607,7 +607,7 @@ class CAnnivList } CAnchor anchor(wndPos, pDlg->_sizeMin); - INT anchorPos = CAnchor::ANCHOR_LEFT | CAnchor::ANCHOR_RIGHT | CAnchor::ANCHOR_TOP; + int anchorPos = CAnchor::ANCHOR_LEFT | CAnchor::ANCHOR_RIGHT | CAnchor::ANCHOR_TOP; anchor.MoveCtrl(IDC_HEADERBAR, anchorPos); anchor.MoveCtrl(GROUP_STATS, anchorPos); @@ -669,7 +669,7 @@ class CAnnivList * @retval 0 if successful * @retval 1 if failed **/ - BOOLEAN AddColumn(INT iSubItem, LPCTSTR pszText, INT defaultWidth) + BYTE AddColumn(int iSubItem, LPCTSTR pszText, int defaultWidth) { LVCOLUMN lvc; CHAR pszSetting[MAXSETTING]; @@ -692,7 +692,7 @@ class CAnnivList * @retval TRUE if successful * @retval FALSE if failed **/ - BOOLEAN AddSubItem(INT iItem, INT iSubItem, LPTSTR pszText) + BYTE AddSubItem(int iItem, int iSubItem, LPTSTR pszText) { LVITEM lvi; if (iSubItem > 0) @@ -715,7 +715,7 @@ class CAnnivList * @retval TRUE if successful * @retval FALSE if failed **/ - BOOLEAN AddItem(LPTSTR pszText, LPARAM lParam) + BYTE AddItem(LPTSTR pszText, LPARAM lParam) { LVITEM lvi; @@ -742,10 +742,10 @@ class CAnnivList * @retval TRUE if successful * @retval FALSE if failed **/ - BOOLEAN AddRow(HANDLE hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore) + BYTE AddRow(HANDLE hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore) { TCHAR szText[MAX_PATH]; - INT diff, iItem = -1; + int diff, iItem = -1; CItemData *pdata; // @@ -810,13 +810,13 @@ class CAnnivList /** * This method clears the list and adds contacts again, according to the current filter settings. **/ - VOID RebuildList() + void RebuildList() { HANDLE hContact; LPSTR pszProto; MTime mtNow; MAnnivDate ad; - INT i = 0; + int i = 0; DWORD age = 0; WORD wDaysBefore = DB::Setting::GetWord(SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET); WORD numMale = 0; @@ -881,11 +881,11 @@ class CAnnivList /** * This method deletes all items from the listview **/ - VOID DeleteAllItems() + void DeleteAllItems() { CItemData *pid; - for (INT i = 0; i < _numRows; i++) + for (int i = 0; i < _numRows; i++) { pid = ItemData(i); if (pid) @@ -904,7 +904,7 @@ class CAnnivList * * @return pointer to the data strucutre on success or NULL otherwise. **/ - CItemData* ItemData(INT iItem) + CItemData* ItemData(int iItem) { if (_hList && iItem >= 0 && iItem < _numRows) { @@ -924,7 +924,7 @@ class CAnnivList /** * This method loads all filter settings from db **/ - VOID LoadFilter() + void LoadFilter() { _filter.wDaysBefore = DB::Setting::GetWord(SET_ANNIVLIST_FILTER_DAYS, 9); _filter.bFilterIndex = DB::Setting::GetByte(SET_ANNIVLIST_FILTER_INDEX, 0); @@ -933,7 +933,7 @@ class CAnnivList /** * This method saves all filter settings to db **/ - VOID SaveFilter() + void SaveFilter() { if (_hDlg) { DB::Setting::WriteWord(SET_ANNIVLIST_FILTER_DAYS, (WORD)GetDlgItemInt(_hDlg, EDIT_DAYS, NULL, FALSE)); @@ -985,7 +985,7 @@ public: // save list state if (_hList) { CHAR pszSetting[MAXSETTING]; - INT c, cc = Header_GetItemCount(ListView_GetHeader(_hList)); + int c, cc = Header_GetItemCount(ListView_GetHeader(_hList)); for (c = 0; c < cc; c++) { mir_snprintf(pszSetting, MAXSETTING, "AnnivDlg_Col%d", c); @@ -1015,7 +1015,7 @@ public: * param: none * return: nothing **/ - VOID BringToFront() + void BringToFront() { ShowWindow(_hDlg, SW_RESTORE); SetForegroundWindow(_hDlg); @@ -1072,7 +1072,7 @@ INT_PTR DlgAnniversaryListShow(WPARAM wParam, LPARAM lParam) * @return nothing **/ -VOID DlgAnniversaryListOnTopToolBarLoaded() +void DlgAnniversaryListOnTopToolBarLoaded() { TTBButton ttb = { sizeof(ttb) }; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; @@ -1089,7 +1089,7 @@ VOID DlgAnniversaryListOnTopToolBarLoaded() * * @return nothing **/ -VOID DlgAnniversaryListLoadModule() +void DlgAnniversaryListLoadModule() { CreateServiceFunction(MS_USERINFO_REMINDER_LIST, DlgAnniversaryListShow); diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.h b/plugins/UserInfoEx/src/dlg_anniversarylist.h index 8c5bff952f..dcc25d7303 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.h +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.h @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SET_ANNIVLIST_FILTER_INDEX "AnLstFltIndex" INT_PTR DlgAnniversaryListShow(WPARAM wParam, LPARAM lParam); -VOID DlgAnniversaryListOnTopToolBarLoaded(); -VOID DlgAnniversaryListLoadModule(); +void DlgAnniversaryListOnTopToolBarLoaded(); +void DlgAnniversaryListLoadModule(); #endif /* _DLGANNIVERSARYLIST_H_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 92500282ff..3cb45cd696 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -43,7 +43,7 @@ MSGPOPUPDATA, *LPMSGPOPUPDATA; * * @return nothing **/ -static FORCEINLINE VOID MoveCtrl(HWND hDlg, INT idCtrl, INT dx, INT dy, INT dw, INT dh) +static FORCEINLINE void MoveCtrl(HWND hDlg, int idCtrl, int dx, int dy, int dw, int dh) { RECT ws; HWND hCtrl = GetDlgItem(hDlg, idCtrl); @@ -106,7 +106,7 @@ static HICON MsgLoadIcon(LPMSGBOX pMsgBox) * * @return nothing **/ -static VOID MakePopupAction(POPUPACTION &pa, INT id) +static void MakePopupAction(POPUPACTION &pa, int id) { pa.cbSize = sizeof(POPUPACTION); pa.flags = PAF_ENABLED; @@ -199,10 +199,10 @@ static VOID MakePopupAction(POPUPACTION &pa, INT id) **/ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static INT retOk = IDOK; - static INT retAll = IDALL; - static INT retNon = IDNONE; - static INT retCancel = IDCANCEL; + static int retOk = IDOK; + static int retAll = IDALL; + static int retNon = IDNONE; + static int retCancel = IDCANCEL; switch (uMsg) { @@ -212,8 +212,8 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l if (PtrIsValid(pMsgBox)) { - INT icoWidth = 0; - INT InfoBarHeight = 0; + int icoWidth = 0; + int InfoBarHeight = 0; HFONT hNormalFont; hNormalFont = (HFONT)SendDlgItemMessage(hDlg, TXT_NAME, WM_GETFONT, 0, 0); @@ -268,7 +268,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l { POINT mpt = {0,0}; RECT ws = {0,0,0,0}; - INT txtWidth, + int txtWidth, txtHeight, needX, needY; RECT rcDlg; diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index bfb3212a0b..dfde72915f 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -58,7 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * internal variables ***********************************************************************************************************/ -static BOOLEAN bInitIcons = INIT_ICONS_NONE; +static BYTE bInitIcons = INIT_ICONS_NONE; static HANDLE ghWindowList = NULL; static HANDLE ghDetailsInitEvent = NULL; @@ -79,7 +79,7 @@ _ignore(10, (LIST::FTSortFunc)_tcscmp) CPsHdr::~CPsHdr() { - INT i; + int i; // delete data for (i = 0 ; i < _ignore.getCount(); i++) @@ -90,7 +90,7 @@ CPsHdr::~CPsHdr() _ignore.destroy(); } -VOID CPsHdr::Free_pPages() +void CPsHdr::Free_pPages() { for ( int i = 0 ; i < _numPages; i++) if (_pPages[i]) delete _pPages[i]; @@ -112,8 +112,8 @@ public: private: PROTOACCOUNT **_pPd; - INT _numProto; - BOOLEAN _bExitAfterUploading; + int _numProto; + BYTE _bExitAfterUploading; HANDLE _hUploading; LPPS _pPs; @@ -125,7 +125,7 @@ private: * @return 0 on success * @return 1 otherwise **/ - INT Upload() + int Upload() { CPsTreeItem *pti; @@ -169,7 +169,7 @@ public: * @param bExitAfter - whether the dialog is to close after upload or not * @return nothing **/ - CPsUpload(LPPS pPs, BOOLEAN bExitAfter) + CPsUpload(LPPS pPs, BYTE bExitAfter) { _pPs = pPs; _pPd = NULL; @@ -178,7 +178,7 @@ public: _bExitAfterUploading = bExitAfter; } - INT UploadFirst() { + int UploadFirst() { // create a list of all protocols which support uploading contact information if ( ProtoEnumAccounts(&_numProto, &_pPd)) return _bExitAfterUploading ? UPLOAD_FINISH_CLOSE : UPLOAD_FINISH; @@ -214,7 +214,7 @@ public: * @param none * @return nothing **/ - INT UploadNext() + int UploadNext() { CHAR str[MAXMODULELABELLENGTH]; while (_pPd && *_pPd && _numProto-- > 0) { @@ -240,7 +240,7 @@ public: * * @return -1 or 0 or 1 **/ -static INT SortProc(CPsTreeItem** item1, CPsTreeItem** item2) +static int SortProc(CPsTreeItem** item1, CPsTreeItem** item2) { if (*item1 && *item2) { if ((*item2)->Pos() > (*item1)->Pos()) return -1; @@ -273,7 +273,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) else { CPsHdr psh; POINT metrics; - BOOLEAN bScanMetaSubContacts = FALSE; + BYTE bScanMetaSubContacts = FALSE; HICON hDefIcon; // init the treeview options @@ -325,11 +325,11 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) // metacontacts sub pages if (bScanMetaSubContacts) { - INT numSubs = DB::MetaContact::SubCount((HANDLE)wParam); + int numSubs = DB::MetaContact::SubCount((HANDLE)wParam); psh._dwFlags &= ~PSF_PROTOPAGESONLY_INIT; psh._dwFlags |= PSF_PROTOPAGESONLY; - for (INT i = 0; i < numSubs; i++) + for (int i = 0; i < numSubs; i++) { psh._hContact = DB::MetaContact::Sub((HANDLE)wParam, i); psh._nSubContact = i; @@ -346,7 +346,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) // sort the pages by the position read from database if (!(psh._dwFlags & PSTVF_SORTTREE)) { qsort(psh._pPages, psh._numPages, sizeof(CPsTreeItem*), - (INT (*)(const VOID*, const VOID*))SortProc); + (int (*)(const void*, const void*))SortProc); } // create the dialog itself hWnd = CreateDialogParam(ghInst, MAKEINTRESOURCE(IDD_DETAILS), NULL, DlgProc, (LPARAM)&psh); @@ -385,7 +385,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) odp->flags = odp->flags > (ODPF_UNICODE|ODPF_BOLDGROUPS|ODPF_ICON|PSPF_PROTOPREPENDED) ? 0 : odp->flags; if (pPsh->_dwFlags & (PSF_PROTOPAGESONLY|PSF_PROTOPAGESONLY_INIT)) { - BOOLEAN bIsUnicode = (odp->flags & ODPF_UNICODE) == ODPF_UNICODE; + BYTE bIsUnicode = (odp->flags & ODPF_UNICODE) == ODPF_UNICODE; TCHAR* ptszTitle = bIsUnicode ? mir_tstrdup(odp->ptszTitle) : mir_a2t(odp->pszTitle); // avoid adding pages for a meta subcontact, which have been added for a metacontact. @@ -427,7 +427,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) * * @return 0 **/ -static INT OnDeleteContact(WPARAM wParam, LPARAM lParam) +static int OnDeleteContact(WPARAM wParam, LPARAM lParam) { HWND hWnd = WindowList_Find(ghWindowList, (HANDLE)wParam); if (hWnd != NULL) @@ -441,7 +441,7 @@ static INT OnDeleteContact(WPARAM wParam, LPARAM lParam) * * @return 0 **/ -static INT OnShutdown(WPARAM wParam, LPARAM lParam) +static int OnShutdown(WPARAM wParam, LPARAM lParam) { WindowList_BroadcastAsync(ghWindowList, WM_DESTROY, 0, 0); return 0; @@ -456,7 +456,7 @@ static INT OnShutdown(WPARAM wParam, LPARAM lParam) * * @return 0 **/ -static INT AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProto = NULL) +static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProto = NULL) { TCHAR szTitle[MAX_PATH]; const BYTE ofs = (pszProto) ? mir_sntprintf(szTitle, SIZEOF(szTitle), _T("%S\\"), pszProto) : 0; @@ -529,14 +529,14 @@ static INT AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt * * @return 0 **/ -static INT InitDetails(WPARAM wParam, LPARAM lParam) +static int InitDetails(WPARAM wParam, LPARAM lParam) { CPsHdr* pPsh = (CPsHdr*)wParam; if (!(pPsh->_dwFlags & PSF_PROTOPAGESONLY)) { OPTIONSDIALOGPAGE odp; - BOOLEAN bChangeDetailsEnabled = myGlobals.CanChangeDetails && DB::Setting::GetByte(SET_PROPSHEET_CHANGEMYDETAILS, FALSE); + BYTE bChangeDetailsEnabled = myGlobals.CanChangeDetails && DB::Setting::GetByte(SET_PROPSHEET_CHANGEMYDETAILS, FALSE); // important to avoid craches!! ZeroMemory(&odp, sizeof(odp)); @@ -576,13 +576,13 @@ static INT InitDetails(WPARAM wParam, LPARAM lParam) * * @return nothing **/ -VOID DlgContactInfoInitTreeIcons() +void DlgContactInfoInitTreeIcons() { // make sure this is run only once if (!(bInitIcons & INIT_ICONS_ALL)) { CPsHdr psh; POINT metrics = {0}; - INT i = 0; + int i = 0; psh._dwFlags = PSTVF_INITICONS; @@ -602,7 +602,7 @@ VOID DlgContactInfoInitTreeIcons() if (!(bInitIcons & INIT_ICONS_CONTACT)) { LPCSTR pszContactProto = NULL; PROTOACCOUNT **pd; - INT ProtoCount = 0; + int ProtoCount = 0; psh._dwFlags |= PSF_PROTOPAGESONLY_INIT; @@ -650,7 +650,7 @@ VOID DlgContactInfoInitTreeIcons() * * @return nothing **/ -VOID DlgContactInfoUnLoadModule() +void DlgContactInfoUnLoadModule() { DestroyHookableEvent(ghDetailsInitEvent); } @@ -661,7 +661,7 @@ VOID DlgContactInfoUnLoadModule() * * @return nothing **/ -VOID DlgContactInfoLoadModule() +void DlgContactInfoLoadModule() { ghDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE); @@ -676,7 +676,7 @@ VOID DlgContactInfoLoadModule() // check whether changing my details via UserInfoEx is basically possible { PROTOACCOUNT **pAcc; - INT i, nAccCount; + int i, nAccCount; myGlobals.CanChangeDetails = FALSE; if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc))) @@ -695,10 +695,10 @@ VOID DlgContactInfoLoadModule() static void ResetUpdateInfo(LPPS pPs) { - INT i; + int i; // free the array of accomblished acks - for (i = 0; i < (INT)pPs->nSubContacts; i++) + for (i = 0; i < (int)pPs->nSubContacts; i++) MIR_FREE(pPs->infosUpdated[i].acks); MIR_FREE(pPs->infosUpdated); pPs->nSubContacts = 0; @@ -823,7 +823,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar HWND hCtrl; RECT rcTree; POINT pt = { 0, 0 }; - INT addWidth = 0; + int addWidth = 0; // at least add width of scrollbar needWidth += 8 + GetSystemMetrics(SM_CXVSCROLL); @@ -912,7 +912,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar { - INT nPage = pPs->pTree->CurrentItemIndex(); + int nPage = pPs->pTree->CurrentItemIndex(); if (!pPs->pTree->IsIndexValid(nPage)) nPage = 0; TreeView_Select(pPs->pTree->Window(), NULL, TVGN_CARET); @@ -967,7 +967,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case TXT_UPDATING: { COLORREF textCol, bgCol, newCol; - INT ratio; + int ratio; textCol = GetSysColor(COLOR_BTNTEXT); bgCol = GetSysColor(COLOR_3DFACE); @@ -1046,8 +1046,8 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case PSM_GETCONTACT: if (lParam) { - CPsTreeItem *pti = ((INT)wParam != -1) - ? pPs->pTree->TreeItem((INT)wParam) + CPsTreeItem *pti = ((int)wParam != -1) + ? pPs->pTree->TreeItem((int)wParam) : pPs->pTree->CurrentItem(); // prefer to return the contact accociated with the current page @@ -1078,8 +1078,8 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/ case PSM_GETBASEPROTO: if (lParam) { - CPsTreeItem *pti = ((INT)wParam != -1) - ? pPs->pTree->TreeItem((INT)wParam) + CPsTreeItem *pti = ((int)wParam != -1) + ? pPs->pTree->TreeItem((int)wParam) : pPs->pTree->CurrentItem(); if (pti && pti->Proto()) { @@ -1110,7 +1110,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/ case PSM_ISLOCKED: { - BOOLEAN bLocked = (pPs->dwFlags & PSF_LOCKED) == PSF_LOCKED; + BYTE bLocked = (pPs->dwFlags & PSF_LOCKED) == PSF_LOCKED; SetWindowLongPtr(hDlg, DWLP_MSGRESULT, bLocked); return bLocked; @@ -1126,7 +1126,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/ case PSM_FORCECHANGED: if (!(pPs->dwFlags & PSF_LOCKED)) { - BOOLEAN bChanged; + BYTE bChanged; pPs->dwFlags |= PSF_LOCKED; if (bChanged = pPs->pTree->OnInfoChanged()) @@ -1180,10 +1180,10 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case PSM_ISAEROMODE: { - BOOLEAN bIsAeroMode = IsAeroMode(); + BYTE bIsAeroMode = IsAeroMode(); if (lParam) { - *(BOOLEAN*)lParam = bIsAeroMode; + *(BYTE*)lParam = bIsAeroMode; } return (INT_PTR)bIsAeroMode; } @@ -1247,7 +1247,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar { ICO_BTN_APPLY, BM_SETIMAGE, IDAPPLY } }; - const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 1; + const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 1; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); @@ -1299,7 +1299,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case HM_PROTOACK: { ACKDATA *ack = (ACKDATA*)lParam; - INT i, iSubContact; + int i, iSubContact; CPsTreeItem *pti; if (!ack->hContact && ack->type == ACKTYPE_STATUS) @@ -1403,8 +1403,8 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // init the acks structure for a sub contact if (pPs->infosUpdated[iSubContact].acks == NULL) { - pPs->infosUpdated[iSubContact].acks = (LPINT)mir_calloc(sizeof(INT) * (INT)(INT_PTR)ack->hProcess); - pPs->infosUpdated[iSubContact].count = (INT)(INT_PTR)ack->hProcess; + pPs->infosUpdated[iSubContact].acks = (LPINT)mir_calloc(sizeof(int) * (int)(INT_PTR)ack->hProcess); + pPs->infosUpdated[iSubContact].count = (int)(INT_PTR)ack->hProcess; } if (ack->result == ACKRESULT_SUCCESS || ack->result == ACKRESULT_FAILED) @@ -1591,7 +1591,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar TVHITTESTINFO hti; RECT rc; BYTE height; - BOOLEAN bAsChild = FALSE; + BYTE bAsChild = FALSE; TreeView_SetInsertMark(pPs->pTree->Window(), NULL, 0); ReleaseCapture(); @@ -1701,7 +1701,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar { HANDLE hSubContact; CHAR szService[MAXSETTING]; - INT i, numSubs; + int i, numSubs; numSubs = DB::MetaContact::SubCount(pPs->hContact); @@ -1727,7 +1727,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (pPs->nSubContacts != 0) { - BOOLEAN bDo = FALSE; + BYTE bDo = FALSE; // call the services for (i = 0; i < pPs->nSubContacts; i++) @@ -1778,7 +1778,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case WM_DESTROY: { - INT i = 0; + int i = 0; // hide before destroy ShowWindow(hDlg, SW_HIDE); diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index 93572c206e..c7965e5693 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -32,62 +32,62 @@ class CPsTree; class CPsTreeItem { - INT _idDlg; // resource id of the property page + int _idDlg; // resource id of the property page LPDLGTEMPLATE _pTemplate; // locked template for the property page HINSTANCE _hInst; // instance handle of the owning plugin dll DLGPROC _pfnDlgProc; // dialog procedure for the property page HWND _hWnd; // window handle for the property page if shown jet DWORD _dwFlags; // some flags - INT _iPosition; // initiating position if custom (used for sorting) + int _iPosition; // initiating position if custom (used for sorting) LPARAM _initParam; HANDLE _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact) LPCSTR _pszProto; // protocol the page is accociated with (is the contact's protocol if _hContact is not NULL) LPCSTR _pszPrefix; // pointer to the dialog owning contact's protocol HTREEITEM _hItem; // handle to the treeview item if visible (NULL if this item is hidden) - INT _iParent; // index of the owning tree item - INT _iImage; // index of treeview item's image + int _iParent; // index of the owning tree item + int _iImage; // index of treeview item's image BYTE _bState; // initial state of this treeitem LPSTR _pszName; // original name, given by plugin (not customized) LPTSTR _ptszLabel; // string to setting in db holding information about this treeitem LPCSTR GlobalName(); - INT Name(LPTSTR pszTitle, const BOOLEAN bIsUnicode); - INT ItemLabel(const BOOLEAN bReadDBValue); + int Name(LPTSTR pszTitle, const BYTE bIsUnicode); + int ItemLabel(const BYTE bReadDBValue); HICON ProtoIcon(); - INT Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BOOLEAN bInitIconsOnly); + int Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOnly); public: CPsTreeItem(); ~CPsTreeItem(); - INT Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp); + int Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp); __inline LPSTR Name() const { return _pszName; }; __inline LPCSTR Proto() const { return _pszProto; }; __inline LPTSTR Label() const { return _ptszLabel; }; - VOID Rename( const LPTSTR pszLabel ); + void Rename( const LPTSTR pszLabel ); __inline HANDLE hContact() const { return _hContact; }; __inline HWND Wnd() const { return _hWnd; }; - __inline INT DlgId() const { return _idDlg; }; + __inline int DlgId() const { return _idDlg; }; __inline HINSTANCE Inst() const { return _hInst; }; - __inline INT Image() const { return _iImage; }; - __inline INT Pos() const { return _iPosition; }; + __inline int Image() const { return _iImage; }; + __inline int Pos() const { return _iPosition; }; __inline BYTE State() const { return _bState; }; __inline HTREEITEM Hti() const { return _hItem; }; - __inline VOID Hti(HTREEITEM hti) { _hItem = hti; }; - __inline INT Parent() const { return _iParent; }; - __inline VOID Parent(const INT iParent) { _iParent = iParent; }; + __inline void Hti(HTREEITEM hti) { _hItem = hti; }; + __inline int Parent() const { return _iParent; }; + __inline void Parent(const int iParent) { _iParent = iParent; }; __inline DWORD Flags() const { return _dwFlags; }; - __inline VOID Flags(DWORD dwFlags) { _dwFlags = dwFlags; }; - __inline VOID AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }; - __inline VOID RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }; + __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; }; + __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }; + __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }; - BOOLEAN HasName(const LPCSTR pszName) const; + BYTE HasName(const LPCSTR pszName) const; LPCSTR PropertyKey(LPCSTR pszProperty); LPCSTR GlobalPropertyKey(LPCSTR pszProperty); @@ -96,12 +96,12 @@ public: LPSTR ParentItemName(); HWND CreateWnd(LPPS pPs); - WORD DBSaveItemState(LPCSTR pszGroup, INT iItemPosition, UINT iState, DWORD dwFlags); + WORD DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags); // notification handlers - VOID OnInfoChanged(); - VOID OnPageIconsChanged(); - VOID OnIconsChanged(CPsTree *pTree); + void OnInfoChanged(); + void OnPageIconsChanged(); + void OnIconsChanged(CPsTree *pTree); }; @@ -136,70 +136,70 @@ class CPsTree { HWND _hWndTree; HIMAGELIST _hImages; CPsTreeItem** _pItems; - INT _curItem; - INT _numItems; + int _curItem; + int _numItems; DWORD _dwFlags; HWND _hLabelEdit; HTREEITEM _hDragItem; - BOOLEAN _isDragging; + BYTE _isDragging; LPPS _pPs; - WORD SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, INT& iItem); + WORD SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem); public: CPsTree(LPPS pPs); ~CPsTree(); - __inline VOID BeginDrag(HTREEITEM hDragItem) { _isDragging = TRUE; _hDragItem = hDragItem; }; - __inline VOID EndDrag() { _isDragging = FALSE; _hDragItem = NULL; }; - __inline BOOLEAN IsDragging() const { return _isDragging; }; + __inline void BeginDrag(HTREEITEM hDragItem) { _isDragging = TRUE; _hDragItem = hDragItem; }; + __inline void EndDrag() { _isDragging = FALSE; _hDragItem = NULL; }; + __inline BYTE IsDragging() const { return _isDragging; }; __inline HTREEITEM DragItem() const { return _hDragItem; }; __inline DWORD Flags() const { return _dwFlags; }; - __inline VOID Flags(DWORD dwFlags) { _dwFlags = dwFlags; }; - __inline VOID AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }; - __inline VOID RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }; + __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; }; + __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }; + __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }; - __inline INT NumItems() const { return _numItems; }; + __inline int NumItems() const { return _numItems; }; __inline HWND Window() const { return _hWndTree; }; __inline HIMAGELIST ImageList() const { return _hImages; }; - __inline BOOLEAN IsIndexValid(const INT index) const { return (index >= 0 && index < _numItems); }; + __inline BYTE IsIndexValid(const int index) const { return (index >= 0 && index < _numItems); }; - __inline CPsTreeItem* TreeItem(INT index) const { return (IsIndexValid(index) ? _pItems[index] : NULL); }; - __inline HTREEITEM TreeItemHandle(INT index) const { return (IsIndexValid(index) ? _pItems[index]->Hti() : NULL); }; + __inline CPsTreeItem* TreeItem(int index) const { return (IsIndexValid(index) ? _pItems[index] : NULL); }; + __inline HTREEITEM TreeItemHandle(int index) const { return (IsIndexValid(index) ? _pItems[index]->Hti() : NULL); }; - __inline INT CurrentItemIndex() const { return _curItem; }; + __inline int CurrentItemIndex() const { return _curItem; }; __inline CPsTreeItem* CurrentItem() const { return TreeItem(CurrentItemIndex()); }; - INT AddDummyItem(LPCSTR pszGroup); - BOOLEAN Create(HWND hWndTree, CPsHdr* pPsh); - BOOLEAN InitTreeItems(LPWORD needWidth); + int AddDummyItem(LPCSTR pszGroup); + BYTE Create(HWND hWndTree, CPsHdr* pPsh); + BYTE InitTreeItems(LPWORD needWidth); - VOID HideItem(const INT iPageIndex); - HTREEITEM ShowItem(const INT iPageIndex, LPWORD needWidth); + void HideItem(const int iPageIndex); + HTREEITEM ShowItem(const int iPageIndex, LPWORD needWidth); - HTREEITEM MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild = FALSE); - VOID SaveState(); - VOID DBResetState(); + HTREEITEM MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, BYTE bAsChild = FALSE); + void SaveState(); + void DBResetState(); - INT FindItemIndexByHandle(HTREEITEM hItem); - INT FindItemIndexByName(LPCSTR pszName); + int FindItemIndexByHandle(HTREEITEM hItem); + int FindItemIndexByName(LPCSTR pszName); CPsTreeItem* FindItemByName(LPCSTR pszName); CPsTreeItem* FindItemByHandle(HTREEITEM hItem); HTREEITEM FindItemHandleByName(LPCSTR pszName); - CPsTreeItem* FindItemByResource(HINSTANCE hInst, INT idDlg); + CPsTreeItem* FindItemByResource(HINSTANCE hInst, int idDlg); - INT BeginLabelEdit( HTREEITEM hItem ); - INT EndLabelEdit( const BOOLEAN bSave ); - VOID PopupMenu(); + int BeginLabelEdit( HTREEITEM hItem ); + int EndLabelEdit( const BYTE bSave ); + void PopupMenu(); - VOID OnIconsChanged(); - BOOLEAN OnInfoChanged(); - BOOLEAN OnSelChanging(); - VOID OnSelChanged(LPNMTREEVIEW lpnmtv); - VOID OnCancel(); - INT OnApply(); + void OnIconsChanged(); + BYTE OnInfoChanged(); + BYTE OnSelChanging(); + void OnSelChanged(LPNMTREEVIEW lpnmtv); + void OnCancel(); + int OnApply(); }; /*********************************************************************************************************** @@ -227,12 +227,12 @@ public: DWORD _dwFlags; // some option flags HIMAGELIST _hImages; // the imagelist with all tree item icons LIST _ignore; // list of to skipp items when adding metasubcontacts pages - INT _nSubContact; // index of a current subcontact + int _nSubContact; // index of a current subcontact CPsHdr(); ~CPsHdr(); - VOID Free_pPages(); + void Free_pPages(); }; @@ -240,7 +240,7 @@ struct TAckInfo { HANDLE hContact; LPINT/*PINT_PTR*/ acks; - INT count; + int count; }; struct TPropSheet @@ -260,7 +260,7 @@ struct TPropSheet DWORD dwFlags; TAckInfo *infosUpdated; - INT nSubContacts; + int nSubContacts; // controls HWND hDlg; @@ -268,6 +268,6 @@ struct TPropSheet CPsUpload *pUpload; }; -VOID DlgContactInfoInitTreeIcons(); -VOID DlgContactInfoLoadModule(); -VOID DlgContactInfoUnLoadModule(); +void DlgContactInfoInitTreeIcons(); +void DlgContactInfoLoadModule(); +void DlgContactInfoUnLoadModule(); diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index a03ae1b855..16cd75e6d7 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -88,10 +88,10 @@ CExImContactBase::~CExImContactBase() * param: hContact - handle to contact whose information to read * return: TRUE if successful or FALSE otherwise **/ -BOOLEAN CExImContactBase::fromDB(HANDLE hContact) +BYTE CExImContactBase::fromDB(HANDLE hContact) { - BOOLEAN ret = FALSE; - BOOLEAN isChatRoom = FALSE; + BYTE ret = FALSE; + BYTE isChatRoom = FALSE; LPSTR pszProto; LPCSTR uidSetting; DBVARIANT dbv; @@ -174,7 +174,7 @@ BOOLEAN CExImContactBase::fromDB(HANDLE hContact) * param: row - the rows data * return: TRUE if successful or FALSE otherwise **/ -BOOLEAN CExImContactBase::fromIni(LPSTR& row) +BYTE CExImContactBase::fromIni(LPSTR& row) { LPSTR p1, p2 = NULL; LPSTR pszUIDValue, pszUIDSetting, pszProto = NULL; @@ -307,7 +307,7 @@ HANDLE CExImContactBase::toDB() * param: file - pointer to the opened file * return: nothing **/ -VOID CExImContactBase::toIni(FILE* file, int modCount) +void CExImContactBase::toIni(FILE* file, int modCount) { // getting dbeditor++ NickFromHContact(hContact) static char name[512] = ""; @@ -362,7 +362,7 @@ VOID CExImContactBase::toIni(FILE* file, int modCount) } } -BOOLEAN CExImContactBase::compareUID(DBVARIANT *dbv) +BYTE CExImContactBase::compareUID(DBVARIANT *dbv) { DWORD hash = 0; switch (dbv->type) { @@ -409,7 +409,7 @@ BOOLEAN CExImContactBase::compareUID(DBVARIANT *dbv) return FALSE; } -LPSTR CExImContactBase::uid2String(BOOLEAN bPrependType) +LPSTR CExImContactBase::uid2String(BYTE bPrependType) { CHAR szUID[MAX_PATH]; LPSTR ptr = szUID; @@ -497,16 +497,16 @@ LPSTR CExImContactBase::uid2String(BOOLEAN bPrependType) return mir_strdup(szUID); } -BOOLEAN CExImContactBase::isMeta() const +BYTE CExImContactBase::isMeta() const { return DB::Module::IsMeta(_pszProto); } -BOOLEAN CExImContactBase::isHandle(HANDLE hContact) +BYTE CExImContactBase::isHandle(HANDLE hContact) { LPCSTR pszProto; DBVARIANT dbv; - BOOLEAN isEqual = FALSE; + BYTE isEqual = FALSE; // owner contact ? if (!_pszProto) return hContact == NULL; @@ -530,7 +530,7 @@ BOOLEAN CExImContactBase::isHandle(HANDLE hContact) if (dbv.type == DBVT_UTF8 && dbv.pszVal && !mir_stricmp(dbv.pszVal,_pszNick)) { LPTSTR ptszNick = mir_utf8decodeT(_pszNick); LPTSTR ptszProto = mir_a2t(_pszProto); - INT ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identificaion"), + int ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identificaion"), LPGENT("The contact %s(%s) has no unique id in the vCard,\nbut there is a contact in your clist with the same nick and protocol.\nDo you wish to use this contact?"), ptszNick, ptszProto); MIR_FREE(ptszNick); diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index c93f7c838b..377b341c3e 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HANDLE CListFindGroup(LPCSTR pszGroup); class CExImContactBase { - BOOLEAN compareUID(DBVARIANT *dbv); + BYTE compareUID(DBVARIANT *dbv); protected: LPSTR _pszNick; // utf8 encoded @@ -37,7 +37,7 @@ protected: DWORD _dbvUIDHash; DBVARIANT _dbvUID; HANDLE _hContact; - BOOLEAN _isNewContact; // is this contact a new one? + BYTE _isNewContact; // is this contact a new one? HANDLE findHandle(); @@ -54,22 +54,22 @@ public: __inline DBVARIANT& uid() { return _dbvUID; } __inline HANDLE handle() const { return _hContact; } - __inline VOID disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; } - __inline VOID group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; } - __inline VOID nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): NULL; } - __inline VOID proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): NULL; } - __inline VOID ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): NULL; } - __inline VOID uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): NULL; } - __inline VOID uid(BYTE val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; } - __inline VOID uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; } - __inline VOID uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; } - __inline VOID uidn(PBYTE val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal= val; _dbvUID.cpbVal = (WORD)len; } - __inline VOID uida(LPCSTR val) + __inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; } + __inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; } + __inline void nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): NULL; } + __inline void proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): NULL; } + __inline void ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): NULL; } + __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): NULL; } + __inline void uid(BYTE val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; } + __inline void uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; } + __inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; } + __inline void uidn(PBYTE val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal= val; _dbvUID.cpbVal = (WORD)len; } + __inline void uida(LPCSTR val) { _dbvUID.type = (_dbvUID.pszVal = mir_utf8decodeA(val))? DBVT_ASCIIZ : DBVT_DELETED; _dbvUIDHash = hashSetting_M2(_dbvUID.pszVal); } - __inline VOID uidu(LPCSTR val) + __inline void uidu(LPCSTR val) { _dbvUID.type = (_dbvUID.pszVal = mir_strdup(val))? DBVT_UTF8 : DBVT_DELETED; LPWSTR temp = mir_utf8decodeW(val); @@ -77,16 +77,16 @@ public: mir_free(temp); } - BOOLEAN isHandle(HANDLE hContact); - BOOLEAN isMeta() const; + BYTE isHandle(HANDLE hContact); + BYTE isMeta() const; - LPSTR uid2String(BOOLEAN bPrependType); + LPSTR uid2String(BYTE bPrependType); - BOOLEAN fromDB(HANDLE hContact); - BOOLEAN fromIni(LPSTR& row); + BYTE fromDB(HANDLE hContact); + BYTE fromIni(LPSTR& row); HANDLE toDB(); - VOID toIni(FILE* file, int modCount); + void toIni(FILE* file, int modCount); - BOOLEAN operator = (HANDLE hContact) { return fromDB(hContact); } + BYTE operator = (HANDLE hContact) { return fromDB(hContact); } }; diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 1f726d3181..1fe64c96bf 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * item2 - item to compare * return: the difference **/ -static INT SortProc(const LPDWORD item1, const LPDWORD item2) +static int SortProc(const LPDWORD item1, const LPDWORD item2) { return *item1 - *item2; } @@ -60,7 +60,7 @@ CExImContactXML::CExImContactXML(CFileXml * pXmlFile) * param: pszKey - the settings key to check * return: TRUE if pszKey is a valid contact information **/ -BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey) +BYTE CExImContactXML::IsContactInfo(LPCSTR pszKey) { // This is a sorted list of all hashvalues of the contact information. // This is the same as the szCiKey[] array below but sorted @@ -81,7 +81,7 @@ BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey) char buf[MAXSETTING]; // convert to hash and make bsearch as it is much faster then working with strings const DWORD dwHash = hashSetting(_strlwr(mir_strncpy(buf, pszKey, SIZEOF(buf)))); - return bsearch(&dwHash, dwCiHash, SIZEOF(dwCiHash), sizeof(dwCiHash[0]), (INT (*)(const VOID*, const VOID*))SortProc) != NULL; + return bsearch(&dwHash, dwCiHash, SIZEOF(dwCiHash), sizeof(dwCiHash[0]), (int (*)(const void*, const void*))SortProc) != NULL; } return FALSE; /* @@ -117,7 +117,7 @@ BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey) hash[i] = hashSetting(_strlwr((char*)buf)); } qsort(hash, SIZEOF(szCiKey), sizeof(hash[0]), - (INT (*)(const VOID*, const VOID*))SortProc); + (int (*)(const void*, const void*))SortProc); FILE* fil = fopen("D:\\temp\\id.txt", "wt"); for (i = 0; i < SIZEOF(szCiKey); i++) { @@ -185,11 +185,11 @@ TiXmlElement* CExImContactXML::CreateXmlElement() * param: none * return: ERROR_OK on success or any other on failure **/ -INT CExImContactXML::ExportContact(DB::CEnumList* pModules) +int CExImContactXML::ExportContact(DB::CEnumList* pModules) { if (_pXmlFile->_wExport & EXPORT_DATA) { if (pModules) { - INT i; + int i; LPSTR p; for (i = 0; i < pModules->getCount(); i++) { @@ -217,7 +217,7 @@ INT CExImContactXML::ExportContact(DB::CEnumList* pModules) * param: none * return: ERROR_OK on success or any other on failure **/ -INT CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules) +int CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules) { // create xmlNode if (!CreateXmlElement()) @@ -243,7 +243,7 @@ INT CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumLi * pModules - list of modules to export for each contact * return: ERROR_OK on success or any other on failure **/ -INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) +int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) { if (!xmlfile) { @@ -265,10 +265,10 @@ INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) { CExImContactXML vContact(_pXmlFile); - const INT cnt = DB::MetaContact::SubCount(_hContact); - const INT def = DB::MetaContact::SubDefNum(_hContact); + const int cnt = DB::MetaContact::SubCount(_hContact); + const int def = DB::MetaContact::SubDefNum(_hContact); HANDLE hSubContact = DB::MetaContact::Sub(_hContact, def); - INT i; + int i; // export default subcontact if (hSubContact && vContact.fromDB(hSubContact)) @@ -313,14 +313,14 @@ INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) * params: pszModule - the module which is to export * return: ERROR_OK on success or any other on failure **/ -INT CExImContactXML::ExportModule(LPCSTR pszModule) +int CExImContactXML::ExportModule(LPCSTR pszModule) { DB::CEnumList Settings; if (!pszModule || !*pszModule) { return ERROR_INVALID_PARAMS; } if (!Settings.EnumSettings(_hContact, pszModule)) { - INT i; + int i; TiXmlElement *xmod; xmod = new TiXmlElement(XKEY_MOD); if (!xmod) { @@ -348,7 +348,7 @@ INT CExImContactXML::ExportModule(LPCSTR pszModule) * pszSetting - the setting which is to export * return: pointer to the added element **/ -INT CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting) +int CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting) { DBVARIANT dbv; TiXmlElement *xmlEntry = NULL; @@ -458,7 +458,7 @@ INT CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LP * hContact - handle of the contact whose event chain is to export * return: TRUE on success, FALSE otherwise **/ -BOOLEAN CExImContactXML::ExportEvents() +BYTE CExImContactXML::ExportEvents() { DBEVENTINFO dbei; HANDLE hDbEvent; @@ -551,7 +551,7 @@ BOOLEAN CExImContactXML::ExportEvents() * params: xmlContact - the contact, who is the owner of the keys to count * return: nothing **/ -VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) +void CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) { TiXmlNode *xmod, *xkey; @@ -577,7 +577,7 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) * param: xContact - TiXmlElement representing a contact * return: ERROR_OK if successful or any other error number otherwise **/ -INT CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) +int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) { if (xContact == NULL) return ERROR_INVALID_PARAMS; @@ -692,7 +692,7 @@ INT CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) * param: none * return: ERROR_OK on success or any other error number otherwise **/ -INT CExImContactXML::ImportContact() +int CExImContactXML::ImportContact() { TiXmlNode *xmod; @@ -717,7 +717,7 @@ INT CExImContactXML::ImportContact() if (ImportModule(xmod) == ERROR_ABORTED) { // ask to delete new incomplete contact if (_isNewContact && _hContact != NULL) { - INT result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING, + int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING, LPGENT("Question"), LPGENT("Importing a new contact was aborted!"), LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?")); @@ -743,9 +743,9 @@ INT CExImContactXML::ImportContact() * param: none * return: ERROR_OK on success or any other error number otherwise **/ -INT CExImContactXML::ImportNormalContact() +int CExImContactXML::ImportNormalContact() { - INT err = ImportContact(); + int err = ImportContact(); // remove contact from a metacontact if (err == ERROR_OK && CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL)) { @@ -763,9 +763,9 @@ INT CExImContactXML::ImportNormalContact() * param: TRUE = keepMetaSubContact * return: ERROR_OK on success or any other error number otherwise **/ -INT CExImContactXML::Import(BOOLEAN keepMetaSubContact) +int CExImContactXML::Import(BYTE keepMetaSubContact) { - INT result; + int result; TiXmlElement *xContact = _xmlNode->FirstChildElement("CONTACT"); // xml contact contains subcontacts? @@ -842,9 +842,9 @@ INT CExImContactXML::Import(BOOLEAN keepMetaSubContact) * param: pMetaContact - the meta contact to add this one to * return: **/ -INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) +int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) { - INT err = ImportContact(); + int err = ImportContact(); // abort here if contact was not imported correctly if (err != ERROR_OK) return err; @@ -858,7 +858,7 @@ INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) if (_isNewContact && _hContact != NULL) { LPTSTR ptszNick = mir_utf8decodeT(_pszNick); LPTSTR ptszMetaNick = mir_utf8decodeT(pMetaContact->_pszNick); - INT result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING, + int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING, LPGENT("Question"), LPGENT("Importing a new meta subcontact failed!"), LPGENT("The newly created MetaSubContact '%s'\ncould not be added to MetaContact '%s'!\n\nDo you want to delete this contact?"), @@ -885,13 +885,13 @@ INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) * stat - structure used to collect some statistics * return: ERROR_OK on success or one other element of ImportError to tell the type of failure **/ -INT CExImContactXML::ImportModule(TiXmlNode* xmlModule) +int CExImContactXML::ImportModule(TiXmlNode* xmlModule) { TiXmlElement *xMod; TiXmlElement *xKey; LPCSTR pszModule; - BOOLEAN isProtoModule; - BOOLEAN isMetaModule; + BYTE isProtoModule; + BYTE isMetaModule; // check if parent is really a module if (!xmlModule || mir_stricmp(xmlModule->Value(), XKEY_MOD)) @@ -945,7 +945,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule) } // import event else if (!mir_stricmp(xKey->Value(), XKEY_EVT)) { - INT error = ImportEvent(pszModule, xKey->ToElement()); + int error = ImportEvent(pszModule, xKey->ToElement()); switch (error) { case ERROR_OK: _pXmlFile->_numEventsDone++; @@ -969,7 +969,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule) * xmlEntry - xmlnode representing the setting to import * return: ERROR_OK on success or one other element of ImportError to tell the type of failure **/ -INT CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry) +int CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry) { DBCONTACTWRITESETTING cws = {0}; TiXmlText* xval; @@ -1055,7 +1055,7 @@ INT CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry) * xmlEvent - xmlnode representing the event to import * return: ERROR_OK on success or one other element of ImportError to tell the type of failure **/ -INT CExImContactXML::ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent) +int CExImContactXML::ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent) { DBEVENTINFO dbei; TiXmlText *xmlValue; diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h index 512ab9b08e..b88d1b8097 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h @@ -51,37 +51,37 @@ class CExImContactXML : public CExImContactBase { TiXmlElement* _xmlNode; // xmlnode with contact information HANDLE _hEvent; - BOOLEAN IsContactInfo(LPCSTR pszKey); + BYTE IsContactInfo(LPCSTR pszKey); // private importing methods - INT ImportModule(TiXmlNode* xmlModule); - INT ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry); - INT ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent); - INT ImportContact(); - INT ImportNormalContact(); - INT ImportMetaSubContact(CExImContactXML * pMetaContact); - VOID CountKeys(DWORD &numSettings, DWORD &numEvents); + int ImportModule(TiXmlNode* xmlModule); + int ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry); + int ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent); + int ImportContact(); + int ImportNormalContact(); + int ImportMetaSubContact(CExImContactXML * pMetaContact); + void CountKeys(DWORD &numSettings, DWORD &numEvents); // private exporting methods - INT ExportModule(LPCSTR pszModule); - INT ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting); - BOOLEAN ExportEvents(); + int ExportModule(LPCSTR pszModule); + int ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting); + BYTE ExportEvents(); - INT ExportContact(DB::CEnumList* pModules); - INT ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules); + int ExportContact(DB::CEnumList* pModules); + int ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules); public: CExImContactXML(CFileXml * pXmlFile); // exporting stuff TiXmlElement* CreateXmlElement(); - INT Export(FILE *xmlfile, DB::CEnumList* pModules); + int Export(FILE *xmlfile, DB::CEnumList* pModules); // importing stuff - INT LoadXmlElemnt(TiXmlElement *xContact); - INT Import(BOOLEAN keepMetaSubContact = FALSE); + int LoadXmlElemnt(TiXmlElement *xContact); + int Import(BYTE keepMetaSubContact = FALSE); - BOOLEAN operator = (TiXmlElement* xmlContact) { + BYTE operator = (TiXmlElement* xmlContact) { return LoadXmlElemnt(xmlContact) == ERROR_OK; } }; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 81c15c9e8a..1512c7dfb9 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -111,7 +111,7 @@ HTREEITEM ExportTree_FindItem(HWND hTree, HTREEITEM hParent, LPSTR pszText) * bState - 0-hide checkbox/1-unchecked/2-checked * return: return handle to added treeitem **/ -HTREEITEM ExportTree_AddItem(HWND hTree, HTREEITEM hParent, LPSTR pszDesc, BOOLEAN bUseImages, BYTE bState) +HTREEITEM ExportTree_AddItem(HWND hTree, HTREEITEM hParent, LPSTR pszDesc, BYTE bUseImages, BYTE bState) { TVINSERTSTRUCTA tvii; HTREEITEM hItem = NULL; @@ -147,7 +147,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar case WM_INITDIALOG: { HWND hTree; - BOOLEAN bImagesLoaded = 0; + BYTE bImagesLoaded = 0; // get tree handle and set treeview style if (!(hTree = GetDlgItem(hDlg, IDC_TREE))) break; @@ -171,7 +171,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar { ICO_BTN_EXPORT, BM_SETIMAGE, IDOK }, { ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL } }; - const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; + const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); // create imagelist for treeview @@ -280,7 +280,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar if (!Modules.EnumModules()) // init Modul list { - INT i; + int i; LPSTR p; for (i = 0; i < Modules.getCount(); i++) @@ -442,7 +442,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar * hParent - handle to a window which should act as the parent of the created dialog * return: 0 if user pressed ok, 1 on cancel **/ -INT DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent) +int DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent) { EXPORTDATA dat; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h index 5b2ce8b2a7..74e64a1e75 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h @@ -22,6 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _DLG_EXIMMODULES_H_ #define _DLG_EXIMMODULES_H_ -INT DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent); +int DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent); #endif /* _DLG_EXIMMODULES_H_ */ diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 2621e83e9c..9a84faf5c5 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * @param nothing * @return nothing **/ -static VOID InitAlteredPlacesBar() +static void InitAlteredPlacesBar() { // do not try it on a win9x Box if (IsWinVer2000Plus()) @@ -92,7 +92,7 @@ static VOID InitAlteredPlacesBar() * params: nothing * return: nothing **/ -static VOID ResetAlteredPlaceBars() +static void ResetAlteredPlaceBars() { // make sure not to call the following on a Win9x Box if (IsWinVer2000Plus()) @@ -115,7 +115,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara if (uMsg == TB_ADDBUTTONS) { TBBUTTON *tbb = (TBBUTTON *)lParam; TCHAR szBtnText[MAX_PATH]; - INT iString; + int iString; HWND hWndToolTip; if (tbb) { @@ -208,7 +208,7 @@ static LRESULT CALLBACK OpenSaveFileDialogHook(HWND hDlg, UINT uMsg, WPARAM wPar * pszInitialDir - buffer to store the initial dir to (size must be MAX_PATH) * return: nothing **/ -static VOID GetInitialDir(LPSTR pszInitialDir) +static void GetInitialDir(LPSTR pszInitialDir) { CHAR szRelative[MAX_PATH]; @@ -235,7 +235,7 @@ static VOID GetInitialDir(LPSTR pszInitialDir) * pszInitialDir - buffer to store the initial dir to (size must be MAX_PATH) * return: nothing **/ -static VOID SaveInitialDir(LPSTR pszInitialDir) +static void SaveInitialDir(LPSTR pszInitialDir) { CHAR szRelative[MAX_PATH]; LPSTR p; @@ -261,7 +261,7 @@ static VOID SaveInitialDir(LPSTR pszInitialDir) * pszFile - this is the buffer to store the file to (size must be MAX_PATH) * return: nothing **/ -static VOID InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszInitialDir, LPSTR pszFile) +static void InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszInitialDir, LPSTR pszFile) { ZeroMemory(pofn, sizeof(OPENFILENAME)); @@ -298,7 +298,7 @@ static VOID InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR * pszFile - this is the buffer to store the file to (size must be MAX_PATH) * return: -1 on error/abort or filter index otherwise **/ -INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile) +int DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile) { OPENFILENAMEA ofn; CHAR szInitialDir[MAX_PATH]; @@ -323,7 +323,7 @@ INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPS * pszFile - this is the buffer to store the file to (size must be MAX_PATH) * return: -1 on error/abort or filter index otherwise **/ -INT DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile) +int DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile) { OPENFILENAMEA ofn; CHAR szInitialDir[MAX_PATH]; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h index 338e64ac23..8ba9117bbb 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once -INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile); -INT DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile); +int DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile); +int DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile); #endif /* _DLG_EXIMOPENSAVEFFILE_H_ */ diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index 4a73d11182..e3a1ecdf8d 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -42,7 +42,7 @@ INT_PTR CALLBACK DlgProcProgress(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar { ICO_DLG_IMPORT, STM_SETIMAGE, ICO_DLGLOGO }, { ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL } }; - const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; + const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); TranslateDialogDefault(hDlg); @@ -114,7 +114,7 @@ CProgress::~CProgress() * params: numContacts - the number of contacts * return: nothing **/ -VOID CProgress::SetContactCount(DWORD numContacts) +void CProgress::SetContactCount(DWORD numContacts) { if (_hDlg) { HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS2); @@ -130,7 +130,7 @@ VOID CProgress::SetContactCount(DWORD numContacts) * params: numSettings - the number of settings & events * return: nothing **/ -VOID CProgress::SetSettingsCount(DWORD numSettings) +void CProgress::SetSettingsCount(DWORD numSettings) { if (_hDlg) { HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS); @@ -146,7 +146,7 @@ VOID CProgress::SetSettingsCount(DWORD numSettings) * params: none * return: nothing **/ -VOID CProgress::Hide() +void CProgress::Hide() { ShowWindow(_hDlg, SW_HIDE); } @@ -158,7 +158,7 @@ VOID CProgress::Hide() * params: nothing * return: FALSE if user pressed cancel, TRUE otherwise **/ -BOOLEAN CProgress::Update() +BYTE CProgress::Update() { MSG msg; @@ -185,7 +185,7 @@ BOOLEAN CProgress::Update() * params: pszFormat - the text to display for the contact * return: FALSE if user pressed cancel, TRUE otherwise **/ -BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...) +BYTE CProgress::UpdateContact(LPCTSTR pszFormat, ...) { if (_hDlg != NULL) { HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS2); @@ -198,7 +198,7 @@ BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...) va_end(vl); SetDlgItemText(_hDlg, TXT_CONTACT, buf); } - SendMessage(hProg, PBM_SETPOS, (INT)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0); + SendMessage(hProg, PBM_SETPOS, (int)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0); return Update(); } return TRUE; @@ -211,7 +211,7 @@ BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...) * params: pszFormat - the text to display for the setting * return: FALSE if user pressed cancel, TRUE otherwise **/ -BOOLEAN CProgress::UpdateSetting(LPCTSTR pszFormat, ...) +BYTE CProgress::UpdateSetting(LPCTSTR pszFormat, ...) { if (_hDlg != NULL) { HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS); @@ -227,7 +227,7 @@ BOOLEAN CProgress::UpdateSetting(LPCTSTR pszFormat, ...) if(mir_tcsicmp(tmp,buf)) SetDlgItemText(_hDlg, TXT_SETTING, buf); } - SendMessage(hProg, PBM_SETPOS, (INT)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0); + SendMessage(hProg, PBM_SETPOS, (int)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0); return Update(); } return TRUE; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h index 8605900911..379df3c7c1 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h @@ -29,19 +29,19 @@ class CProgress HWND _hDlg; DWORD _dwStartTime; - BOOLEAN Update(); + BYTE Update(); public: CProgress(); ~CProgress(); - VOID Hide(); + void Hide(); - VOID SetContactCount(DWORD numContacts); - VOID SetSettingsCount(DWORD numSettings); + void SetContactCount(DWORD numContacts); + void SetSettingsCount(DWORD numSettings); - BOOLEAN UpdateContact(LPCTSTR pszFormat, ...); - BOOLEAN UpdateSetting(LPCTSTR pszFormat, ...); + BYTE UpdateContact(LPCTSTR pszFormat, ...); + BYTE UpdateSetting(LPCTSTR pszFormat, ...); }; #endif /* _DLG_EXIMPROGRESS_H_ */ diff --git a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h index 17934e4131..d30fddca4a 100644 --- a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h +++ b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h @@ -239,14 +239,14 @@ inline INT_PTR QPDecodeGetRequiredLength(INT_PTR nSrcLen) return nSrcLen; } -inline BOOL QPEncode(BYTE* pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR* pnDestLen, BOOLEAN *bEncoded, DWORD dwFlags = 0) +inline BOOL QPEncode(BYTE* pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR* pnDestLen, BYTE *bEncoded, DWORD dwFlags = 0) { //The hexadecimal character set static const CHAR s_chHexChars[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; INT_PTR nRead = 0, nWritten = 0, nLineLen = 0; CHAR ch; - BOOLEAN bChanged = FALSE; + BYTE bChanged = FALSE; if (!pbSrcData || !szDest || !pnDestLen) { diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index efa977f9e4..77a638e44a 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * file - file to write the settings to * return nothing **/ -static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file) +static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file) { DB::CEnumList Settings; @@ -46,7 +46,7 @@ static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file) DBVARIANT dbv; LPSTR here; WORD j; - INT i; + int i; LPSTR pszSetting; //char tmp[32]; @@ -126,7 +126,7 @@ static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file) * pModules - module to export, NULL to export all modules of a contact * file - ini file to write the contact to **/ -static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file) +static BYTE ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file) { CExImContactBase vcc; @@ -134,7 +134,7 @@ static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* fil { if ((vcc = hContact) >= NULL) { - INT i; + int i; LPSTR p; vcc.toIni(file, pModules->getCount()-1); @@ -161,7 +161,7 @@ static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* fil * param: hContact - contact to export or -1 to export all contacts * pszFileName - ini-filename to write the contact to **/ -INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName) +int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName) { FILE* file; errno_t err; @@ -225,7 +225,7 @@ INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName) * importing stuff ***********************************************************************************************************/ -LPSTR strnrchr(LPSTR string, INT ch, DWORD len) +LPSTR strnrchr(LPSTR string, int ch, DWORD len) { LPSTR start = (LPSTR)string; @@ -248,7 +248,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str) { CHAR c; DWORD l = 0; - BOOLEAN bComment = 0; + BYTE bComment = 0; str[0] = 0; while (!feof(file)) { @@ -300,7 +300,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str) * cchBuf - character count of the buffer * return: handle to the contact that matches the information or NULL if no match **/ -static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BOOLEAN bCanCreate) +static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate) { CExImContactBase vcc; @@ -324,7 +324,7 @@ static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BOOLEAN bCanCrea * strLine - string with the setting and its value to write to db * return: 0 if writing was ok, 1 otherwise **/ -INT ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine) +int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine) { DBCONTACTWRITESETTING cws; LPSTR end, value; @@ -437,7 +437,7 @@ INT ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine) * strLine - string with the setting and its value to write to db * return: 0 if writing was ok, 1 otherwise **/ -INT SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName) +int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName) { FILE *file; HANDLE hNewContact = INVALID_HANDLE_VALUE; diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h index 572d2d06aa..6961b1b6f7 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once - INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName); - INT SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName); + int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName); + int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName); #endif /* _SVC_EXIMINI_H_ */ diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index c419a0e34c..7a5ca3ae94 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -36,11 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * return TRUE or FALSE **/ -BOOLEAN IsUSASCII(LPCSTR pBuffer, LPDWORD pcbBuffer) +BYTE IsUSASCII(LPCSTR pBuffer, LPDWORD pcbBuffer) { BYTE c; PBYTE s = (PBYTE)pBuffer; - BOOLEAN bIsUTF = 0; + BYTE bIsUTF = 0; if (s == NULL) return 1; while ((c = *s++) != 0) { @@ -93,7 +93,7 @@ CLineBuffer::~CLineBuffer() * * return: TRUE if reallocation successful or memoryblock is large enough, FALSE otherwise **/ -BOOLEAN CLineBuffer::_resizeBuf(const size_t cbReq) +BYTE CLineBuffer::_resizeBuf(const size_t cbReq) { if (cbReq > _cbVal - _cbUsed) { if (!(_pVal = (PBYTE)mir_realloc(_pVal, BLOCKSIZE + _cbVal + 1))) { @@ -318,7 +318,7 @@ LPCSTR CLineBuffer::GetBuffer() * * return: nothing **/ -VOID CLineBuffer::TruncToLength(size_t cbLength) +void CLineBuffer::TruncToLength(size_t cbLength) { if (cbLength < _cbUsed) { _cbUsed = cbLength; @@ -333,7 +333,7 @@ VOID CLineBuffer::TruncToLength(size_t cbLength) * * return: nothing **/ -VOID CLineBuffer::Truncate(size_t count) +void CLineBuffer::Truncate(size_t count) { if (_cbUsed <= count) { _cbUsed = 0; @@ -352,7 +352,7 @@ VOID CLineBuffer::Truncate(size_t count) * * return: nothing **/ -VOID CLineBuffer::TruncateSMS() +void CLineBuffer::TruncateSMS() { if (!strncmp((LPSTR)(_pVal + _cbUsed - 4), " SMS", 4)) { _cbUsed -= 4; @@ -367,7 +367,7 @@ VOID CLineBuffer::TruncateSMS() * * return: nothing **/ -VOID CLineBuffer::fput(FILE *outfile) +void CLineBuffer::fput(FILE *outfile) { if (_pVal) { _pVal[_cbUsed] = 0; @@ -384,7 +384,7 @@ VOID CLineBuffer::fput(FILE *outfile) * * return: nothing **/ -VOID CLineBuffer::fputEncoded(FILE *outFile) +void CLineBuffer::fputEncoded(FILE *outFile) { PBYTE pVal = _pVal; @@ -437,7 +437,7 @@ VOID CLineBuffer::fputEncoded(FILE *outFile) * * return: nothing **/ -INT CLineBuffer::fgetEncoded(FILE *inFile) +int CLineBuffer::fgetEncoded(FILE *inFile) { CHAR c; CHAR hex[3]; @@ -557,10 +557,10 @@ size_t CLineBuffer::GetTokenNext(const CHAR delim, CLineBuffer * pBuf) * * return: 0 if successful, 1 otherwise **/ -INT CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim) +int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim) { PBYTE here; - INT iRet = 1; + int iRet = 1; _pTok = _pVal; if (_pTok && *_pTok) { @@ -594,10 +594,10 @@ INT CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const * * return: 0 if successful, 1 otherwise **/ -INT CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim) +int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim) { PBYTE here; - INT iRet = 1; + int iRet = 1; if (_pTok && *_pTok) { for (here = _pTok;; here++) { @@ -628,7 +628,7 @@ INT CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const * * return: 0 if successful, 1 otherwise **/ -INT CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting) +int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting) { if (_pVal && _cbUsed > 0) return DB::Setting::WriteAString(hContact, pszModule, pszSetting, (LPSTR)_pVal); @@ -667,7 +667,7 @@ CVCardFileVCF::CVCardFileVCF() * * return number of the added bytes **/ -size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *cbRew) +size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew) { UINT i; WORD wAdd = 0; @@ -691,7 +691,7 @@ size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *c * * return value type **/ -BOOLEAN CVCardFileVCF::GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv) +BYTE CVCardFileVCF::GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv) { DBCONTACTGETSETTING cgs; @@ -762,7 +762,7 @@ size_t CVCardFileVCF::packDB(const CHAR *pszModule, const CHAR *pszSetting, size * * return number of bytes, added to the linebuffer **/ -size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BOOLEAN bSigned, size_t *cbRew) +size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned, size_t *cbRew) { DBVARIANT dbv; UINT nList; @@ -772,13 +772,13 @@ size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, GetList((WPARAM)&nList, (LPARAM)&pList); switch (GetSetting(pszModule, pszSetting, &dbv)) { case DBVT_BYTE: - wAdd = packList(pList, nList, (INT)(bSigned ? dbv.cVal : dbv.bVal), cbRew); + wAdd = packList(pList, nList, (int)(bSigned ? dbv.cVal : dbv.bVal), cbRew); break; case DBVT_WORD: - wAdd = packList(pList, nList, (INT)(bSigned ? dbv.sVal : dbv.wVal), cbRew); + wAdd = packList(pList, nList, (int)(bSigned ? dbv.sVal : dbv.wVal), cbRew); break; case DBVT_DWORD: - wAdd = packList(pList, nList, (INT)(bSigned ? dbv.lVal : dbv.dVal), cbRew); + wAdd = packList(pList, nList, (int)(bSigned ? dbv.lVal : dbv.dVal), cbRew); break; case DBVT_UTF8: case DBVT_ASCIIZ: @@ -805,7 +805,7 @@ size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, * * return number of bytes, added to the linebuffer **/ -VOID CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew) +void CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew) { if (cbRew) { _clVal.Truncate(*cbRew); @@ -834,7 +834,7 @@ VOID CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew) * * return number of bytes, added to the linebuffer **/ -VOID CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew) +void CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew) { if (cbRew) { _clVal.Truncate(*cbRew); @@ -860,7 +860,7 @@ VOID CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew) * pszMode - the mode the file should be opened with * return TRUE or FALSE **/ -BOOLEAN CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode) +BYTE CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode) { if (!(_pFile = fopen(pszFileName, pszMode))) return FALSE; @@ -879,7 +879,7 @@ BOOLEAN CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode) * pszMode - the mode the file should be opened with * return TRUE or FALSE **/ -VOID CVCardFileVCF::Close(VOID) +void CVCardFileVCF::Close(void) { if (_pFile) fclose(_pFile); @@ -894,7 +894,7 @@ VOID CVCardFileVCF::Close(VOID) * param: none * return TRUE or FALSE **/ -BOOLEAN CVCardFileVCF::Export(BOOLEAN bExportUtf) +BYTE CVCardFileVCF::Export(BYTE bExportUtf) { size_t cbRew = 0; @@ -1122,7 +1122,7 @@ BOOLEAN CVCardFileVCF::Export(BOOLEAN bExportUtf) * * return: number of characters read from the file or EOF **/ -INT CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting) +int CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting) { LPSTR here; @@ -1152,11 +1152,11 @@ INT CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting) * * return: number of characters read from the file or EOF **/ -BOOLEAN CVCardFileVCF::Import() +BYTE CVCardFileVCF::Import() { CHAR szEnt[MAX_PATH]; LPSTR pszParam; - INT cbLine; + int cbLine; BYTE numEmails = 0; while (EOF != (cbLine = readLine(szEnt, MAX_PATH))) { diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index c5a938ea13..3fbab056e7 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -29,7 +29,7 @@ private: size_t _cbVal; size_t _cbUsed; - BOOLEAN _resizeBuf(const size_t cbReq); + BYTE _resizeBuf(const size_t cbReq); public: CLineBuffer(); @@ -49,19 +49,19 @@ public: size_t GetLength(); LPCSTR GetBuffer(); - VOID TruncToLength(size_t cbLength); - VOID Truncate(size_t count); - VOID TruncateSMS(); + void TruncToLength(size_t cbLength); + void Truncate(size_t count); + void TruncateSMS(); - VOID fput(FILE *outfile); - VOID fputEncoded(FILE *outFile); - INT fgetEncoded(FILE *inFile); + void fput(FILE *outfile); + void fputEncoded(FILE *outFile); + int fgetEncoded(FILE *inFile); size_t GetTokenFirst(const CHAR delim, CLineBuffer * pBuf); size_t GetTokenNext(const CHAR delim, CLineBuffer * pBuf); - INT DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim); - INT DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim); - INT DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting); + int DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim); + int DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim); + int DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting); }; class CVCardFileVCF @@ -72,23 +72,23 @@ private: HANDLE _hContact; const CHAR *_pszBaseProto; WORD _cbRew; - BOOLEAN _useUtf8; + BYTE _useUtf8; WORD _hasUtf8; - size_t packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *cbRew = NULL); - BOOLEAN GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv); + size_t packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew = NULL); + BYTE GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv); size_t packDB(const CHAR *pszModule, const CHAR *pszSetting, size_t *cbRew = NULL); - size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BOOLEAN bSigned = FALSE, size_t *cbRew = NULL); + size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned = FALSE, size_t *cbRew = NULL); - VOID writeLine(const CHAR *szSet, size_t *cbRew = NULL); - VOID writeLineEncoded(const CHAR *szSet, size_t *cbRew = NULL); - INT readLine(LPSTR szVCFSetting, WORD cchSetting); + void writeLine(const CHAR *szSet, size_t *cbRew = NULL); + void writeLineEncoded(const CHAR *szSet, size_t *cbRew = NULL); + int readLine(LPSTR szVCFSetting, WORD cchSetting); public: CVCardFileVCF(); - BOOLEAN Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode); - VOID Close(VOID); - BOOLEAN Export(BOOLEAN bExportUtf); - BOOLEAN Import(); + BYTE Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode); + void Close(void); + BYTE Export(BYTE bExportUtf); + BYTE Import(); }; diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index a5f5dcc4e2..9b211ce7ad 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -35,7 +35,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM { ICO_BTN_EXPORT, BM_SETIMAGE, IDOK }, { ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL } }; - const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; + const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2; IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet); TranslateDialogDefault(hDlg); @@ -86,7 +86,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM * pszFileName - full qualified path to the xml file which is destination for the export process * return: 0 on success, 1 otherwise **/ -INT CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) +int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) { FILE *xmlfile; DB::CEnumList Modules; @@ -230,7 +230,7 @@ CFileXml::CFileXml() * stat - structure used to collect some statistics * return: ERROR_OK on success or one other element of ImportError to tell the type of failure **/ -INT CFileXml::ImportOwner(TiXmlElement* xContact) +int CFileXml::ImportOwner(TiXmlElement* xContact) { CExImContactXML vContact(this); @@ -249,11 +249,11 @@ INT CFileXml::ImportOwner(TiXmlElement* xContact) * stat - structure used to collect some statistics * return: ERROR_OK if at least one contact was successfully imported **/ -INT CFileXml::ImportContacts(TiXmlElement* xmlParent) +int CFileXml::ImportContacts(TiXmlElement* xmlParent) { TiXmlElement *xContact; CExImContactXML vContact(this); - INT result; + int result; LPTSTR pszNick; // import contacts @@ -348,7 +348,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent) * pszFileName - full qualified path to the xml file which is to import * return: ERROR_OK on success or one other element of ImportError to tell the type of failure **/ -INT CFileXml::Import(HANDLE hContact, LPCSTR pszFileName) +int CFileXml::Import(HANDLE hContact, LPCSTR pszFileName) { TiXmlDocument doc; TiXmlElement *xmlCard = NULL; @@ -374,7 +374,7 @@ INT CFileXml::Import(HANDLE hContact, LPCSTR pszFileName) // is owner contact to import ? if (_hContactToWorkOn == NULL) { - INT ret; + int ret; // disable database safty mode to speed up the operation CallService(MS_DB_SETSAFETYMODE, 0, 0); diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h index 6fd12366f5..3ec0ca998a 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h @@ -43,21 +43,21 @@ class CFileXml { CProgress _progress; - INT ImportOwner(TiXmlElement* xmlContact); - INT ImportContacts(TiXmlElement* xmlParent); + int ImportOwner(TiXmlElement* xmlContact); + int ImportContacts(TiXmlElement* xmlParent); DWORD CountContacts(TiXmlElement* xmlParent); /* - INT ExportOwner(FILE *xmlfile, BOOLEAN bExportEvents); - INT ExportContact(FILE *xmlfile, HANDLE hContact, BOOLEAN bExportEvents, LPENUMLIST pModules); - INT ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BOOLEAN bExportEvents); + int ExportOwner(FILE *xmlfile, BYTE bExportEvents); + int ExportContact(FILE *xmlfile, HANDLE hContact, BYTE bExportEvents, LPENUMLIST pModules); + int ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BYTE bExportEvents); */ public: CFileXml(); - INT Import(HANDLE hContact, LPCSTR pszFileName); - INT Export(lpExImParam ExImContact, LPCSTR pszFileName); + int Import(HANDLE hContact, LPCSTR pszFileName); + int Export(lpExImParam ExImContact, LPCSTR pszFileName); }; #endif /* _SVC_FILEXML_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index e51bde3e9c..f331f1f3e3 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * cchFileName - number of maximum characters the filename can be * return: nothing **/ -static VOID DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WORD cchFileName) +static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WORD cchFileName) { LPCSTR disp = 0; LPSTR temp = 0; @@ -116,7 +116,7 @@ INT_PTR SvcExImport_Export(lpExImParam ExImContact, HWND hwndParent) CHAR szFileName[MAX_PATH] = { 0 }; // create the filename to suggest the user for the to export contact DisplayNameToFileName(ExImContact, szFileName, SIZEOF(szFileName)); - INT nIndex = DlgExIm_SaveFileName(hwndParent, + int nIndex = DlgExIm_SaveFileName(hwndParent, Translate("Select a destination file..."), FilterString(ExImContact), szFileName); @@ -160,7 +160,7 @@ INT_PTR SvcExImport_Import(lpExImParam ExImContact, HWND hwndParent) // create the filename to suggest the user for the to export contact DisplayNameToFileName(ExImContact, szFileName, SIZEOF(szFileName)); - INT nIndex = DlgExIm_OpenFileName(hwndParent, + int nIndex = DlgExIm_OpenFileName(hwndParent, Translate("Import User Details from VCard"), FilterString(ExImContact), szFileName); @@ -353,7 +353,7 @@ INT_PTR svcExIm_Account_Service(WPARAM wParam, LPARAM lParam) * * return: 0 or 1 **/ -VOID SvcExImport_LoadModule() +void SvcExImport_LoadModule() { CreateServiceFunction(MS_USERINFO_VCARD_EXPORTALL, svcExIm_MainExport_Service); CreateServiceFunction(MS_USERINFO_VCARD_IMPORTALL, svcExIm_MainImport_Service); diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h index e6a60f1229..16c64c25e3 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h @@ -48,6 +48,6 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam); INT_PTR svcExIm_Group_Service(WPARAM wParam,LPARAM lParam); INT_PTR svcExIm_Account_Service(WPARAM wParam,LPARAM lParam); -VOID SvcExImport_LoadModule(); +void SvcExImport_LoadModule(); #endif /* _SVC_EXIMPORT_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index b8c35eae33..e7af317ef7 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -52,7 +52,7 @@ int hLangpack; * * @return always 0 **/ -static INT OnTopToolBarLoaded(WPARAM wParam, LPARAM lParam) +static int OnTopToolBarLoaded(WPARAM wParam, LPARAM lParam) { DlgAnniversaryListOnTopToolBarLoaded(); SvcReminderOnTopToolBarLoaded(); @@ -67,7 +67,7 @@ static INT OnTopToolBarLoaded(WPARAM wParam, LPARAM lParam) * * @return always 0 **/ -static INT OnModulesLoaded(WPARAM wParam, LPARAM lParam) +static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { myGlobals.PopUpActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS); myGlobals.MsgAddIconExist = ServiceExists(MS_MSG_ADDICON); @@ -103,7 +103,7 @@ static INT OnModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -static INT OnShutdown(WPARAM wParam, LPARAM lParam) +static int OnShutdown(WPARAM wParam, LPARAM lParam) { DlgContactInfoUnLoadModule(); SvcReminderUnloadModule(); @@ -157,7 +157,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { * * @return 0 **/ -extern "C" INT __declspec(dllexport) Unload(VOID) +extern "C" int __declspec(dllexport) Unload(void) { return 0; } @@ -167,7 +167,7 @@ extern "C" INT __declspec(dllexport) Unload(VOID) * * @return 0 **/ -extern "C" INT __declspec(dllexport) Load(void) +extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); @@ -195,8 +195,7 @@ extern "C" INT __declspec(dllexport) Load(void) return 1; } - if (IsWinVerVistaPlus()) - { + if (IsWinVerVistaPlus()) { HMODULE hDwmApi = LoadLibraryA("dwmapi.dll"); if (hDwmApi) dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi,"DwmIsCompositionEnabled"); diff --git a/plugins/UserInfoEx/src/mir_contactqueue.cpp b/plugins/UserInfoEx/src/mir_contactqueue.cpp index 859ef24ef3..d6d910a4fe 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.cpp +++ b/plugins/UserInfoEx/src/mir_contactqueue.cpp @@ -29,9 +29,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * @return The function returns the time slack between the two items. **/ -static INT QueueSortItems(const CQueueItem *i1, const CQueueItem *i2) +static int QueueSortItems(const CQueueItem *i1, const CQueueItem *i2) { - INT rc = i1->check_time - i2->check_time; + int rc = i1->check_time - i2->check_time; if (!rc) { rc = i1->hContact != i2->hContact; @@ -43,7 +43,7 @@ static INT QueueSortItems(const CQueueItem *i1, const CQueueItem *i2) * * **/ -CContactQueue::CContactQueue(INT initialSize) +CContactQueue::CContactQueue(int initialSize) : _queue(initialSize, QueueSortItems) { _hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); @@ -66,12 +66,12 @@ CContactQueue::~CContactQueue() } SetEvent(_hEvent); - for (INT count = 0; _status != STOPPED && ++count < 50;) + for (int count = 0; _status != STOPPED && ++count < 50;) { Sleep(10); } - for (INT i = 0; i < _queue.getCount(); i++) + for (int i = 0; i < _queue.getCount(); i++) { mir_free(_queue[i]); } @@ -85,7 +85,7 @@ CContactQueue::~CContactQueue() * * **/ -VOID CContactQueue::Lock() +void CContactQueue::Lock() { EnterCriticalSection(&_cs); } @@ -94,7 +94,7 @@ VOID CContactQueue::Lock() * * **/ -VOID CContactQueue::Release() +void CContactQueue::Release() { LeaveCriticalSection(&_cs); } @@ -106,11 +106,11 @@ VOID CContactQueue::Release() * * @return nothing **/ -VOID CContactQueue::RemoveAll() +void CContactQueue::RemoveAll() { Lock(); - for (INT i = _queue.getCount() - 1; i >= 0; --i) + for (int i = _queue.getCount() - 1; i >= 0; --i) { mir_free(_queue[i]); } @@ -126,11 +126,11 @@ VOID CContactQueue::RemoveAll() * * @return nothing **/ -VOID CContactQueue::RemoveAll(HANDLE hContact) +void CContactQueue::RemoveAll(HANDLE hContact) { Lock(); - for (INT i = _queue.getCount() - 1; i >= 0; --i) + for (int i = _queue.getCount() - 1; i >= 0; --i) { CQueueItem *qi = _queue[i]; @@ -152,11 +152,11 @@ VOID CContactQueue::RemoveAll(HANDLE hContact) * * @return nothing **/ -VOID CContactQueue::RemoveAllConsiderParam(HANDLE hContact, PVOID param) +void CContactQueue::RemoveAllConsiderParam(HANDLE hContact, PVOID param) { Lock(); - for (INT i = _queue.getCount() - 1; i >= 0; --i) + for (int i = _queue.getCount() - 1; i >= 0; --i) { CQueueItem *qi = _queue[i]; @@ -180,7 +180,7 @@ VOID CContactQueue::RemoveAllConsiderParam(HANDLE hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ -BOOL CContactQueue::Add(INT waitTime, HANDLE hContact, PVOID param) +BOOL CContactQueue::Add(int waitTime, HANDLE hContact, PVOID param) { BOOL rc; @@ -204,9 +204,9 @@ BOOL CContactQueue::Add(INT waitTime, HANDLE hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ -BOOL CContactQueue::AddIfDontHave(INT waitTime, HANDLE hContact, PVOID param) +BOOL CContactQueue::AddIfDontHave(int waitTime, HANDLE hContact, PVOID param) { - INT i; + int i; BOOL rc; Lock(); @@ -238,7 +238,7 @@ BOOL CContactQueue::AddIfDontHave(INT waitTime, HANDLE hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ -BOOL CContactQueue::AddUnique(INT waitTime, HANDLE hContact, PVOID param) +BOOL CContactQueue::AddUnique(int waitTime, HANDLE hContact, PVOID param) { BOOL rc; @@ -264,7 +264,7 @@ BOOL CContactQueue::AddUnique(INT waitTime, HANDLE hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ -BOOL CContactQueue::AddUniqueConsiderParam(INT waitTime, HANDLE hContact, PVOID param) +BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HANDLE hContact, PVOID param) { BOOL rc; @@ -288,7 +288,7 @@ BOOL CContactQueue::AddUniqueConsiderParam(INT waitTime, HANDLE hContact, PVOID * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ -BOOL CContactQueue::InternalAdd(INT waitTime, HANDLE hContact, PVOID param) +BOOL CContactQueue::InternalAdd(int waitTime, HANDLE hContact, PVOID param) { BOOL rc; CQueueItem *qi = (CQueueItem *) mir_alloc(sizeof(CQueueItem)); @@ -319,7 +319,7 @@ BOOL CContactQueue::InternalAdd(INT waitTime, HANDLE hContact, PVOID param) * * @return nothing **/ -VOID CContactQueue::Thread() +void CContactQueue::Thread() { while (_status == RUNNING) { @@ -342,7 +342,7 @@ VOID CContactQueue::Thread() // Take a look at first queue item CQueueItem *qi = _queue[0]; - INT dt = qi->check_time - GetTickCount(); + int dt = qi->check_time - GetTickCount(); if (dt > 0) { // Not time to request yet, wait... @@ -373,7 +373,7 @@ VOID CContactQueue::Thread() * * @return nothing **/ -VOID CContactQueue::Suspend(INT time) const +void CContactQueue::Suspend(int time) const { if (_status == RUNNING) { @@ -388,11 +388,11 @@ VOID CContactQueue::Suspend(INT time) const * * @return nothing **/ -VOID CContactQueue::ContinueWithNext() +void CContactQueue::ContinueWithNext() { if (_status == RUNNING) { - INT i, c, dt; + int i, c, dt; Lock(); diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h index ae583b5f60..b42d89c1a6 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.h +++ b/plugins/UserInfoEx/src/mir_contactqueue.h @@ -48,15 +48,15 @@ public: STOPPED = 2 }; - CContactQueue (INT initialSize = 10); + CContactQueue (int initialSize = 10); ~CContactQueue (); - inline INT Size () const { return _queue.getCount();} - inline INT Remove (INT idx) { mir_free(_queue[idx]); return _queue.remove(idx);} - inline CQueueItem* Get (INT idx) const { return _queue[idx];} + inline int Size () const { return _queue.getCount();} + inline int Remove (int idx) { mir_free(_queue[idx]); return _queue.remove(idx);} + inline CQueueItem* Get (int idx) const { return _queue[idx];} - VOID RemoveAll(); + void RemoveAll(); /** * This function removes all queue items for the hContact. @@ -65,7 +65,7 @@ public: * * @return nothing **/ - VOID RemoveAll(HANDLE hContact); + void RemoveAll(HANDLE hContact); /** * This function removes all queue items for the hContact considering the correct parameter. @@ -75,7 +75,7 @@ public: * * @return nothing **/ - VOID RemoveAllConsiderParam(HANDLE hContact, PVOID param); + void RemoveAllConsiderParam(HANDLE hContact, PVOID param); /** * This method adds the desired new item. @@ -87,7 +87,7 @@ public: * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ - BOOL Add(INT waitTime, HANDLE hContact, PVOID param = NULL); + BOOL Add(int waitTime, HANDLE hContact, PVOID param = NULL); /** * This method adds the desired new item only, if the queue does not yet contain @@ -100,7 +100,7 @@ public: * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ - BOOL AddIfDontHave(INT waitTime, HANDLE hContact, PVOID param = NULL); + BOOL AddIfDontHave(int waitTime, HANDLE hContact, PVOID param = NULL); /** * This method removes all existing queue items for the contact and adds a new queue item @@ -113,7 +113,7 @@ public: * * @return nothing **/ - BOOL AddUnique(INT waitTime, HANDLE hContact, PVOID param = NULL); + BOOL AddUnique(int waitTime, HANDLE hContact, PVOID param = NULL); /** * This method removes all existing queue items for the contact with the same parameter as @e param @@ -126,7 +126,7 @@ public: * * @return nothing **/ - BOOL AddUniqueConsiderParam (INT waitTime, HANDLE hContact, PVOID param = NULL); + BOOL AddUniqueConsiderParam (int waitTime, HANDLE hContact, PVOID param = NULL); /** * This method resumes the worker thread and immitiatly goes on with the next entry. @@ -135,12 +135,12 @@ public: * * @return nothing **/ - VOID ContinueWithNext(); + void ContinueWithNext(); protected: - virtual VOID OnEmpty () {}; - virtual VOID Callback (HANDLE hContact, PVOID param) = 0; + virtual void OnEmpty () {}; + virtual void Callback (HANDLE hContact, PVOID param) = 0; /** * This is the real thread callback function. As long as _status @@ -153,7 +153,7 @@ protected: * * @return nothing **/ - VOID Thread(); + void Thread(); /** * This is a static method to redirect the thread's callback function @@ -163,7 +163,7 @@ protected: * * @return nothing **/ - static VOID ThreadProc(CContactQueue* obj) + static void ThreadProc(CContactQueue* obj) { obj->Thread(); } @@ -175,7 +175,7 @@ protected: * * @return nothing **/ - VOID Suspend(INT time) const; + void Suspend(int time) const; private: @@ -185,8 +185,8 @@ private: HANDLE _hEvent; EQueueStatus _status; - VOID Lock(); - VOID Release(); + void Lock(); + void Release(); /** * This member function really adds an item into the time sorted queue list. @@ -198,7 +198,7 @@ private: * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ - BOOL InternalAdd(INT waitTime, HANDLE hContact, PVOID param); + BOOL InternalAdd(int waitTime, HANDLE hContact, PVOID param); }; #endif // __CONTACTASYNCQUEUE_H__ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index c5cbd35343..ed1501abed 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -49,7 +49,7 @@ INT_PTR SubDefNum(HANDLE hMetaContact) * * **/ -HANDLE Sub(HANDLE hMetaContact, INT idx) +HANDLE Sub(HANDLE hMetaContact, int idx) { if (idx != -1) { INT_PTR result = CallService(MS_MC_GETSUBCONTACT, (WPARAM) hMetaContact, (LPARAM) idx); @@ -62,7 +62,7 @@ HANDLE Sub(HANDLE hMetaContact, INT idx) * * **/ -BOOLEAN IsSub(HANDLE hContact) +BYTE IsSub(HANDLE hContact) { return myGlobals.szMetaProto && DB::Setting::GetByte(myGlobals.szMetaProto, "Enabled", TRUE) && @@ -207,11 +207,11 @@ namespace Module { * @param pszModule - the module to delete the setting from (e.g. USERINFO) * return: nothing **/ -VOID Delete(HANDLE hContact, LPCSTR pszModule) +void Delete(HANDLE hContact, LPCSTR pszModule) { CEnumList Settings; if (!Settings.EnumSettings(hContact, pszModule)) { - INT i; + int i; for (i = 0; i < Settings.getCount(); i++) { DB::Setting::Delete(hContact, pszModule, Settings[i]); } @@ -224,7 +224,7 @@ VOID Delete(HANDLE hContact, LPCSTR pszModule) * @param lParam - DBCONTACTENUMSETTINGS - (LPARAM)&dbces * @retval TRUE - always true **/ -static INT IsEmptyEnumProc(LPCSTR pszSetting, LPARAM lParam) +static int IsEmptyEnumProc(LPCSTR pszSetting, LPARAM lParam) { return 1; } @@ -236,7 +236,7 @@ static INT IsEmptyEnumProc(LPCSTR pszSetting, LPARAM lParam) * @retval TRUE - the module is empty * @retval FALSE - the module contains settings **/ -BOOLEAN IsEmpty(HANDLE hContact, LPCSTR pszModule) +BYTE IsEmpty(HANDLE hContact, LPCSTR pszModule) { DBCONTACTENUMSETTINGS dbces; dbces.pfnEnumProc = IsEmptyEnumProc; @@ -252,7 +252,7 @@ BOOLEAN IsEmpty(HANDLE hContact, LPCSTR pszModule) * @retval TRUE - the module belongs to a metacontact protocol * @retval FALSE - the module belongs to a other protocol **/ -BOOLEAN IsMeta(LPCSTR pszModule) +BYTE IsMeta(LPCSTR pszModule) { if(myGlobals.szMetaProto) return !mir_strcmp(pszModule, myGlobals.szMetaProto); @@ -265,7 +265,7 @@ BOOLEAN IsMeta(LPCSTR pszModule) * @retval TRUE - the module is empty * @retval FALSE - the module contains settings **/ -BOOLEAN IsMetaAndScan (LPCSTR pszModule) +BYTE IsMetaAndScan (LPCSTR pszModule) { return DB::Setting::GetByte(SET_META_SCAN, TRUE) && IsMeta(pszModule); } @@ -465,7 +465,7 @@ WORD GetCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszP * @retval 0 - success * @retval 1 - error **/ -BYTE GetStatic(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, LPSTR pszValue, INT cchValue) +BYTE GetStatic(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, LPSTR pszValue, int cchValue) { DBVARIANT dbv; DBCONTACTGETSETTING sVal; @@ -754,7 +754,7 @@ BYTE WriteUString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, LPSTR va * @retval TRUE - setting exists * @retval FALSE - setting does not exist **/ -BOOLEAN Exists(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) +BYTE Exists(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) { if (pszModule && pszSetting) { DBCONTACTGETSETTING cgs; @@ -800,7 +800,7 @@ BYTE Delete(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting) * * @return nothing **/ -VOID DeleteArray(HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, INT iStart) +void DeleteArray(HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart) { CHAR pszSetting[MAXSETTING]; do { @@ -1145,9 +1145,9 @@ INT_PTR BlobSizeOf(HANDLE hEvent) * @retval FALSE - The two structure's events differ from each other. **/ static FORCEINLINE -BOOLEAN IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bool Data) +BYTE IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bool Data) { - BOOLEAN res = d1 && d2 && + BYTE res = d1 && d2 && (d1->timestamp == d2->timestamp) && (d1->eventType == d2->eventType) && (d1->cbBlob == d2->cbBlob) && @@ -1174,9 +1174,9 @@ BOOLEAN IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bool Data) * @retval FALSE - no event with the information of @c dbei exists. * **/ -BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei) +BYTE Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei) { - BOOLEAN result = FALSE; + BYTE result = FALSE; DBEVENTINFO edbei; HANDLE sdbe, edbe; @@ -1246,7 +1246,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei) } /* namespace Events */ -INT CEnumList::EnumProc(LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam) +int CEnumList::EnumProc(LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam) { if (pszName) { ((CEnumList*)lParam)->Insert(pszName); @@ -1254,12 +1254,12 @@ INT CEnumList::EnumProc(LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam) return 0; } -INT CEnumList::EnumSettingsProc(LPCSTR pszName, LPARAM lParam) +int CEnumList::EnumSettingsProc(LPCSTR pszName, LPARAM lParam) { return EnumProc(pszName, 0, lParam); } -INT CEnumList::CompareProc(LPCSTR p1, LPCSTR p2) +int CEnumList::CompareProc(LPCSTR p1, LPCSTR p2) { if (p1) { if (p2) { @@ -1276,7 +1276,7 @@ CEnumList::CEnumList() : LIST(50, (FTSortFunc)CEnumList::CompareProc) CEnumList::~CEnumList() { - INT i, cnt; + int i, cnt; LPSTR p; for (i = 0, cnt = getCount(); i < cnt; i++) { diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 5efc0c0853..c2383fc590 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -26,9 +26,9 @@ namespace DB { namespace MetaContact{ INT_PTR SubCount (HANDLE hMetaContact); INT_PTR SubDefNum (HANDLE hMetaContact); - HANDLE Sub (HANDLE hMetaContact, INT idx); + HANDLE Sub (HANDLE hMetaContact, int idx); - BOOLEAN IsSub (HANDLE hContact); + BYTE IsSub (HANDLE hContact); HANDLE GetMeta (HANDLE hContact); } /* namespace MetaContact */ @@ -53,10 +53,10 @@ namespace Contact { } /* namespace Contact */ namespace Module { - VOID Delete (HANDLE hContact, LPCSTR pszModule); - BOOLEAN IsEmpty (HANDLE hContact, LPCSTR pszModule); - BOOLEAN IsMeta (LPCSTR pszModule); - BOOLEAN IsMetaAndScan (LPCSTR pszModule); + void Delete (HANDLE hContact, LPCSTR pszModule); + BYTE IsEmpty (HANDLE hContact, LPCSTR pszModule); + BYTE IsMeta (LPCSTR pszModule); + BYTE IsMetaAndScan (LPCSTR pszModule); } /* namespace Module */ @@ -97,7 +97,7 @@ namespace Setting { static FORCEINLINE WORD GetUStringCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv) { return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_UTF8); } - BYTE GetStatic (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, LPSTR szValue, INT cchValue); + BYTE GetStatic (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, LPSTR szValue, int cchValue); BYTE GetByte (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, BYTE errorValue); static FORCEINLINE @@ -168,9 +168,9 @@ namespace Setting { /** * misc operations **/ - BOOLEAN Exists (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); + BYTE Exists (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); BYTE Delete (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting); - VOID DeleteArray (HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, INT iStart); + void DeleteArray (HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart); BYTE Resident (LPCSTR pszSetting, const bool enabled); } /* namespace Setting */ @@ -191,7 +191,7 @@ namespace Event { BYTE GetInfoWithData(HANDLE hEvent, DBEVENTINFO *dbei); DWORD GetTime (HANDLE hEvent); INT_PTR BlobSizeOf (HANDLE hEvent); - BOOLEAN Exists (HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei); + BYTE Exists (HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei); } /* namespace Events */ /** @@ -199,10 +199,10 @@ namespace Event { **/ class CEnumList : public ::LIST { - static INT EnumProc (LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam); - static INT EnumSettingsProc(LPCSTR pszName, LPARAM lParam); + static int EnumProc (LPCSTR pszName, DWORD ofsModuleName, LPARAM lParam); + static int EnumSettingsProc(LPCSTR pszName, LPARAM lParam); - static INT CompareProc (LPCSTR p1, LPCSTR p2); + static int CompareProc (LPCSTR p1, LPCSTR p2); public: CEnumList(); diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index e627241170..4262ab7609 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -140,7 +140,7 @@ LPTSTR IcoLib_GetDefaultIconFileName() }; TCHAR absolute[MAX_PATH]; - for (INT i = 0; i < SIZEOF(path); i++) { + for (int i = 0; i < SIZEOF(path); i++) { PathToAbsoluteT(path[i], absolute); if ( PathFileExists(absolute)) return path[i]; @@ -158,7 +158,7 @@ LPTSTR IcoLib_GetDefaultIconFileName() * * @return nothing **/ -static VOID IcoLib_CheckIconPackVersion(LPTSTR szIconPack) +static void IcoLib_CheckIconPackVersion(LPTSTR szIconPack) { if (DB::Setting::GetByte(SET_ICONS_CHECKFILEVERSION, TRUE)) { @@ -220,7 +220,7 @@ HICON IcoLib_GetIconByHandle(HANDLE hIconItem) * * @return nothing **/ -VOID IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL* pCtrl, BYTE numCtrls) +void IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL* pCtrl, BYTE numCtrls) { HICON hIcon; BYTE i; @@ -270,7 +270,7 @@ VOID IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL* pCtrl, BYTE numCtrls) * * @return This function returns the HANDLE of the icon item. **/ -static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, LPTSTR szDefaultFile, INT idIcon, INT Size, HICON hDefIcon) +static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, LPTSTR szDefaultFile, int idIcon, int Size, HICON hDefIcon) { HANDLE hIconHandle = NULL; @@ -331,7 +331,7 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L * * @return This function returns the HANDLE of the icon item. **/ -HANDLE IcoLib_RegisterIconHandle(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, INT idIcon, INT Size) +HANDLE IcoLib_RegisterIconHandle(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, int idIcon, int Size) { return IcoLib_RegisterIconHandleEx(szIconID, szDescription, szSection, IcoLib_GetDefaultIconFileName(), idIcon, Size, ghDefIcon); } @@ -351,7 +351,7 @@ HANDLE IcoLib_RegisterIconHandle(LPSTR szIconID, LPSTR szDescription, LPSTR szSe * * @return This function returns the HICON of the icon itself. **/ -HICON IcoLib_RegisterIcon(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, INT idIcon, INT Size) +HICON IcoLib_RegisterIcon(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, int idIcon, int Size) { return IcoLib_GetIconByHandle(IcoLib_RegisterIconHandle(szIconID, szDescription, szSection, idIcon, Size)); } @@ -363,7 +363,7 @@ HICON IcoLib_RegisterIcon(LPSTR szIconID, LPSTR szDescription, LPSTR szSection, * * @return nothing **/ -VOID IcoLib_LoadModule() +void IcoLib_LoadModule() { LPTSTR szDefaultFile = IcoLib_GetDefaultIconFileName(); IcoLib_CheckIconPackVersion(szDefaultFile); diff --git a/plugins/UserInfoEx/src/mir_icolib.h b/plugins/UserInfoEx/src/mir_icolib.h index 1d2cb2ab68..046819a861 100644 --- a/plugins/UserInfoEx/src/mir_icolib.h +++ b/plugins/UserInfoEx/src/mir_icolib.h @@ -126,13 +126,13 @@ typedef struct TIconCtrl } ICONCTRL, *LPICONCTRL; LPTSTR IcoLib_GetDefaultIconFileName(); -VOID IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL* pCtrl, BYTE numCtrls); +void IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL* pCtrl, BYTE numCtrls); -HANDLE IcoLib_RegisterIconHandle(LPSTR szName, LPSTR szDescription, LPSTR szSection, INT idIcon, INT Size); -HICON IcoLib_RegisterIcon(LPSTR szName, LPSTR szDescription, LPSTR szSection, INT idIcon, INT Size); +HANDLE IcoLib_RegisterIconHandle(LPSTR szName, LPSTR szDescription, LPSTR szSection, int idIcon, int Size); +HICON IcoLib_RegisterIcon(LPSTR szName, LPSTR szDescription, LPSTR szSection, int idIcon, int Size); HICON IcoLib_GetIcon(LPCSTR pszIcon); HICON IcoLib_GetIconByHandle(HANDLE hIconItem); -VOID IcoLib_LoadModule(); +void IcoLib_LoadModule(); #endif /* _UINFOEX_ICONS_H_INCLUDED_ */ diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index ead806d70d..9ff015ce1c 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -28,7 +28,7 @@ enum ECascadeType { MCAS_NOTINITIATED = 128 }; -INT hMenuItemRefresh = NULL; +int hMenuItemRefresh = NULL; HGENMENU *hMenuItemAccount = NULL; /** @@ -63,7 +63,7 @@ INT_PTR RemoveMenuItems(HGENMENU * pItems, int Count) * * @return nothing **/ -VOID RebuildContact() +void RebuildContact() { int flag = 0; BYTE item = 0; @@ -163,7 +163,7 @@ VOID RebuildContact() * * @return nothing **/ -VOID RebuildMain() +void RebuildMain() { int flag = 0; BYTE item = 0; @@ -252,7 +252,7 @@ VOID RebuildMain() // reminder { - const BOOLEAN bRemindMenus = + const BYTE bRemindMenus = DB::Setting::GetByte(SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) && DB::Setting::GetByte(SET_REMIND_MENUENABLED, DEFVAL_REMIND_MENUENABLED); if (bRemindMenus) { @@ -300,7 +300,7 @@ VOID RebuildMain() * * @return nothing **/ -VOID RebuildGroup() +void RebuildGroup() { int flag = 0; BYTE item = 0; @@ -397,7 +397,7 @@ VOID RebuildGroup() * * @return nothing **/ -VOID RebuildSubGroup() +void RebuildSubGroup() { int flag = 0; BYTE item = 0; @@ -619,7 +619,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam) } -VOID RebuildMenu() +void RebuildMenu() { RebuildMain(); RebuildContact(); diff --git a/plugins/UserInfoEx/src/mir_menuitems.h b/plugins/UserInfoEx/src/mir_menuitems.h index 6f4ad8589c..a081037513 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.h +++ b/plugins/UserInfoEx/src/mir_menuitems.h @@ -22,16 +22,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_MENUITEMS_H_INCLUDED_ #define _UINFOEX_MENUITEMS_H_INCLUDED_ -extern INT hMenuItemRefresh; +extern int hMenuItemRefresh; extern HGENMENU *hMenuItemAccount; -VOID RebuildMenu(); +void RebuildMenu(); -VOID RebuildMain(); -VOID RebuildContact(); -VOID RebuildGroup(); -VOID RebuildSubGroup(); +void RebuildMain(); +void RebuildContact(); +void RebuildGroup(); +void RebuildSubGroup(); INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam); diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp index de41f30f57..1b58459737 100644 --- a/plugins/UserInfoEx/src/psp_anniversary.cpp +++ b/plugins/UserInfoEx/src/psp_anniversary.cpp @@ -88,7 +88,7 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND hDlg, UINT uMsg, WPARAM w // read new description { HWND hEdit = GetDlgItem(hDlg, EDIT_CATEGORY); - INT len = Edit_GetTextLength(hEdit); + int len = Edit_GetTextLength(hEdit); LPTSTR pszText; if ( @@ -299,7 +299,7 @@ INT_PTR CALLBACK PSPProcAnniversary(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM pCurrent = pDateCtrl->Current(); if (pCurrent) { - INT rc = MsgBox(hDlg, MB_YESNO|MB_ICON_QUESTION|MB_NOPOPUP, LPGENT("Delete"), NULL, + int rc = MsgBox(hDlg, MB_YESNO|MB_ICON_QUESTION|MB_NOPOPUP, LPGENT("Delete"), NULL, LPGENT("Do you really want to delete the %s?"), pCurrent->Description()); if (rc == IDYES) diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp index 2e0ea911d0..ebdf9e1e96 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" -VOID UpDate_CountryIcon(HWND hCtrl, int countryID) { +void UpDate_CountryIcon(HWND hCtrl, int countryID) { HICON hIcon = LoadFlagIcon(countryID); HICON hOld = Static_SetIcon(hCtrl, hIcon); ShowWindow(hCtrl, hIcon ? SW_SHOW : SW_HIDE); diff --git a/plugins/UserInfoEx/src/psp_base.h b/plugins/UserInfoEx/src/psp_base.h index 378fe2fec9..726aeccb7d 100644 --- a/plugins/UserInfoEx/src/psp_base.h +++ b/plugins/UserInfoEx/src/psp_base.h @@ -37,6 +37,6 @@ static FORCEINLINE INT_PTR CALLBACK PSPProcMyNotes(HWND hDlg, UINT uMsg, WPARAM static FORCEINLINE INT_PTR CALLBACK PSPProcAbout(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { return PSPProcEdit(hDlg, uMsg, wParam, lParam, SET_CONTACT_ABOUT); } -VOID UpDate_CountryIcon(HWND hCtrl, int countryID); +void UpDate_CountryIcon(HWND hCtrl, int countryID); #endif /* _UI_PSP_BASE_INCLUDE_ */ diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index 746e41cc08..4b82defd70 100644 --- a/plugins/UserInfoEx/src/psp_general.cpp +++ b/plugins/UserInfoEx/src/psp_general.cpp @@ -84,7 +84,7 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar { case PSN_INFOCHANGED: { - BOOLEAN bEnable; + BYTE bEnable; DBVARIANT dbv; CCtrlFlags Flags; diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index a1b7de2531..ea0b2c76d8 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -37,7 +37,7 @@ static MenuOptionsList ctrl_Menu[]= * * **/ -static FORCEINLINE VOID NotifyParentOfChange(HWND hDlg) +static FORCEINLINE void NotifyParentOfChange(HWND hDlg) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); } @@ -49,7 +49,7 @@ static FORCEINLINE VOID NotifyParentOfChange(HWND hDlg) * * @return nothing **/ -static VOID SendNotify_InfoChanged(HWND hDlg) +static void SendNotify_InfoChanged(HWND hDlg) { PSHNOTIFY pshn; @@ -62,9 +62,9 @@ static VOID SendNotify_InfoChanged(HWND hDlg) * * **/ -static INT FORCEINLINE ComboBox_FindByItemDataPtr(HWND hCombo, LPARAM pData) +static int FORCEINLINE ComboBox_FindByItemDataPtr(HWND hCombo, LPARAM pData) { - INT nItemIndex; + int nItemIndex; for (nItemIndex = ComboBox_GetCount(hCombo); (nItemIndex >= 0) && (ComboBox_GetItemData(hCombo, nItemIndex) != pData); @@ -76,7 +76,7 @@ static INT FORCEINLINE ComboBox_FindByItemDataPtr(HWND hCombo, LPARAM pData) * * **/ -static VOID FORCEINLINE ComboBox_SetCurSelByItemDataPtr(HWND hCombo, LPARAM pData) +static void FORCEINLINE ComboBox_SetCurSelByItemDataPtr(HWND hCombo, LPARAM pData) { ComboBox_SetCurSel(hCombo, ComboBox_FindByItemDataPtr(hCombo, pData)); } @@ -85,7 +85,7 @@ static VOID FORCEINLINE ComboBox_SetCurSelByItemDataPtr(HWND hCombo, LPARAM pDat * * **/ -static VOID FORCEINLINE ComboBox_AddItemWithData(HWND hCombo, LPTSTR ptszText, LPARAM pData) +static void FORCEINLINE ComboBox_AddItemWithData(HWND hCombo, LPTSTR ptszText, LPARAM pData) { ComboBox_SetItemData(hCombo, ComboBox_AddString(hCombo, TranslateTS(ptszText)), pData); } @@ -100,7 +100,7 @@ static VOID FORCEINLINE ComboBox_AddItemWithData(HWND hCombo, LPTSTR ptszText, L * @retval TRUE on success * @retval FALSE on failure **/ -static BOOLEAN EnableDlgItem(HWND hDlg, const INT idCtrl, BOOLEAN bEnabled) +static BYTE EnableDlgItem(HWND hDlg, const int idCtrl, BYTE bEnabled) { return EnableWindow(GetDlgItem(hDlg, idCtrl), bEnabled); } @@ -115,7 +115,7 @@ static BOOLEAN EnableDlgItem(HWND hDlg, const INT idCtrl, BOOLEAN bEnabled) * * @return bEnabled **/ -static BOOLEAN InitialEnableControls(HWND hDlg, const INT *idCtrl, int countCtrl, BOOLEAN bEnabled) +static BYTE InitialEnableControls(HWND hDlg, const int *idCtrl, int countCtrl, BYTE bEnabled) { HWND hCtrl; @@ -137,7 +137,7 @@ static BOOLEAN InitialEnableControls(HWND hDlg, const INT *idCtrl, int countCtrl * * @return bEnabled **/ -static BOOLEAN EnableControls(HWND hDlg, const INT *idCtrl, int countCtrl, BOOLEAN bEnabled) +static BYTE EnableControls(HWND hDlg, const int *idCtrl, int countCtrl, BYTE bEnabled) { while (countCtrl-- > 0) { @@ -156,9 +156,9 @@ static BOOLEAN EnableControls(HWND hDlg, const INT *idCtrl, int countCtrl, BOOLE * * @return This function returns the value from database or the default value. **/ -static BOOLEAN DBGetCheckBtn(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, BOOLEAN bDefault) +static BYTE DBGetCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting, BYTE bDefault) { - BOOLEAN val = (DB::Setting::GetByte(pszSetting, bDefault) & 1) == 1; + BYTE val = (DB::Setting::GetByte(pszSetting, bDefault) & 1) == 1; CheckDlgButton(hDlg, idCtrl, val); return val; } @@ -173,9 +173,9 @@ static BOOLEAN DBGetCheckBtn(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, BOO * * @return checkstate **/ -static BOOLEAN DBWriteCheckBtn(HWND hDlg, const INT idCtrl, LPCSTR pszSetting) +static BYTE DBWriteCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting) { - BOOLEAN val = IsDlgButtonChecked(hDlg, idCtrl); + BYTE val = IsDlgButtonChecked(hDlg, idCtrl); int Temp = DB::Setting::GetByte(pszSetting, 0); Temp &= ~1; DB::Setting::WriteByte(pszSetting, Temp |= val ); @@ -193,7 +193,7 @@ static BOOLEAN DBWriteCheckBtn(HWND hDlg, const INT idCtrl, LPCSTR pszSetting) * * @return nothing **/ -static VOID DBGetColor(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, DWORD bDefault) +static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, DWORD bDefault) { SendDlgItemMessage(hDlg, idCtrl, CPM_SETCOLOUR, 0, DB::Setting::GetDWord(pszSetting, bDefault)); } @@ -208,7 +208,7 @@ static VOID DBGetColor(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, DWORD bDe * * @return nothing **/ -static VOID DBWriteColor(HWND hDlg, const INT idCtrl, LPCSTR pszSetting) +static void DBWriteColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting) { DB::Setting::WriteDWord(pszSetting, SendDlgItemMessage(hDlg, idCtrl, CPM_GETCOLOUR, 0, 0)); } @@ -226,7 +226,7 @@ static VOID DBWriteColor(HWND hDlg, const INT idCtrl, LPCSTR pszSetting) * @retval TRUE - the database value was updated * @retval FALSE - no database update needed **/ -static BOOLEAN DBWriteEditByte(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, BYTE defVal) +static BYTE DBWriteEditByte(HWND hDlg, const int idCtrl, LPCSTR pszSetting, BYTE defVal) { BYTE v; BOOL t; @@ -252,7 +252,7 @@ static BOOLEAN DBWriteEditByte(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, B * @retval TRUE - the database value was updated * @retval FALSE - no database update needed **/ -static BOOLEAN DBWriteEditWord(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, WORD defVal) +static BYTE DBWriteEditWord(HWND hDlg, const int idCtrl, LPCSTR pszSetting, WORD defVal) { WORD v; BOOL t; @@ -278,7 +278,7 @@ static BOOLEAN DBWriteEditWord(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, W * @retval TRUE - the database value was updated * @retval FALSE - no database update needed **/ -static BOOLEAN DBWriteComboByte(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, BYTE defVal) +static BYTE DBWriteComboByte(HWND hDlg, const int idCtrl, LPCSTR pszSetting, BYTE defVal) { BYTE v; @@ -292,7 +292,7 @@ static BOOLEAN DBWriteComboByte(HWND hDlg, const INT idCtrl, LPCSTR pszSetting, static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static BOOLEAN bInitialized = 0; + static BYTE bInitialized = 0; switch (uMsg) { @@ -399,7 +399,7 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, } // misc - BOOLEAN bEnabled = IsDlgButtonChecked(hDlg, CHECK_OPT_ZODIACAVATAR); + BYTE bEnabled = IsDlgButtonChecked(hDlg, CHECK_OPT_ZODIACAVATAR); DB::Setting::WriteByte(SET_ZODIAC_AVATARS, bEnabled); NServices::NAvatar::Enable(bEnabled); } @@ -419,7 +419,7 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, for (int i = 0; i < SIZEOF(ctrl_Menu); i++) { if (ctrl_Menu[i].idCheckbox == LOWORD(wParam)) { - const INT idMenuItems[] = { ctrl_Menu[i].idCheckbox + 1, ctrl_Menu[i].idNONE, ctrl_Menu[i].idALL, ctrl_Menu[i].idEXIMPORT }; + const int idMenuItems[] = { ctrl_Menu[i].idCheckbox + 1, ctrl_Menu[i].idNONE, ctrl_Menu[i].idALL, ctrl_Menu[i].idEXIMPORT }; EnableControls(hDlg, idMenuItems, SIZEOF(idMenuItems), Button_GetCheck((HWND)lParam) && ServiceExists(MS_CLIST_REMOVEMAINMENUITEM)); break; @@ -467,7 +467,7 @@ static INT_PTR CALLBACK DlgProc_CommonOpts(HWND hDlg, UINT uMsg, WPARAM wParam, static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static BOOLEAN bInitialized = 0; + static BYTE bInitialized = 0; switch (uMsg) { case WM_INITDIALOG: @@ -534,7 +534,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam case BTN_OPT_RESET: { - BOOLEAN WantReset; + BYTE WantReset; WantReset = MsgBox(hDlg, MB_ICON_WARNING|MB_YESNO, @@ -548,7 +548,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam // delete all skin icons if (!Settings.EnumSettings(NULL, "SkinIcons")) { - INT i; + int i; LPSTR s; for (i = 0; i < Settings.getCount(); i++) { @@ -593,7 +593,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam static INT_PTR CALLBACK DlgProc_DetailsDlgOpts(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static BOOLEAN bInitialized = 0; + static BYTE bInitialized = 0; switch (uMsg) { @@ -661,7 +661,7 @@ static INT_PTR CALLBACK DlgProc_DetailsDlgOpts(HWND hDlg, UINT uMsg, WPARAM wPar if (HIWORD(wParam) == BN_CLICKED) { BOOL bChecked = SendMessage((HWND)lParam, BM_GETCHECK, NULL, NULL); - const INT idCtrl[] = { CLR_NORMAL, CLR_USER, CLR_BOTH, CLR_CHANGED, CLR_META, TXT_OPT_CLR_NORMAL, + const int idCtrl[] = { CLR_NORMAL, CLR_USER, CLR_BOTH, CLR_CHANGED, CLR_META, TXT_OPT_CLR_NORMAL, TXT_OPT_CLR_USER, TXT_OPT_CLR_BOTH, TXT_OPT_CLR_CHANGED, TXT_OPT_CLR_META }; EnableControls(hDlg, idCtrl, SIZEOF(idCtrl), bChecked); @@ -697,7 +697,7 @@ static INT_PTR CALLBACK DlgProc_DetailsDlgOpts(HWND hDlg, UINT uMsg, WPARAM wPar static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static BOOLEAN bInitialized = 0; + static BYTE bInitialized = 0; switch (uMsg) { @@ -741,7 +741,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam case PSN_INFOCHANGED: { bInitialized = 0; - BOOLEAN bEnabled; + BYTE bEnabled; // set reminder options bEnabled = DB::Setting::GetByte(SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED); @@ -778,7 +778,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam case PSN_APPLY: { BYTE bNewVal; - BOOLEAN bReminderCheck = FALSE; + BYTE bReminderCheck = FALSE; // save checkbox options DBWriteCheckBtn(hDlg, CHECK_REMIND_MI, SET_REMIND_MENUENABLED); @@ -841,8 +841,8 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam { if (HIWORD(wParam) == CBN_SELCHANGE) { - INT bEnabled = ComboBox_GetCurSel((HWND)lParam) > 0; - const INT idCtrl[] = { + int bEnabled = ComboBox_GetCurSel((HWND)lParam) > 0; + const int idCtrl[] = { CHECK_REMIND_MI, EDIT_REMIND, EDIT_REMIND2, SPIN_REMIND, SPIN_REMIND2, TXT_REMIND, TXT_REMIND2, TXT_REMIND3, TXT_REMIND4, TXT_REMIND6, TXT_REMIND7, TXT_REMIND8, TXT_REMIND9, TXT_REMIND_LASTCHECK, CHECK_REMIND_FLASHICON, EDIT_BIRTHMODULE, CHECK_REMIND_VISIBLEONLY, @@ -930,7 +930,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static BOOLEAN bInitialized = 0; + static BYTE bInitialized = 0; switch (uMsg) { @@ -1088,7 +1088,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case BTN_PREVIEW: { POPUPDATAT ppd = { 0 }; - ppd.iSeconds = (INT)DB::Setting::GetByte(SET_POPUP_DELAY, 0); + ppd.iSeconds = (int)DB::Setting::GetByte(SET_POPUP_DELAY, 0); mir_tcsncpy(ppd.lptzText, TranslateT("This is the reminder message"), MAX_SECONDLINE); // Birthday @@ -1132,7 +1132,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case CHECK_OPT_POPUP_ENABLED: if (HIWORD(wParam) == BN_CLICKED) { const BOOL bEnabled = SendMessage((HWND)lParam, BM_GETCHECK, NULL, NULL); - const INT idCtrl[] = { + const int idCtrl[] = { CHECK_OPT_POPUP_DEFCLR, CHECK_OPT_POPUP_WINCLR, CLR_BBACK, TXT_OPT_POPUP_CLR_BACK, CLR_BTEXT, TXT_OPT_POPUP_CLR_TEXT, @@ -1153,8 +1153,8 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case CHECK_OPT_POPUP_DEFCLR: case CHECK_OPT_POPUP_WINCLR: if (HIWORD(wParam) == BN_CLICKED) { - INT bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_DEFCLR, BM_GETCHECK, NULL, NULL); - INT bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_WINCLR, BM_GETCHECK, NULL, NULL); + int bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_DEFCLR, BM_GETCHECK, NULL, NULL); + int bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_WINCLR, BM_GETCHECK, NULL, NULL); EnableDlgItem(hDlg, CHECK_OPT_POPUP_DEFCLR, !bWinClr); EnableDlgItem(hDlg, CHECK_OPT_POPUP_WINCLR, !bDefClr); @@ -1170,8 +1170,8 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case CHECK_OPT_POPUP_ADEFCLR: case CHECK_OPT_POPUP_AWINCLR: if (HIWORD(wParam) == BN_CLICKED) { - INT bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_ADEFCLR, BM_GETCHECK, NULL, NULL); - INT bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_AWINCLR, BM_GETCHECK, NULL, NULL); + int bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_ADEFCLR, BM_GETCHECK, NULL, NULL); + int bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_AWINCLR, BM_GETCHECK, NULL, NULL); EnableDlgItem(hDlg, CHECK_OPT_POPUP_ADEFCLR, !bWinClr); EnableDlgItem(hDlg, CHECK_OPT_POPUP_AWINCLR, !bDefClr); @@ -1230,7 +1230,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR * * @retval MIR_OK **/ -static INT OnInitOptions(WPARAM wParam, LPARAM lParam) +static int OnInitOptions(WPARAM wParam, LPARAM lParam) { DlgContactInfoInitTreeIcons(); @@ -1288,7 +1288,7 @@ static INT OnInitOptions(WPARAM wParam, LPARAM lParam) * * @retval nothing **/ -VOID OptionsLoadModule() +void OptionsLoadModule() { HookEvent(ME_OPT_INITIALISE, OnInitOptions); } diff --git a/plugins/UserInfoEx/src/psp_options.h b/plugins/UserInfoEx/src/psp_options.h index 57c0e9b1d8..599610d427 100644 --- a/plugins/UserInfoEx/src/psp_options.h +++ b/plugins/UserInfoEx/src/psp_options.h @@ -30,5 +30,5 @@ struct MenuOptionsList { const int idEXIMPORT; }; -VOID OptionsLoadModule(); +void OptionsLoadModule(); #endif /* _UINFOEX_OPTIONS_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index b5b148f009..872f7ea9ea 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -33,8 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct TCECListItem : CTRL { LPIDSTRLIST idstrList; - INT idstrListCount; - INT iListItem; + int idstrListCount; + int iListItem; LPTSTR pszText[2]; } LCITEM, *LPLCITEM; @@ -42,8 +42,8 @@ typedef struct TListCtrl : CTRL { HWND hList; HWND hTip; POINT ptTip; - INT iHotItem; - INT iHotSubItem; + int iHotItem; + int iHotSubItem; HFONT hFont; struct { @@ -52,16 +52,16 @@ typedef struct TListCtrl : CTRL { RECT rcCombo; struct { HWND hDrop; // dropdown list - INT iItem; // currently selected item of the dropdown + int iItem; // currently selected item of the dropdown } dropDown; LPLCITEM pItem; // the item beiing edited - INT iItem; // zero based index to item in the listview - INT iSubItem; // zero based index to subitem - INT iTopIndex; // zero based index to first visible item on list + int iItem; // zero based index to item in the listview + int iSubItem; // zero based index to subitem + int iTopIndex; // zero based index to first visible item on list } labelEdit; } LISTCTRL, *LPLISTCTRL; -typedef INT (*MISERVICE)(WPARAM wParam, LPARAM lParam); +typedef int (*MISERVICE)(WPARAM wParam, LPARAM lParam); typedef struct TProfileEntries { LPTSTR szGroup; @@ -92,7 +92,7 @@ extern COLORREF clrMeta; * pszText - text of new group * return: index the where group was added **/ -static INT ProfileList_AddGroup(HWND hList, LPTSTR pszText, INT iItem) +static int ProfileList_AddGroup(HWND hList, LPTSTR pszText, int iItem) { LVITEM lvi; lvi.mask = LVIF_TEXT|LVIF_PARAM; @@ -113,7 +113,7 @@ static INT ProfileList_AddGroup(HWND hList, LPTSTR pszText, INT iItem) * ccText - number of maximal characters pszText can take * return: number of read characters **/ -static INT ProfileList_GetItemText(HWND hList, INT iItem, INT iSubItem, LPTSTR pszText, INT ccText) +static int ProfileList_GetItemText(HWND hList, int iItem, int iSubItem, LPTSTR pszText, int ccText) { LVITEM lvi; TCHAR szNull[2]; @@ -133,7 +133,7 @@ static INT ProfileList_GetItemText(HWND hList, INT iItem, INT iSubItem, LPTSTR p * iItem - item index * return: LPLCITEM structure **/ -static LPLCITEM ProfileList_GetItemData(HWND hList, INT iItem) +static LPLCITEM ProfileList_GetItemData(HWND hList, int iItem) { LVITEM lvi; @@ -152,7 +152,7 @@ static LPLCITEM ProfileList_GetItemData(HWND hList, INT iItem) * * return: nothing **/ -static VOID ProfileList_DeleteItem(HWND hList, INT iItem) +static void ProfileList_DeleteItem(HWND hList, int iItem) { LPLCITEM pItem = ProfileList_GetItemData(hList, iItem); @@ -171,7 +171,7 @@ static VOID ProfileList_DeleteItem(HWND hList, INT iItem) * desc: delete all list items and their data * **/ -static VOID ProfileList_Clear(HWND hList) +static void ProfileList_Clear(HWND hList) { LVITEM lvi; @@ -200,7 +200,7 @@ static VOID ProfileList_Clear(HWND hList) * return: returns 0 on success or nonzero **/ -static INT ProfileList_EndLabelEdit(LPLISTCTRL pList, BOOLEAN bSave) +static int ProfileList_EndLabelEdit(LPLISTCTRL pList, BYTE bSave) { HWND hEdit; @@ -214,7 +214,7 @@ static INT ProfileList_EndLabelEdit(LPLISTCTRL pList, BOOLEAN bSave) if (bSave != FALSE && pList->labelEdit.pItem) { WORD ccText; LPTSTR szEdit = NULL; - BOOLEAN bChanged = FALSE; + BYTE bChanged = FALSE; // an list element was selected if (pList->labelEdit.iSubItem && pList->labelEdit.dropDown.iItem != pList->labelEdit.pItem->iListItem && pList->labelEdit.dropDown.iItem >= 0 && pList->labelEdit.dropDown.iItem < pList->labelEdit.pItem->idstrListCount) { @@ -260,7 +260,7 @@ static INT ProfileList_EndLabelEdit(LPLISTCTRL pList, BOOLEAN bSave) return 0; } -static INT ProfileList_EndLabelEdit(HWND hList, BOOLEAN bSave) +static int ProfileList_EndLabelEdit(HWND hList, BYTE bSave) { return ProfileList_EndLabelEdit((LPLISTCTRL)GetUserData(hList), bSave); } @@ -274,7 +274,7 @@ static INT ProfileList_EndLabelEdit(HWND hList, BOOLEAN bSave) * return: handle to the edit control **/ -static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, INT iItem, INT iSubItem) +static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, int iItem, int iSubItem) { LVITEM lvi; LPLCITEM pItem; @@ -371,7 +371,7 @@ static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, INT iItem, INT iSubItem * iSubItem - subitem (column) index * return: handle to the edit control **/ -static HWND ProfileList_BeginLabelEdit(HWND hList, INT iItem, INT iSubItem) +static HWND ProfileList_BeginLabelEdit(HWND hList, int iItem, int iSubItem) { return ProfileList_BeginLabelEdit((LPLISTCTRL)GetUserData(hList), iItem, iSubItem); } @@ -384,10 +384,10 @@ static HWND ProfileList_BeginLabelEdit(HWND hList, INT iItem, INT iSubItem) * * return: zero based index for the new item or -1 on failure **/ -static INT ProfileList_GetInsertIndex(HWND hList, LPTSTR pszGroup) +static int ProfileList_GetInsertIndex(HWND hList, LPTSTR pszGroup) { LVFINDINFO lfi; - INT iDevider, + int iDevider, iItem; // search for the devider to add the new item under @@ -427,7 +427,7 @@ static INT ProfileList_GetInsertIndex(HWND hList, LPTSTR pszGroup) * * return: TRUE or FALSE **/ -static BOOLEAN ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENTRY *pEntry) +static BYTE ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENTRY *pEntry) { LPLCITEM pItem; LVITEM lvi; @@ -473,9 +473,9 @@ static BOOLEAN ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILE * * return number of added rows or -1 if listview's changed flag is set **/ -static INT ProfileList_AddItemlistFromDB( +static int ProfileList_AddItemlistFromDB( LPLISTCTRL pList, - INT &iItem, + int &iItem, LPIDSTRLIST idList, UINT nList, HANDLE hContact, @@ -660,8 +660,8 @@ static LRESULT CALLBACK ProfileList_LabelEditProc(HWND hwnd, UINT msg, WPARAM wP return 0; case VK_RETURN: { - BOOLEAN bEditNext; - INT iItem; + BYTE bEditNext; + int iItem; if (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_WANTRETURN && !(GetKeyState(VK_CONTROL) & 0x8000)) break; @@ -758,7 +758,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa switch (msg) { case WM_KEYDOWN: { - INT nCurSel, newSel; + int nCurSel, newSel; LVITEM lvi; switch (wParam) { @@ -809,7 +809,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa SIZE textSize; LVHITTESTINFO hi; TOOLINFO ti; - BOOLEAN bReposition; + BYTE bReposition; LPLCITEM pItem; hi.pt.x = GET_X_LPARAM(lParam); @@ -911,7 +911,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa // show dropdown menu for category list case BTN_EDIT: { - INT i; + int i; TCHAR szEdit[MAX_PATH]; if (!PtrIsValid(pList = (LPLISTCTRL)GetUserData(hwnd))) break; @@ -919,9 +919,9 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa // need to create the dropdown list? if (pList->labelEdit.dropDown.hDrop == NULL) { - const INT listHeight = 120; + const int listHeight = 120; RECT rc, rcList; - INT add; + int add; // dropdown rect GetClientRect(pList->hList, &rcList); @@ -1127,7 +1127,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR LPIDSTRLIST idList; UINT nList; BYTE i; - INT iItem = 0, + int iItem = 0, iGrp = 0, numProtoItems, numUserItems; @@ -1143,10 +1143,10 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR // scan all basic protocols for the subcontacts if (DB::Module::IsMetaAndScan(pszProto)) { - INT iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)hContact, NULL); + int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)hContact, NULL); HANDLE hSubContact, hDefContact; LPCSTR pszSubBaseProto; - INT j, numSubs; + int j, numSubs; if ((hDefContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) && (pszSubBaseProto = DB::Contact::Proto(hDefContact))) @@ -1187,7 +1187,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case PSN_APPLY: if (pList->wFlags & CTRLF_CHANGED) { BYTE iFmt = -1; - INT iItem; + int iItem; LVITEM lvi; TCHAR szGroup[MAX_PATH]; CHAR pszSetting[MAXSETTING]; @@ -1426,7 +1426,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR break; case BTN_DEL: if (IDYES == MsgBox(hDlg, MB_YESNO|MB_ICON_QUESTION, LPGENT("Question"), LPGENT("Delete an entry"), LPGENT("Do you really want to delete this entry?"))) { - INT iItem = ListView_GetSelectionMark(hList); + int iItem = ListView_GetSelectionMark(hList); pList = (LPLISTCTRL)GetUserData(hList); ProfileList_DeleteItem(hList, iItem); diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp index c68a705d97..c82965f96c 100644 --- a/plugins/UserInfoEx/src/svc_avatar.cpp +++ b/plugins/UserInfoEx/src/svc_avatar.cpp @@ -28,7 +28,7 @@ namespace NServices static HANDLE ghChangedHook = NULL; - static INT GetContactAvatarFileName(LPCTSTR zodiac, LPSTR szFileName, INT cchFileName) + static int GetContactAvatarFileName(LPCTSTR zodiac, LPSTR szFileName, int cchFileName) { if (!CallService(MS_DB_GETPROFILEPATH, (WPARAM)cchFileName, (LPARAM)szFileName)) { @@ -50,7 +50,7 @@ namespace NServices * * **/ - static VOID SetZodiacAvatar(HANDLE hContact) + static void SetZodiacAvatar(HANDLE hContact) { MAnnivDate mtb; @@ -81,7 +81,7 @@ namespace NServices } } - VOID DeleteAvatar(HANDLE hContact) + void DeleteAvatar(HANDLE hContact) { if (hContact && DB::Setting::GetByte(hContact, "ContactPhoto", "IsZodiac", FALSE)) { @@ -113,7 +113,7 @@ namespace NServices * * **/ - static INT OnAvatarChanged(HANDLE hContact, AVATARCACHEENTRY *ace) + static int OnAvatarChanged(HANDLE hContact, AVATARCACHEENTRY *ace) { if (hContact) { @@ -149,7 +149,7 @@ namespace NServices * * **/ - VOID Enable(BOOLEAN bEnable) + void Enable(BYTE bEnable) { HANDLE hContact; DBVARIANT dbv; @@ -165,7 +165,7 @@ namespace NServices // don't set if avatar is locked! if (!DB::Setting::GetByte(hContact, "ContactPhoto", "Locked", 0)) { - BOOLEAN bInvalidAvatar = TRUE; + BYTE bInvalidAvatar = TRUE; // the relative file is valid if (!DB::Setting::GetAString(hContact, "ContactPhoto", "RFile", &dbv)) @@ -226,7 +226,7 @@ namespace NServices * params: none * return: 0 **/ - VOID OnModulesLoaded() + void OnModulesLoaded() { Enable(DB::Setting::GetByte(SET_ZODIAC_AVATARS, FALSE)); } diff --git a/plugins/UserInfoEx/src/svc_avatar.h b/plugins/UserInfoEx/src/svc_avatar.h index cc67ad08a8..0bbd2a5089 100644 --- a/plugins/UserInfoEx/src/svc_avatar.h +++ b/plugins/UserInfoEx/src/svc_avatar.h @@ -26,8 +26,8 @@ namespace NServices { namespace NAvatar { - VOID Enable (BOOLEAN bEnable); - VOID OnModulesLoaded (); + void Enable (BYTE bEnable); + void OnModulesLoaded (); } } /* namespace NServices */ diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 4e06f1fcba..4b2828b247 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -266,7 +266,7 @@ static int __cdecl ListSortProc(const LPIDSTRLIST p1, const LPIDSTRLIST p2) * * @return nothing **/ -static VOID SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount/*, SortedList *pSorted*/) +static void SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount/*, SortedList *pSorted*/) { if (!pList[0].ptszTranslated) { @@ -279,7 +279,7 @@ static VOID SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount/*, Sort // Sort list according translated text and ignore first item. qsort(pList+1, nListCount-1, sizeof(pList[0]), - (INT (*)(const VOID*, const VOID*))ListSortProc); + (int (*)(const void*, const void*))ListSortProc); } } @@ -314,7 +314,7 @@ INT_PTR GetCountryList(LPUINT pnListSize, LPIDSTRLIST *pList) } // Sort list according translated text and ignore first item. qsort(MyCountries+1, MyCountriesCount-1, sizeof(MyCountries[0]), - (INT (*)(const VOID*, const VOID*))ListSortProc); + (int (*)(const void*, const void*))ListSortProc); } else { @@ -387,7 +387,7 @@ INT_PTR GetNamePrefixList(LPUINT pnListSize, LPIDSTRLIST *pList) return MIR_OK; } -VOID SvcConstantsLoadModule(VOID) +void SvcConstantsLoadModule(void) { UINT nListSize; LPIDSTRLIST pList; @@ -403,7 +403,7 @@ VOID SvcConstantsLoadModule(VOID) GetNamePrefixList(&nListSize, &pList); } -static VOID FORCEINLINE SvcConstantsClearList(UINT pnListSize, LPIDSTRLIST pList) +static void FORCEINLINE SvcConstantsClearList(UINT pnListSize, LPIDSTRLIST pList) { if (pList) { @@ -414,7 +414,7 @@ static VOID FORCEINLINE SvcConstantsClearList(UINT pnListSize, LPIDSTRLIST pList } } -VOID SvcConstantsUnloadModule(VOID) +void SvcConstantsUnloadModule(void) { SvcConstantsClearList(SIZEOF(TmplMarital), TmplMarital); SvcConstantsClearList(SIZEOF(TmplLanguages), TmplLanguages); diff --git a/plugins/UserInfoEx/src/svc_constants.h b/plugins/UserInfoEx/src/svc_constants.h index d383cb44d3..76f9421296 100644 --- a/plugins/UserInfoEx/src/svc_constants.h +++ b/plugins/UserInfoEx/src/svc_constants.h @@ -165,7 +165,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct CIDList { - INT nID; + int nID; LPCSTR pszText; LPTSTR ptszTranslated; @@ -180,7 +180,7 @@ INT_PTR GetPastList(LPUINT pListSize, LPIDSTRLIST *pList); INT_PTR GetAffiliationsList(LPUINT pListSize, LPIDSTRLIST *pList); INT_PTR GetNamePrefixList(LPUINT pListSize, LPIDSTRLIST *pList); -VOID SvcConstantsLoadModule(VOID); -VOID SvcConstantsUnloadModule(VOID); +void SvcConstantsLoadModule(void); +void SvcConstantsUnloadModule(void); #endif /* _SVC_CONSTANTS_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 04dbd4c5ed..b7760f225d 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -642,7 +642,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) case CNF_DISPLAYNC: case CNF_DISPLAY: { - INT i; + int i; for (i = 0; i < NAMEORDERCOUNT; i++) { switch (gNameOrder[i]) { case 0: // custom name @@ -743,7 +743,7 @@ static INT_PTR GetContactSettingStrExService(WPARAM wParam, LPARAM lParam) * @param lParam - DBCONTACTWRITESETTING structure holding information about the written data * @return 0 **/ -static INT OnSettingChanged(WPARAM wParam, LPARAM lParam) +static int OnSettingChanged(WPARAM wParam, LPARAM lParam) { if ((HANDLE)wParam == NULL) { DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*) lParam; @@ -762,7 +762,7 @@ static INT OnSettingChanged(WPARAM wParam, LPARAM lParam) * @param none * @return nothing **/ -VOID SvcContactInfoLoadModule() +void SvcContactInfoLoadModule() { CreateServiceFunction(MS_DB_CONTACT_GETSETTING_STR_EX, GetContactSettingStrExService); CreateServiceFunction(MS_CONTACT_GETCONTACTINFO, GetContactInfo); diff --git a/plugins/UserInfoEx/src/svc_contactinfo.h b/plugins/UserInfoEx/src/svc_contactinfo.h index b438ca7255..ffbed41915 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.h +++ b/plugins/UserInfoEx/src/svc_contactinfo.h @@ -23,6 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _UINFOEX_SVCCONTACTS_H_INCLUDED_ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam); -VOID SvcContactInfoLoadModule(VOID); +void SvcContactInfoLoadModule(void); #endif /* _UINFOEX_SVCCONTACTS_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 0b70235656..b0d5b382ec 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -51,7 +51,7 @@ static LPSTR Get(HANDLE hContact) { SET_CONTACT_COMPANY_EMAIL, SET_CONTACT_COMPANY_EMAIL0, SET_CONTACT_COMPANY_EMAIL1, "MyCompanye-mail0"} }; - INT i, j; + int i, j; LPSTR pszEMail; for (i = 0; i < 2; i++) @@ -85,7 +85,7 @@ static LPSTR Get(HANDLE hContact) **/ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) { - INT result; + int result; LPSTR val = NULL; __try @@ -135,7 +135,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -static INT OnCListApplyIcons(WPARAM wParam, LPARAM lParam) +static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam) { LPSTR val = Get((HANDLE)wParam); ExtraIcon_SetIcon(ghExtraIconSvc, (HANDLE)wParam, (val) ? ICO_BTN_EMAIL: 0); @@ -149,7 +149,7 @@ static INT OnCListApplyIcons(WPARAM wParam, LPARAM lParam) * @param wParam - (HANDLE)hContact * @param lParam - (DBCONTACTWRITESETTING*)pdbcws **/ -static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) +static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) { if (hContact && pdbcws && pdbcws->szSetting && ((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) && @@ -170,7 +170,7 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw * * @return always 0 **/ -static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam) +static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam) { CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = CMIM_FLAGS; @@ -192,7 +192,7 @@ static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam) /** * This function enables or disables menuitems. **/ -VOID SvcEMailRebuildMenu() +void SvcEMailRebuildMenu() { static HANDLE hPrebuildMenuHook = NULL; @@ -235,7 +235,7 @@ VOID SvcEMailRebuildMenu() * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -VOID SvcEMailApplyCListIcons() +void SvcEMailApplyCListIcons() { HANDLE hContact; @@ -252,7 +252,7 @@ VOID SvcEMailApplyCListIcons() * @param bEnable - determines whether icons are enabled or not * @param bUpdateDB - if true the database setting is updated, too. **/ -VOID SvcEMailEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) +void SvcEMailEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB) { if (bUpdateDB) DB::Setting::WriteByte(SET_CLIST_EXTRAICON_EMAIL, bEnable); @@ -288,7 +288,7 @@ VOID SvcEMailEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) /** * This function initially loads the module uppon startup. **/ -VOID SvcEMailOnModulesLoaded() +void SvcEMailOnModulesLoaded() { SvcEMailEnableExtraIcons( DB::Setting::GetByte(SET_CLIST_EXTRAICON_EMAIL, @@ -298,7 +298,7 @@ VOID SvcEMailOnModulesLoaded() /** * This function initially loads the module uppon startup. **/ -VOID SvcEMailLoadModule() +void SvcEMailLoadModule() { if (DB::Setting::GetByte(SET_EXTENDED_EMAILSERVICE, TRUE)) { // create own email send command @@ -314,7 +314,7 @@ VOID SvcEMailLoadModule() * * @return nothing **/ -VOID SvcEMailUnloadModule() +void SvcEMailUnloadModule() { // unhook event handlers UnhookEvent(hChangedHook); hChangedHook = NULL; diff --git a/plugins/UserInfoEx/src/svc_email.h b/plugins/UserInfoEx/src/svc_email.h index c306124423..4161ebc8f8 100644 --- a/plugins/UserInfoEx/src/svc_email.h +++ b/plugins/UserInfoEx/src/svc_email.h @@ -22,10 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_SVCEMAIL_H_INCLUDED_ #define _UINFOEX_SVCEMAIL_H_INCLUDED_ -VOID SvcEMailRebuildMenu(); -VOID SvcEMailEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB = FALSE); -VOID SvcEMailOnModulesLoaded(); -VOID SvcEMailLoadModule(); -VOID SvcEMailUnloadModule(); +void SvcEMailRebuildMenu(); +void SvcEMailEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB = FALSE); +void SvcEMailOnModulesLoaded(); +void SvcEMailLoadModule(); +void SvcEMailUnloadModule(); #endif /* _UINFOEX_SVCEMAIL_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 48e618e7ad..7178000293 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -70,7 +70,7 @@ BYTE GenderOf(HANDLE hContact) * @param lParam - not used **/ -static INT OnCListApplyIcons(HANDLE hContact, LPARAM) +static int OnCListApplyIcons(HANDLE hContact, LPARAM) { if (ghExtraIconSvc != INVALID_HANDLE_VALUE) { char *icoName; @@ -90,7 +90,7 @@ static INT OnCListApplyIcons(HANDLE hContact, LPARAM) * @param wParam - (HANDLE)hContact * @param lParam - (DBCONTACTWRITESETTING*)pdbcws **/ -static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) +static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) { if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !lstrcmpA(pdbcws->szSetting, SET_CONTACT_GENDER)) OnCListApplyIcons(hContact, 0); @@ -108,7 +108,7 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -VOID SvcGenderApplyCListIcons() +void SvcGenderApplyCListIcons() { HANDLE hContact; @@ -125,7 +125,7 @@ VOID SvcGenderApplyCListIcons() * @param bEnable - determines whether icons are enabled or not * @param bUpdateDB - if true the database setting is updated, too. **/ -VOID SvcGenderEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB) +void SvcGenderEnableExtraIcons(BYTE bColumn, BYTE bUpdateDB) { bool bEnable = (bColumn!=((BYTE)-1)); @@ -163,7 +163,7 @@ VOID SvcGenderEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB) /** * This function initially loads the module uppon startup. **/ -VOID SvcGenderLoadModule() +void SvcGenderLoadModule() { SvcGenderEnableExtraIcons(DB::Setting::GetByte(SET_CLIST_EXTRAICON_GENDER2, 0), FALSE); } @@ -175,7 +175,7 @@ VOID SvcGenderLoadModule() * * @return nothing **/ -VOID SvcGenderUnloadModule() +void SvcGenderUnloadModule() { // unhook event handlers UnhookEvent(hChangedHook); hChangedHook = NULL; diff --git a/plugins/UserInfoEx/src/svc_gender.h b/plugins/UserInfoEx/src/svc_gender.h index 36133f81dd..6103f7f7ae 100644 --- a/plugins/UserInfoEx/src/svc_gender.h +++ b/plugins/UserInfoEx/src/svc_gender.h @@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. BYTE GenderOf(HANDLE hContact, LPCSTR pszProto); BYTE GenderOf(HANDLE hContact); -VOID SvcGenderEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB); -VOID SvcGenderLoadModule(); -VOID SvcGenderUnloadModule(); +void SvcGenderEnableExtraIcons(BYTE bColumn, BYTE bUpdateDB); +void SvcGenderLoadModule(); +void SvcGenderUnloadModule(); #endif /* _UINFOEX_SVCGENDER_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index ad2c1e691c..5e8aeddc73 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -48,7 +48,7 @@ static LPSTR Get(HANDLE hContact) LPCSTR e[2] = { SET_CONTACT_HOMEPAGE, SET_CONTACT_COMPANY_HOMEPAGE }; LPSTR pszHomepage; - INT i; + int i; for (i = 0; i < 2; i++) { @@ -98,7 +98,7 @@ static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam) * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -static INT OnCListApplyIcons(HANDLE hContact, LPARAM) +static int OnCListApplyIcons(HANDLE hContact, LPARAM) { LPSTR val = Get(hContact); if (ghExtraIconSvc != INVALID_HANDLE_VALUE) @@ -113,7 +113,7 @@ static INT OnCListApplyIcons(HANDLE hContact, LPARAM) * @param wParam - (HANDLE)hContact * @param lParam - (DBCONTACTWRITESETTING*)pdbcws **/ -static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) +static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) { if (hContact && pdbcws && pdbcws->szSetting && ((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) && @@ -132,7 +132,7 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw * * @return always 0 **/ -static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam) +static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam) { LPSTR val; @@ -160,7 +160,7 @@ static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam) * @param not used * @return nothing **/ -VOID SvcHomepageRebuildMenu() +void SvcHomepageRebuildMenu() { static HANDLE hPrebuildMenuHook = NULL; @@ -184,7 +184,7 @@ VOID SvcHomepageRebuildMenu() * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -VOID SvcHomepageApplyCListIcons() +void SvcHomepageApplyCListIcons() { HANDLE hContact; @@ -201,7 +201,7 @@ VOID SvcHomepageApplyCListIcons() * @param bEnable - determines whether icons are enabled or not * @param bUpdateDB - if true the database setting is updated, too. **/ -VOID SvcHomepageEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) +void SvcHomepageEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB) { if (bUpdateDB) DB::Setting::WriteByte(SET_CLIST_EXTRAICON_HOMEPAGE, bEnable); @@ -240,7 +240,7 @@ VOID SvcHomepageEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) * @param not used * @return nothing **/ -VOID SvcHomepageLoadModule() +void SvcHomepageLoadModule() { CreateServiceFunction(MS_USERINFO_HOMEPAGE_OPENURL, MenuCommand); SvcHomepageEnableExtraIcons( @@ -254,7 +254,7 @@ VOID SvcHomepageLoadModule() * * @return nothing **/ -VOID SvcHomepageUnloadModule() +void SvcHomepageUnloadModule() { // unhook event handlers UnhookEvent(hChangedHook); hChangedHook = NULL; diff --git a/plugins/UserInfoEx/src/svc_homepage.h b/plugins/UserInfoEx/src/svc_homepage.h index 93b574356f..cdb9f0927a 100644 --- a/plugins/UserInfoEx/src/svc_homepage.h +++ b/plugins/UserInfoEx/src/svc_homepage.h @@ -22,9 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_SvcHomepage_H_INCLUDED_ #define _UINFOEX_SvcHomepage_H_INCLUDED_ -VOID SvcHomepageRebuildMenu(); -VOID SvcHomepageEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB = FALSE); -VOID SvcHomepageLoadModule(); -VOID SvcHomepageUnloadModule(); +void SvcHomepageRebuildMenu(); +void SvcHomepageEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB = FALSE); +void SvcHomepageLoadModule(); +void SvcHomepageUnloadModule(); #endif /* _UINFOEX_SvcHomepage_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp index d071d1b049..11708b0bc7 100644 --- a/plugins/UserInfoEx/src/svc_phone.cpp +++ b/plugins/UserInfoEx/src/svc_phone.cpp @@ -60,7 +60,7 @@ static INT_PTR Get(HANDLE hContact) { SET_CONTACT_COMPANY_CELLULAR, SET_CONTACT_COMPANY_PHONE, "MyCompanyPhone0" } }; - INT i, j; + int i, j; LPSTR pszPhone; for (i = 0; (i < 2) && (nType == PHONE_NONE); i++) @@ -92,7 +92,7 @@ static INT_PTR Get(HANDLE hContact) * @param lParam - not used **/ -static INT OnCListApplyIcons(HANDLE hContact, LPARAM) +static int OnCListApplyIcons(HANDLE hContact, LPARAM) { char *icoName; switch (Get(hContact)) { @@ -110,7 +110,7 @@ static INT OnCListApplyIcons(HANDLE hContact, LPARAM) * @param wParam - (HANDLE)hContact * @param lParam - (DBCONTACTWRITESETTING*)pdbcws **/ -static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) +static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) { if (hContact && pdbcws && pdbcws->szSetting && ((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) && @@ -134,7 +134,7 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw * @param wParam - handle to the contact whose extra icon is to apply * @param lParam - not used **/ -VOID SvcPhoneApplyCListIcons() +void SvcPhoneApplyCListIcons() { HANDLE hContact; @@ -151,7 +151,7 @@ VOID SvcPhoneApplyCListIcons() * @param bEnable - determines whether icons are enabled or not * @param bUpdateDB - if true the database setting is updated, too. **/ -VOID SvcPhoneEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) +void SvcPhoneEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB) { if (bUpdateDB) DB::Setting::WriteByte(SET_CLIST_EXTRAICON_PHONE, bEnable); @@ -188,7 +188,7 @@ VOID SvcPhoneEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB) /** * This function initially loads the module uppon startup. **/ -VOID SvcPhoneLoadModule() +void SvcPhoneLoadModule() { SvcPhoneEnableExtraIcons( DB::Setting::GetByte(SET_CLIST_EXTRAICON_PHONE, DEFVAL_CLIST_EXTRAICON_PHONE), FALSE); @@ -201,7 +201,7 @@ VOID SvcPhoneLoadModule() * * @return nothing **/ -VOID SvcPhoneUnloadModule() +void SvcPhoneUnloadModule() { // unhook event handlers UnhookEvent(hChangedHook); hChangedHook = NULL; diff --git a/plugins/UserInfoEx/src/svc_phone.h b/plugins/UserInfoEx/src/svc_phone.h index 6b5693e077..7fd00cd16a 100644 --- a/plugins/UserInfoEx/src/svc_phone.h +++ b/plugins/UserInfoEx/src/svc_phone.h @@ -22,9 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_SVCPHONE_H_INCLUDED_ #define _UINFOEX_SVCPHONE_H_INCLUDED_ -VOID SvcPhoneApplyCListIcons(); -VOID SvcPhoneEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB = FALSE); -VOID SvcPhoneLoadModule(); -VOID SvcPhoneUnloadModule(); +void SvcPhoneApplyCListIcons(); +void SvcPhoneEnableExtraIcons(BYTE bEnable, BYTE bUpdateDB = FALSE); +void SvcPhoneLoadModule(); +void SvcPhoneUnloadModule(); #endif /* _UINFOEX_SVCPHONE_H_INCLUDED_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 92aa202b65..5c4e87ae87 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -32,8 +32,8 @@ typedef INT_PTR (*PUpdCallback) (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa class CUpdProgress { protected: - BOOLEAN _bBBCode; // TRUE if text renderer can handle BBCodes - BOOLEAN _bIsCanceled; // is set to TRUE uppon click on the CANCEL button + BYTE _bBBCode; // TRUE if text renderer can handle BBCodes + BYTE _bIsCanceled; // is set to TRUE uppon click on the CANCEL button PUpdCallback _pFnCallBack; // a pointer to a callback function, which can be used // to catch several messages by the caller. PVOID _pData; // application defined data @@ -90,11 +90,11 @@ protected: public: virtual HWND Create (LPCTSTR szTitle, PUpdCallback pFnCallBack) = 0; - virtual VOID Destroy (VOID) {}; - virtual VOID SetTitle (LPCTSTR szText) = 0; - virtual VOID SetText (LPCTSTR szText) = 0; + virtual void Destroy (void) {}; + virtual void SetTitle (LPCTSTR szText) = 0; + virtual void SetText (LPCTSTR szText) = 0; - BOOLEAN IsVisible() const + BYTE IsVisible() const { return _hWnd != NULL; } @@ -102,7 +102,7 @@ public: * * **/ - BOOLEAN IsCanceled() const + BYTE IsCanceled() const { return _bIsCanceled; } @@ -111,7 +111,7 @@ public: * * **/ - VOID SetTitleParam(LPCTSTR szText, ...) + void SetTitleParam(LPCTSTR szText, ...) { if (szText) { @@ -139,7 +139,7 @@ public: * * @return nothing **/ - VOID SetTextParam(LPCTSTR szText, ...) + void SetTextParam(LPCTSTR szText, ...) { if (szText) { @@ -305,7 +305,7 @@ public: * * **/ - virtual VOID Destroy() + virtual void Destroy() { if (_hWnd) { @@ -319,7 +319,7 @@ public: * * **/ - virtual VOID SetTitle(LPCTSTR szText) + virtual void SetTitle(LPCTSTR szText) { SetWindowText(_hWnd, szText); } @@ -328,7 +328,7 @@ public: * * **/ - virtual VOID SetText(LPCTSTR szText) + virtual void SetText(LPCTSTR szText) { SetDlgItemText(_hWnd, IDC_INFO, szText); } @@ -348,7 +348,7 @@ class CPopupUpdProgress : public CUpdProgress * * **/ - VOID UpdateText() + void UpdateText() { if (_szText) { @@ -445,7 +445,7 @@ public: * * **/ - virtual VOID Destroy() + virtual void Destroy() { if (_hWnd) { @@ -459,7 +459,7 @@ public: * * **/ - virtual VOID SetTitle(LPCTSTR szText) + virtual void SetTitle(LPCTSTR szText) { MIR_FREE(_szText); _szText = mir_tcsdup(szText); @@ -470,7 +470,7 @@ public: * * **/ - virtual VOID SetText(LPCTSTR szText) + virtual void SetText(LPCTSTR szText) { SendMessage(_hWnd, UM_CHANGEPOPUP, CPT_TEXTT, (LPARAM) mir_tcsdup(szText)); } @@ -504,7 +504,7 @@ class CContactUpdater : public CContactQueue * * @return This method returns 0. **/ - static INT DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, CContactUpdater* u) + static int DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, CContactUpdater* u) { switch (uMsg) { @@ -546,7 +546,7 @@ class CContactUpdater : public CContactQueue * * @return nothing **/ - INT __cdecl OnProtoAck(WPARAM wParam, ACKDATA *ack) + int __cdecl OnProtoAck(WPARAM wParam, ACKDATA *ack) { if (ack && ack->cbSize == sizeof(ACKDATA) && ack->hContact == _hContact && ack->type == ACKTYPE_GETINFO) { @@ -562,7 +562,7 @@ class CContactUpdater : public CContactQueue _hContactAcks[ack->lParam] = 1; } - for (INT i = 0; i < _nContactAcks; i++) + for (int i = 0; i < _nContactAcks; i++) { if (_hContactAcks[i] == 0) { @@ -584,7 +584,7 @@ class CContactUpdater : public CContactQueue * * @return nothing **/ - virtual VOID OnEmpty() + virtual void OnEmpty() { // This was the last contact, so destroy the progress window. if (_hProtoAckEvent) @@ -627,7 +627,7 @@ class CContactUpdater : public CContactQueue * * @return nothing **/ - virtual VOID Callback(HANDLE hContact, PVOID param) + virtual void Callback(HANDLE hContact, PVOID param) { LPSTR pszProto = DB::Contact::Proto(hContact); @@ -649,7 +649,7 @@ class CContactUpdater : public CContactQueue } if (IsProtoOnline(pszProto)) { - INT i; + int i; for (i = 0; i < 3 && CallContactService(hContact, PSS_GETINFO, 0, 0); i++) { Sleep(3000); @@ -687,7 +687,7 @@ public: * * **/ - BOOL QueueAddRefreshContact(HANDLE hContact, INT iWait) + BOOL QueueAddRefreshContact(HANDLE hContact, int iWait) { LPSTR pszProto = DB::Contact::Proto(hContact); @@ -704,10 +704,10 @@ public: * * **/ - VOID RefreshAll() + void RefreshAll() { HANDLE hContact; - INT iWait; + int iWait; for (hContact = DB::Contact::FindFirst(), iWait = 100; hContact != NULL; @@ -748,7 +748,7 @@ public: * * **/ - VOID Cancel() + void Cancel() { RemoveAll(); ContinueWithNext(); @@ -773,7 +773,7 @@ static CContactUpdater *ContactUpdater = NULL; static BOOL IsMirandaOnline() { PROTOACCOUNT **pAcc; - INT i, nAccCount; + int i, nAccCount; BOOL bIsOnline = FALSE; if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc))) @@ -842,7 +842,7 @@ static INT_PTR RefreshService(WPARAM wParam, LPARAM lParam) * * **/ -static INT OnContactAdded(WPARAM wParam, LPARAM lParam) +static int OnContactAdded(WPARAM wParam, LPARAM lParam) { try { @@ -886,7 +886,7 @@ static INT OnContactAdded(WPARAM wParam, LPARAM lParam) * * @return This function always returns 0. **/ -static INT OnPreShutdown(WPARAM, LPARAM) +static int OnPreShutdown(WPARAM, LPARAM) { if(ContactUpdater) { delete ContactUpdater; @@ -903,7 +903,7 @@ static INT OnPreShutdown(WPARAM, LPARAM) /** * This function initially loads the module uppon startup. **/ -VOID SvcRefreshContactInfoLoadModule(VOID) +void SvcRefreshContactInfoLoadModule(void) { CreateServiceFunction(MS_USERINFO_REFRESH, RefreshService); HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); diff --git a/plugins/UserInfoEx/src/svc_refreshci.h b/plugins/UserInfoEx/src/svc_refreshci.h index edcfa135e2..7aba236ef7 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.h +++ b/plugins/UserInfoEx/src/svc_refreshci.h @@ -22,6 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _SVC_REFRESH_USER_DETAILS_H_ #define _SVC_REFRESH_USER_DETAILS_H_ -VOID SvcRefreshContactInfoLoadModule(VOID); +void SvcRefreshContactInfoLoadModule(void); #endif /* _SVC_REFRESH_USER_DETAILS_H_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 09c6769d83..390a1215c0 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -38,7 +38,7 @@ struct CEvent CEvent(); CEvent(EType eType, WORD wDaysLeft); - BOOLEAN operator << (const CEvent& e); + BYTE operator << (const CEvent& e); }; typedef struct _REMINDEROPTIONS @@ -68,7 +68,7 @@ HANDLE ghCListBirthdayIcons[11]; static REMINDEROPTIONS gRemindOpts; -static VOID UpdateTimer(BOOLEAN bStartup); +static void UpdateTimer(BYTE bStartup); /*********************************************************************************************************** @@ -111,7 +111,7 @@ CEvent::CEvent(EType eType, WORD wDaysLeft) * @retval TRUE - The values of @e evt have been assigned. * @retval FALSE - The values are not assigned. **/ -BOOLEAN CEvent::operator << (const CEvent& evt) +BYTE CEvent::operator << (const CEvent& evt) { if (_wDaysLeft > evt._wDaysLeft) { @@ -170,7 +170,7 @@ static HICON GetAnnivIcon(const CEvent &evt) * * @return nothing **/ -static VOID NotifyWithExtraIcon(HANDLE hContact, const CEvent &evt) +static void NotifyWithExtraIcon(HANDLE hContact, const CEvent &evt) { if (gRemindOpts.bCListExtraIcon) { char szIcon[MAXSETTING], *icoName; @@ -245,13 +245,13 @@ static LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA * * @return return value of the popup service **/ -static INT NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, INT DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg) +static int NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg) { if (gRemindOpts.bPopups) { POPUPDATAT ppd = { 0 }; ppd.PluginWindowProc = PopupWindowProc; - ppd.iSeconds = (INT)DB::Setting::GetByte(SET_POPUP_DELAY, 0); + ppd.iSeconds = (int)DB::Setting::GetByte(SET_POPUP_DELAY, 0); if (hContact) { ppd.lchContact = hContact; @@ -305,7 +305,7 @@ static INT NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, INT DaysToA * * @return nothing **/ -static VOID NotifyFlashCListIcon(HANDLE hContact, const CEvent &evt) +static void NotifyFlashCListIcon(HANDLE hContact, const CEvent &evt) { if (gRemindOpts.bFlashCList && evt._wDaysLeft == 0) { @@ -392,15 +392,15 @@ static LPCTSTR ContactGender(HANDLE hContact) return TranslateT("He/She"); } -static BOOLEAN CheckAnniversaries(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN bNotify) +static BYTE CheckAnniversaries(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify) { - INT numAnniversaries = 0; - INT Diff; + int numAnniversaries = 0; + int Diff; MAnnivDate mta; - INT i; + int i; TCHAR szAnniv[MAX_PATH]; TCHAR strMsg[MAX_SECONDLINE]; - BOOLEAN bOverflow = FALSE; + BYTE bOverflow = FALSE; WORD wDaysEarlier; if ((gRemindOpts.RemindState == REMIND_ANNIV) || (gRemindOpts.RemindState == REMIND_ALL)) @@ -504,9 +504,9 @@ static BOOLEAN CheckAnniversaries(HANDLE hContact, MTime &Now, CEvent &evt, BOOL * @retval TRUE - contact has a birthday to remind of * @retval FALSE - contact has no birthday or it is not within the desired period of time. **/ -static BOOLEAN CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN bNotify, PWORD LastAnwer) +static BYTE CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer) { - BOOLEAN result = FALSE; + BYTE result = FALSE; if (gRemindOpts.RemindState == REMIND_BIRTH || gRemindOpts.RemindState == REMIND_ALL) { @@ -514,7 +514,7 @@ static BOOLEAN CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN b if (!mtb.DBGetBirthDate(hContact)) { - INT Diff; + int Diff; WORD wDaysEarlier; mtb.DBGetReminderOpts(hContact); @@ -597,7 +597,7 @@ static BOOLEAN CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN b * * @return nothing **/ -static VOID CheckContact(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN bNotify, PWORD LastAnwer = 0) +static void CheckContact(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0) { // ignore meta subcontacts here as their birthday information are collected explicitly if (hContact && @@ -627,7 +627,7 @@ static VOID CheckContact(HANDLE hContact, MTime &Now, CEvent &evt, BOOLEAN bNoti * * @return nothing **/ -VOID SvcReminderCheckAll(const ENotify notify) +void SvcReminderCheckAll(const ENotify notify) { if (gRemindOpts.RemindState != REMIND_OFF) { @@ -680,7 +680,7 @@ VOID SvcReminderCheckAll(const ENotify notify) * * @return This function must return 0 in order to continue in the notification chain. **/ -static INT OnCListRebuildIcons(WPARAM, LPARAM) +static int OnCListRebuildIcons(WPARAM, LPARAM) { UINT i; @@ -703,7 +703,7 @@ static INT OnCListRebuildIcons(WPARAM, LPARAM) * * @return This function must return 0 in order to continue in the notification chain. **/ -INT OnCListApplyIcon(HANDLE hContact, LPARAM) +int OnCListApplyIcon(HANDLE hContact, LPARAM) { if (gRemindOpts.RemindState != REMIND_OFF) { @@ -726,7 +726,7 @@ INT OnCListApplyIcon(HANDLE hContact, LPARAM) * * @return This function must return 0 in order to continue in the notification chain. **/ -static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) +static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws) { if (hContact && // valid contact not owner! ghCListIA && // extraicons active @@ -767,7 +767,7 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw * @return nothing **/ -VOID SvcReminderOnTopToolBarLoaded() +void SvcReminderOnTopToolBarLoaded() { TTBButton ttb = { sizeof(ttb) }; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; @@ -876,7 +876,7 @@ LPCSTR SvcReminderGetMyBirthdayModule() * @param dwTime - not used * @return nothing **/ -static VOID CALLBACK TimerProc_DateChanged(HWND, UINT, UINT_PTR, DWORD) +static void CALLBACK TimerProc_DateChanged(HWND, UINT, UINT_PTR, DWORD) { static MTime last; MTime now; @@ -898,7 +898,7 @@ static VOID CALLBACK TimerProc_DateChanged(HWND, UINT, UINT_PTR, DWORD) * * @return nothing **/ -static VOID CALLBACK TimerProc_Check(HWND, UINT, UINT_PTR, DWORD) +static void CALLBACK TimerProc_Check(HWND, UINT, UINT_PTR, DWORD) { SvcReminderCheckAll(NOTIFY_POPUP); } @@ -910,7 +910,7 @@ static VOID CALLBACK TimerProc_Check(HWND, UINT, UINT_PTR, DWORD) * * @return nothing **/ -static VOID UpdateTimer(BOOLEAN bStartup) +static void UpdateTimer(BYTE bStartup) { LONG wNotifyInterval = 60 * 60 * (LONG)DB::Setting::GetWord(MODNAME, SET_REMIND_NOTIFYINTERVAL, DEFVAL_REMIND_NOTIFYINTERVAL); MTime now, last; @@ -940,7 +940,7 @@ static VOID UpdateTimer(BOOLEAN bStartup) * module loading & unloading ***********************************************************************************************************/ -VOID SvcReminderEnable(BOOLEAN bEnable) +void SvcReminderEnable(BYTE bEnable) { if (bEnable) // Reminder is on { @@ -987,7 +987,7 @@ VOID SvcReminderEnable(BOOLEAN bEnable) * * @return nothing **/ -VOID SvcReminderOnModulesLoaded(VOID) +void SvcReminderOnModulesLoaded(void) { // init clist extra icon structure OnCListRebuildIcons(0, 0); @@ -1002,7 +1002,7 @@ VOID SvcReminderOnModulesLoaded(VOID) * * @return nothing **/ -VOID SvcReminderLoadModule(VOID) +void SvcReminderLoadModule(void) { // init sounds SKINSOUNDDESCEX ssd = { 0 }; @@ -1045,7 +1045,7 @@ VOID SvcReminderLoadModule(VOID) * * @return nothing **/ -VOID SvcReminderUnloadModule(VOID) +void SvcReminderUnloadModule(void) { // kill timers KillTimer(0, ghRemindTimer); diff --git a/plugins/UserInfoEx/src/svc_reminder.h b/plugins/UserInfoEx/src/svc_reminder.h index baaaabec82..3ece0495a6 100644 --- a/plugins/UserInfoEx/src/svc_reminder.h +++ b/plugins/UserInfoEx/src/svc_reminder.h @@ -95,14 +95,14 @@ enum ENotify /** * Global functions: **/ -VOID SvcReminderCheckAll(const ENotify notify); -LPCSTR SvcReminderGetMyBirthdayModule(VOID); +void SvcReminderCheckAll(const ENotify notify); +LPCSTR SvcReminderGetMyBirthdayModule(void); -VOID SvcReminderOnTopToolBarLoaded(VOID); -VOID SvcReminderOnModulesLoaded(VOID); +void SvcReminderOnTopToolBarLoaded(void); +void SvcReminderOnModulesLoaded(void); -VOID SvcReminderEnable(BOOLEAN bEnable); -VOID SvcReminderLoadModule(VOID); -VOID SvcReminderUnloadModule(VOID); +void SvcReminderEnable(BYTE bEnable); +void SvcReminderLoadModule(void); +void SvcReminderUnloadModule(void); #endif /* _SVCREMINDER_H_ */ diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp index b29b640599..fc8bc336e2 100644 --- a/plugins/UserInfoEx/src/svc_timezone.cpp +++ b/plugins/UserInfoEx/src/svc_timezone.cpp @@ -66,7 +66,7 @@ INT_PTR GetContactLocalTime(WPARAM wParam, LPARAM lParam) /** * This function initially loads the module uppon startup. **/ -VOID SvcTimezoneLoadModule() +void SvcTimezoneLoadModule() { CreateServiceFunction(MS_USERINFO_TIMEZONEINFO, GetContactTimeZoneInformation); CreateServiceFunction(MS_USERINFO_LOCALTIME, GetContactLocalTime); diff --git a/plugins/UserInfoEx/src/svc_timezone.h b/plugins/UserInfoEx/src/svc_timezone.h index 25276c6898..533edacd4c 100644 --- a/plugins/UserInfoEx/src/svc_timezone.h +++ b/plugins/UserInfoEx/src/svc_timezone.h @@ -38,6 +38,6 @@ typedef struct _REG_TZI_FORMAT INT_PTR GetContactTimeZoneInformation(WPARAM wParam, LPARAM lParam); INT_PTR GetContactLocalTime(WPARAM wParam, LPARAM lParam); -VOID SvcTimezoneLoadModule(); +void SvcTimezoneLoadModule(); #endif /* _SVC_TIMEZONE_H_ */ \ No newline at end of file diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index c3fbeea121..768ef503cb 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -84,9 +84,9 @@ CTimeZone::operator TIME_ZONE_INFORMATION() const class CTzBias : public LIST { - static INT sortFunc(const CTimeZone *tz1, const CTimeZone *tz2) + static int sortFunc(const CTimeZone *tz1, const CTimeZone *tz2) { - INT result = tz2->Bias - tz1->Bias; + int result = tz2->Bias - tz1->Bias; // DO NOT USE mir_tcsicmp here as it does only return TRUE or FALSE!!! // lstrcmpi takes care of umlauts e.g. Ä,Ö,.... return (result || !tz1->ptszDisplay || !tz2->ptszDisplay) ? result : lstrcmpi(tz1->ptszDisplay, tz2->ptszDisplay); @@ -117,7 +117,7 @@ class CTzMgr : public LIST { CTzBias _bias; - static INT sortFunc(const CTimeZone *tz1, const CTimeZone *tz2) + static int sortFunc(const CTimeZone *tz1, const CTimeZone *tz2) { // DO NOT USE mir_tcsicmp here as it does only return TRUE or FALSE!!! return _tcsicmp(tz1->ptszName, tz2->ptszName); @@ -126,9 +126,9 @@ class CTzMgr : public LIST /** * This method clears the TzTzMgr's data. **/ - VOID destroy() + void destroy() { - INT i; + int i; // delete data for (i = 0 ; i < count; i++) @@ -167,9 +167,9 @@ public: /** * This method loads all information about timezones from windows' registry. **/ - INT Init() + int Init() { - INT result; + int result; HKEY hKeyRoot, hKeyTz; DWORD i, @@ -242,9 +242,9 @@ public: * @retval -1 : item not found * @retval 0...count : index of the found item **/ - INT find(CTimeZone** pTimezone, CTimeZone* pKey) const + int find(CTimeZone** pTimezone, CTimeZone* pKey) const { - INT nItemIndex = -1; + int nItemIndex = -1; if (pKey && pKey->ptszName) { @@ -257,10 +257,10 @@ public: return nItemIndex; } - INT find(CTimeZone** pTimezone, LPTSTR ptszName) const + int find(CTimeZone** pTimezone, LPTSTR ptszName) const { CTimeZone key; - INT nItemIndex; + int nItemIndex; key.ptszName = ptszName; nItemIndex = find(pTimezone, &key); @@ -278,9 +278,9 @@ public: * @retval -1 : item not found * @retval 0...count : index of the found item **/ - INT find(CTimeZone** result, DWORD dwTzIndex) const + int find(CTimeZone** result, DWORD dwTzIndex) const { - INT nItemIndex = -1; + int nItemIndex = -1; CTimeZone *ptz = NULL; if (dwTzIndex != TZINDEX_UNSPECIFIED) @@ -533,9 +533,9 @@ INT_PTR EnumTimeZones(PEnumNamesProc enumProc, LPARAM lParam) * * **/ -static BOOL SvcTimezoneSyncWithWindowsProc(LPCSTR pszProto, INT bias) +static BOOL SvcTimezoneSyncWithWindowsProc(LPCSTR pszProto, int bias) { - INT tz = (INT) ((CHAR)DB::Setting::GetByte(pszProto, SET_CONTACT_TIMEZONE, (BYTE)-100)); + int tz = (int) ((CHAR)DB::Setting::GetByte(pszProto, SET_CONTACT_TIMEZONE, (BYTE)-100)); if (tz * 30 != bias) { DB::Setting::WriteByte(pszProto, SET_CONTACT_TIMEZONE, (BYTE)(bias / 30)); @@ -548,10 +548,10 @@ static BOOL SvcTimezoneSyncWithWindowsProc(LPCSTR pszProto, INT bias) * * **/ -VOID SvcTimezoneSyncWithWindows() +void SvcTimezoneSyncWithWindows() { PROTOACCOUNT **pAcc; - INT i, nAccCount; + int i, nAccCount; TIME_ZONE_INFORMATION tzi; ZeroMemory(&tzi, sizeof(tzi)); @@ -623,7 +623,7 @@ INT_PTR GetContactLocalTime_old(WPARAM wParam, LPARAM lParam) /** * This function initially loads the module uppon startup. **/ -VOID SvcTimezoneLoadModule_old() +void SvcTimezoneLoadModule_old() { TzMgr.Init(); CreateServiceFunction(MS_USERINFO_TIMEZONEINFO, GetContactTimeZoneInformation); diff --git a/plugins/UserInfoEx/src/svc_timezone_old.h b/plugins/UserInfoEx/src/svc_timezone_old.h index b3dc66a18f..8d8627039f 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.h +++ b/plugins/UserInfoEx/src/svc_timezone_old.h @@ -76,7 +76,7 @@ struct CTimeZone : public REG_TZI_FORMAT operator TIME_ZONE_INFORMATION() const; }; -typedef INT_PTR (*PEnumNamesProc)(CTimeZone* pTimeZone, INT index, LPARAM lParam); +typedef INT_PTR (*PEnumNamesProc)(CTimeZone* pTimeZone, int index, LPARAM lParam); CTimeZone* GetContactTimeZone(HANDLE hContact); CTimeZone* GetContactTimeZone(HANDLE hContact, LPCSTR pszProto); @@ -87,7 +87,7 @@ INT_PTR EnumTimeZones(PEnumNamesProc enumProc, LPARAM lParam); INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam, LPARAM lParam); INT_PTR GetContactLocalTime_old(WPARAM wParam, LPARAM lParam); -VOID SvcTimezoneSyncWithWindows(); -VOID SvcTimezoneLoadModule_old(); +void SvcTimezoneSyncWithWindows(); +void SvcTimezoneLoadModule_old(); #endif /* _SVC_TIMEZONE_H_OLD */ \ No newline at end of file -- cgit v1.2.3