From 896889f317b90a03e1bec9d050ddb4b3cdc56aec Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sat, 8 May 1999 12:50:36 +0000 Subject: [PATCH] ANSI C fixes. --- debugger/msc.c | 14 ++++++++------ dlls/comctl32/comboex.c | 12 ++++++------ dlls/comctl32/header.c | 8 ++++---- dlls/comctl32/hotkey.c | 6 +++--- dlls/comctl32/listview.c | 16 +++++++++------- dlls/comctl32/pager.c | 20 ++++++++++---------- dlls/comctl32/rebar.c | 16 ++++++++-------- dlls/comctl32/status.c | 16 ++++++++-------- dlls/comctl32/toolbar.c | 14 +++++++------- dlls/comctl32/tooltips.c | 16 ++++++++-------- dlls/comctl32/treeview.c | 2 +- dlls/commdlg/fontdlg.c | 2 +- dlls/ntdll/time.c | 4 ++-- dlls/shell32/folders.c | 2 +- dlls/shell32/shlfolder.c | 2 +- dlls/shell32/shlview.c | 6 +++--- graphics/ddraw.c | 12 ++++++------ graphics/ddraw_private.h | 1 + graphics/dispdib.c | 1 + graphics/psdrv/init.c | 1 + include/dplay.h | 4 +--- include/dplobby.h | 7 ++----- include/heap.h | 4 +++- include/metafile.h | 4 ++-- include/mmsystem.h | 4 ++-- include/psdrv.h | 1 + include/shellapi.h | 4 ++-- include/sig_context.h | 4 ++-- include/winsock.h | 12 ++++++++---- ipc/dde_atom.c | 2 +- ipc/generic_hash.c | 4 ++-- ipc/shm_block.c | 2 +- ipc/shm_main_blk.c | 2 +- ipc/shm_semaph.c | 2 +- loader/dos/dosmod.c | 2 +- loader/signal.c | 2 +- memory/ldt.c | 2 +- misc/winsock.c | 2 +- multimedia/dsound.c | 8 ++++---- objects/brush.c | 6 +++++- objects/enhmetafile.c | 18 +++++++++++------- 41 files changed, 142 insertions(+), 125 deletions(-) diff --git a/debugger/msc.c b/debugger/msc.c index 1a5de9daa7d..9a62281b491 100644 --- a/debugger/msc.c +++ b/debugger/msc.c @@ -618,7 +618,7 @@ DEBUG_ParseTypeTable(char * table, int len) curr_type = 0x1000; - ptr = (union any_size) (table + 16); + ptr.c = (table + 16); while( ptr.c - table < len ) { type = (union codeview_type *) ptr.c; @@ -1033,7 +1033,9 @@ DEBUG_RegisterDebugInfo( HMODULE hModule, const char *module_name) dbglist = deefer; } break; +#if 0 default: +#endif } } DEBUG_next_index++; @@ -1545,7 +1547,7 @@ DEBUG_SnarfLinetab(char * linetab, /* * Now get the important bits. */ - pnt = (union any_size) linetab; + pnt.c = linetab; nfile = *pnt.s++; nseg = *pnt.s++; @@ -1557,7 +1559,7 @@ DEBUG_SnarfLinetab(char * linetab, nseg = 0; for(i=0; insect; sectp = deefer->sectp; diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index d4a6ba53080..abdeaaba54f 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -31,7 +31,7 @@ DEFAULT_DEBUG_CHANNEL(comboex) /* << COMBOEX_DeleteItem >> */ -__inline__ static LRESULT +inline static LRESULT COMBOEX_GetComboControl (HWND hwnd, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); @@ -42,7 +42,7 @@ COMBOEX_GetComboControl (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT COMBOEX_GetEditControl (HWND hwnd, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); @@ -56,7 +56,7 @@ COMBOEX_GetEditControl (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT COMBOEX_GetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); @@ -65,7 +65,7 @@ COMBOEX_GetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT COMBOEX_GetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); @@ -112,7 +112,7 @@ COMBOEX_SetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT COMBOEX_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); @@ -141,7 +141,7 @@ COMBOEX_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) /* << COMBOEX_SetItem32W >> */ -__inline__ static LRESULT +inline static LRESULT COMBOEX_Forward (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 5c8b92316c8..7994e4b5573 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -659,7 +659,7 @@ HEADER_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT HEADER_GetItemCount (HWND hwnd) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); @@ -689,7 +689,7 @@ HEADER_GetItemRect (HWND hwnd, WPARAM wParam, LPARAM lParam) /* << HEADER_GetOrderArray >> */ -__inline__ static LRESULT +inline static LRESULT HEADER_GetUnicodeFormat (HWND hwnd) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); @@ -1074,7 +1074,7 @@ HEADER_SetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam) /* << HEADER_SetOrderArray >> */ -__inline__ static LRESULT +inline static LRESULT HEADER_SetUnicodeFormat (HWND hwnd, WPARAM wParam) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); @@ -1147,7 +1147,7 @@ HEADER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT HEADER_GetFont (HWND hwnd) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index cb5c06d4dc8..b1f4f9d3be1 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -91,7 +91,7 @@ HOTKEY_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT HOTKEY_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam) { HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr (hwnd); @@ -163,7 +163,7 @@ HOTKEY_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT HOTKEY_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) { DWORD dwExStyle = GetWindowLongA (hwnd, GWL_EXSTYLE); @@ -194,7 +194,7 @@ HOTKEY_SetFocus (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT HOTKEY_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam) { HOTKEY_INFO *infoPtr = HOTKEY_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 1392e205c43..d5a5cc111a8 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -4712,31 +4712,33 @@ static LRESULT LISTVIEW_SetColumnWidth(HWND hwnd, INT iCol, INT cx) LRESULT lret; LONG lStyle; - // set column width only if in report mode + /* set column width only if in report mode */ lStyle = GetWindowLongA(hwnd, GWL_STYLE); if ((lStyle & LVS_TYPEMASK) != LVS_REPORT) return (FALSE); - // make sure we can get the listview info + /* make sure we can get the listview info */ if (!(infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0))) return (FALSE); - if (!infoPtr->hwndHeader) // make sure we have a header + if (!infoPtr->hwndHeader) /* make sure we have a header */ return (FALSE); - // FIXME: currently ignoring LVSCW_AUTOSIZE (-1) and - // LVSCV_AUTOSIZE_USEHEADER (-2) + /* + * FIXME: currently ignoring LVSCW_AUTOSIZE (-1) and + * LVSCV_AUTOSIZE_USEHEADER (-2) + */ if (cx < 0) return (FALSE); hdi.mask = HDI_WIDTH; hdi.cxy = cx; - // call header to update the column change + /* call header to update the column change */ lret = Header_SetItemA(infoPtr->hwndHeader, (WPARAM)iCol, (LPARAM)&hdi); infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd, LVS_REPORT); - InvalidateRect(hwnd, NULL, TRUE); // force redraw of the listview + InvalidateRect(hwnd, NULL, TRUE); /* force redraw of the listview */ return lret; } diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c index 23903fce5eb..7a85595ab30 100644 --- a/dlls/comctl32/pager.c +++ b/dlls/comctl32/pager.c @@ -24,7 +24,7 @@ DEFAULT_DEBUG_CHANNEL(pager) #define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO *)GetWindowLongA(hwnd, 0)) -static __inline__ LRESULT +static inline LRESULT PAGER_ForwardMouse (HWND hwnd, WPARAM wParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -35,7 +35,7 @@ PAGER_ForwardMouse (HWND hwnd, WPARAM wParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_GetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -44,7 +44,7 @@ PAGER_GetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_GetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -53,7 +53,7 @@ PAGER_GetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_GetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -76,7 +76,7 @@ PAGER_GetButtonState (HWND hwnd, WPARAM wParam, LPARAM lParam) /* << PAGER_GetDropTarget >> */ -static __inline__ LRESULT +static inline LRESULT PAGER_GetPos (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -113,7 +113,7 @@ PAGER_RecalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_SetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -127,7 +127,7 @@ PAGER_SetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_SetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -141,7 +141,7 @@ PAGER_SetBorder (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -157,7 +157,7 @@ PAGER_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_SetChild (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); @@ -177,7 +177,7 @@ PAGER_SetChild (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT PAGER_SetPos (HWND hwnd, WPARAM wParam, LPARAM lParam) { PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index f98f4d4d446..c3684237153 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -598,7 +598,7 @@ REBAR_GetBandBorders (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetBandCount (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -792,7 +792,7 @@ REBAR_GetBarInfo (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetBkColor (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -844,7 +844,7 @@ REBAR_GetRect (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetRowCount (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -866,7 +866,7 @@ REBAR_GetRowHeight (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetTextColor (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -877,7 +877,7 @@ REBAR_GetTextColor (HWND hwnd) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetToolTips (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -885,7 +885,7 @@ REBAR_GetToolTips (HWND hwnd) } -__inline__ static LRESULT +inline static LRESULT REBAR_GetUnicodeFormat (HWND hwnd) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -1495,7 +1495,7 @@ REBAR_SetTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam) /* << REBAR_SetTooltips >> */ -__inline__ static LRESULT +inline static LRESULT REBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam) { REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); @@ -1665,7 +1665,7 @@ REBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) #endif -__inline__ static LRESULT +inline static LRESULT REBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam) { if (GetWindowLongA (hwnd, GWL_STYLE) & WS_BORDER) { diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 0d2917c39f0..37fdd7f848e 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -281,7 +281,7 @@ STATUSBAR_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg, } -__inline__ static LRESULT +inline static LRESULT STATUSBAR_GetBorders (LPARAM lParam) { LPINT out = (LPINT) lParam; @@ -465,7 +465,7 @@ STATUSBAR_GetTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT STATUSBAR_GetUnicodeFormat (HWND hwnd) { STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); @@ -473,7 +473,7 @@ STATUSBAR_GetUnicodeFormat (HWND hwnd) } -__inline__ static LRESULT +inline static LRESULT STATUSBAR_IsSimple (HWND hwnd) { STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); @@ -753,7 +753,7 @@ STATUSBAR_SetTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT STATUSBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam) { STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); @@ -913,7 +913,7 @@ STATUSBAR_WMDestroy (HWND hwnd) } -static __inline__ LRESULT +static inline LRESULT STATUSBAR_WMGetFont (HWND hwnd) { STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); @@ -942,7 +942,7 @@ STATUSBAR_WMGetText (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT STATUSBAR_WMMouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) { STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); @@ -978,7 +978,7 @@ STATUSBAR_WMNCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) { PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam); @@ -986,7 +986,7 @@ STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT STATUSBAR_WMNCLButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) { PostMessageA (GetParent (hwnd), WM_NCLBUTTONUP, wParam, lParam); diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index e49b146bbce..c397f3a1f03 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1259,7 +1259,7 @@ TOOLBAR_GetBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) } -static __inline__ LRESULT +static inline LRESULT TOOLBAR_GetBitmapFlags (HWND hwnd, WPARAM wParam, LPARAM lParam) { return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0; @@ -1393,7 +1393,7 @@ TOOLBAR_GetDisabledImageList (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_GetExtendedStyle (HWND hwnd) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -1615,7 +1615,7 @@ TOOLBAR_HideButton (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_HitTest (HWND hwnd, WPARAM wParam, LPARAM lParam) { return TOOLBAR_InternalHitTest (hwnd, (LPPOINT)lParam); @@ -2221,7 +2221,7 @@ TOOLBAR_SetStyle (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_SetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); @@ -2565,7 +2565,7 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_NCActivate (HWND hwnd, WPARAM wParam, LPARAM lParam) { /* if (wndPtr->dwStyle & CCS_NODIVIDER) */ @@ -2575,7 +2575,7 @@ TOOLBAR_NCActivate (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam) { if (!(GetWindowLongA (hwnd, GWL_STYLE) & CCS_NODIVIDER)) @@ -2635,7 +2635,7 @@ TOOLBAR_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLBAR_Notify (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 3116d8621a2..44419e4575a 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1118,7 +1118,7 @@ TOOLTIPS_GetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_GetMaxTipWidth (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1169,7 +1169,7 @@ TOOLTIPS_GetTextW (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_GetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1177,7 +1177,7 @@ TOOLTIPS_GetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_GetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1185,7 +1185,7 @@ TOOLTIPS_GetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_GetToolCount (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1379,7 +1379,7 @@ TOOLTIPS_NewToolRectW (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_Pop (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1503,7 +1503,7 @@ TOOLTIPS_SetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_SetMaxTipWidth (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1515,7 +1515,7 @@ TOOLTIPS_SetMaxTipWidth (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_SetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); @@ -1526,7 +1526,7 @@ TOOLTIPS_SetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam) } -__inline__ static LRESULT +inline static LRESULT TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam) { TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index b57d99a8d44..4320a330859 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1601,7 +1601,7 @@ TREEVIEW_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) if (listItems>1) { prevsib=NULL; - switch ((INT)ptdi->hInsertAfter) { + switch ((DWORD) ptdi->hInsertAfter) { case (DWORD) TVI_FIRST: if (wineItem->parent) { wineItem->sibling=parentItem->firstChild; diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index 415c76f3a91..7dce147dbe8 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -400,7 +400,7 @@ INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType, int i; TRACE(commdlg,"(nFontType=%d)\n",nFontType); - TRACE(commdlg," %s h=%d w=%d e=%d o=%d wg=%d i=%d u=%d s=%d" + TRACE(commdlg," %s h=%ld w=%ld e=%ld o=%ld wg=%ld i=%d u=%d s=%d" " ch=%d op=%d cp=%d q=%d pf=%xh\n", lplf->lfFaceName,lplf->lfHeight,lplf->lfWidth, lplf->lfEscapement,lplf->lfOrientation, diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index 45ffabb034d..c28ed47abe0 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -36,12 +36,12 @@ static const int MonthLengths[2][MONSPERYEAR] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }; -static __inline__ int IsLeapYear(int Year) +static inline int IsLeapYear(int Year) { return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0; } -static __inline__ void NormalizeTimeFields(CSHORT *FieldToNormalize, CSHORT *CarryField,int Modulus) +static inline void NormalizeTimeFields(CSHORT *FieldToNormalize, CSHORT *CarryField,int Modulus) { *FieldToNormalize = (CSHORT) (*FieldToNormalize - Modulus); *CarryField = (CSHORT) (*CarryField + 1); diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c index dd12bee4396..02aacbc3411 100644 --- a/dlls/shell32/folders.c +++ b/dlls/shell32/folders.c @@ -34,7 +34,7 @@ static struct ICOM_VTABLE(IExtractIconA) eivt; static struct ICOM_VTABLE(IPersistFile) pfvt; #define _IPersistFile_Offset ((int)(&(((IExtractIconAImpl*)0)->lpvtblPersistFile))) -#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((void*)name)-_IPersistFile_Offset); +#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset); /************************************************************************** * IExtractIconA_Constructor diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 23d6c6dd1c6..7eaf94e02f5 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -219,7 +219,7 @@ static struct ICOM_VTABLE(IShellFolder) sfvt; static struct ICOM_VTABLE(IPersistFolder) psfvt; #define _IPersistFolder_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder))) -#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((void*)name)-_IPersistFolder_Offset); +#define _ICOM_THIS_From_IPersistFolder(class, name) class* This = (class*)(((char*)name)-_IPersistFolder_Offset); /************************************************************************** * IShellFolder_Constructor diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 60dfb1c9c1a..366c2305702 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -54,15 +54,15 @@ static struct ICOM_VTABLE(IShellView) svvt; static struct ICOM_VTABLE(IOleCommandTarget) ctvt; #define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) -#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((void*)name)-_IOleCommandTarget_Offset); +#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); static struct ICOM_VTABLE(IDropTarget) dtvt; #define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) -#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((void*)name)-_IDropTarget_Offset); +#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); static struct ICOM_VTABLE(IViewObject) vovt; #define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) -#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((void*)name)-_IViewObject_Offset); +#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); /*menu items */ #define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500) diff --git a/graphics/ddraw.c b/graphics/ddraw.c index 6177398291d..334510099a2 100644 --- a/graphics/ddraw.c +++ b/graphics/ddraw.c @@ -887,7 +887,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt( dstheight = xdst.bottom - xdst.top; dstwidth = xdst.right - xdst.left; width = (xdst.right - xdst.left) * bpp; - dbuf = ddesc.y.lpSurface + (xdst.top * ddesc.lPitch) + (xdst.left * bpp); + dbuf = (BYTE *) ddesc.y.lpSurface + (xdst.top * ddesc.lPitch) + (xdst.left * bpp); dwFlags &= ~(DDBLT_WAIT|DDBLT_ASYNC);/* FIXME: can't handle right now */ @@ -941,7 +941,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt( LPBYTE sbase; int sx, xinc, sy, yinc; - sbase = sdesc.y.lpSurface + (xsrc.top * sdesc.lPitch) + xsrc.left * bpp; + sbase = (BYTE *) sdesc.y.lpSurface + (xsrc.top * sdesc.lPitch) + xsrc.left * bpp; xinc = (srcwidth << 16) / dstwidth; yinc = (srcheight << 16) / dstheight; @@ -1082,8 +1082,8 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_BltFast( IDirectDrawSurface4_Lock(iface,NULL,&ddesc,DDLOCK_WRITEONLY,0); bpp = This->s.surface_desc.ddpfPixelFormat.x.dwRGBBitCount / 8; - sbuf = sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp; - dbuf = ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp; + sbuf = (BYTE *) sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp; + dbuf = (BYTE *) ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp; h=rsrc->bottom-rsrc->top; @@ -1110,8 +1110,8 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_BltFast( #define COPYBOX_COLORKEY(type) { \ type *d = (type *)dbuf, *s = (type *)sbuf, tmp; \ - s = sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp; \ - d = ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp; \ + s = (type *) ((BYTE *) sdesc.y.lpSurface + (rsrc->top * sdesc.lPitch) + rsrc->left * bpp); \ + d = (type *) ((BYTE *) ddesc.y.lpSurface + (dsty * ddesc.lPitch) + dstx * bpp); \ for (y = 0; y < h; y++) { \ for (x = 0; x < w; x++) { \ tmp = s[x]; \ diff --git a/graphics/ddraw_private.h b/graphics/ddraw_private.h index 48ccb83756e..bf62da143cb 100644 --- a/graphics/ddraw_private.h +++ b/graphics/ddraw_private.h @@ -2,6 +2,7 @@ #define __GRAPHICS_WINE_DDRAW_PRIVATE_H #include "ddraw.h" +#include "winuser.h" /***************************************************************************** * Predeclare the interface implementation structures diff --git a/graphics/dispdib.c b/graphics/dispdib.c index 2b741b81a84..3ef7b166ad9 100644 --- a/graphics/dispdib.c +++ b/graphics/dispdib.c @@ -10,6 +10,7 @@ #include "dispdib.h" #include "vga.h" #include "debug.h" +#include "wine/wingdi16.h" DEFAULT_DEBUG_CHANNEL(ddraw) diff --git a/graphics/psdrv/init.c b/graphics/psdrv/init.c index cbc34f2e3d3..d72e5027200 100644 --- a/graphics/psdrv/init.c +++ b/graphics/psdrv/init.c @@ -169,6 +169,7 @@ static PSDRV_DEVMODE16 DefaultDevmode = /* dmDisplayFrequency */ 0 }, { /* dmDocPrivate */ + 0 /* dummy */ }, { /* dmDrvPrivate */ /* ppdfilename */ "default.ppd" diff --git a/include/dplay.h b/include/dplay.h index e24ae837fb3..9445d70ffa2 100644 --- a/include/dplay.h +++ b/include/dplay.h @@ -362,6 +362,7 @@ typedef BOOL (CALLBACK* LPDPENUMSESSIONSCALLBACK2)( DWORD dwFlags, LPVOID lpContext ); +#include "poppack.h" /***************************************************************************** * IDirectPlay interface @@ -584,7 +585,4 @@ ICOM_DEFINE(IDirectPlay3,IDirectPlay2) #define IDirectPlay3_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b) #endif - -#include "poppack.h" - #endif /* __WINE_DPLAY_H */ diff --git a/include/dplobby.h b/include/dplobby.h index 4f1bfe016e0..8339a65b1a9 100644 --- a/include/dplobby.h +++ b/include/dplobby.h @@ -3,8 +3,7 @@ #include "dplay.h" - -#pragma pack(1) +#include "pshpack1.h" /***************************************************************************** * Predeclare the interfaces @@ -72,6 +71,7 @@ typedef BOOL (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)( LPVOID lpContext, DWORD dwFlags ); +#include "poppack.h" /***************************************************************************** * IDirectPlayLobby interface @@ -148,7 +148,4 @@ ICOM_DEFINE(IDirectPlayLobby2,IDirectPlayLobby) #define IDirectPlayLobby2_CreateCompoundAddress(p,a,b,c,d) ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d) #endif -#pragma pack(4) - - #endif /* __WINE_DPLOBBY_H */ diff --git a/include/heap.h b/include/heap.h index 59a76191895..ed1c9794d68 100644 --- a/include/heap.h +++ b/include/heap.h @@ -7,6 +7,8 @@ #ifndef __WINE_HEAP_H #define __WINE_HEAP_H +#include "config.h" + #include "winbase.h" extern HANDLE SystemHeap; @@ -32,7 +34,7 @@ extern LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str ); #define SEGPTR_STRDUP_WtoA(str) \ (HIWORD(str) ? HEAP_strdupWtoA( SegptrHeap, 0, (str) ) : (LPSTR)(str)) /* define an inline function, a macro won't do */ -static __inline__ SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) { +static inline SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) { return (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr); } #define SEGPTR_GET(ptr) SEGPTR_Get(ptr) diff --git a/include/metafile.h b/include/metafile.h index ae2f952346b..94cdad7c1dc 100644 --- a/include/metafile.h +++ b/include/metafile.h @@ -17,13 +17,13 @@ typedef struct METAHEADER *mh; } METAFILEOBJ; -#pragma pack(1) +#include "pshpack1.h" typedef struct { DWORD dw1, dw2, dw3; WORD w4; CHAR filename[0x100]; } METAHEADERDISK; -#pragma pack(4) +#include "poppack.h" #define MFHEADERSIZE (sizeof(METAHEADER)) #define MFVERSION 0x300 diff --git a/include/mmsystem.h b/include/mmsystem.h index b63a6f0c644..1e163012e07 100644 --- a/include/mmsystem.h +++ b/include/mmsystem.h @@ -2819,8 +2819,8 @@ typedef struct { UINT wCustomCommandTable; /* custom command table (0xFFFF if none) * filled in by the driver */ UINT wType; /* driver type (filled in by the driver) */ } MCI_OPEN_DRIVER_PARMSW, *LPMCI_OPEN_DRIVER_PARMSW; -DECL_WINELIB_TYPE_AW(MCI_OPEN_DRIVER_PARMS); -DECL_WINELIB_TYPE_AW(LPMCI_OPEN_DRIVER_PARMS); +DECL_WINELIB_TYPE_AW(MCI_OPEN_DRIVER_PARMS) +DECL_WINELIB_TYPE_AW(LPMCI_OPEN_DRIVER_PARMS) DWORD WINAPI mciGetDriverData16(UINT16 uDeviceID); DWORD WINAPI mciGetDriverData(UINT uDeviceID); diff --git a/include/psdrv.h b/include/psdrv.h index 3f27316b10f..b32a32b27cb 100644 --- a/include/psdrv.h +++ b/include/psdrv.h @@ -144,6 +144,7 @@ typedef struct { typedef struct { DEVMODE16 dmPublic; struct _tagdocprivate { + int dummy; } dmDocPrivate; struct _tagdrvprivate { char ppdFileName[100]; /* Hack */ diff --git a/include/shellapi.h b/include/shellapi.h index b76eacb9c8f..4291a475b46 100644 --- a/include/shellapi.h +++ b/include/shellapi.h @@ -3,7 +3,7 @@ #include "windef.h" -#pragma pack(1) +#include "pshpack1.h" /****************************************** * DragObject @@ -264,6 +264,6 @@ BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON); BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON); #define ShellAbout WINELIB_NAME_AW(ShellAbout) -#pragma pack(4) +#include "poppack.h" #endif /* _WINE_SHELLAPI_H */ diff --git a/include/sig_context.h b/include/sig_context.h index 1c43d948c50..326d624fe96 100644 --- a/include/sig_context.h +++ b/include/sig_context.h @@ -82,7 +82,7 @@ typedef struct sigcontext SIGCONTEXT; #endif /* FreeBSD */ -#if defined(__svr4__) || defined(_SCO_DS) +#if defined(__svr4__) || defined(_SCO_DS) || defined(__sun) #include #ifdef _SCO_DS @@ -174,7 +174,7 @@ typedef struct _CONTEXT /* Note 1 */ #endif /* linux || __NetBSD__ || __FreeBSD__ || __OpenBSD__ */ -#if defined(__svr4__) || defined(_SCO_DS) +#if defined(__svr4__) || defined(_SCO_DS) || defined(__sun) #ifdef _SCO_DS #define gregs regs diff --git a/include/winsock.h b/include/winsock.h index 217764f6fd4..9ee1c5e67fc 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -456,14 +456,18 @@ INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, UINT lEvent); #define WS_AF_MAX 27 +#include "pshpack1.h" + struct ws_sockaddr_ipx { - INT16 sipx_family __attribute__((packed)); - UINT sipx_network __attribute__((packed)); - CHAR sipx_node[6] __attribute__((packed)); - UINT16 sipx_port __attribute__((packed)); + INT16 sipx_family; + UINT sipx_network; + CHAR sipx_node[6]; + UINT16 sipx_port; }; +#include "poppack.h" + #ifdef __cplusplus } #endif diff --git a/ipc/dde_atom.c b/ipc/dde_atom.c index 01080a7e112..5d90f9af2da 100644 --- a/ipc/dde_atom.c +++ b/ipc/dde_atom.c @@ -39,7 +39,7 @@ typedef struct #define ATOM_OFS(idx) (main_block->atoms[idx]) /* rot_left: rotate (with wrap-around) */ -static __inline__ int rot_left(unsigned var,int count) +static inline int rot_left(unsigned var,int count) { return (var<> (sizeof(var)-count)); } diff --git a/ipc/generic_hash.c b/ipc/generic_hash.c index df0449b8281..198fcd34c98 100644 --- a/ipc/generic_hash.c +++ b/ipc/generic_hash.c @@ -516,7 +516,7 @@ void detach_hash(HASH_CONTAINER *hash) /********** Hash usage *************/ -static __inline__ BOOL +static inline BOOL correct_entry(HASH_ITEM *item, int key, HASH_VAL *seeked_data, HASH_ITEM_TEST *is_correct_item, BOOL skip_deleted) { @@ -586,7 +586,7 @@ static HASH_ITEM *locate_entry(HASH_CONTAINER* hash, DWORD key, } -static __inline__ void sync_shared_hash(HASH_CONTAINER *hash) +static inline void sync_shared_hash(HASH_CONTAINER *hash) { HASH_SHARED *shared= hash->shared; diff --git a/ipc/shm_block.c b/ipc/shm_block.c index fa9546f289f..14255cf6945 100644 --- a/ipc/shm_block.c +++ b/ipc/shm_block.c @@ -9,7 +9,7 @@ */ #ifdef CONFIG_IPC -#define inline __inline__ +#define inline inline #include #include #include diff --git a/ipc/shm_main_blk.c b/ipc/shm_main_blk.c index a92ad3179c9..3333e2b162d 100644 --- a/ipc/shm_main_blk.c +++ b/ipc/shm_main_blk.c @@ -9,7 +9,7 @@ */ #ifdef CONFIG_IPC -#define inline __inline__ +#define inline inline #include #include #include diff --git a/ipc/shm_semaph.c b/ipc/shm_semaph.c index 2dce9b1c685..fc4f5b69b44 100644 --- a/ipc/shm_semaph.c +++ b/ipc/shm_semaph.c @@ -9,7 +9,7 @@ */ #ifdef CONFIG_IPC -#define inline __inline__ +#define inline inline #include #include #include diff --git a/loader/dos/dosmod.c b/loader/dos/dosmod.c index 2f2c683766d..d3f49bd39b5 100644 --- a/loader/dos/dosmod.c +++ b/loader/dos/dosmod.c @@ -32,7 +32,7 @@ asm(".org 0x110000"); #define SYS_vm86 166 -static __inline__ int vm86plus( int func, struct vm86plus_struct *ptr ) +static inline int vm86plus( int func, struct vm86plus_struct *ptr ) { int res; #ifdef __PIC__ diff --git a/loader/signal.c b/loader/signal.c index 97af53c725c..6dd77bd82a9 100644 --- a/loader/signal.c +++ b/loader/signal.c @@ -89,7 +89,7 @@ struct kernel_sigaction /* Similar to the sigaction function in libc, except it leaves alone the restorer field, which is used to specify the signal stack address */ -static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new, +static inline int wine_sigaction( int sig, struct kernel_sigaction *new, struct kernel_sigaction *old ) { #ifdef __PIC__ diff --git a/memory/ldt.c b/memory/ldt.c index f36411ee8c0..08320095161 100644 --- a/memory/ldt.c +++ b/memory/ldt.c @@ -30,7 +30,7 @@ struct modify_ldt_s unsigned int seg_not_present : 1; }; -static __inline__ int modify_ldt( int func, struct modify_ldt_s *ptr, +static inline int modify_ldt( int func, struct modify_ldt_s *ptr, unsigned long count ) { int res; diff --git a/misc/winsock.c b/misc/winsock.c index 29a4cb43c1c..55676e894b5 100644 --- a/misc/winsock.c +++ b/misc/winsock.c @@ -246,7 +246,7 @@ static fd_set* fd_set_import( fd_set* fds, LPWSINFO pwsi, void* wsfds, int* high return NULL; } -__inline__ static int sock_error_p(int s) +inline static int sock_error_p(int s) { unsigned int optval, optlen; diff --git a/multimedia/dsound.c b/multimedia/dsound.c index 61b8a698b11..7ba17445e4b 100644 --- a/multimedia/dsound.c +++ b/multimedia/dsound.c @@ -1714,14 +1714,14 @@ static void DSOUND_CheckEvent(IDirectSoundBufferImpl *dsb, int len) /* 8-bit WAV is unsigned */ /* 16-bit WAV is signed */ -static __inline__ INT16 cvtU8toS16(BYTE byte) +static inline INT16 cvtU8toS16(BYTE byte) { INT16 s = (byte - 128) << 8; return s; } -static __inline__ BYTE cvtS16toU8(INT16 word) +static inline BYTE cvtS16toU8(INT16 word) { BYTE b = (word + 32768) >> 8; @@ -1732,7 +1732,7 @@ static __inline__ BYTE cvtS16toU8(INT16 word) /* We should be able to optimize these two inline functions */ /* so that we aren't doing 8->16->8 conversions when it is */ /* not necessary. But this is still a WIP. Optimize later. */ -static __inline__ void get_fields(const IDirectSoundBufferImpl *dsb, BYTE *buf, INT *fl, INT *fr) +static inline void get_fields(const IDirectSoundBufferImpl *dsb, BYTE *buf, INT *fl, INT *fr) { INT16 *bufs = (INT16 *) buf; @@ -1765,7 +1765,7 @@ static __inline__ void get_fields(const IDirectSoundBufferImpl *dsb, BYTE *buf, return; } -static __inline__ void set_fields(BYTE *buf, INT fl, INT fr) +static inline void set_fields(BYTE *buf, INT fl, INT fr) { INT16 *bufs = (INT16 *) buf; diff --git a/objects/brush.c b/objects/brush.c index 279e88f0e45..fd8c75e8fec 100644 --- a/objects/brush.c +++ b/objects/brush.c @@ -222,13 +222,17 @@ HBRUSH WINAPI CreateDIBPatternBrushPt( ) { BITMAPINFO *info=(BITMAPINFO*)data; - LOGBRUSH logbrush = { BS_DIBPATTERN, coloruse, 0 }; + LOGBRUSH logbrush; BITMAPINFO *newInfo; INT size; TRACE(gdi, "%p %ldx%ld %dbpp\n", info, info->bmiHeader.biWidth, info->bmiHeader.biHeight, info->bmiHeader.biBitCount); + logbrush.lbStyle = BS_DIBPATTERN; + logbrush.lbColor = coloruse; + logbrush.lbHatch = 0; + /* Make a copy of the bitmap */ diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c index 805dfddef85..3c6ceb32f8a 100644 --- a/objects/enhmetafile.c +++ b/objects/enhmetafile.c @@ -183,11 +183,11 @@ UINT WINAPI GetEnhMetaFileDescriptionA( return emh->nDescription; } - first = lstrlenW( (void *)emh + emh->offDescription); + first = lstrlenW( (WCHAR *) ((char *) emh + emh->offDescription)); - lstrcpynWtoA(buf, (void *)emh + emh->offDescription, size); + lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription), size); buf += first + 1; - lstrcpynWtoA(buf, (void *)emh + emh->offDescription+2*(first+1), + lstrcpynWtoA(buf, (WCHAR *) ((char *) emh + emh->offDescription+2*(first+1)), size - first - 1); EMF_ReleaseEnhMetaHeader(hmf); @@ -220,7 +220,7 @@ UINT WINAPI GetEnhMetaFileDescriptionW( return emh->nDescription; } - memmove(buf, (void *)emh + emh->offDescription, + memmove(buf, (char *) emh + emh->offDescription, MIN(size,emh->nDescription)); EMF_ReleaseEnhMetaHeader(hmf); return MIN(size, emh->nDescription); @@ -555,7 +555,7 @@ BOOL WINAPI EnumEnhMetaFile( while (ret) { ret = (*callback)(hdc, ht, p, count, data); if (p->iType == EMR_EOF) break; - p = (void *) p + p->nSize; + p = (LPENHMETARECORD) ((char *) p + p->nSize); } HeapFree( GetProcessHeap(), 0, ht); EMF_ReleaseEnhMetaHeader(hmf); @@ -591,7 +591,11 @@ BOOL WINAPI PlayEnhMetaFile( (lpRect->right - lpRect->left); FLOAT yscale = (h->rclBounds.bottom - h->rclBounds.top) / (lpRect->bottom - lpRect->top); - XFORM xform = {xscale, 0, 0, yscale, 0, 0}; + XFORM xform; + xform.eM11 = xscale; + xform.eM12 = 0; + xform.eM21 = 0; + xform.eM22 = yscale; xform.eDx = lpRect->left; xform.eDy = lpRect->top; FIXME(enhmetafile, "play into rect doesn't work\n"); @@ -605,7 +609,7 @@ BOOL WINAPI PlayEnhMetaFile( while (1) { PlayEnhMetaFileRecord(hdc, ht, p, count); if (p->iType == EMR_EOF) break; - p = (void *) p + p->nSize; /* casted so that arithmetic is in bytes */ + p = (LPENHMETARECORD) ((char *) p + p->nSize); /* casted so that arithmetic is in bytes */ } HeapFree( GetProcessHeap(), 0, ht ); EMF_ReleaseEnhMetaHeader(hmf);