From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/EnumProc.cpp | 2 +- plugins/KeyboardNotify/flash.cpp | 2 +- plugins/KeyboardNotify/ignore.cpp | 2 +- plugins/KeyboardNotify/keyboard.cpp | 2 ++ plugins/KeyboardNotify/main.cpp | 25 ++++++++++--------------- plugins/KeyboardNotify/options.cpp | 6 ++++-- plugins/KeyboardNotify/protolist.h | 2 +- plugins/KeyboardNotify/trigger.cpp | 2 +- 8 files changed, 21 insertions(+), 22 deletions(-) (limited to 'plugins/KeyboardNotify') diff --git a/plugins/KeyboardNotify/EnumProc.cpp b/plugins/KeyboardNotify/EnumProc.cpp index a225bd0a03..7a5a23f0e3 100644 --- a/plugins/KeyboardNotify/EnumProc.cpp +++ b/plugins/KeyboardNotify/EnumProc.cpp @@ -62,7 +62,7 @@ void LoadProcsLibrary(void) lpfVDMEnumTaskWOWEx = (INT (WINAPI *)(DWORD, TASKENUMPROCEX, LPARAM)) GetProcAddress(hInstLib2, "VDMEnumTaskWOWEx"); } else { - if(!(hInstLib = LoadLibraryA("Kernel32.DLL"))) + if (!(hInstLib = LoadLibraryA("Kernel32.DLL"))) return; if (bWindowsNT && !(hInstLib2 = LoadLibraryA("VDMDBG.DLL"))) diff --git a/plugins/KeyboardNotify/flash.cpp b/plugins/KeyboardNotify/flash.cpp index fd3815d0b1..aa0014a329 100644 --- a/plugins/KeyboardNotify/flash.cpp +++ b/plugins/KeyboardNotify/flash.cpp @@ -108,7 +108,7 @@ FLASHING_SEQUENCE *getCustomSeq(void) customStr[0] = _T('\0'); - if(!DBGetContactSetting(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", wCustomTheme), &dbv)) { + if (!DBGetContactSetting(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", wCustomTheme), &dbv)) { wcscpy(customStr, dbv.pwszVal); DBFreeVariant(&dbv); } diff --git a/plugins/KeyboardNotify/ignore.cpp b/plugins/KeyboardNotify/ignore.cpp index ededae2c84..97988f59a5 100644 --- a/plugins/KeyboardNotify/ignore.cpp +++ b/plugins/KeyboardNotify/ignore.cpp @@ -309,7 +309,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y)); if(hItem == NULL) break; - if(!(hitFlags & CLCHT_ONITEMEXTRA)) + if (!(hitFlags & CLCHT_ONITEMEXTRA)) break; if(nm->iColumn == IGNOREEVENT_MAX) { //ignore all for(iImage=0; iImage < IGNOREEVENT_MAX; iImage++) diff --git a/plugins/KeyboardNotify/keyboard.cpp b/plugins/KeyboardNotify/keyboard.cpp index cb77a88827..df1033fce7 100644 --- a/plugins/KeyboardNotify/keyboard.cpp +++ b/plugins/KeyboardNotify/keyboard.cpp @@ -46,9 +46,11 @@ typedef struct _KEYBOARD_INDICATOR_PARAMETERS { void outportb(UINT portid, BYTE value) { + #if !defined( _WIN64 ) __asm mov edx,portid __asm mov al,value __asm out dx,al + #endif } diff --git a/plugins/KeyboardNotify/main.cpp b/plugins/KeyboardNotify/main.cpp index fbadbf7e19..ff131f0c89 100644 --- a/plugins/KeyboardNotify/main.cpp +++ b/plugins/KeyboardNotify/main.cpp @@ -698,7 +698,7 @@ BOOL contactCheckProtocol(char *szProto, HANDLE hContact, WORD eventType) BOOL checkStatus(char *szProto) { - if(!szProto) + if (!szProto) return checkGlobalStatus(); return isStatusEnabled(CallProtoService(szProto, PS_GETSTATUS, 0, 0)); @@ -710,7 +710,7 @@ BOOL checkXstatus(char *szProto) unsigned int i; int status=0; ICQ_CUSTOM_STATUS xstatus={0}; - if(!szProto) + if (!szProto) return checkGlobalXstatus(); for(i=0; i < ProtoList.protoCount; i++) @@ -762,7 +762,7 @@ static int PluginMessageEventHook(WPARAM wParam, LPARAM lParam) // ** Checks for pending events. If it finds any, it pings the FlashThread to keep the LEDs flashing. // ** -static VOID CALLBACK ReminderTimer(HWND hwnd, UINT message, UINT idEvent, DWORD dwTime) +static VOID CALLBACK ReminderTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime) { int nIndex; CLISTEVENT *pCLEvent; @@ -791,23 +791,19 @@ static VOID CALLBACK ReminderTimer(HWND hwnd, UINT message, UINT idEvent, DWORD // Support for third-party plugins and mBot's scripts -static int EnableService(WPARAM wParam, LPARAM lParam) +static INT_PTR EnableService(WPARAM wParam, LPARAM lParam) { bFlashingEnabled = TRUE; - return 0; } - -static int DisableService(WPARAM wParam, LPARAM lParam) +static INT_PTR DisableService(WPARAM wParam, LPARAM lParam) { bFlashingEnabled = FALSE; - return 0; } - -static int StartBlinkService(WPARAM wParam, LPARAM lParam) +static INT_PTR StartBlinkService(WPARAM wParam, LPARAM lParam) { nExternCount += (unsigned int)wParam; if (bFlashOnOther && checkNotifyOptions() && checkGlobalStatus() && checkGlobalXstatus()) { @@ -819,8 +815,7 @@ static int StartBlinkService(WPARAM wParam, LPARAM lParam) return 0; } - -static int EventsWereOpenedService(WPARAM wParam, LPARAM lParam) +static INT_PTR EventsWereOpenedService(WPARAM wParam, LPARAM lParam) { if ((unsigned int)wParam > nExternCount) nExternCount = 0; @@ -831,7 +826,7 @@ static int EventsWereOpenedService(WPARAM wParam, LPARAM lParam) } -static int IsFlashingActiveService(WPARAM wParam, LPARAM lParam) +static INT_PTR IsFlashingActiveService(WPARAM wParam, LPARAM lParam) { if (!bReminderDisabled) return 0; @@ -987,9 +982,9 @@ void GetWindowsVersion(void) ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - if(!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi))) { + if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi))) { osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - if(!GetVersionEx((OSVERSIONINFO *)&osvi)) + if (!GetVersionEx((OSVERSIONINFO *)&osvi)) osvi.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS; } bWindowsNT = osvi.dwPlatformId==VER_PLATFORM_WIN32_NT; diff --git a/plugins/KeyboardNotify/options.cpp b/plugins/KeyboardNotify/options.cpp index d415862503..993f9e119d 100644 --- a/plugins/KeyboardNotify/options.cpp +++ b/plugins/KeyboardNotify/options.cpp @@ -1116,7 +1116,8 @@ void exportThemes(const TCHAR *filename) void importThemes(const TCHAR *filename, BOOL overrideExisting) { - int i, status=0; + int status=0; + size_t i; FILE *fImport; TCHAR buffer[MAX_PATH+1], theme[MAX_PATH+1], *str; @@ -1428,7 +1429,8 @@ INT_PTR CALLBACK DlgProcXstatusList(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case WM_INITDIALOG: { - unsigned int i, j; + unsigned int i; + WPARAM j; int imageCount; HICON hIconAux; HIMAGELIST hImageList; diff --git a/plugins/KeyboardNotify/protolist.h b/plugins/KeyboardNotify/protolist.h index f48f64d126..5a08d929da 100644 --- a/plugins/KeyboardNotify/protolist.h +++ b/plugins/KeyboardNotify/protolist.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ typedef struct { - unsigned int count; + UINT_PTR count; BOOL *enabled; } XSTATUS_INFO; diff --git a/plugins/KeyboardNotify/trigger.cpp b/plugins/KeyboardNotify/trigger.cpp index 2f07230696..df3d7daaf3 100644 --- a/plugins/KeyboardNotify/trigger.cpp +++ b/plugins/KeyboardNotify/trigger.cpp @@ -57,7 +57,7 @@ int getCustomNro(DWORD actionID, HWND hwndDlg, int nItems) return DEF_SETTING_CUSTOMTHEME; } -static BOOL CALLBACK DlgProcOptsActionKbdNotify(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK DlgProcOptsActionKbdNotify(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; DWORD actionID; -- cgit v1.2.3