ANSI C fixes.

This commit is contained in:
Patrik Stridvall 1999-05-08 12:50:36 +00:00 committed by Alexandre Julliard
parent a9f55c46c1
commit 896889f317
41 changed files with 142 additions and 125 deletions

View File

@ -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; i<nfile; i++)
{
pnt2 = (union any_size) (linetab + filetab[i]);
pnt2.c = linetab + filetab[i];
nseg += *pnt2.s;
}
@ -1588,7 +1590,7 @@ DEBUG_SnarfLinetab(char * linetab,
/*
* Get the pointer into the segment information.
*/
pnt2 = (union any_size) (linetab + filetab[i]);
pnt2.c = linetab + filetab[i];
file_segcount = *pnt2.s;
pnt2.ui++;
@ -1605,7 +1607,7 @@ DEBUG_SnarfLinetab(char * linetab,
for(k = 0; k < file_segcount; k++, this_seg++)
{
pnt2 = (union any_size) (linetab + lt_ptr[k]);
pnt2.c = linetab + lt_ptr[k];
lt_hdr[this_seg].start = start[k].start;
lt_hdr[this_seg].end = start[k].end;
lt_hdr[this_seg].sourcefile = fn;
@ -1642,7 +1644,7 @@ DEBUG_SnarfCodeView( struct deferred_debug_info * deefer,
char symname[PATH_MAX];
struct name_hash * thunk_sym = NULL;
ptr = (union any_size) cv_data;
ptr.c = cv_data;
nsect = deefer->nsect;
sectp = deefer->sectp;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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]; \

View File

@ -2,6 +2,7 @@
#define __GRAPHICS_WINE_DDRAW_PRIVATE_H
#include "ddraw.h"
#include "winuser.h"
/*****************************************************************************
* Predeclare the interface implementation structures

View File

@ -10,6 +10,7 @@
#include "dispdib.h"
#include "vga.h"
#include "debug.h"
#include "wine/wingdi16.h"
DEFAULT_DEBUG_CHANNEL(ddraw)

View File

@ -169,6 +169,7 @@ static PSDRV_DEVMODE16 DefaultDevmode =
/* dmDisplayFrequency */ 0
},
{ /* dmDocPrivate */
0 /* dummy */
},
{ /* dmDrvPrivate */
/* ppdfilename */ "default.ppd"

View File

@ -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 */

View File

@ -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 */

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -144,6 +144,7 @@ typedef struct {
typedef struct {
DEVMODE16 dmPublic;
struct _tagdocprivate {
int dummy;
} dmDocPrivate;
struct _tagdrvprivate {
char ppdFileName[100]; /* Hack */

View File

@ -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 */

View File

@ -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 <signal.h>
#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

View File

@ -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

View File

@ -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<<count) | (var>> (sizeof(var)-count));
}

View File

@ -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;

View File

@ -9,7 +9,7 @@
*/
#ifdef CONFIG_IPC
#define inline __inline__
#define inline inline
#include <sys/types.h>
#include <sys/sem.h>
#include <assert.h>

View File

@ -9,7 +9,7 @@
*/
#ifdef CONFIG_IPC
#define inline __inline__
#define inline inline
#include <sys/types.h>
#include <sys/sem.h>
#include <time.h>

View File

@ -9,7 +9,7 @@
*/
#ifdef CONFIG_IPC
#define inline __inline__
#define inline inline
#include <assert.h>
#include <unistd.h>
#include <sys/sem.h>

View File

@ -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__

View File

@ -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__

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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);