From: Alex Ionescu Date: Tue, 22 Nov 2005 00:05:23 +0000 (+0000) Subject: - Remove usage of STATIC, and use static in the right place. X-Git-Tag: backups/ros-branch-0_2_9@19949~494 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=91f701e9e7c602874134b589cfff1e8b24a9db36 - Remove usage of STATIC, and use static in the right place. svn path=/trunk/; revision=19434 --- diff --git a/reactos/lib/kernel32/file/bintype.c b/reactos/lib/kernel32/file/bintype.c index b836f620bd0..1ebf2fee053 100644 --- a/reactos/lib/kernel32/file/bintype.c +++ b/reactos/lib/kernel32/file/bintype.c @@ -17,7 +17,6 @@ #define NDEBUG #include "../include/debug.h" - /* FUNCTIONS ****************************************************************/ /* Check whether a file is an OS/2 or a very old Windows executable @@ -26,7 +25,7 @@ * FIXME: is reading the module imports the only way of discerning * old Windows binaries from OS/2 ones ? At least it seems so... */ -STATIC DWORD STDCALL +static DWORD STDCALL InternalIsOS2OrOldWin(HANDLE hFile, IMAGE_DOS_HEADER *mz, IMAGE_OS2_HEADER *ne) { DWORD CurPos; @@ -78,7 +77,7 @@ InternalIsOS2OrOldWin(HANDLE hFile, IMAGE_DOS_HEADER *mz, IMAGE_OS2_HEADER *ne) return Ret; } -STATIC DWORD STDCALL +static DWORD STDCALL InternalGetBinaryType(HANDLE hFile) { union diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 3c6e96d0c47..941716eb9c9 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -2898,7 +2898,7 @@ SetConsoleTextAttribute( } -BOOL STATIC +static BOOL AddConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine) { if (HandlerRoutine == NULL) @@ -2932,7 +2932,7 @@ AddConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine) } -BOOL STATIC +static BOOL RemoveConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine) { ULONG i; diff --git a/reactos/lib/kernel32/synch/event.c b/reactos/lib/kernel32/synch/event.c index f5da06033cb..87da86c8397 100644 --- a/reactos/lib/kernel32/synch/event.c +++ b/reactos/lib/kernel32/synch/event.c @@ -90,7 +90,7 @@ CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, } Status = NtCreateEvent(&hEvent, - STANDARD_RIGHTS_ALL | EVENT_READ_ACCESS | EVENT_WRITE_ACCESS, + EVENT_ALL_ACCESS, &ObjectAttributes, (bManualReset ? NotificationEvent : SynchronizationEvent), bInitialState); diff --git a/reactos/lib/user32/controls/scrollbar.c b/reactos/lib/user32/controls/scrollbar.c index 87b6c7a117b..c4513c9a518 100644 --- a/reactos/lib/user32/controls/scrollbar.c +++ b/reactos/lib/user32/controls/scrollbar.c @@ -210,7 +210,7 @@ IntDrawScrollInterior(HWND hWnd, HDC hDC, INT nBar, BOOL Vertical, SelectObject(hDC, hSaveBrush); } -STATIC VOID FASTCALL +static VOID FASTCALL IntDrawScrollArrows(HDC hDC, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) { RECT RectLT, RectRB; @@ -253,7 +253,7 @@ IntDrawScrollArrows(HDC hDC, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) DrawFrameControl(hDC, &RectRB, DFC_SCROLL, ScrollDirFlagRB); } -STATIC VOID FASTCALL +static VOID FASTCALL IntScrollDrawMovingThumb(HDC Dc, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) { INT Pos = ScrollTrackingPos; @@ -291,7 +291,7 @@ IntScrollDrawMovingThumb(HDC Dc, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical) ScrollMovingThumb = ! ScrollMovingThumb; } -STATIC LONG FASTCALL +static LONG FASTCALL IntScrollGetObjectId(INT SBType) { if (SB_VERT == SBType) @@ -306,7 +306,7 @@ IntScrollGetObjectId(INT SBType) return OBJID_CLIENT; } -STATIC BOOL FASTCALL +static BOOL FASTCALL IntGetScrollBarInfo(HWND Wnd, INT Bar, PSCROLLBARINFO ScrollBarInfo) { ScrollBarInfo->cbSize = sizeof(SCROLLBARINFO); @@ -382,7 +382,7 @@ IntDrawScrollBar(HWND Wnd, HDC DC, INT Bar) } } -STATIC BOOL FASTCALL +static BOOL FASTCALL IntScrollPtInRectEx(LPRECT Rect, POINT Pt, BOOL Vertical) { RECT TempRect = *Rect; @@ -400,7 +400,7 @@ IntScrollPtInRectEx(LPRECT Rect, POINT Pt, BOOL Vertical) return PtInRect(&TempRect, Pt); } -STATIC DWORD FASTCALL +static DWORD FASTCALL IntScrollHitTest(PSCROLLBARINFO ScrollBarInfo, BOOL Vertical, POINT Pt, BOOL Dragging) { INT ArrowSize, ThumbSize, ThumbPos; @@ -479,7 +479,7 @@ IntScrollHitTest(PSCROLLBARINFO ScrollBarInfo, BOOL Vertical, POINT Pt, BOOL Dra * relative to the left or to the top. * Return TRUE if the scrollbar is vertical, FALSE if horizontal. */ -STATIC BOOL FASTCALL +static BOOL FASTCALL IntScrollGetScrollBarRect(HWND Wnd, INT Bar, RECT *Rect, INT *ArrowSize, INT *ThumbSize, INT *ThumbPos) @@ -629,7 +629,7 @@ IntScrollGetScrollBarRect(HWND Wnd, INT Bar, RECT *Rect, * Compute the current scroll position based on the thumb position in pixels * from the top of the scroll-bar. */ -STATIC UINT FASTCALL +static UINT FASTCALL IntScrollGetThumbVal(HWND Wnd, INT SBType, PSCROLLBARINFO ScrollBarInfo, BOOL Vertical, INT Pos) { @@ -676,7 +676,7 @@ IntScrollGetThumbVal(HWND Wnd, INT SBType, PSCROLLBARINFO ScrollBarInfo, /*********************************************************************** * IntScrollClipPos */ -STATIC POINT IntScrollClipPos(PRECT Rect, POINT Pt) +static POINT IntScrollClipPos(PRECT Rect, POINT Pt) { if (Pt.x < Rect->left) { @@ -704,7 +704,7 @@ STATIC POINT IntScrollClipPos(PRECT Rect, POINT Pt) * * Draw the size grip. */ -STATIC void FASTCALL +static void FASTCALL IntScrollDrawSizeGrip(HWND Wnd, HDC Dc) { RECT Rect; @@ -723,7 +723,7 @@ IntScrollDrawSizeGrip(HWND Wnd, HDC Dc) * * Handle a keyboard event (only for SB_CTL scrollbars with focus). */ -STATIC void FASTCALL +static void FASTCALL IntScrollHandleKbdEvent( HWND Wnd /* [in] Handle of window with scrollbar(s) */, WPARAM wParam /* [in] Variable input including enable state */, @@ -778,7 +778,7 @@ IntScrollHandleKbdEvent( * Handle a mouse or timer event for the scrollbar. * 'Pt' is the location of the mouse event in drawing coordinates */ -STATIC VOID FASTCALL +static VOID FASTCALL IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt) { static POINT PrevPt; /* Previous mouse position for timer events */ @@ -1136,7 +1136,7 @@ static void IntScrollCreateScrollBar( } } -STATIC INT FASTCALL +static INT FASTCALL IntScrollGetScrollPos(HWND Wnd, INT Bar) { SCROLLINFO ScrollInfo; @@ -1151,7 +1151,7 @@ IntScrollGetScrollPos(HWND Wnd, INT Bar) return ScrollInfo.nPos; } -STATIC BOOL FASTCALL +static BOOL FASTCALL IntScrollGetScrollRange(HWND Wnd, int Bar, LPINT MinPos, LPINT MaxPos) { BOOL Result; diff --git a/reactos/lib/user32/windows/bitmap.c b/reactos/lib/user32/windows/bitmap.c index 121a280d995..def59583237 100644 --- a/reactos/lib/user32/windows/bitmap.c +++ b/reactos/lib/user32/windows/bitmap.c @@ -70,7 +70,7 @@ LoadImageA(HINSTANCE hinst, } -HANDLE STATIC +static HANDLE LoadCursorImage(HINSTANCE hinst, LPCWSTR lpszName, UINT fuLoad) { HANDLE hResource; @@ -249,7 +249,7 @@ LoadCursorImage(HINSTANCE hinst, LPCWSTR lpszName, UINT fuLoad) } -HANDLE STATIC +static HANDLE LoadIconImage(HINSTANCE hinst, LPCWSTR lpszName, INT width, INT height, UINT fuLoad) { HANDLE hResource; @@ -443,7 +443,7 @@ LoadIconImage(HINSTANCE hinst, LPCWSTR lpszName, INT width, INT height, UINT fuL } -HANDLE STATIC +static HANDLE LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad) { HANDLE hResource; diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index 79d3949901b..4f12cf60e7a 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -366,7 +366,7 @@ DefWndStartSizeMove(HWND hWnd, WPARAM wParam, POINT *capturePoint) #define ON_BOTTOM_BORDER(hit) \ (((hit) == HTBOTTOM) || ((hit) == HTBOTTOMLEFT) || ((hit) == HTBOTTOMRIGHT)) -VOID STATIC +static VOID UserDrawWindowFrame(HDC hdc, const RECT *rect, ULONG width, ULONG height) { @@ -394,7 +394,7 @@ UserDrawWindowFrame(HDC hdc, const RECT *rect, SelectObject( hdc, hbrush ); } -VOID STATIC +static VOID UserDrawMovingFrame(HDC hdc, RECT *rect, BOOL thickframe) { if(thickframe) @@ -407,7 +407,7 @@ UserDrawMovingFrame(HDC hdc, RECT *rect, BOOL thickframe) } } -VOID STATIC +static VOID DefWndDoSizeMove(HWND hwnd, WORD wParam) { HRGN DesktopRgn; @@ -723,7 +723,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam) * * Track a mouse button press on the horizontal or vertical scroll-bar. */ -STATIC VOID +static VOID DefWndTrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt) { INT ScrollBar; diff --git a/reactos/lib/user32/windows/hook.c b/reactos/lib/user32/windows/hook.c index aaf29cfbcce..107ec952d03 100644 --- a/reactos/lib/user32/windows/hook.c +++ b/reactos/lib/user32/windows/hook.c @@ -139,7 +139,7 @@ CallNextHookEx( return NtUserCallNextHookEx(Hook, Code, wParam, lParam); } -STATIC +static HHOOK FASTCALL IntSetWindowsHook( diff --git a/reactos/lib/user32/windows/message.c b/reactos/lib/user32/windows/message.c index 591ef218aa5..80582eab173 100644 --- a/reactos/lib/user32/windows/message.c +++ b/reactos/lib/user32/windows/message.c @@ -963,7 +963,7 @@ IntCallWindowProcW(BOOL IsAnsiProc, } } -STATIC LRESULT FASTCALL +static LRESULT FASTCALL IntCallWindowProcA(BOOL IsAnsiProc, WNDPROC WndProc, HWND hWnd, diff --git a/reactos/lib/user32/windows/window.c b/reactos/lib/user32/windows/window.c index 6f26cf5e427..b007f882124 100644 --- a/reactos/lib/user32/windows/window.c +++ b/reactos/lib/user32/windows/window.c @@ -379,9 +379,8 @@ GetForegroundWindow(VOID) return NtUserGetForegroundWindow(); } - +static BOOL -STATIC User32EnumWindows ( HDESK hDesktop, HWND hWndparent,