=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: user32: Use BOOL type where appropriate.
Alexandre Julliard
julliard at winehq.org
Tue Nov 5 15:02:29 CST 2013
Module: wine
Branch: master
Commit: 77ee42fd330130c55b6b74ab8662a23774551ea4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=77ee42fd330130c55b6b74ab8662a23774551ea4
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Tue Nov 5 01:05:02 2013 +0100
user32: Use BOOL type where appropriate.
---
dlls/user32/mdi.c | 22 +++++++++++-----------
dlls/user32/menu.c | 4 ++--
dlls/user32/message.c | 4 ++--
dlls/user32/misc.c | 2 +-
dlls/user32/win.c | 8 ++++----
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
index 7b50fae..8ef7214 100644
--- a/dlls/user32/mdi.c
+++ b/dlls/user32/mdi.c
@@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p,child %p\n",frame,hChild);
- if( !menu ) return 0;
+ if (!menu) return FALSE;
/* create a copy of sysmenu popup and insert it into frame menu bar */
if (!(hSysPopup = GetSystemMenu(hChild, FALSE)))
{
TRACE("child %p doesn't have a system menu\n", hChild);
- return 0;
+ return FALSE;
}
AppendMenuW(menu, MF_HELP | MF_BITMAP,
@@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
{
TRACE("not inserted\n");
DestroyMenu(hSysPopup);
- return 0;
+ return FALSE;
}
EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED);
@@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
/* redraw menu */
DrawMenuBar(frame);
- return 1;
+ return TRUE;
}
/**********************************************************************
@@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p, child %p\n", frame, hChild);
- if( !menu ) return 0;
+ if (!menu) return FALSE;
/* if there is no system buttons then nothing to do */
nItems = GetMenuItemCount(menu) - 1;
iId = GetMenuItemID(menu, nItems);
if ( !(iId == SC_RESTORE || iId == SC_CLOSE) )
- return 0;
+ return FALSE;
/*
* Remove the system menu, If that menu is the icon of the window
@@ -963,7 +963,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
DrawMenuBar(frame);
- return 1;
+ return TRUE;
}
@@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
MDICLIENTINFO *ci = get_client_info( hwndClient );
WPARAM wParam = 0;
- if (!ci || !IsWindowEnabled(ci->hwndActiveChild)) return 0;
+ if (!ci || !IsWindowEnabled(ci->hwndActiveChild)) return FALSE;
/* translate if the Ctrl key is down and Alt not. */
@@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
}
/* fall through */
default:
- return 0;
+ return FALSE;
}
TRACE("wParam = %04lx\n", wParam);
SendMessageW(ci->hwndActiveChild, WM_SYSCOMMAND, wParam, msg->wParam);
- return 1;
+ return TRUE;
}
}
- return 0; /* failure */
+ return FALSE; /* failure */
}
/***********************************************************************
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 73b20b9..50545ee 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
MENUITEM *lpitem;
HDC hdc;
UINT start, i;
- int textandbmp = FALSE;
+ BOOL textandbmp = FALSE;
int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight;
lppop->Width = lppop->Height = 0;
@@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
HBITMAP bm;
INT y = rect.top + rect.bottom;
RECT rc = rect;
- int checked = FALSE;
+ BOOL checked = FALSE;
UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK );
UINT check_bitmap_height = GetSystemMetrics( SM_CYMENUCHECK );
/* Draw the check mark
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 4fc87ad..b51b6de 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] =
};
/* check whether a given message type includes pointers */
-static inline int is_pointer_message( UINT message )
+static inline BOOL is_pointer_message( UINT message )
{
if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
return (message_pointer_flags[message / 32] & SET(message)) != 0;
}
/* check whether a given message type contains Unicode (or ASCII) chars */
-static inline int is_unicode_message( UINT message )
+static inline BOOL is_unicode_message( UINT message )
{
if (message >= 8*sizeof(message_unicode_flags)) return FALSE;
return (message_unicode_flags[message / 32] & SET(message)) != 0;
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c
index ad3c788..732d11c 100644
--- a/dlls/user32/misc.c
+++ b/dlls/user32/misc.c
@@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
BOOL WINAPI RegisterShellHookWindow ( HWND hWnd )
{
FIXME("(%p): stub\n", hWnd);
- return 0;
+ return FALSE;
}
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 7223b41..275b93c 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
if (wnd == WND_OTHER_PROCESS)
{
if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );
- return 0;
+ return FALSE;
}
wnd->helpContext = id;
WIN_ReleasePtr( wnd );
@@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( msg.message == WM_LBUTTONUP )
{
ReleaseCapture();
- return 0;
+ return FALSE;
}
if( msg.message == WM_MOUSEMOVE )
{
@@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( !PtInRect( &rect, tmp ))
{
ReleaseCapture();
- return 1;
+ return TRUE;
}
}
}
WaitMessage();
}
- return 0;
+ return FALSE;
}
/******************************************************************************
More information about the wine-cvs
mailing list