From 1ed4ecffa81ccc2f23e14c67917c4aa557fe96d0 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sat, 26 Jun 1999 14:58:24 +0000 Subject: [PATCH] ANSI C fixes. Removed warnings. Made the include files self-sufficient. Some Solaris fixes. --- controls/desktop.c | 2 +- controls/edit.c | 6 +- controls/menu.c | 6 +- controls/uitools.c | 1 + controls/widgets.c | 27 ++----- debugger/debug.l | 2 +- debugger/editline.c | 163 ++++++++++++++++---------------------- debugger/stabs.c | 4 +- dlls/comctl32/animate.c | 6 +- dlls/comctl32/listview.c | 6 +- dlls/comctl32/toolbar.c | 4 +- dlls/comctl32/trackbar.c | 2 +- dlls/comctl32/treeview.c | 4 +- dlls/commdlg/finddlg32.c | 10 +-- dlls/commdlg/fontdlg.c | 16 ++-- dlls/commdlg/printdlg.c | 10 +-- dlls/ntdll/rtl.c | 4 +- dlls/winaspi/winaspi16.c | 2 + dlls/wnaspi32/winaspi32.c | 3 + files/directory.c | 1 + graphics/ddraw.c | 126 ++++++++++++++++++----------- include/animate.h | 1 + include/aspi.h | 1 - include/combo.h | 10 ++- include/comboex.h | 2 + include/commdlg.h | 6 +- include/console.h | 2 +- include/crtdll.h | 2 + include/datetime.h | 2 + include/desktop.h | 2 +- include/device.h | 3 + include/dinput.h | 5 ++ include/display.h | 2 +- include/elfdll.h | 3 + include/flatsb.h | 2 + include/flatthunk.h | 6 +- include/header.h | 3 + include/hotkey.h | 2 + include/input.h | 2 + include/ipaddress.h | 2 + include/listview.h | 4 + include/loadorder.h | 2 + include/main.h | 2 + include/menu.h | 3 + include/monthcal.h | 2 + include/nativefont.h | 2 + include/pager.h | 2 + include/progress.h | 1 + include/psapi.h | 2 + include/rebar.h | 4 + include/resource.h | 2 +- include/scroll.h | 8 +- include/sig_context.h | 3 + include/status.h | 3 + include/syslevel.h | 8 +- include/tab.h | 3 + include/tlhelp32.h | 2 +- include/toolbar.h | 2 + include/tooltips.h | 3 + include/trackbar.h | 3 + include/win.h | 15 +++- include/winbase.h | 5 +- include/wincrypt.h | 2 + include/windows.h | 2 - include/wine/obj_base.h | 8 +- include/wine/obj_oleaut.h | 20 ++--- include/wine/winbase16.h | 7 +- include/wine/winuser16.h | 1 + include/winsock.h | 8 ++ include/winuser.h | 16 +++- include/winversion.h | 2 + include/wnet.h | 1 + loader/task.c | 4 +- memory/atom.c | 1 + memory/ldt.c | 1 + memory/selector.c | 1 + memory/string.c | 1 + misc/comm.c | 24 ++---- misc/cpu.c | 2 +- misc/lstr.c | 4 +- misc/port.c | 2 + misc/registry.c | 4 +- misc/winsock.c | 4 +- msdos/dpmi.c | 4 +- msdos/int2f.c | 8 +- ole/ole2.c | 2 +- ole/parsedt.c | 1 - relay32/utthunk.c | 4 +- scheduler/client.c | 4 +- scheduler/syslevel.c | 16 ++-- server/main.c | 4 +- server/socket.c | 4 +- tools/build.c | 4 + windows/caret.c | 8 +- windows/display.c | 2 +- windows/driver.c | 8 +- windows/mdi.c | 3 +- windows/message.c | 4 +- windows/msgbox.c | 2 + windows/multimon.c | 2 +- windows/nonclient.c | 10 +-- windows/painting.c | 16 ++-- windows/queue.c | 2 +- windows/scroll.c | 1 + windows/syscolor.c | 4 + windows/sysmetrics.c | 1 + windows/timer.c | 2 + windows/winproc.c | 4 +- windows/x11drv/keyboard.c | 6 +- 109 files changed, 461 insertions(+), 324 deletions(-) diff --git a/controls/desktop.c b/controls/desktop.c index 462625f7f15..c170f2cd0e1 100644 --- a/controls/desktop.c +++ b/controls/desktop.c @@ -22,7 +22,7 @@ DESKTOP_DRIVER *DESKTOP_Driver = NULL; /*********************************************************************** * DESKTOP_IsSingleWindow */ -BOOL DESKTOP_IsSingleWindow() +BOOL DESKTOP_IsSingleWindow(void) { BOOL retvalue; DESKTOP *pDesktop = (DESKTOP *) WIN_GetDesktop()->wExtra; diff --git a/controls/edit.c b/controls/edit.c index 33fe741927d..f9debfa8ceb 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -154,11 +154,7 @@ static inline BOOL EDIT_EM_CanUndo(WND *wnd, EDITSTATE *es); static inline void EDIT_EM_EmptyUndoBuffer(WND *wnd, EDITSTATE *es); static inline void EDIT_WM_Clear(WND *wnd, EDITSTATE *es); static inline void EDIT_WM_Cut(WND *wnd, EDITSTATE *es); -/* - * This is the only exported function - */ -LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); + /* * Helper functions only valid for one type of control */ diff --git a/controls/menu.c b/controls/menu.c index e9ac2d978f9..5b8d3828c39 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -295,7 +295,7 @@ static HMENU MENU_CopySysPopup(void) * * Return the locked pointer pTopPopupWnd. */ -WND *MENU_GetTopPopupWnd() +static WND *MENU_GetTopPopupWnd() { return WIN_LockWndPtr(pTopPopupWnd); } @@ -304,7 +304,7 @@ WND *MENU_GetTopPopupWnd() * * Realease the locked pointer pTopPopupWnd. */ -void MENU_ReleaseTopPopupWnd() +static void MENU_ReleaseTopPopupWnd() { WIN_ReleaseWndPtr(pTopPopupWnd); } @@ -313,7 +313,7 @@ void MENU_ReleaseTopPopupWnd() * * Destroy the locked pointer pTopPopupWnd. */ -void MENU_DestroyTopPopupWnd() +static void MENU_DestroyTopPopupWnd() { WND *tmpWnd = pTopPopupWnd; pTopPopupWnd = NULL; diff --git a/controls/uitools.c b/controls/uitools.c index b7251d5a97e..b0aa3aa5164 100644 --- a/controls/uitools.c +++ b/controls/uitools.c @@ -5,6 +5,7 @@ * Copyright 1997 Bertho A. Stultiens */ +#include "wine/winuser16.h" #include "winuser.h" #include "debugtools.h" diff --git a/controls/widgets.c b/controls/widgets.c index e81f6891bd2..f13196ea601 100644 --- a/controls/widgets.c +++ b/controls/widgets.c @@ -4,33 +4,20 @@ * Copyright 1993 Alexandre Julliard */ -#include #include +#include #include "win.h" #include "button.h" -#include "static.h" -#include "scroll.h" +#include "combo.h" #include "desktop.h" -#include "mdi.h" #include "gdi.h" -#include "module.h" #include "heap.h" - -/* Window procedures */ - -extern LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); -extern LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); -extern LRESULT WINAPI ComboLBWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); -extern LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); -extern LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); -extern LRESULT WINAPI IconTitleWndProc( HWND hwnd, UINT msg, - WPARAM wParam, LPARAM lParam ); +#include "mdi.h" +#include "menu.h" +#include "module.h" +#include "scroll.h" +#include "static.h" /* Built-in classes */ diff --git a/debugger/debug.l b/debugger/debug.l index d8f96a91eff..02aa298c13e 100644 --- a/debugger/debug.l +++ b/debugger/debug.l @@ -23,7 +23,7 @@ if ( (result = dbg_read((char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" ); -extern char * readline(char *); +extern char * readline(const char *); extern void add_history(char *); static int dbg_read(char * buf, int size); static char * make_symbol(char *); diff --git a/debugger/editline.c b/debugger/editline.c index 37c8e135698..3063357d69a 100644 --- a/debugger/editline.c +++ b/debugger/editline.c @@ -27,11 +27,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include "windef.h" #include "debugger.h" @@ -151,8 +153,7 @@ extern int tgetent(); #include static void -rl_ttyset(Reset) - int Reset; +rl_ttyset(int Reset) { static struct termios old; struct termios new; @@ -181,8 +182,7 @@ rl_ttyset(Reset) #else /* HAVE_TCGETATTR */ static void -rl_ttyset(Reset) - int Reset; +rl_ttyset(int Reset) { static struct sgttyb old_sgttyb; static struct tchars old_tchars; @@ -221,7 +221,7 @@ rl_ttyset(Reset) #endif /* HAVE_TCGETATTR */ static void -TTYflush() +TTYflush(void) { if (ScreenCount) { (void)write(1, Screen, ScreenCount); @@ -230,8 +230,7 @@ TTYflush() } static void -TTYput(c) - CHAR c; +TTYput(CHAR c) { Screen[ScreenCount] = c; if (++ScreenCount >= ScreenSize - 1) { @@ -241,16 +240,14 @@ TTYput(c) } static void -TTYputs(p) - CHAR *p; +TTYputs(CHAR *p) { while (*p) TTYput(*p++); } static void -TTYshow(c) - CHAR c; +TTYshow(CHAR c) { if (c == DEL) { TTYput('^'); @@ -270,15 +267,14 @@ TTYshow(c) } static void -TTYstring(p) - CHAR *p; +TTYstring(CHAR *p) { while (*p) TTYshow(*p++); } static unsigned int -TTYget() +TTYget(void) { CHAR c; int retv; @@ -306,15 +302,14 @@ TTYget() #define TTYback() (backspace ? TTYputs((CHAR *)backspace) : TTYput('\b')) static void -TTYbackn(n) - int n; +TTYbackn(int n) { while (--n >= 0) TTYback(); } static void -TTYinfo() +TTYinfo(void) { static int init; #if defined(USE_TERMCAP) @@ -370,7 +365,7 @@ TTYinfo() static void -reposition() +reposition(void) { int i; CHAR *p; @@ -382,8 +377,7 @@ reposition() } static void -left(Change) - STATUS Change; +left(STATUS Change) { TTYback(); if (Point) { @@ -399,8 +393,7 @@ left(Change) } static void -right(Change) - STATUS Change; +right(STATUS Change) { TTYshow(Line[Point]); if (Change == CSmove) @@ -408,7 +401,7 @@ right(Change) } static STATUS -ring_bell() +ring_bell(void) { TTYput('\07'); TTYflush(); @@ -416,8 +409,7 @@ ring_bell() } static STATUS -do_macro(c) - unsigned int c; +do_macro(unsigned int c) { CHAR name[4]; @@ -434,8 +426,7 @@ do_macro(c) } static STATUS -do_forward(move) - STATUS move; +do_forward(STATUS move) { int i; CHAR *p; @@ -459,8 +450,7 @@ do_forward(move) } static STATUS -do_case(type) - CASE type; +do_case(CASE type) { int i; int end; @@ -488,19 +478,19 @@ do_case(type) } static STATUS -case_down_word() +case_down_word(void) { return do_case(TOlower); } static STATUS -case_up_word() +case_up_word(void) { return do_case(TOupper); } static void -ceol() +ceol(void) { int extras; int i; @@ -524,7 +514,7 @@ ceol() } static void -clear_line() +clear_line(void) { Point = -strlen(Prompt); TTYput('\r'); @@ -535,8 +525,7 @@ clear_line() } static STATUS -insert_string(p) - CHAR *p; +insert_string(CHAR *p) { size_t len; int i; @@ -568,7 +557,7 @@ insert_string(p) static CHAR * -next_hist() +next_hist(void) { return H.Pos >= H.Size - 1 ? NULL : H.Lines[++H.Pos]; } @@ -580,8 +569,7 @@ prev_hist() } static STATUS -do_insert_hist(p) - CHAR *p; +do_insert_hist(CHAR *p) { if (p == NULL) return ring_bell(); @@ -593,8 +581,7 @@ do_insert_hist(p) } static STATUS -do_hist(move) - CHAR *(*move)(); +do_hist(CHAR *(*move)(void)) { CHAR *p; int i; @@ -608,25 +595,25 @@ do_hist(move) } static STATUS -h_next() +h_next(void) { return do_hist(next_hist); } static STATUS -h_prev() +h_prev(void) { return do_hist(prev_hist); } static STATUS -h_first() +h_first(void) { return do_insert_hist(H.Lines[H.Pos = 0]); } static STATUS -h_last() +h_last(void) { return do_insert_hist(H.Lines[H.Pos = H.Size - 1]); } @@ -635,10 +622,7 @@ h_last() ** Return zero if pat appears as a substring in text. */ static int -substrcmp(text, pat, len) - char *text; - char *pat; - int len; +substrcmp(char *text, char *pat, int len) { CHAR c; @@ -651,9 +635,7 @@ substrcmp(text, pat, len) } static CHAR * -search_hist(search, move) - CHAR *search; - CHAR *(*move)(); +search_hist(CHAR *search, CHAR *(*move)(void)) { static CHAR *old_search; int len; @@ -692,7 +674,7 @@ search_hist(search, move) } static STATUS -h_search() +h_search(void) { static int Searching; const char *old_prompt; @@ -718,7 +700,7 @@ h_search() } static STATUS -fd_char() +fd_char(void) { int i; @@ -732,9 +714,7 @@ fd_char() } static void -save_yank(begin, i) - int begin; - int i; +save_yank(int begin, int i) { if (Yanked) { DISPOSE(Yanked); @@ -751,8 +731,7 @@ save_yank(begin, i) } static STATUS -delete_string(count) - int count; +delete_string(int count) { int i; CHAR *p; @@ -794,7 +773,7 @@ delete_string(count) } static STATUS -bk_char() +bk_char(void) { int i; @@ -809,7 +788,7 @@ bk_char() } static STATUS -bk_del_char() +bk_del_char(void) { int i; @@ -824,7 +803,7 @@ bk_del_char() } static STATUS -redisplay() +redisplay(void) { TTYputs((CHAR *)NEWLINE); TTYputs((CHAR *)Prompt); @@ -833,7 +812,7 @@ redisplay() } static STATUS -kill_line() +kill_line(void) { int i; @@ -859,8 +838,7 @@ kill_line() } static STATUS -insert_char(c) - int c; +insert_char(int c) { STATUS s; CHAR buff[2]; @@ -886,7 +864,7 @@ insert_char(c) } static STATUS -meta() +meta(void) { unsigned int c; KEYMAP *kp; @@ -922,8 +900,7 @@ meta() } static STATUS -emacs(c) - unsigned int c; +emacs(unsigned int c) { STATUS s; KEYMAP *kp; @@ -944,8 +921,7 @@ emacs(c) } static STATUS -TTYspecial(c) - unsigned int c; +TTYspecial(unsigned int c) { if (ISMETA(c)) return CSdispatch; @@ -972,7 +948,7 @@ TTYspecial(c) } static CHAR * -editinput() +editinput(void) { unsigned int c; @@ -1010,8 +986,7 @@ editinput() } static void -hist_add(p) - CHAR *p; +hist_add(CHAR *p) { int i; @@ -1029,8 +1004,7 @@ hist_add(p) } char * -readline(prompt) - const char *prompt; +readline(const char *prompt) { CHAR *line; @@ -1059,8 +1033,7 @@ readline(prompt) } void -add_history(p) - char *p; +add_history(char *p) { if (p == NULL || *p == '\0') return; @@ -1074,7 +1047,7 @@ add_history(p) static STATUS -beg_line() +beg_line(void) { if (Point) { Point = 0; @@ -1084,13 +1057,13 @@ beg_line() } static STATUS -del_char() +del_char(void) { return delete_string(Repeat == NO_ARG ? 1 : Repeat); } static STATUS -end_line() +end_line(void) { if (Point != End) { Point = End; @@ -1100,14 +1073,14 @@ end_line() } static STATUS -accept_line() +accept_line(void) { Line[End] = '\0'; return CSdone; } static STATUS -transpose() +transpose(void) { CHAR c; @@ -1125,7 +1098,7 @@ transpose() } static STATUS -quote() +quote(void) { unsigned int c; @@ -1133,7 +1106,7 @@ quote() } static STATUS -wipe() +wipe(void) { int i; @@ -1151,14 +1124,14 @@ wipe() } static STATUS -mk_set() +mk_set(void) { Mark = Point; return CSstay; } static STATUS -exchange() +exchange(void) { unsigned int c; @@ -1174,7 +1147,7 @@ exchange() } static STATUS -yank() +yank(void) { if (Yanked && *Yanked) return insert_string(Yanked); @@ -1182,7 +1155,7 @@ yank() } static STATUS -copy_region() +copy_region(void) { if (Mark > End) return ring_bell(); @@ -1196,7 +1169,7 @@ copy_region() } static STATUS -move_to_char() +move_to_char(void) { unsigned int c; int i; @@ -1213,13 +1186,13 @@ move_to_char() } static STATUS -fd_word() +fd_word(void) { return do_forward(CSmove); } static STATUS -fd_kill_word() +fd_kill_word(void) { int i; @@ -1233,7 +1206,7 @@ fd_kill_word() } static STATUS -bk_word() +bk_word(void) { int i; CHAR *p; @@ -1254,7 +1227,7 @@ bk_word() } static STATUS -bk_kill_word() +bk_kill_word(void) { (void)bk_word(); if (OldPoint != Point) @@ -1263,9 +1236,7 @@ bk_kill_word() } static int -argify(line, avp) - CHAR *line; - CHAR ***avp; +argify(CHAR *line, CHAR ***avp) { CHAR *c; CHAR **p; @@ -1309,7 +1280,7 @@ argify(line, avp) } static STATUS -last_argument() +last_argument(void) { CHAR **av; CHAR *p; diff --git a/debugger/stabs.c b/debugger/stabs.c index 3a5b77a17e4..2758ac76517 100644 --- a/debugger/stabs.c +++ b/debugger/stabs.c @@ -93,7 +93,7 @@ struct known_typedef struct known_typedef * next; char * name; int ndefs; - struct datatype * types[0]; + struct datatype * types[1]; }; #define NR_STAB_HASH 521 @@ -221,7 +221,7 @@ DEBUG_RegisterTypedef(const char * name, struct datatype ** types, int ndef) return TRUE; ktd = (struct known_typedef *) DBG_alloc(sizeof(struct known_typedef) - + ndef * sizeof(struct datatype *)); + + (ndef - 1) * sizeof(struct datatype *)); hash = stab_hash(name); diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index 32a3a2ea285..906bdc9544c 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -93,7 +93,7 @@ ANIMATE_Free (ANIMATE_INFO *infoPtr) static VOID -ANIMATE_GetAviInfo (infoPtr) +ANIMATE_GetAviInfo (ANIMATE_INFO *infoPtr) { @@ -305,7 +305,7 @@ ANIMATE_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) VOID -ANIMATE_Register (VOID) +ANIMATE_Register (void) { WNDCLASSA wndClass; @@ -325,7 +325,7 @@ ANIMATE_Register (VOID) VOID -ANIMATE_Unregister (VOID) +ANIMATE_Unregister (void) { if (GlobalFindAtomA (ANIMATE_CLASSA)) UnregisterClassA (ANIMATE_CLASSA, (HINSTANCE)NULL); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 3303a9fd321..bb04095f379 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -2040,7 +2040,7 @@ static INT LISTVIEW_GetCountPerColumn(HWND hwnd) * RETURN: * Number of columns. */ -static INT LISTVIEW_GetColumnCount(hwnd) +static INT LISTVIEW_GetColumnCount(HWND hwnd) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); LONG lStyle = GetWindowLongA(hwnd, GWL_STYLE); @@ -6767,7 +6767,7 @@ LRESULT WINAPI LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, * RETURN: * None */ -VOID LISTVIEW_Register(VOID) +VOID LISTVIEW_Register(void) { WNDCLASSA wndClass; @@ -6795,7 +6795,7 @@ VOID LISTVIEW_Register(VOID) * RETURN: * None */ -VOID LISTVIEW_Unregister(VOID) +VOID LISTVIEW_Unregister(void) { if (GlobalFindAtomA(WC_LISTVIEWA)) { diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index af6087822ed..ebb7ced670e 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3227,7 +3227,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) VOID -TOOLBAR_Register (VOID) +TOOLBAR_Register (void) { WNDCLASSA wndClass; @@ -3247,7 +3247,7 @@ TOOLBAR_Register (VOID) VOID -TOOLBAR_Unregister (VOID) +TOOLBAR_Unregister (void) { if (GlobalFindAtomA (TOOLBARCLASSNAMEA)) UnregisterClassA (TOOLBARCLASSNAMEA, (HINSTANCE)NULL); diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index cb4eb360989..9e981651090 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -85,7 +85,7 @@ void TRACKBAR_RecalculateTics (TRACKBAR_INFO *infoPtr) /* converts from physical (mouse) position to logical position (in range of trackbar) */ -static __inline__ DOUBLE +static inline DOUBLE TRACKBAR_ConvertPlaceToPosition (TRACKBAR_INFO *infoPtr, int place, int vertical) { diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 7068eaeab62..daad00782f6 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3570,7 +3570,7 @@ TREEVIEW_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) VOID -TREEVIEW_Register (VOID) +TREEVIEW_Register (void) { WNDCLASSA wndClass; @@ -3592,7 +3592,7 @@ TREEVIEW_Register (VOID) VOID -TREEVIEW_Unregister (VOID) +TREEVIEW_Unregister (void) { if (GlobalFindAtomA (WC_TREEVIEWA)) UnregisterClassA (WC_TREEVIEWA, (HINSTANCE)NULL); diff --git a/dlls/commdlg/finddlg32.c b/dlls/commdlg/finddlg32.c index d29ee1ab109..1c0b7838e86 100644 --- a/dlls/commdlg/finddlg32.c +++ b/dlls/commdlg/finddlg32.c @@ -49,7 +49,7 @@ static UINT HelpMessage; * RETURNS * Current state of check and radio buttons */ -DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd) +static DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd) { DWORD flags = 0; if(IsDlgButtonChecked(hDlgWnd, rad2) == BST_CHECKED) @@ -65,7 +65,7 @@ DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd) * COMDLG32_FR_HandleWMCommand [internal] * Handle WM_COMMAND messages... */ -void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode) +static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode) { DWORD flag; @@ -148,7 +148,7 @@ Replace: * COMDLG32_FindReplaceDlgProc [internal] * [Find/Replace]Text32[A/W] window procedure. */ -BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +static BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { COMDLG32_FR_Data *pdata = (COMDLG32_FR_Data *)GetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom); BOOL retval = TRUE;; @@ -272,7 +272,7 @@ BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam * TRUE: Succes * FALSE: Failure */ -BOOL COMDLG32_FR_CheckPartial( +static BOOL COMDLG32_FR_CheckPartial( LPFINDREPLACEA pfr, /* [in] Find structure */ BOOL Replace /* [in] True if called as replace */ ) { @@ -340,7 +340,7 @@ BOOL COMDLG32_FR_CheckPartial( * Window handle to created dialog:Succes * NULL:Failure */ -HWND COMDLG32_FR_DoFindReplace( +static HWND COMDLG32_FR_DoFindReplace( COMDLG32_FR_Data *pdata /* [in] Internal data structure */ ) { HWND hdlgwnd = 0; diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index 75937cf535d..77b51841314 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -286,7 +286,7 @@ typedef struct /************************************************************************* * FontFamilyEnumProc32 [internal] */ -INT WINAPI FontFamilyEnumProc(LPENUMLOGFONTA lpEnumLogFont, +static INT WINAPI FontFamilyEnumProc(LPENUMLOGFONTA lpEnumLogFont, LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam) { LPCFn_ENUMSTRUCT e; @@ -393,7 +393,7 @@ static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTA lpcf) /*********************************************************************** * AddFontStyle [internal] */ -INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType, +static INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType, LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg) { int i; @@ -444,7 +444,7 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics, /*********************************************************************** * FontStyleEnumProc32 [internal] */ -INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont, +static INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont, LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam ) { LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam; @@ -458,7 +458,7 @@ INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont, /*********************************************************************** * CFn_WMInitDialog [internal] */ -LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, +static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTA lpcf) { HDC hdc; @@ -579,7 +579,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, /*********************************************************************** * CFn_WMMeasureItem [internal] */ -LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) +static LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) { BITMAP bm; LPMEASUREITEMSTRUCT lpmi=(LPMEASUREITEMSTRUCT)lParam; @@ -595,7 +595,7 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) /*********************************************************************** * CFn_WMDrawItem [internal] */ -LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam) +static LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam) { HBRUSH hBrush; char buffer[40]; @@ -697,7 +697,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam) /*********************************************************************** * CFn_WMCtlColor [internal] */ -LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam, +static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTA lpcf) { if (lpcf->Flags & CF_EFFECTS) @@ -712,7 +712,7 @@ LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam, /*********************************************************************** * CFn_WMCommand [internal] */ -LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, +static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTA lpcf) { HFONT hFont; diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index cabc00208b9..bdb5cc2b0f3 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -242,7 +242,7 @@ BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg ) /*********************************************************************** * PRINTDLG_UpdatePrinterInfoTexts [internal] */ -void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructures) +static void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructures) { char PrinterName[256]; char StatusMsg[256]; @@ -272,8 +272,8 @@ void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructures) /*********************************************************************** * PRINTDLG_WMInitDialog [internal] */ -LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, - PRINT_PTRA* PrintStructures) +static LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, + PRINT_PTRA* PrintStructures) { int i; LPPRINTDLGA lppd = PrintStructures->lpPrintDlg; @@ -377,8 +377,8 @@ TRACE("succesful!\n"); * FALSE if user is not allowed to close (i.e. wrong nTo or nFrom values) * TRUE if succesful. */ -BOOL PRINTDLG_ValidateAndDuplicateSettings(HWND hDlg, - PRINT_PTRA* PrintStructures) +static BOOL PRINTDLG_ValidateAndDuplicateSettings(HWND hDlg, + PRINT_PTRA* PrintStructures) { LPPRINTDLGA lppd = PrintStructures->lpPrintDlg; diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 1e18e637539..8e9ec995045 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -398,7 +398,7 @@ INT WINAPI RtlExtendedLargeIntegerDivide( *rest = x1 % divisor; return x1/divisor; #else - FIXME("((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest); + FIXME("((%ld<<32)+%ld,%ld,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest); return 0; #endif } @@ -415,7 +415,7 @@ long long WINAPI RtlExtendedIntegerMultiply( #if SIZEOF_LONG_LONG==8 return (*(long long*)&factor1) * factor2; #else - FIXME("((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2); + FIXME("((%ld<<32)+%ld,%d), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2); return 0; #endif } diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c index d1983c17272..09fa06ba867 100644 --- a/dlls/winaspi/winaspi16.c +++ b/dlls/winaspi/winaspi16.c @@ -28,6 +28,8 @@ DEFAULT_DEBUG_CHANNEL(aspi) #ifdef linux +static ASPI_DEVICE_INFO *ASPI_open_devices = NULL; + static FARPROC16 ASPIChainFunc = NULL; static WORD HA_Count = 1; /* host adapter count; FIXME: detect it */ diff --git a/dlls/wnaspi32/winaspi32.c b/dlls/wnaspi32/winaspi32.c index 30d11f00139..a62c4432613 100644 --- a/dlls/wnaspi32/winaspi32.c +++ b/dlls/wnaspi32/winaspi32.c @@ -25,6 +25,9 @@ DEFAULT_DEBUG_CHANNEL(aspi) */ #ifdef linux + +static ASPI_DEVICE_INFO *ASPI_open_devices = NULL; + static int ASPI_OpenDevice(SRB_ExecSCSICmd *prb) { diff --git a/files/directory.c b/files/directory.c index b1833eaf227..351d9595d52 100644 --- a/files/directory.c +++ b/files/directory.c @@ -16,6 +16,7 @@ #include "winbase.h" #include "wine/winbase16.h" #include "wine/winestring.h" +#include "wine/winuser16.h" #include "winerror.h" #include "process.h" #include "drive.h" diff --git a/graphics/ddraw.c b/graphics/ddraw.c index a16b6ca0bc0..95d2d59a9de 100644 --- a/graphics/ddraw.c +++ b/graphics/ddraw.c @@ -96,14 +96,23 @@ static GUID XLIB_DirectDraw_GUID = { /* 1574a740-dc61-11d1-8407-f7875a7d1879 */ {0x84, 0x07, 0xf7, 0x87, 0x5a, 0x7d, 0x18, 0x79} }; -static struct ICOM_VTABLE(IDirectDrawSurface4) dga_dds4vt, xlib_dds4vt; -static struct ICOM_VTABLE(IDirectDraw) dga_ddvt, xlib_ddvt; -static struct ICOM_VTABLE(IDirectDraw2) dga_dd2vt, xlib_dd2vt; -static struct ICOM_VTABLE(IDirectDraw4) dga_dd4vt, xlib_dd4vt; +#ifdef HAVE_LIBXXF86DGA +static struct ICOM_VTABLE(IDirectDrawSurface4) dga_dds4vt; +static struct ICOM_VTABLE(IDirectDraw) dga_ddvt; +static struct ICOM_VTABLE(IDirectDraw2) dga_dd2vt; +static struct ICOM_VTABLE(IDirectDraw4) dga_dd4vt; +static struct ICOM_VTABLE(IDirectDrawPalette) dga_ddpalvt; +#endif /* defined(HAVE_LIBXXF86DGA) */ + +static struct ICOM_VTABLE(IDirectDrawSurface4) xlib_dds4vt; +static struct ICOM_VTABLE(IDirectDraw) xlib_ddvt; +static struct ICOM_VTABLE(IDirectDraw2) xlib_dd2vt; +static struct ICOM_VTABLE(IDirectDraw4) xlib_dd4vt; +static struct ICOM_VTABLE(IDirectDrawPalette) xlib_ddpalvt; + static struct ICOM_VTABLE(IDirectDrawClipper) ddclipvt; -static struct ICOM_VTABLE(IDirectDrawPalette) dga_ddpalvt, xlib_ddpalvt; -static struct ICOM_VTABLE(IDirect3D) d3dvt; -static struct ICOM_VTABLE(IDirect3D2) d3d2vt; +static struct ICOM_VTABLE(IDirect3D) d3dvt; +static struct ICOM_VTABLE(IDirect3D2) d3d2vt; #ifdef HAVE_LIBXXF86VM static XF86VidModeModeInfo *orig_mode = NULL; @@ -629,6 +638,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Lock( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_Unlock( LPDIRECTDRAWSURFACE4 iface,LPVOID surface ) { @@ -636,6 +646,7 @@ static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_Unlock( TRACE(ddraw,"(%p)->Unlock(%p)\n",This,surface); return DD_OK; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static void Xlib_copy_surface_on_screen(IDirectDrawSurface4Impl* This) { if (This->s.ddraw->d.pixel_convert != NULL) @@ -688,12 +699,12 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Unlock( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_Flip( LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWSURFACE4 flipto,DWORD dwFlags ) { ICOM_THIS(IDirectDrawSurface4Impl,iface); IDirectDrawSurface4Impl* iflipto=(IDirectDrawSurface4Impl*)flipto; -#ifdef HAVE_LIBXXF86DGA TRACE(ddraw,"(%p)->Flip(%p,%08lx)\n",This,iflipto,dwFlags); if (!iflipto) { if (This->s.backbuffer) @@ -721,10 +732,8 @@ static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_Flip( iflipto->s.surface_desc.y.lpSurface = ptmp; } return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Flip( LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWSURFACE4 flipto,DWORD dwFlags @@ -841,13 +850,14 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_SetPalette( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_SetPalette( LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWPALETTE pal ) { ICOM_THIS(IDirectDrawSurface4Impl,iface); IDirectDrawPaletteImpl* ipal=(IDirectDrawPaletteImpl*)pal; TRACE(ddraw,"(%p)->(%p)\n",This,ipal); -#ifdef HAVE_LIBXXF86DGA + /* According to spec, we are only supposed to * AddRef if this is not the same palette. */ @@ -870,12 +880,8 @@ static HRESULT WINAPI DGA_IDirectDrawSurface4Impl_SetPalette( TSXF86DGAInstallColormap(display,DefaultScreen(display),This->s.palette->cm); } return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ - - } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT _Blt_ColorFill(LPBYTE buf, int width, int height, int bpp, LONG lPitch, DWORD color) { @@ -1275,11 +1281,11 @@ static ULONG WINAPI IDirectDrawSurface4Impl_AddRef(LPDIRECTDRAWSURFACE4 iface) { return ++(This->ref); } +#ifdef HAVE_LIBXXF86DGA static ULONG WINAPI DGA_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 iface) { ICOM_THIS(IDirectDrawSurface4Impl,iface); TRACE( ddraw, "(%p)->() decrementing from %lu.\n", This, This->ref ); -#ifdef HAVE_LIBXXF86DGA if (!--(This->ref)) { IDirectDraw2_Release((IDirectDraw2*)This->s.ddraw); /* clear out of surface list */ @@ -1303,9 +1309,9 @@ static ULONG WINAPI DGA_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 ifa HeapFree(GetProcessHeap(),0,This); return 0; } -#endif /* defined(HAVE_LIBXXF86DGA) */ return This->ref; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static ULONG WINAPI Xlib_IDirectDrawSurface4Impl_Release(LPDIRECTDRAWSURFACE4 iface) { ICOM_THIS(IDirectDrawSurface4Impl,iface); @@ -1982,6 +1988,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_ChangeUniquenessValue(LPDIRECTDRAW return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static ICOM_VTABLE(IDirectDrawSurface4) dga_dds4vt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE @@ -2031,6 +2038,7 @@ static ICOM_VTABLE(IDirectDrawSurface4) dga_dds4vt = IDirectDrawSurface4Impl_GetUniquenessValue, IDirectDrawSurface4Impl_ChangeUniquenessValue }; +#endif /* defined(HAVE_LIBXXF86DGA) */ static ICOM_VTABLE(IDirectDrawSurface4) xlib_dds4vt = { @@ -2261,10 +2269,10 @@ static HRESULT WINAPI Xlib_IDirectDrawPaletteImpl_SetEntries( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDrawPaletteImpl_SetEntries( LPDIRECTDRAWPALETTE iface,DWORD x,DWORD start,DWORD count,LPPALETTEENTRY palent ) { -#ifdef HAVE_LIBXXF86DGA ICOM_THIS(IDirectDrawPaletteImpl,iface); XColor xc; Colormap cm; @@ -2298,10 +2306,8 @@ static HRESULT WINAPI DGA_IDirectDrawPaletteImpl_SetEntries( } TSXF86DGAInstallColormap(display,DefaultScreen(display),This->cm); return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ static ULONG WINAPI IDirectDrawPaletteImpl_Release(LPDIRECTDRAWPALETTE iface) { ICOM_THIS(IDirectDrawPaletteImpl,iface); @@ -2353,6 +2359,7 @@ static HRESULT WINAPI IDirectDrawPaletteImpl_QueryInterface( return S_OK; } +#ifdef HAVE_LIBXXF86DGA static ICOM_VTABLE(IDirectDrawPalette) dga_ddpalvt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE @@ -2364,6 +2371,7 @@ static ICOM_VTABLE(IDirectDrawPalette) dga_ddpalvt = IDirectDrawPaletteImpl_Initialize, DGA_IDirectDrawPaletteImpl_SetEntries }; +#endif /* defined(HAVE_LIBXXF86DGA) */ static ICOM_VTABLE(IDirectDrawPalette) xlib_ddpalvt = { @@ -2743,10 +2751,10 @@ static HRESULT common_off_screen_CreateSurface(IDirectDraw2Impl* This, return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface( LPDIRECTDRAW2 iface,LPDDSURFACEDESC lpddsd,LPDIRECTDRAWSURFACE *lpdsf,IUnknown *lpunk ) { -#ifdef HAVE_LIBXXF86DGA ICOM_THIS(IDirectDraw2Impl,iface); IDirectDrawSurfaceImpl** ilpdsf=(IDirectDrawSurfaceImpl**)lpdsf; int i; @@ -2847,10 +2855,8 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface( } return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ #ifdef HAVE_LIBXXSHM /* Error handlers for Image creation */ @@ -3300,10 +3306,10 @@ static int _common_depth_to_pixelformat(DWORD depth, DDPIXELFORMAT *pixelformat, return match; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDrawImpl_SetDisplayMode( LPDIRECTDRAW iface,DWORD width,DWORD height,DWORD depth ) { -#ifdef HAVE_LIBXXF86DGA ICOM_THIS(IDirectDrawImpl,iface); int i,mode_count; @@ -3387,10 +3393,8 @@ static HRESULT WINAPI DGA_IDirectDrawImpl_SetDisplayMode( EXC_InitHandlers(); #endif return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ /* ************************************* 16 / 15 bpp to palettized 8 bpp @@ -3637,10 +3641,10 @@ static HRESULT WINAPI Xlib_IDirectDrawImpl_SetDisplayMode( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_GetCaps( LPDIRECTDRAW2 iface,LPDDCAPS caps1,LPDDCAPS caps2 ) { -#ifdef HAVE_LIBXXF86DGA ICOM_THIS(IDirectDraw2Impl,iface); TRACE(ddraw,"(%p)->GetCaps(%p,%p)\n",This,caps1,caps2); if (!caps1 && !caps2) @@ -3656,10 +3660,8 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_GetCaps( caps2->ddsCaps.dwCaps = 0xffffffff; /* we can do anything */ } return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ static void fill_caps(LPDDCAPS caps) { /* This function tries to fill the capabilities of Wine's DDraw implementation. @@ -3763,6 +3765,7 @@ static HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_CreatePalette( LPDIRECTDRAW2 iface,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk ) { @@ -3795,6 +3798,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreatePalette( } return DD_OK; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreatePalette( LPDIRECTDRAW2 iface,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk @@ -3811,8 +3815,8 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_CreatePalette( return DD_OK; } -static HRESULT WINAPI DGA_IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 iface) { #ifdef HAVE_LIBXXF86DGA +static HRESULT WINAPI DGA_IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 iface) { ICOM_THIS(IDirectDraw2Impl,iface); TRACE(ddraw, "(%p)->()\n",This); Sleep(1000); @@ -3821,10 +3825,8 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 ifac EXC_InitHandlers(); #endif return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 iface) { ICOM_THIS(IDirectDraw2Impl,iface); @@ -3848,11 +3850,11 @@ static ULONG WINAPI IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 iface) { return ++(This->ref); } +#ifdef HAVE_LIBXXF86DGA static ULONG WINAPI DGA_IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface) { ICOM_THIS(IDirectDraw2Impl,iface); TRACE( ddraw, "(%p)->() decrementing from %lu.\n", This, This->ref ); -#ifdef HAVE_LIBXXF86DGA if (!--(This->ref)) { TSXF86DGADirectVideo(display,DefaultScreen(display),0); if (This->d.window && (This->d.mainWindow != This->d.window)) @@ -3876,9 +3878,9 @@ static ULONG WINAPI DGA_IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface) { HeapFree(GetProcessHeap(),0,This); return 0; } -#endif /* defined(HAVE_LIBXXF86DGA) */ return This->ref; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static ULONG WINAPI Xlib_IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface) { ICOM_THIS(IDirectDraw2Impl,iface); @@ -3894,6 +3896,7 @@ static ULONG WINAPI Xlib_IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface) { return This->ref; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface( LPDIRECTDRAW2 iface,REFIID refiid,LPVOID *obj ) { @@ -3968,6 +3971,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_QueryInterface( WARN(ddraw,"(%p):interface for IID %s _NOT_ found!\n",This,xrefiid); return OLE_E_ENUM_NOMORE; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_QueryInterface( LPDIRECTDRAW2 iface,REFIID refiid,LPVOID *obj @@ -4053,6 +4057,7 @@ static HRESULT WINAPI IDirectDraw2Impl_GetVerticalBlankStatus( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_EnumDisplayModes( LPDIRECTDRAW2 iface,DWORD dwFlags,LPDDSURFACEDESC lpddsfd,LPVOID context,LPDDENUMMODESCALLBACK modescb ) { @@ -4137,6 +4142,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_EnumDisplayModes( } return DD_OK; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_EnumDisplayModes( LPDIRECTDRAW2 iface,DWORD dwFlags,LPDDSURFACEDESC lpddsfd,LPVOID context,LPDDENUMMODESCALLBACK modescb @@ -4266,10 +4272,10 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_EnumDisplayModes( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_GetDisplayMode( LPDIRECTDRAW2 iface,LPDDSURFACEDESC lpddsfd ) { -#ifdef HAVE_LIBXXF86DGA ICOM_THIS(IDirectDraw2Impl,iface); TRACE(ddraw,"(%p)->(%p)\n",This,lpddsfd); lpddsfd->dwFlags = DDSD_HEIGHT|DDSD_WIDTH|DDSD_PITCH|DDSD_BACKBUFFERCOUNT|DDSD_PIXELFORMAT|DDSD_CAPS; @@ -4281,10 +4287,8 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_GetDisplayMode( lpddsfd->ddsCaps.dwCaps = DDSCAPS_PALETTE; lpddsfd->ddpfPixelFormat = This->d.directdraw_pixelformat; return DD_OK; -#else /* defined(HAVE_LIBXXF86DGA) */ - return E_UNEXPECTED; -#endif /* defined(HAVE_LIBXXF86DGA) */ } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_GetDisplayMode( LPDIRECTDRAW2 iface,LPDDSURFACEDESC lpddsfd @@ -4367,6 +4371,8 @@ static HRESULT WINAPI IDirectDraw2Impl_Initialize(LPDIRECTDRAW2 iface, return DD_OK; } +#ifdef HAVE_LIBXXF86DGA + /* Note: Hack so we can reuse the old functions without compiler warnings */ #if !defined(__STRICT_ANSI__) && defined(__GNUC__) # define XCAST(fun) (typeof(dga_ddvt.fn##fun)) @@ -4402,6 +4408,17 @@ static ICOM_VTABLE(IDirectDraw) dga_ddvt = XCAST(WaitForVerticalBlank)IDirectDraw2Impl_WaitForVerticalBlank, }; +#undef XCAST + +#endif /* defined(HAVE_LIBXXF86DGA) */ + +/* Note: Hack so we can reuse the old functions without compiler warnings */ +#if !defined(__STRICT_ANSI__) && defined(__GNUC__) +# define XCAST(fun) (typeof(xlib_ddvt.fn##fun)) +#else +# define XCAST(fun) (void *) +#endif + static ICOM_VTABLE(IDirectDraw) xlib_ddvt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE @@ -4438,11 +4455,13 @@ static ICOM_VTABLE(IDirectDraw) xlib_ddvt = */ +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_SetDisplayMode( LPDIRECTDRAW2 iface,DWORD width,DWORD height,DWORD depth,DWORD xx,DWORD yy ) { return DGA_IDirectDrawImpl_SetDisplayMode((LPDIRECTDRAW)iface,width,height,depth); } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_SetDisplayMode( LPDIRECTDRAW2 iface,DWORD width,DWORD height,DWORD depth,DWORD xx,DWORD yy @@ -4450,6 +4469,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_SetDisplayMode( return Xlib_IDirectDrawImpl_SetDisplayMode((LPDIRECTDRAW)iface,width,height,depth); } +#ifdef HAVE_LIBXXF86DGA static HRESULT WINAPI DGA_IDirectDraw2Impl_GetAvailableVidMem( LPDIRECTDRAW2 iface,LPDDSCAPS ddscaps,LPDWORD total,LPDWORD free ) { @@ -4461,6 +4481,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_GetAvailableVidMem( if (free) *free = This->e.dga.fb_memsize * 1024; return DD_OK; } +#endif /* defined(HAVE_LIBXXF86DGA) */ static HRESULT WINAPI Xlib_IDirectDraw2Impl_GetAvailableVidMem( LPDIRECTDRAW2 iface,LPDDSCAPS ddscaps,LPDWORD total,LPDWORD free @@ -4474,6 +4495,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2Impl_GetAvailableVidMem( return DD_OK; } +#ifdef HAVE_LIBXXF86DGA static ICOM_VTABLE(IDirectDraw2) dga_dd2vt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE @@ -4502,6 +4524,7 @@ static ICOM_VTABLE(IDirectDraw2) dga_dd2vt = IDirectDraw2Impl_WaitForVerticalBlank, DGA_IDirectDraw2Impl_GetAvailableVidMem }; +#endif /* defined(HAVE_LIBXXF86DGA) */ static ICOM_VTABLE(IDirectDraw2) xlib_dd2vt = { @@ -4569,13 +4592,14 @@ static HRESULT WINAPI IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 iface, return DD_OK; } +#ifdef HAVE_LIBXXF86DGA + #if !defined(__STRICT_ANSI__) && defined(__GNUC__) # define XCAST(fun) (typeof(dga_dd4vt.fn##fun)) #else # define XCAST(fun) (void*) #endif - static ICOM_VTABLE(IDirectDraw4) dga_dd4vt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE @@ -4609,6 +4633,16 @@ static ICOM_VTABLE(IDirectDraw4) dga_dd4vt = IDirectDraw4Impl_GetDeviceIdentifier }; +#undef XCAST + +#endif /* defined(HAVE_LIBXXF86DGA) */ + +#if !defined(__STRICT_ANSI__) && defined(__GNUC__) +# define XCAST(fun) (typeof(xlib_dd4vt.fn##fun)) +#else +# define XCAST(fun) (void*) +#endif + static ICOM_VTABLE(IDirectDraw4) xlib_dd4vt = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE diff --git a/include/animate.h b/include/animate.h index cfde3f22f52..04dcd36f5ff 100644 --- a/include/animate.h +++ b/include/animate.h @@ -7,6 +7,7 @@ #ifndef __WINE_ANIMATE_H #define __WINE_ANIMATE_H +#include "windef.h" typedef struct tagANIMATE_INFO { diff --git a/include/aspi.h b/include/aspi.h index cb5bca795f7..41541ce2610 100644 --- a/include/aspi.h +++ b/include/aspi.h @@ -115,7 +115,6 @@ struct ASPI_DEVICE_INFO { }; typedef struct ASPI_DEVICE_INFO ASPI_DEVICE_INFO; -static ASPI_DEVICE_INFO *ASPI_open_devices = NULL; #include "poppack.h" diff --git a/include/combo.h b/include/combo.h index 67d6ea86d19..4b7ea489d3e 100644 --- a/include/combo.h +++ b/include/combo.h @@ -5,6 +5,10 @@ #ifndef __WINE_COMBO_H #define __WINE_COMBO_H +#include "windef.h" + +struct tagWND; + #define ID_CB_LISTBOX 1000 #define ID_CB_EDIT 1001 @@ -28,7 +32,7 @@ typedef struct { - WND* self; + struct tagWND *self; HWND owner; UINT dwStyle; HWND hWndEdit; @@ -54,8 +58,10 @@ typedef struct #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS) #define CB_HWND( lphc ) ((lphc)->self->hwndSelf) +LRESULT WINAPI ComboWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); + BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL ); -HWND COMBO_GetLBWindow( WND* ); +HWND COMBO_GetLBWindow( struct tagWND * ); LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL ); #endif /* __WINE_COMBO_H */ diff --git a/include/comboex.h b/include/comboex.h index 338b29a7166..4546366e358 100644 --- a/include/comboex.h +++ b/include/comboex.h @@ -7,6 +7,8 @@ #ifndef __WINE_COMBOEX_H #define __WINE_COMBOEX_H +#include "commctrl.h" +#include "windef.h" typedef struct tagCOMBOEX_INFO { diff --git a/include/commdlg.h b/include/commdlg.h index e20add7f964..0db8141c83c 100644 --- a/include/commdlg.h +++ b/include/commdlg.h @@ -591,6 +591,7 @@ BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol); BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol); #define ChooseColor WINELIB_NAME_AW(ChooseColor) DWORD WINAPI CommDlgExtendedError(void); +DWORD WINAPI CommDlgExtendedError16(void); HWND16 WINAPI FindText16( SEGPTR find); HWND WINAPI FindTextA(LPFINDREPLACEA lpFind); HWND WINAPI FindTextW(LPFINDREPLACEW lpFind); @@ -641,8 +642,11 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); LRESULT WINAPI FormatCharDlgProcA(HWND,UINT,WPARAM,LPARAM); LRESULT WINAPI FormatCharDlgProcW(HWND,UINT,WPARAM,LPARAM); #define FormatCharDlgProc WINELIB_NAME_AW(FormatCharDlgProc) +INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics, UINT16 nFontType, LPARAM lParam); +INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics, UINT16 nFontType, LPARAM lParam); -void COMDLG32_SetCommDlgExtendedError(DWORD err); +BOOL WINAPI COMMDLG_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD HeapSize, DWORD res1, WORD res2); +BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved); #include "poppack.h" diff --git a/include/console.h b/include/console.h index 45975fa43cf..245fdc6fc14 100644 --- a/include/console.h +++ b/include/console.h @@ -70,7 +70,7 @@ extern CONSOLE_device driver; /* Global driver struct */ /* Generic defines */ int CONSOLE_Init(char *drivers); -void CONSOLE_Close(); +void CONSOLE_Close(void); void CONSOLE_Write(char out, int fg_color, int bg_color, int attribute); void CONSOLE_MoveCursor(char row, char col); void CONSOLE_ClearWindow(char, char, char, char, int, int); diff --git a/include/crtdll.h b/include/crtdll.h index a272ce579d8..0e9733bf0b6 100644 --- a/include/crtdll.h +++ b/include/crtdll.h @@ -1,6 +1,8 @@ #ifndef __WINE_CRTDLL_H #define __WINE_CRTDLL_H +#include "windef.h" + #define CRTDLL_LC_ALL 0 #define CRTDLL_LC_COLLATE 1 #define CRTDLL_LC_CTYPE 2 diff --git a/include/datetime.h b/include/datetime.h index d8ee1a3ff7c..b5e6cbf3e94 100644 --- a/include/datetime.h +++ b/include/datetime.h @@ -7,6 +7,8 @@ #ifndef __WINE_DATETIME_H #define __WINE_DATETIME_H +#include "windef.h" + typedef struct tagDATETIME_INFO { DWORD dwDummy; /* just to keep the compiler happy ;-) */ diff --git a/include/desktop.h b/include/desktop.h index 3d124816219..9a81694abcb 100644 --- a/include/desktop.h +++ b/include/desktop.h @@ -30,7 +30,7 @@ typedef struct tagDESKTOP_DRIVER { extern DESKTOP_DRIVER *DESKTOP_Driver; -extern BOOL DESKTOP_IsSingleWindow(); +extern BOOL DESKTOP_IsSingleWindow(void); extern int DESKTOP_GetScreenWidth(void); extern int DESKTOP_GetScreenHeight(void); extern int DESKTOP_GetScreenDepth(void); diff --git a/include/device.h b/include/device.h index 6a5216c5aaa..d0f0c7fbfbe 100644 --- a/include/device.h +++ b/include/device.h @@ -1,5 +1,8 @@ #ifndef __WINE_DEVICE_H #define __WINE_DEVICE_H + +#include "winbase.h" + extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa ); #endif diff --git a/include/dinput.h b/include/dinput.h index 8297ff3742e..503a8d61d38 100644 --- a/include/dinput.h +++ b/include/dinput.h @@ -832,5 +832,10 @@ ICOM_DEFINE(IDirectInputA,IUnknown) #define IDirectInputA_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b) #endif +/* Export functions */ + +HRESULT WINAPI DirectInputCreateA(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN); +HRESULT WINAPI DirectInputCreateW(HINSTANCE,DWORD,LPDIRECTINPUTA *,LPUNKNOWN); +#define DirectInputCreate WINELIB_NAME_AW(DirectInputCreate) #endif /* __WINE_DINPUT_H */ diff --git a/include/display.h b/include/display.h index c9645375307..1560e5b91c4 100644 --- a/include/display.h +++ b/include/display.h @@ -22,7 +22,7 @@ typedef struct tagCURSORINFO WORD WINAPI DISPLAY_Inquire(LPCURSORINFO lpCursorInfo); VOID WINAPI DISPLAY_SetCursor( struct tagCURSORICONINFO *lpCursor ); VOID WINAPI DISPLAY_MoveCursor( WORD wAbsX, WORD wAbsY ); -VOID WINAPI DISPLAY_CheckCursor(); +VOID WINAPI DISPLAY_CheckCursor( void ); VOID WINAPI UserRepaintDisable16( BOOL16 bDisable ); #endif /* __WINE_DISPLAY_H */ diff --git a/include/elfdll.h b/include/elfdll.h index 94bfef8fd1e..c546f4efd1b 100644 --- a/include/elfdll.h +++ b/include/elfdll.h @@ -1,6 +1,9 @@ #ifndef __WINE_ELFDLL_H #define __WINE_ELFDLL_H +#include "module.h" +#include "windef.h" + WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR libname, DWORD flags, DWORD *err); HINSTANCE16 ELFDLL_LoadModule16(LPCSTR libname, BOOL implicit); void ELFDLL_UnloadLibrary(WINE_MODREF *wm); diff --git a/include/flatsb.h b/include/flatsb.h index ec4eefc8af3..4a6c61034ff 100644 --- a/include/flatsb.h +++ b/include/flatsb.h @@ -8,6 +8,8 @@ #ifndef __WINE_FLATSB_H #define __WINE_FLATSB_H +#include "windef.h" + typedef struct tagFLATSB_INFO { DWORD dwDummy; /* just to keep the compiler happy ;-) */ diff --git a/include/flatthunk.h b/include/flatthunk.h index 2a8059bce17..31ec12edd12 100644 --- a/include/flatthunk.h +++ b/include/flatthunk.h @@ -7,6 +7,10 @@ #ifndef __WINE_FLATTHUNK_H #define __WINE_FLATTHUNK_H +#include "windef.h" + +struct _PDB; + struct ThunkDataCommon { char magic[4]; /* 00 */ @@ -96,7 +100,7 @@ struct ThunkDataSL struct SLTargetDB { struct SLTargetDB * next; - PDB * process; + struct _PDB * process; DWORD * targetTable; }; diff --git a/include/header.h b/include/header.h index 9d3ada91ec4..ed2da64d054 100644 --- a/include/header.h +++ b/include/header.h @@ -8,6 +8,9 @@ #ifndef __WINE_HEADER_H_ #define __WINE_HEADER_H_ +#include "commctrl.h" +#include "windef.h" + typedef struct { INT cxy; diff --git a/include/hotkey.h b/include/hotkey.h index 46f813c7e04..78904e14d94 100644 --- a/include/hotkey.h +++ b/include/hotkey.h @@ -7,6 +7,8 @@ #ifndef __WINE_HOTKEY_H #define __WINE_HOTKEY_H +#include "windef.h" + typedef struct tagHOTKEY_INFO { HFONT hFont; diff --git a/include/input.h b/include/input.h index 63bf4b2be6f..dcaa44e2cc7 100644 --- a/include/input.h +++ b/include/input.h @@ -7,6 +7,8 @@ #ifndef __WINE_INPUT_H #define __WINE_INPUT_H +#include "windef.h" + extern BOOL MouseButtonsStates[3]; extern BOOL AsyncMouseButtonsStates[3]; extern BYTE InputKeyStateTable[256]; diff --git a/include/ipaddress.h b/include/ipaddress.h index 1d50c6e8010..f2596a8958b 100644 --- a/include/ipaddress.h +++ b/include/ipaddress.h @@ -8,6 +8,8 @@ #ifndef __WINE_IPADDRESS_H #define __WINE_IPADDRESS_H +#include "windef.h" + typedef struct tagIPADDRESS_INFO { BYTE LowerLimit[4]; diff --git a/include/listview.h b/include/listview.h index 44bbe86eda7..96a10788069 100644 --- a/include/listview.h +++ b/include/listview.h @@ -7,6 +7,10 @@ #ifndef __WINE_LISTVIEW_H #define __WINE_LISTVIEW_H +#include "commctrl.h" +#include "windef.h" +#include "wingdi.h" + typedef struct tagLISTVIEW_SUBITEM { LPSTR pszText; diff --git a/include/loadorder.h b/include/loadorder.h index 9b8313389a2..d64dcc81078 100644 --- a/include/loadorder.h +++ b/include/loadorder.h @@ -7,6 +7,8 @@ #ifndef __WINE_LOADORDER_H #define __WINE_LOADORDER_H +#include "windef.h" + #define MODULE_LOADORDER_INVALID 0 /* Must be 0 */ #define MODULE_LOADORDER_DLL 1 /* Native DLLs */ #define MODULE_LOADORDER_ELFDLL 2 /* Elf-dlls */ diff --git a/include/main.h b/include/main.h index 6002a126662..ed84ca782e9 100644 --- a/include/main.h +++ b/include/main.h @@ -5,6 +5,8 @@ #ifndef __WINE_MAIN_H #define __WINE_MAIN_H +#include "windef.h" + extern void MAIN_Usage(char*); extern BOOL MAIN_MainInit(void); extern BOOL MAIN_WineInit( int *argc, char *argv[] ); diff --git a/include/menu.h b/include/menu.h index 6fd9eeb03de..f8c25b6ca5e 100644 --- a/include/menu.h +++ b/include/menu.h @@ -7,6 +7,9 @@ #include "win.h" +LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, + LPARAM lParam ); + extern BOOL MENU_Init(void); extern HMENU MENU_GetSysMenu(HWND hWndOwner, HMENU hSysPopup); extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth, diff --git a/include/monthcal.h b/include/monthcal.h index fbc501a9932..16b9ca2a235 100644 --- a/include/monthcal.h +++ b/include/monthcal.h @@ -7,6 +7,8 @@ #ifndef __WINE_MONTHCAL_H #define __WINE_MONTHCAL_H +#include "windef.h" + typedef struct tagMONTHCAL_INFO { DWORD dwDummy; /* just to keep the compiler happy ;-) */ diff --git a/include/nativefont.h b/include/nativefont.h index 13603f3cf4d..1321d59dbf1 100644 --- a/include/nativefont.h +++ b/include/nativefont.h @@ -7,6 +7,8 @@ #ifndef __WINE_NATIVEFONT_H #define __WINE_NATIVEFONT_H +#include "windef.h" + typedef struct tagNATIVEFONT_INFO { DWORD dwDummy; /* just to keep the compiler happy ;-) */ diff --git a/include/pager.h b/include/pager.h index 993695d1960..0cc90577188 100644 --- a/include/pager.h +++ b/include/pager.h @@ -7,6 +7,8 @@ #ifndef __WINE_PAGER_H #define __WINE_PAGER_H +#include "windef.h" +#include "wingdi.h" typedef struct tagPAGER_INFO { diff --git a/include/progress.h b/include/progress.h index 804541a37ec..fb2a75149fa 100644 --- a/include/progress.h +++ b/include/progress.h @@ -8,6 +8,7 @@ #define __WINE_PROGRESS_H #include "windef.h" +#include "wingdi.h" typedef struct { diff --git a/include/psapi.h b/include/psapi.h index 389bad8eb1f..8fedeb1f399 100644 --- a/include/psapi.h +++ b/include/psapi.h @@ -5,6 +5,8 @@ #ifndef __WINE_PSAPI_H #define __WINE_PSAPI_H +#include "windef.h" + typedef struct _MODULEINFO { LPVOID lpBaseOfDll; DWORD SizeOfImage; diff --git a/include/rebar.h b/include/rebar.h index f704f311414..c060141f23b 100644 --- a/include/rebar.h +++ b/include/rebar.h @@ -7,6 +7,10 @@ #ifndef __WINE_REBAR_H #define __WINE_REBAR_H +#include "commctrl.h" +#include "windef.h" +#include "wingdi.h" + typedef struct tagREBAR_BAND { UINT fStyle; diff --git a/include/resource.h b/include/resource.h index aa52a99fe55..6512265372a 100644 --- a/include/resource.h +++ b/include/resource.h @@ -30,7 +30,7 @@ typedef enum { SYSRES_MENU_SYSMENU, SYSRES_MENU_EDITMENU, - SYSRES_DIALOG_MSGBOX, + SYSRES_DIALOG_MSGBOX } SYSTEM_RESOURCE; extern void LIBRES_RegisterResources(const wrc_resource32_t * const * Res); diff --git a/include/scroll.h b/include/scroll.h index 9c7f88edda3..f8f10b1d37b 100644 --- a/include/scroll.h +++ b/include/scroll.h @@ -10,6 +10,8 @@ #include "windef.h" +struct tagWND; + typedef struct { INT CurVal; /* Current scroll-bar value */ @@ -21,9 +23,13 @@ typedef struct extern LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); + extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior ); extern void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt ); - +extern INT SCROLL_SetNCSbState( struct tagWND *wndPtr, int vMin, int vMax, int vPos, + int hMin, int hMax, int hPos ); #endif /* __WINE_SCROLL_H */ + + diff --git a/include/sig_context.h b/include/sig_context.h index 783ea26a7f6..a851ed10e7e 100644 --- a/include/sig_context.h +++ b/include/sig_context.h @@ -88,7 +88,10 @@ typedef struct sigcontext SIGCONTEXT; #ifdef _SCO_DS #include #endif +/* Solaris kludge */ +#undef ERR #include +#undef ERR typedef struct ucontext SIGCONTEXT; #define __HAVE_SIGCONTEXT diff --git a/include/status.h b/include/status.h index 6afeec18672..f3f20c013db 100644 --- a/include/status.h +++ b/include/status.h @@ -7,6 +7,9 @@ #ifndef __WINE_STATUS_H #define __WINE_STATUS_H +#include "windef.h" +#include "wingdi.h" + typedef struct { INT x; diff --git a/include/syslevel.h b/include/syslevel.h index faeb3ec5306..800a4d273f3 100644 --- a/include/syslevel.h +++ b/include/syslevel.h @@ -20,10 +20,10 @@ extern WORD SYSLEVEL_Win16CurrentTeb; extern WORD SYSLEVEL_EmergencyTeb; void SYSLEVEL_Init(void); -VOID WINAPI SYSLEVEL_EnterWin16Lock(VOID); -VOID WINAPI SYSLEVEL_LeaveWin16Lock(VOID); -VOID SYSLEVEL_ReleaseWin16Lock(VOID); -VOID SYSLEVEL_RestoreWin16Lock(VOID); +VOID WINAPI SYSLEVEL_EnterWin16Lock(void); +VOID WINAPI SYSLEVEL_LeaveWin16Lock(void); +VOID SYSLEVEL_ReleaseWin16Lock(void); +VOID SYSLEVEL_RestoreWin16Lock(void); VOID SYSLEVEL_CheckNotLevel( INT level ); VOID WINAPI GetpWin16Lock(SYSLEVEL **lock); diff --git a/include/tab.h b/include/tab.h index 853f7f6bad1..2adb506aaab 100644 --- a/include/tab.h +++ b/include/tab.h @@ -7,6 +7,9 @@ #ifndef __WINE_TAB_H #define __WINE_TAB_H +#include "commctrl.h" +#include "windef.h" + typedef struct tagTAB_ITEM { UINT mask; diff --git a/include/tlhelp32.h b/include/tlhelp32.h index 7c488d55669..05e6fcb8ed8 100644 --- a/include/tlhelp32.h +++ b/include/tlhelp32.h @@ -23,7 +23,7 @@ extern "C" { #define TH32CS_INHERIT 0x80000000 #ifdef __cplusplus -extern "C" { +} /* extern "C" */ #endif #endif /* __WINE_TLHELP32_H */ diff --git a/include/toolbar.h b/include/toolbar.h index cf8eddd716d..64805b8e08e 100644 --- a/include/toolbar.h +++ b/include/toolbar.h @@ -7,6 +7,8 @@ #ifndef __WINE_TOOLBAR_H #define __WINE_TOOLBAR_H +#include "commctrl.h" +#include "windef.h" typedef struct tagTBUTTON_INFO { diff --git a/include/tooltips.h b/include/tooltips.h index 1249a3067ad..a067a58b30a 100644 --- a/include/tooltips.h +++ b/include/tooltips.h @@ -7,6 +7,9 @@ #ifndef __WINE_TOOLTIPS_H #define __WINE_TOOLTIPS_H +#include "commctrl.h" +#include "windef.h" +#include "wingdi.h" typedef struct tagTT_SUBCLASS_INFO { diff --git a/include/trackbar.h b/include/trackbar.h index 9e1570784c7..0777a2451d0 100644 --- a/include/trackbar.h +++ b/include/trackbar.h @@ -7,6 +7,9 @@ #ifndef __WINE_TRACKBAR_H #define __WINE_TRACKBAR_H +#include "windef.h" +#include "wingdi.h" + typedef struct tagTRACKBAR_INFO { INT nRangeMin; diff --git a/include/win.h b/include/win.h index f17959b29e1..a3b0a00b70a 100644 --- a/include/win.h +++ b/include/win.h @@ -165,9 +165,9 @@ typedef struct /* Window functions */ extern void WIN_Init( void ); -extern void WIN_LockWnds(); -extern void WIN_UnlockWnds(); -extern int WIN_SuspendWndsLock(); +extern void WIN_LockWnds( void ); +extern void WIN_UnlockWnds( void ); +extern int WIN_SuspendWndsLock( void ); extern void WIN_RestoreWndsLock(int ipreviousLock); extern WND* WIN_FindWndPtr( HWND hwnd ); extern WND* WIN_LockWndPtr(WND *wndPtr); @@ -207,10 +207,19 @@ extern BOOL WIDGETS_Init( void ); extern BOOL WIDGETS_IsControl( WND* pWnd, BUILTIN_CLASS32 cls ); /* controls/icontitle.c */ +extern LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + extern HWND ICONTITLE_Create( WND* ); extern BOOL ICONTITLE_Init( void ); /* windows/focus.c */ extern void FOCUS_SwitchFocus( MESSAGEQUEUE *pMsgQ, HWND , HWND ); +/* windows/edit.c */ +extern LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); + +/* windows/listbox.c */ +extern LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +extern LRESULT WINAPI ComboLBWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); + #endif /* __WINE_WIN_H */ diff --git a/include/winbase.h b/include/winbase.h index 2cd5b5048a1..a71aebee321 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1142,7 +1142,8 @@ BOOL WINAPI SetCommTimeouts(INT,LPCOMMTIMEOUTS); BOOL WINAPI GetCommState(INT,LPDCB); BOOL WINAPI SetCommState(INT,LPDCB); BOOL WINAPI TransmitCommChar(INT,CHAR); - +BOOL WINAPI SetupComm(HANDLE, DWORD, DWORD); +BOOL WINAPI GetCommProperties(HANDLE, LPDCB *); /*DWORD WINAPI GetVersion( void );*/ BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16*); @@ -1158,7 +1159,6 @@ BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit); void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit); void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit); void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit); -HANDLE WINAPI OpenProcess(DWORD access, BOOL inherit, DWORD id); BOOL WINAPI GetProcessWorkingSetSize(HANDLE,LPDWORD,LPDWORD); DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR); void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD); @@ -1504,6 +1504,7 @@ BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES); BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES); BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES); #define CreateDirectoryEx WINELIB_NAME_AW(CreateDirectoryEx) +BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR); #define DefineHandleTable(w) ((w),TRUE) ATOM WINAPI DeleteAtom(ATOM); BOOL WINAPI DeleteFileA(LPCSTR); diff --git a/include/wincrypt.h b/include/wincrypt.h index 16b47c65c06..34fbae50afa 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -1,6 +1,8 @@ #ifndef __WINE_WINCRYPT_H #define __WINE_WINCRYPT_H +#include "windef.h" + /* FIXME: this whole file plus the implementation */ /* some typedefs for function parameters */ diff --git a/include/windows.h b/include/windows.h index 72e111b1213..956058d0e7b 100644 --- a/include/windows.h +++ b/include/windows.h @@ -32,8 +32,6 @@ typedef KANJISTRUCT *PKANJISTRUCT; BOOL16 WINAPI CheckMenuRadioButton16(HMENU16,UINT16,UINT16,UINT16,BOOL16); BOOL WINAPI CheckMenuRadioButton(HMENU,UINT,UINT,UINT,BOOL); WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE); -BOOL16 WINAPI GetPrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR); -INT16 WINAPI GetPrivateProfileSection16(LPCSTR,LPSTR,UINT16,LPCSTR); #endif /* 0 */ diff --git a/include/wine/obj_base.h b/include/wine/obj_base.h index d09a0d18af3..0f4f72c5401 100644 --- a/include/wine/obj_base.h +++ b/include/wine/obj_base.h @@ -66,15 +66,15 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax); BOOL16 WINAPI IsEqualGUID16(GUID* g1,GUID* g2); BOOL WINAPI IsEqualGUID32(REFGUID rguid1,REFGUID rguid2); /*#define IsEqualGUID WINELIB_NAME(IsEqualGUID)*/ -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CINTERFACE) #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID))) -#else +#else /* defined(__cplusplus) && !defined(CINTERFACE) */ #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID))) -#endif /* cplusplus */ +#endif /* defined(__cplusplus) && !defined(CINTERFACE) */ #define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2) #define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2) -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(CINTERFACE) inline BOOL operator==(const GUID& guidOne, const GUID& guidOther) { return !memcmp(&guidOne,&guidOther,sizeof(GUID)); diff --git a/include/wine/obj_oleaut.h b/include/wine/obj_oleaut.h index 9b32c393f2a..1bde283c682 100644 --- a/include/wine/obj_oleaut.h +++ b/include/wine/obj_oleaut.h @@ -61,11 +61,11 @@ typedef struct ISupportErrorInfo ISupportErrorInfo,*LPSUPPORTERRORINFO; /***************************************************************************** * Automation data types */ -#ifdef __cplusplus -#define DUMMY_UNION_NAME -#else -#define DUMMY_UNION_NAME u -#endif +#if defined(__cplusplus) && !defined(NONAMELESSUNION) +#define DUMMYUNIONNAME +#else /* defined(__cplusplus) && !defined(NONAMELESSUNION) */ +#define DUMMYUNIONNAME u +#endif /* defined(__cplusplus) && !defined(NONAMELESSUNION) */ /***************************************************************** * SafeArray defines and structs @@ -132,7 +132,7 @@ struct tagVARIANT { WORD wReserved1; WORD wReserved2; WORD wReserved3; - union /*DUMMY_UNION_NAME*/ + union /* DUMMYUNIONNAME */ { /* By value. */ CHAR cVal; @@ -177,7 +177,7 @@ struct tagVARIANT { IUnknown** ppunkVal; IDispatch** ppdispVal; SAFEARRAY** pparray; - } DUMMY_UNION_NAME; + } DUMMYUNIONNAME; }; @@ -260,7 +260,7 @@ typedef struct tagTYPEDESC struct tagTYPEDESC *lptdesc; struct tagARRAYDESC *lpadesc; HREFTYPE hreftype; - } DUMMY_UNION_NAME; + } DUMMYUNIONNAME; VARTYPE vt; } TYPEDESC; @@ -270,7 +270,7 @@ typedef struct tagELEMDESC union { IDLDESC idldesc; PARAMDESC paramdesc; - } DUMMY_UNION_NAME; + } DUMMYUNIONNAME; } ELEMDESC, *LPELEMDESC; typedef enum tagTYPEKIND @@ -363,7 +363,7 @@ typedef struct tagVARDESC union { ULONG oInst; VARIANT *lpvarValue; - } DUMMY_UNION_NAME; + } DUMMYUNIONNAME; ELEMDESC elemdescVar; WORD wVarFlags; VARKIND varkind; diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index 00037eb2f35..ad37c023070 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -102,7 +102,7 @@ WORD WINAPI SetSelectorLimit16(WORD,DWORD); HQUEUE16 WINAPI SetTaskQueue16(HTASK16,HQUEUE16); VOID WINAPI SwitchStackTo16(WORD,WORD,WORD); BOOL16 WINAPI WaitEvent16(HTASK16); -VOID WINAPI WriteOutProfiles16(VOID); +VOID WINAPI WriteOutProfiles16(void); VOID WINAPI hmemcpy16(LPVOID,LPCVOID,LONG); #endif /* __WINE__ */ @@ -128,10 +128,14 @@ DWORD WINAPI GetFileAttributes16(LPCSTR); DWORD WINAPI GetFreeSpace16(UINT16); INT16 WINAPI GetModuleFileName16(HINSTANCE16,LPSTR,INT16); UINT16 WINAPI GetPrivateProfileInt16(LPCSTR,LPCSTR,INT16,LPCSTR); +INT16 WINAPI GetPrivateProfileSection16(LPCSTR,LPSTR,UINT16,LPCSTR); WORD WINAPI GetPrivateProfileSectionNames16(LPSTR,UINT16,LPCSTR); INT16 WINAPI GetPrivateProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16,LPCSTR); +BOOL16 WINAPI GetPrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR); FARPROC16 WINAPI GetProcAddress16(HMODULE16,SEGPTR); UINT16 WINAPI GetProfileInt16(LPCSTR,LPCSTR,INT16); +INT16 WINAPI GetProfileSection16(LPCSTR,LPSTR,UINT16); +WORD WINAPI GetProfileSectionNames16(LPSTR,WORD); INT16 WINAPI GetProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16); UINT16 WINAPI GetSystemDirectory16(LPSTR,UINT16); UINT16 WINAPI GetTempFileName16(BYTE,LPCSTR,UINT16,LPSTR); @@ -199,6 +203,7 @@ UINT16 WINAPI _lread16(HFILE16,LPVOID,UINT16); UINT16 WINAPI _lwrite16(HFILE16,LPCSTR,UINT16); BOOL16 WINAPI WritePrivateProfileSection16(LPCSTR,LPCSTR,LPCSTR); BOOL16 WINAPI WritePrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR); +BOOL16 WINAPI WriteProfileSection16(LPCSTR,LPCSTR); DWORD WINAPI GetSelectorBase(WORD); WORD WINAPI SetSelectorBase(WORD,DWORD); diff --git a/include/wine/winuser16.h b/include/wine/winuser16.h index 0eddbb2fac7..abf25fcb6dc 100644 --- a/include/wine/winuser16.h +++ b/include/wine/winuser16.h @@ -750,6 +750,7 @@ INT16 WINAPI GetKeyboardLayoutName16(LPSTR); INT16 WINAPI GetKeyState16(INT16); HWND16 WINAPI GetLastActivePopup16(HWND16); HMENU16 WINAPI GetMenu16(HWND16); +DWORD WINAPI GetMenuContextHelpId16(HMENU16); INT16 WINAPI GetMenuItemCount16(HMENU16); UINT16 WINAPI GetMenuItemID16(HMENU16,INT16); BOOL16 WINAPI GetMenuItemRect16(HWND16,HMENU16,UINT16,LPRECT16); diff --git a/include/winsock.h b/include/winsock.h index d5cc614e6bc..ca4f9b6de3a 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -7,7 +7,15 @@ #ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ +/* Solaris kludge */ +#undef FSHIFT +#undef PAGESIZE +#undef TRANSPARENT #include +#undef FSHIFT +#undef PAGESIZE +#undef TRANSPARENT + #include #include #include diff --git a/include/winuser.h b/include/winuser.h index 88d9f85373c..0af79afd4b1 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -2914,8 +2914,10 @@ typedef struct #define AnsiToOemBuffA CharToOemBuffA #define AnsiToOemBuffW CharToOemBuffW #define AnsiToOemBuff WINELIB_NAME_AW(AnsiToOemBuff) -WORD WINAPI CascadeWindows (HWND, UINT, const LPRECT, - UINT, const HWND *); + +HKL WINAPI ActivateKeyboardLayout(HKL,UINT); +LONG WINAPI BroadcastSystemMessage(DWORD,LPDWORD,UINT,WPARAM,LPARAM); +WORD WINAPI CascadeWindows(HWND, UINT, const LPRECT, UINT, const HWND *); INT WINAPI CopyAcceleratorTableA(HACCEL,LPACCEL,INT); INT WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,INT); #define CopyAcceleratorTable WINELIB_NAME_AW(CopyAcceleratorTable) @@ -2928,7 +2930,9 @@ INT WINAPI EnumPropsExW(HWND,PROPENUMPROCEXW,LPARAM); BOOL WINAPI EnumThreadWindows(DWORD,WNDENUMPROC,LPARAM); BOOL WINAPI ExitWindowsEx(UINT,DWORD); BOOL WINAPI GetIconInfo(HICON,LPICONINFO); -DWORD WINAPI GetMenuContextHelpId(HMENU); +HKL WINAPI GetKeyboardLayout(DWORD); +INT WINAPI GetKeyboardLayoutList(INT,HKL *); +DWORD WINAPI GetMenuContextHelpId(HMENU); UINT WINAPI GetMenuDefaultItem(HMENU,UINT,UINT); BOOL WINAPI GetMenuInfo(HMENU,LPMENUINFO); BOOL WINAPI GetMenuItemInfoA(HMENU,UINT,BOOL,MENUITEMINFOA*); @@ -2957,7 +2961,11 @@ BOOL WINAPI PaintDesktop(HDC); BOOL WINAPI PostThreadMessageA(DWORD, UINT, WPARAM, LPARAM); BOOL WINAPI PostThreadMessageW(DWORD, UINT, WPARAM, LPARAM); #define PostThreadMessage WINELIB_NAME_AW(PostThreadMessage) +BOOL WINAPI RegisterHotKey(HWND,INT,UINT,UINT); UINT WINAPI ReuseDDElParam(UINT,UINT,UINT,UINT,UINT); +BOOL WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,FARPROC,DWORD); +BOOL WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,FARPROC,DWORD); +#define SendMessageCallback WINELIB_NAME_AW(SendMessageCallback) BOOL WINAPI SendNotifyMessageA(HWND,UINT,WPARAM,LPARAM); BOOL WINAPI SendNotifyMessageW(HWND,UINT,WPARAM,LPARAM); #define SendNotifyMessage WINELIB_NAME_AW(SendNotifyMessage) @@ -2971,9 +2979,11 @@ BOOL WINAPI SetMenuItemInfoW(HMENU,UINT,BOOL,const MENUITEMINFOW*); BOOL WINAPI SetWindowContextHelpId(HWND,DWORD); WORD WINAPI TileWindows (HWND, UINT, const LPRECT, UINT, const HWND *); +INT WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT); BOOL WINAPI TrackPopupMenuEx(HMENU,UINT,INT,INT,HWND, LPTPMPARAMS); UINT WINAPI UnpackDDElParam(UINT,UINT,UINT*,UINT*); +BOOL WINAPI UnregisterHotKey(HWND,INT); DWORD WINAPI WaitForInputIdle(HANDLE,DWORD); VOID WINAPI keybd_event(BYTE,BYTE,DWORD,DWORD); VOID WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,DWORD); diff --git a/include/winversion.h b/include/winversion.h index e3fb5c87906..b371dcad2dd 100644 --- a/include/winversion.h +++ b/include/winversion.h @@ -1,6 +1,8 @@ #ifndef __WINE_WINVERSION_H #define __WINE_WINVERSION_H +#include "windef.h" + typedef enum { WIN31, /* Windows 3.1 */ diff --git a/include/wnet.h b/include/wnet.h index 3729642a508..b7d7fedf2f1 100644 --- a/include/wnet.h +++ b/include/wnet.h @@ -5,6 +5,7 @@ #ifndef __WINE_WNET_H #define __WINE_WNET_H +#include "windef.h" #include "winerror.h" #define WNDN_MKDIR 1 diff --git a/loader/task.c b/loader/task.c index eba0b72ff47..0cfc833f243 100644 --- a/loader/task.c +++ b/loader/task.c @@ -599,8 +599,8 @@ void TASK_Reschedule(void) /* Check what we need to do */ hOldTask = GetCurrentTask(); pOldTask = (TDB *)GlobalLock16( hOldTask ); - TRACE_(task)( "entered with hCurrentTask %04x by hTask %04x (pid %d)\n", - hCurrentTask, hOldTask, getpid() ); + TRACE_(task)( "entered with hCurrentTask %04x by hTask %04x (pid %ld)\n", + hCurrentTask, hOldTask, (long) getpid() ); if ( pOldTask && THREAD_IsWin16( NtCurrentTeb() ) ) { diff --git a/memory/atom.c b/memory/atom.c index c317449de16..aab4592f036 100644 --- a/memory/atom.c +++ b/memory/atom.c @@ -19,6 +19,7 @@ #include "wine/winbase16.h" #include "wine/winuser16.h" #include "winuser.h" +#include "global.h" #include "instance.h" #include "ldt.h" #include "stackframe.h" diff --git a/memory/ldt.c b/memory/ldt.c index a2f4fe14468..aa0ee3b526d 100644 --- a/memory/ldt.c +++ b/memory/ldt.c @@ -61,6 +61,7 @@ static inline int modify_ldt( int func, struct modify_ldt_s *ptr, #if defined(__svr4__) || defined(_SCO_DS) #include +extern int sysi86(int,void*); #ifndef __sun__ #include #endif diff --git a/memory/selector.c b/memory/selector.c index d2cf90966f3..1a2891ce6f0 100644 --- a/memory/selector.c +++ b/memory/selector.c @@ -12,6 +12,7 @@ #include "stackframe.h" #include "process.h" #include "debugtools.h" +#include "toolhelp.h" DEFAULT_DEBUG_CHANNEL(selector) diff --git a/memory/string.c b/memory/string.c index 4e480d900d8..ddbb6c34062 100644 --- a/memory/string.c +++ b/memory/string.c @@ -9,6 +9,7 @@ #include #include "wine/winbase16.h" +#include "wine/winuser16.h" #include "winbase.h" #include "winuser.h" #include "wine/keyboard16.h" diff --git a/misc/comm.c b/misc/comm.c index b8cee05d7f9..73b67db0723 100644 --- a/misc/comm.c +++ b/misc/comm.c @@ -145,21 +145,7 @@ void COMM_Init(void) } -struct DosDeviceStruct *GetDeviceStruct_fd(int fd) -{ - int x; - - for (x=0; x!=MAX_PORTS; x++) { - if (COM[x].fd == fd) - return &COM[x]; - if (LPT[x].fd == fd) - return &LPT[x]; - } - - return NULL; -} - -struct DosDeviceStruct *GetDeviceStruct(int fd) +static struct DosDeviceStruct *GetDeviceStruct(int fd) { if ((fd&0x7F)<=MAX_PORTS) { if (!(fd&FLAG_LPT)) { @@ -174,7 +160,7 @@ struct DosDeviceStruct *GetDeviceStruct(int fd) return NULL; } -int GetCommPort_fd(int fd) +static int GetCommPort_fd(int fd) { int x; @@ -186,17 +172,17 @@ int GetCommPort_fd(int fd) return -1; } -int ValidCOMPort(int x) +static int ValidCOMPort(int x) { return(x < MAX_PORTS ? (int) COM[x].devicename : 0); } -int ValidLPTPort(int x) +static int ValidLPTPort(int x) { return(x < MAX_PORTS ? (int) LPT[x].devicename : 0); } -int WinError(void) +static int WinError(void) { TRACE(comm, "errno = %d\n", errno); switch (errno) { diff --git a/misc/cpu.c b/misc/cpu.c index 8a07175a429..8ad04bbbb40 100644 --- a/misc/cpu.c +++ b/misc/cpu.c @@ -46,7 +46,6 @@ VOID WINAPI GetSystemInfo( static int cache = 0; static SYSTEM_INFO cachedsi; HKEY xhkey=0,hkey; - char buf[20]; if (cache) { memcpy(si,&cachedsi,sizeof(*si)); @@ -82,6 +81,7 @@ VOID WINAPI GetSystemInfo( #ifdef linux { + char buf[20]; char line[200]; FILE *f = fopen ("/proc/cpuinfo", "r"); diff --git a/misc/lstr.c b/misc/lstr.c index 9e9a1cc202c..8054ccafe9b 100644 --- a/misc/lstr.c +++ b/misc/lstr.c @@ -21,10 +21,10 @@ # define iswlower(c) islower(c) #endif /* HAVE_WCTYPE_H */ - +#include "wine/winbase16.h" +#include "wine/winuser16.h" #include "winbase.h" #include "winuser.h" -#include "wine/winbase16.h" #include "winnls.h" #include "task.h" #include "heap.h" diff --git a/misc/port.c b/misc/port.c index 7f99f643e8a..9d0a0aa5ccc 100644 --- a/misc/port.c +++ b/misc/port.c @@ -5,8 +5,10 @@ */ #include "config.h" + #include #include +#include #include #include #include diff --git a/misc/registry.c b/misc/registry.c index 833c7079a91..412b3bc294d 100644 --- a/misc/registry.c +++ b/misc/registry.c @@ -729,7 +729,7 @@ void SHELL_SaveRegistry( void ) if (!(home = getenv( "HOME" ))) { - WARN_(reg)("Failed to get homedirectory of UID %d.\n",getuid()); + WARN_(reg)("Failed to get homedirectory of UID %ld.\n",(long) getuid()); return; } /* @@ -1964,7 +1964,7 @@ void SHELL_LoadRegistry( void ) } else { - WARN_(reg)("Failed to get homedirectory of UID %d.\n",getuid()); + WARN_(reg)("Failed to get homedirectory of UID %ld.\n",(long) getuid()); } /* diff --git a/misc/winsock.c b/misc/winsock.c index 70d800ebc01..6aff24ab9da 100644 --- a/misc/winsock.c +++ b/misc/winsock.c @@ -251,7 +251,7 @@ inline static int sock_error_p(int s) unsigned int optval, optlen; optlen = sizeof(optval); - getsockopt(s, SOL_SOCKET, SO_ERROR, &optval, &optlen); + getsockopt(s, SOL_SOCKET, SO_ERROR, (void *) &optval, &optlen); if (optval) WARN(winsock, "\t[%i] error: %d\n", s, optval); return optval != 0; } @@ -2336,7 +2336,7 @@ INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, UINT lEvent) pws->psop = psop; pws->flags |= (0x0000FFFF & lEvent); - getsockopt(pws->fd, SOL_SOCKET, SO_TYPE, &sock_type, &bytes); + getsockopt(pws->fd, SOL_SOCKET, SO_TYPE, (void *) &sock_type, &bytes); if( sock_type == SOCK_RAW ) pws->flags |= WS_FD_RAW; if( lEvent & (WS_FD_ACCEPT | WS_FD_CONNECT | WS_FD_READ | WS_FD_CLOSE) ) diff --git a/msdos/dpmi.c b/msdos/dpmi.c index 1ce03a8e0b9..83eea74b3cf 100644 --- a/msdos/dpmi.c +++ b/msdos/dpmi.c @@ -336,7 +336,7 @@ callrmproc_again: SP_reg(context) -= (args + (iret?1:0)) * sizeof(WORD); #else if (!already) { - stack16 = CURRENT_STACK16; + stack16 = (LPWORD) CURRENT_STACK16; #endif stack16 -= args; if (args) memcpy(stack16, stack, args*sizeof(WORD) ); @@ -387,7 +387,7 @@ callrmproc_again: CS_reg(context) = HIWORD(seg_addr); IP_reg(context) = LOWORD(seg_addr); - EBP_reg(context) = OFFSETOF( thdb->cur_stack ) + EBP_reg(context) = OFFSETOF( NtCurrentTeb()->cur_stack ) + (WORD)&((STACK16FRAME*)0)->bp; Callbacks->CallRegisterShortProc(context, args*sizeof(WORD)); SELECTOR_FreeBlock(sel, 1); diff --git a/msdos/int2f.c b/msdos/int2f.c index 0b63071eeda..add9ced8bc9 100644 --- a/msdos/int2f.c +++ b/msdos/int2f.c @@ -120,10 +120,11 @@ void WINAPI INT_Int2fHandler( CONTEXT *context ) break; case 0x10: /* XMS v2+ get driver address */ { +#ifdef MZ_SUPPORTED TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() ); NE_MODULE *pModule = pTask ? NE_GetPtr( pTask->hModule ) : NULL; GlobalUnlock16( GetCurrentTask() ); -#ifdef MZ_SUPPORTED + if (pModule && pModule->lpDosTask) ES_reg(context) = pModule->lpDosTask->xms_seg; else @@ -359,11 +360,14 @@ static void do_int2f_16( CONTEXT *context ) if (ISV86(context)) break; /* so bail out for now if in v86 mode */ #endif { + SYSTEM_INFO si; +#ifdef MZ_SUPPORTED TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() ); NE_MODULE *pModule = pTask ? NE_GetPtr( pTask->hModule ) : NULL; - SYSTEM_INFO si; GlobalUnlock16( GetCurrentTask() ); +#endif + GetSystemInfo(&si); AX_reg(context) = 0x0000; /* DPMI Installed */ BX_reg(context) = 0x0001; /* 32bits available */ diff --git a/ole/ole2.c b/ole/ole2.c index 975e8b43b95..7ca01b66cb4 100644 --- a/ole/ole2.c +++ b/ole/ole2.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include "winuser.h" #include "winerror.h" diff --git a/ole/parsedt.c b/ole/parsedt.c index 963588ff342..3d4228733f5 100644 --- a/ole/parsedt.c +++ b/ole/parsedt.c @@ -42,7 +42,6 @@ PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. #include #include #include -#include #include #include diff --git a/relay32/utthunk.c b/relay32/utthunk.c index 4a94ce57ded..9460e2d437b 100644 --- a/relay32/utthunk.c +++ b/relay32/utthunk.c @@ -85,8 +85,8 @@ DWORD WINAPI UTGlue16( LPVOID lpBuff, DWORD dwUserDefined, SEGPTR translationLis /**************************************************************************** * UTGlue32 */ -DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefined, - LPVOID translationList[] ) +static DWORD WINAPI UTGlue32( FARPROC16 target, LPVOID lpBuff, DWORD dwUserDefined, + LPVOID translationList[] ) { SEGPTR segBuff, *segptrList = NULL; INT i, nList = 0; diff --git a/scheduler/client.c b/scheduler/client.c index bc62f539de1..1d430156bd0 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -104,7 +104,7 @@ static void send_request_fd( enum request req, int fd ) struct msghdr msghdr; struct iovec vec; - vec.iov_base = &req; + vec.iov_base = (void *)&req; vec.iov_len = sizeof(req); msghdr.msg_name = NULL; @@ -194,7 +194,7 @@ static unsigned int wait_reply_fd( int *fd ) msghdr.msg_namelen = 0; msghdr.msg_iov = &vec; msghdr.msg_iovlen = 1; - vec.iov_base = &res; + vec.iov_base = (void *)&res; vec.iov_len = sizeof(res); for (;;) diff --git a/scheduler/syslevel.c b/scheduler/syslevel.c index 6c69ecc1b9b..37c33258a98 100644 --- a/scheduler/syslevel.c +++ b/scheduler/syslevel.c @@ -73,8 +73,8 @@ VOID WINAPI _EnterSysLevel(SYSLEVEL *lock) TEB *teb = NtCurrentTeb(); int i; - TRACE("(%p, level %d): thread %p (fs %04x, pid %d) count before %ld\n", - lock, lock->level, teb->tid, teb->teb_sel, getpid(), + TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n", + lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), teb->sys_count[lock->level] ); for ( i = 3; i > lock->level; i-- ) @@ -89,8 +89,8 @@ VOID WINAPI _EnterSysLevel(SYSLEVEL *lock) teb->sys_count[lock->level]++; teb->sys_mutex[lock->level] = lock; - TRACE("(%p, level %d): thread %p (fs %04x, pid %d) count after %ld\n", - lock, lock->level, teb->tid, teb->teb_sel, getpid(), + TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count after %ld\n", + lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), teb->sys_count[lock->level] ); if (lock == &Win16Mutex) @@ -104,8 +104,8 @@ VOID WINAPI _LeaveSysLevel(SYSLEVEL *lock) { TEB *teb = NtCurrentTeb(); - TRACE("(%p, level %d): thread %p (fs %04x, pid %d) count before %ld\n", - lock, lock->level, teb->tid, teb->teb_sel, getpid(), + TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count before %ld\n", + lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), teb->sys_count[lock->level] ); if ( teb->sys_count[lock->level] <= 0 || teb->sys_mutex[lock->level] != lock ) @@ -122,8 +122,8 @@ VOID WINAPI _LeaveSysLevel(SYSLEVEL *lock) LeaveCriticalSection( &lock->crst ); - TRACE("(%p, level %d): thread %p (fs %04x, pid %d) count after %ld\n", - lock, lock->level, teb->tid, teb->teb_sel, getpid(), + TRACE("(%p, level %d): thread %p (fs %04x, pid %ld) count after %ld\n", + lock, lock->level, teb->tid, teb->teb_sel, (long) getpid(), teb->sys_count[lock->level] ); } diff --git a/server/main.c b/server/main.c index ac0c308563c..0275b6d76b8 100644 --- a/server/main.c +++ b/server/main.c @@ -25,9 +25,9 @@ int main( int argc, char *argv[] ) debug_level = 1; - if (debug_level) fprintf( stderr, "Server: starting (pid=%d)\n", getpid() ); + if (debug_level) fprintf( stderr, "Server: starting (pid=%ld)\n", (long) getpid() ); create_initial_thread( fd ); - if (debug_level) fprintf( stderr, "Server: exiting (pid=%d)\n", getpid() ); + if (debug_level) fprintf( stderr, "Server: exiting (pid=%ld)\n", (long) getpid() ); #ifdef DEBUG_OBJECTS dump_objects(); /* dump any remaining objects */ diff --git a/server/socket.c b/server/socket.c index 5628c1e5529..9571f73136a 100644 --- a/server/socket.c +++ b/server/socket.c @@ -73,7 +73,7 @@ static int do_write( struct client *client ) cmsg.fd = client->pass_fd; #endif /* HAVE_MSGHDR_ACCRIGHTS */ - iovec.iov_base = (char *)&client->res; + iovec.iov_base = (void *)&client->res; iovec.iov_len = sizeof(client->res); ret = sendmsg( client->select.fd, &msghdr, 0 ); @@ -113,7 +113,7 @@ static void do_read( struct client *client ) assert( client->pass_fd == -1 ); - iovec.iov_base = &req; + iovec.iov_base = (void *)&req; iovec.iov_len = sizeof(req); ret = recvmsg( client->select.fd, &msghdr, 0 ); diff --git a/tools/build.c b/tools/build.c index 4f496390745..9a92b88b0d6 100644 --- a/tools/build.c +++ b/tools/build.c @@ -2730,7 +2730,9 @@ static int BuildSpec( FILE *outfile, int argc, char *argv[] ) static int BuildCallFrom16( FILE *outfile, char * outname, int argc, char *argv[] ) { int i; +#ifdef USE_STABS char buffer[1024]; +#endif /* File header */ @@ -2884,7 +2886,9 @@ static int BuildCallTo16( FILE *outfile, char * outname, int argc, char *argv[] */ static int BuildCall32( FILE *outfile, char * outname ) { +#ifdef USE_STABS char buffer[1024]; +#endif /* File header */ diff --git a/windows/caret.c b/windows/caret.c index 35b12451018..90fa95062a2 100644 --- a/windows/caret.c +++ b/windows/caret.c @@ -5,10 +5,12 @@ * Copyright 1996 Frans van Dorsselaer */ -#include "winuser.h" -#include "module.h" -#include "debug.h" #include "wine/wingdi16.h" +#include "wine/winuser16.h" +#include "module.h" +#include "win.h" +#include "winuser.h" +#include "debug.h" DEFAULT_DEBUG_CHANNEL(caret) diff --git a/windows/display.c b/windows/display.c index ce3a09fde60..a86403208d4 100644 --- a/windows/display.c +++ b/windows/display.c @@ -44,7 +44,7 @@ VOID WINAPI DISPLAY_MoveCursor( WORD wAbsX, WORD wAbsY ) /*********************************************************************** * DISPLAY_CheckCursor (DISPLAY.104) */ -VOID WINAPI DISPLAY_CheckCursor() +VOID WINAPI DISPLAY_CheckCursor( void ) { TRACE( cursor, "stub\n" ); } diff --git a/windows/driver.c b/windows/driver.c index 41dfba88805..e9f7d0610d6 100644 --- a/windows/driver.c +++ b/windows/driver.c @@ -132,7 +132,7 @@ int DRIVER_GetType(HDRVR hDrvr) * -1 : ko, unknown message * -2 : ko, memory problem */ -int DRIVER_MapMsg16To32(WORD wMsg, DWORD* lParam1, DWORD* lParam2) +static int DRIVER_MapMsg16To32(WORD wMsg, DWORD* lParam1, DWORD* lParam2) { int ret = -1; @@ -217,7 +217,7 @@ int DRIVER_MapMsg16To32(WORD wMsg, DWORD* lParam1, DWORD* lParam2) * -1 : ko * -2 : ko, memory problem */ -int DRIVER_UnMapMsg16To32(WORD wMsg, DWORD lParam1, DWORD lParam2) +static int DRIVER_UnMapMsg16To32(WORD wMsg, DWORD lParam1, DWORD lParam2) { int ret = -1; @@ -284,7 +284,7 @@ int DRIVER_UnMapMsg16To32(WORD wMsg, DWORD lParam1, DWORD lParam2) * -1 : ko, unknown message * -2 : ko, memory problem */ -int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2) +static int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2) { int ret = -1; @@ -393,7 +393,7 @@ int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2) * -1 : ko * -2 : ko, memory problem */ -int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2) +static int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2) { int ret = -1; diff --git a/windows/mdi.c b/windows/mdi.c index dc603bc5f41..d3fae2db606 100644 --- a/windows/mdi.c +++ b/windows/mdi.c @@ -23,6 +23,7 @@ #include "user.h" #include "menu.h" #include "resource.h" +#include "scroll.h" #include "struct32.h" #include "tweak.h" #include "debug.h" @@ -34,8 +35,6 @@ DEFAULT_DEBUG_CHANNEL(mdi) static HBITMAP16 hBmpClose = 0; static HBITMAP16 hBmpRestore = 0; -INT SCROLL_SetNCSbState(WND*,int,int,int,int,int,int); - /* ----------------- declarations ----------------- */ static void MDI_UpdateFrameText(WND *, HWND, BOOL, LPCSTR); static BOOL MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND); diff --git a/windows/message.c b/windows/message.c index 6ca48dd6a51..c9560439828 100644 --- a/windows/message.c +++ b/windows/message.c @@ -49,7 +49,7 @@ static UINT doubleClickSpeed = 452; /*********************************************************************** * MSG_CheckFilter */ -BOOL MSG_CheckFilter(DWORD uMsg, DWORD first, DWORD last) +static BOOL MSG_CheckFilter(DWORD uMsg, DWORD first, DWORD last) { if( first || last ) return (uMsg >= first && uMsg <= last); @@ -1553,7 +1553,7 @@ static void MSG_CallWndProcHook( LPMSG pmsg, BOOL bUnicode ) * return values: 0 if timeout occurs * 1 otherwise */ -LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam, +static LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, DWORD timeout, WORD flags, LRESULT *pRes) { diff --git a/windows/msgbox.c b/windows/msgbox.c index 21a9207819a..ec5ff2b4417 100644 --- a/windows/msgbox.c +++ b/windows/msgbox.c @@ -5,6 +5,8 @@ */ #include + +#include "wine/winbase16.h" #include "wine/winuser16.h" #include "dlgs.h" #include "heap.h" diff --git a/windows/multimon.c b/windows/multimon.c index 5dc3987a810..e8b407a6939 100644 --- a/windows/multimon.c +++ b/windows/multimon.c @@ -21,7 +21,7 @@ MONITOR MONITOR_PrimaryMonitor; /*********************************************************************** * MONITOR_GetMonitor */ -MONITOR *MONITOR_GetMonitor(HMONITOR hMonitor) +static MONITOR *MONITOR_GetMonitor(HMONITOR hMonitor) { if(hMonitor == xPRIMARY_MONITOR) { diff --git a/windows/nonclient.c b/windows/nonclient.c index 16015e5c006..f382f04d20d 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c @@ -636,7 +636,7 @@ END: * Handle a WM_NCHITTEST message. Called from NC_HandleNcHitTest(). */ -LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt ) +static LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt ) { RECT16 rect; @@ -771,7 +771,7 @@ LONG NC_DoNCHitTest (WND *wndPtr, POINT16 pt ) * FIXME: Just a modified copy of the Win 3.1 version. */ -LONG +static LONG NC_DoNCHitTest95 (WND *wndPtr, POINT16 pt ) { RECT16 rect; @@ -1070,7 +1070,7 @@ NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down) * *****************************************************************************/ -void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down) +static void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down) { RECT rect; HDC hdcMem; @@ -1556,7 +1556,7 @@ static void NC_DrawCaption95( * * Paint the non-client area. clip is currently unused. */ -void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint ) +static void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint ) { HDC hdc; RECT rect; @@ -1667,7 +1667,7 @@ void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint ) * *****************************************************************************/ -void NC_DoNCPaint95( +static void NC_DoNCPaint95( WND *wndPtr, HRGN clip, BOOL suppress_menupaint ) diff --git a/windows/painting.c b/windows/painting.c index db20ef5caa9..25d146fb234 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -380,10 +380,14 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags ) */ BOOL bHadOne = wndPtr->hrgnUpdate && hRgn; - RECT r = {0, 0, wndPtr->rectWindow.right - wndPtr->rectWindow.left, - wndPtr->rectWindow.bottom - wndPtr->rectWindow.top }; BOOL bChildren = ( wndPtr->child && !(flags & RDW_NOCHILDREN) && !(wndPtr->dwStyle & WS_MINIMIZE) && ((flags & RDW_ALLCHILDREN) || !(wndPtr->dwStyle & WS_CLIPCHILDREN)) ); + RECT r; + + r.left = 0; + r.top = 0; + r.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left; + r.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top; TRACE_(win)("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", wndPtr->hwndSelf, wndPtr->hrgnUpdate, hRgn, flags ); @@ -411,8 +415,8 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags ) } } break; - case 1: /* already an entire window */ + break; } } else if( hRgn == 1 ) @@ -474,9 +478,11 @@ EMPTY: if( hRgn > 1 && bChildren ) { WND* wnd = wndPtr->child; - POINT ptClient = { wndPtr->rectClient.left - wndPtr->rectWindow.left, - wndPtr->rectClient.top - wndPtr->rectWindow.top }; POINT ptTotal, prevOrigin = {0,0}; + POINT ptClient; + + ptClient.x = wndPtr->rectClient.left - wndPtr->rectWindow.left; + ptClient.y = wndPtr->rectClient.top - wndPtr->rectWindow.top; for( ptTotal.x = ptTotal.y = 0; wnd; wnd = wnd->next ) { diff --git a/windows/queue.c b/windows/queue.c index 662aa6f8ef9..7c8afc63c70 100644 --- a/windows/queue.c +++ b/windows/queue.c @@ -488,7 +488,7 @@ static HQUEUE16 QUEUE_CreateMsgQueue( BOOL16 bCreatePerQData ) * * Try to reply to all pending sent messages on exit. */ -void QUEUE_FlushMessages( MESSAGEQUEUE *queue ) +static void QUEUE_FlushMessages( MESSAGEQUEUE *queue ) { SMSG *smsg; MESSAGEQUEUE *senderQ = 0; diff --git a/windows/scroll.c b/windows/scroll.c index ef817a4a794..0bf8adf337f 100644 --- a/windows/scroll.c +++ b/windows/scroll.c @@ -9,6 +9,7 @@ #include +#include "wine/winuser16.h" #include "winuser.h" #include "dc.h" #include "win.h" diff --git a/windows/syscolor.c b/windows/syscolor.c index f3f389661e6..210d8bd786a 100644 --- a/windows/syscolor.c +++ b/windows/syscolor.c @@ -9,6 +9,10 @@ #include #include #include + +#include "wine/winbase16.h" +#include "wine/winuser16.h" +#include "sysmetrics.h" #include "winbase.h" #include "winuser.h" #include "debug.h" diff --git a/windows/sysmetrics.c b/windows/sysmetrics.c index d8d6006ae1a..fb6d9b0db7f 100644 --- a/windows/sysmetrics.c +++ b/windows/sysmetrics.c @@ -12,6 +12,7 @@ #include "winuser.h" #include "monitor.h" #include "options.h" +#include "sysmetrics.h" #include "tweak.h" static short sysMetrics[SM_CMETRICS+1]; diff --git a/windows/timer.c b/windows/timer.c index 34fa262e4ac..4250b0b0978 100644 --- a/windows/timer.c +++ b/windows/timer.c @@ -4,11 +4,13 @@ * Copyright 1993 Alexandre Julliard */ +#include "wine/winuser16.h" #include "winuser.h" #include "queue.h" #include "task.h" #include "winproc.h" #include "services.h" +#include "message.h" #include "debug.h" DEFAULT_DEBUG_CHANNEL(timer) diff --git a/windows/winproc.c b/windows/winproc.c index a6e1e7904f1..fc3e698945a 100644 --- a/windows/winproc.c +++ b/windows/winproc.c @@ -402,7 +402,7 @@ WINDOWPROCTYPE WINPROC_GetProcType( HWINDOWPROC proc ) * * Return TRUE if the lparam is a string */ -BOOL WINPROC_TestCBForStr ( HWND hwnd ) +static BOOL WINPROC_TestCBForStr ( HWND hwnd ) { BOOL retvalue; WND * wnd = WIN_FindWndPtr(hwnd); @@ -416,7 +416,7 @@ BOOL WINPROC_TestCBForStr ( HWND hwnd ) * * Return TRUE if the lparam is a string */ -BOOL WINPROC_TestLBForStr ( HWND hwnd ) +static BOOL WINPROC_TestLBForStr ( HWND hwnd ) { BOOL retvalue; WND * wnd = WIN_FindWndPtr(hwnd); diff --git a/windows/x11drv/keyboard.c b/windows/x11drv/keyboard.c index 05f55547909..faa5d439452 100644 --- a/windows/x11drv/keyboard.c +++ b/windows/x11drv/keyboard.c @@ -380,7 +380,7 @@ static BOOL NumState=FALSE, CapsState=FALSE; * Convention : called with vkey only VK_NUMLOCK or VK_CAPITAL * */ -void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT event_y, +static void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT event_y, DWORD event_time ) { BOOL * State = (vkey==VK_NUMLOCK? &NumState : &CapsState); @@ -429,7 +429,7 @@ void KEYBOARD_GenerateMsg( WORD vkey, WORD scan, int Evtype, INT event_x, INT ev * Updates internal state for , depending on key under X * */ -void KEYBOARD_UpdateOneState ( int vkey, int state ) +static void KEYBOARD_UpdateOneState ( int vkey, int state ) { /* Do something if internal table state != X state for keycode */ if (((pKeyStateTable[vkey] & 0x80)!=0) != state) @@ -592,7 +592,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event ) * This routine walks through the defined keyboard layouts and selects * whichever matches most closely. */ -void +static void X11DRV_KEYBOARD_DetectLayout (void) { unsigned current, match, mismatch, seq;