diff --git a/objects/bitmap.c b/objects/bitmap.c index 64d59e6b497..d7b5c8d99ce 100644 --- a/objects/bitmap.c +++ b/objects/bitmap.c @@ -83,7 +83,9 @@ static INT BITMAP_GetWidthBytes( INT bmWidth, INT bpp ) /****************************************************************************** - * CreateBitmap [GDI32.@] Creates a bitmap with the specified info + * CreateBitmap [GDI32.@] + * + * Creates a bitmap with the specified info. * * PARAMS * width [I] bitmap width @@ -152,7 +154,9 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes, /****************************************************************************** - * CreateCompatibleBitmap [GDI32.@] Creates a bitmap compatible with the DC + * CreateCompatibleBitmap [GDI32.@] + * + * Creates a bitmap compatible with the DC. * * PARAMS * hdc [I] Handle to device context @@ -199,7 +203,9 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height) /****************************************************************************** - * CreateBitmapIndirect [GDI32.@] Creates a bitmap with the specifies info + * CreateBitmapIndirect [GDI32.@] + * + * Creates a bitmap with the specifies info. * * RETURNS * Success: Handle to bitmap @@ -214,7 +220,9 @@ HBITMAP WINAPI CreateBitmapIndirect( /*********************************************************************** - * GetBitmapBits [GDI32.@] Copies bitmap bits of bitmap to buffer + * GetBitmapBits [GDI32.@] + * + * Copies bitmap bits of bitmap to buffer. * * RETURNS * Success: Number of bytes copied @@ -286,7 +294,9 @@ LONG WINAPI GetBitmapBits( /****************************************************************************** - * SetBitmapBits [GDI32.@] Sets bits of color data for a bitmap + * SetBitmapBits [GDI32.@] + * + * Sets bits of color data for a bitmap. * * RETURNS * Success: Number of bytes used in setting the bitmap bits @@ -580,7 +590,9 @@ static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer /****************************************************************************** - * CreateDiscardableBitmap [GDI32.@] Creates a discardable bitmap + * CreateDiscardableBitmap [GDI32.@] + * + * Creates a discardable bitmap. * * RETURNS * Success: Handle to bitmap @@ -596,7 +608,9 @@ HBITMAP WINAPI CreateDiscardableBitmap( /****************************************************************************** - * GetBitmapDimensionEx [GDI32.@] Retrieves dimensions of a bitmap + * GetBitmapDimensionEx [GDI32.@] + * + * Retrieves dimensions of a bitmap. * * RETURNS * Success: TRUE @@ -615,7 +629,9 @@ BOOL WINAPI GetBitmapDimensionEx( /****************************************************************************** - * SetBitmapDimensionEx [GDI32.@] Assignes dimensions to a bitmap + * SetBitmapDimensionEx [GDI32.@] + * + * Assigns dimensions to a bitmap. * * RETURNS * Success: TRUE diff --git a/objects/dc.c b/objects/dc.c index 1424b20b9f6..6297b229e23 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -1092,7 +1092,9 @@ BOOL WINAPI SetWorldTransform( HDC hdc, const XFORM *xform ) * Multiplies xform into the world transformation matrix from * the right. * - * RETURNS STD + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. */ BOOL WINAPI ModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD iMode ) @@ -1155,7 +1157,9 @@ BOOL WINAPI ModifyWorldTransform( HDC hdc, const XFORM *xform, * REMARKS * The same matrix can be passed in for more than one of the parameters. * - * RETURNS STD + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. */ BOOL WINAPI CombineTransform( LPXFORM xformResult, const XFORM *xform1, const XFORM *xform2 ) diff --git a/objects/dib.c b/objects/dib.c index 7b4ba69db43..eb68bedc0af 100644 --- a/objects/dib.c +++ b/objects/dib.c @@ -224,7 +224,9 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, /****************************************************************************** - * SetDIBits [GDI32.@] Sets pixels in a bitmap using colors from DIB + * SetDIBits [GDI32.@] + * + * Sets pixels in a bitmap using colors from DIB. * * PARAMS * hdc [I] Handle to device context @@ -385,7 +387,9 @@ static RGBQUAD DefLogPalette[20] = { /* Copy of Default Logical Palette */ /****************************************************************************** - * GetDIBits [GDI32.@] Retrieves bits of bitmap and copies to buffer + * GetDIBits [GDI32.@] + * + * Retrieves bits of bitmap and copies to buffer. * * RETURNS * Success: Number of scan lines copied from bitmap diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c index 920bfbbf359..2605e0fb085 100644 --- a/objects/enhmetafile.c +++ b/objects/enhmetafile.c @@ -2213,7 +2213,9 @@ BOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE hmf) } /***************************************************************************** - * CopyEnhMetaFileA (GDI32.@) Duplicate an enhanced metafile + * CopyEnhMetaFileA (GDI32.@) + * + * Duplicate an enhanced metafile. * * */ @@ -2250,7 +2252,9 @@ HENHMETAFILE WINAPI CopyEnhMetaFileA( } /***************************************************************************** - * CopyEnhMetaFileW (GDI32.@) Duplicate an enhanced metafile + * CopyEnhMetaFileW (GDI32.@) + * + * See CopyEnhMetaFileA. * * */ diff --git a/objects/font.c b/objects/font.c index b58d7f855e2..c53a90c57a1 100644 --- a/objects/font.c +++ b/objects/font.c @@ -989,7 +989,9 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count, /*********************************************************************** - * GetTextExtentPoint32W [GDI32.@] Computes width/height for a string + * GetTextExtentPoint32W [GDI32.@] + * + * Computes width/height for a string. * * Computes width and height of the specified string. * @@ -1645,7 +1647,9 @@ BOOL WINAPI GetCharABCWidthsA(HDC hdc, UINT firstChar, UINT lastChar, /****************************************************************************** - * GetCharABCWidthsW [GDI32.@] Retrieves widths of characters in range + * GetCharABCWidthsW [GDI32.@] + * + * Retrieves widths of characters in range. * * PARAMS * hdc [I] Handle of device context @@ -1691,7 +1695,7 @@ DWORD WINAPI GetGlyphOutline16( HDC16 hdc, UINT16 uChar, UINT16 fuFormat, { FIXME("(%04x, '%c', %04x, %p, %ld, %p, %p): stub\n", hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); - return (DWORD)-1; /* failure */ + return ~0UL; /* failure */ } @@ -1842,8 +1846,8 @@ BOOL WINAPI TranslateCharsetInfo( if flags == TCI_SRCCODEPAGE: a code page value */ LPCHARSETINFO lpCs, /* [out] structure to receive charset information */ - DWORD flags /* [in] determines interpretation of lpSrc */ -) { + DWORD flags /* [in] determines interpretation of lpSrc */) +{ int index = 0; switch (flags) { case TCI_SRCFONTSIG: @@ -1912,7 +1916,9 @@ DWORD WINAPI GetFontLanguageInfo(HDC hdc) /************************************************************************* - * GetFontData [GDI32.@] Retrieve data for TrueType font + * GetFontData [GDI32.@] + * + * Retrieve data for TrueType font. * * RETURNS * diff --git a/objects/gdiobj.c b/objects/gdiobj.c index d66afa06e73..88b8d9fc28e 100644 --- a/objects/gdiobj.c +++ b/objects/gdiobj.c @@ -1389,7 +1389,7 @@ DWORD WINAPI GdiSeeGdiDo16( WORD wReqType, WORD wParam1, WORD wParam2, return GDI_HeapSel; default: WARN("(wReqType=%04x): Unknown\n", wReqType); - return (DWORD)-1; + return ~0UL; } } diff --git a/objects/metafile.c b/objects/metafile.c index 656bcd6d54c..df738b23960 100644 --- a/objects/metafile.c +++ b/objects/metafile.c @@ -437,8 +437,8 @@ HMETAFILE16 WINAPI CopyMetaFile16( HMETAFILE16 hSrcMetaFile, LPCSTR lpFilename) */ HMETAFILE WINAPI CopyMetaFileW( HMETAFILE hSrcMetaFile, /* [in] handle of metafile to copy */ - LPCWSTR lpFilename /* [in] filename if copying to a file */ -) { + LPCWSTR lpFilename /* [in] filename if copying to a file */) +{ METAHEADER *mh = MF_GetMetaHeader( hSrcMetaFile ); METAHEADER *mh2 = NULL; HANDLE hFile; @@ -731,8 +731,8 @@ BOOL WINAPI EnumMetaFile( HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc, - LPARAM lpData -) { + LPARAM lpData) +{ METAHEADER *mhTemp = NULL, *mh = MF_GetMetaHeader(hmf); METARECORD *mr; HANDLETABLE *ht; @@ -1364,7 +1364,9 @@ HMETAFILE WINAPI SetMetaFileBitsEx( } /***************************************************************** - * GetMetaFileBitsEx (GDI32.@) Get raw metafile data + * GetMetaFileBitsEx (GDI32.@) + * + * Get raw metafile data. * * Copies the data from metafile _hmf_ into the buffer _buf_. * If _buf_ is zero, returns size of buffer required. Otherwise, @@ -1373,8 +1375,8 @@ HMETAFILE WINAPI SetMetaFileBitsEx( UINT WINAPI GetMetaFileBitsEx( HMETAFILE hmf, /* [in] metafile */ UINT nSize, /* [in] size of buf */ - LPVOID buf /* [out] buffer to receive raw metafile data */ -) { + LPVOID buf /* [out] buffer to receive raw metafile data */) +{ METAHEADER *mh = MF_GetMetaHeader(hmf); UINT mfSize; diff --git a/objects/palette.c b/objects/palette.c index c21e912fe59..358719f4734 100644 --- a/objects/palette.c +++ b/objects/palette.c @@ -143,7 +143,9 @@ static void PALETTE_ValidateFlags(PALETTEENTRY* lpPalE, int size) /*********************************************************************** - * CreatePalette [GDI32.@] Creates a logical color palette + * CreatePalette [GDI32.@] + * + * Creates a logical color palette. * * RETURNS * Success: Handle to logical palette @@ -176,16 +178,18 @@ HPALETTE WINAPI CreatePalette( /*********************************************************************** - * CreateHalftonePalette [GDI32.@] Creates a halftone palette + * CreateHalftonePalette [GDI32.@] + * + * Creates a halftone palette. * * RETURNS * Success: Handle to logical halftone palette * Failure: 0 * - * FIXME: This simply creates the halftone palette dirived from runing + * FIXME: This simply creates the halftone palette derived from running * tests on an windows NT machine. this is assuming a color depth * of greater that 256 color. On a 256 color device the halftone - * palette will be differnt and this funtion will be incorrect + * palette will be different and this function will be incorrect */ HPALETTE WINAPI CreateHalftonePalette( HDC hdc) /* [in] Handle to device context */ @@ -271,7 +275,9 @@ HPALETTE WINAPI CreateHalftonePalette( /*********************************************************************** - * GetPaletteEntries [GDI32.@] Retrieves palette entries + * GetPaletteEntries [GDI32.@] + * + * Retrieves palette entries. * * RETURNS * Success: Number of entries from logical palette @@ -321,7 +327,9 @@ UINT WINAPI GetPaletteEntries( /*********************************************************************** - * SetPaletteEntries [GDI32.@] Sets color values for range in palette + * SetPaletteEntries [GDI32.@] + * + * Sets color values for range in palette. * * RETURNS * Success: Number of entries that were set @@ -360,7 +368,9 @@ UINT WINAPI SetPaletteEntries( /*********************************************************************** - * ResizePalette [GDI32.@] Resizes logical palette + * ResizePalette [GDI32.@] + * + * Resizes logical palette. * * RETURNS * Success: TRUE @@ -416,7 +426,9 @@ BOOL WINAPI ResizePalette( /*********************************************************************** - * AnimatePalette [GDI32.@] Replaces entries in logical palette + * AnimatePalette [GDI32.@] + * + * Replaces entries in logical palette. * * RETURNS * Success: TRUE @@ -475,7 +487,9 @@ UINT WINAPI SetSystemPaletteUse( /*********************************************************************** - * GetSystemPaletteUse [GDI32.@] Gets state of system palette + * GetSystemPaletteUse [GDI32.@] + * + * Gets state of system palette. * * RETURNS * Current state of system palette @@ -488,7 +502,9 @@ UINT WINAPI GetSystemPaletteUse( /*********************************************************************** - * GetSystemPaletteEntries [GDI32.@] Gets range of palette entries + * GetSystemPaletteEntries [GDI32.@] + * + * Gets range of palette entries. * * RETURNS * Success: Number of entries retrieved from palette @@ -516,7 +532,9 @@ UINT WINAPI GetSystemPaletteEntries( /*********************************************************************** - * GetNearestPaletteIndex [GDI32.@] Gets palette index for color + * GetNearestPaletteIndex [GDI32.@] + * + * Gets palette index for color. * * NOTES * Should index be initialized to CLR_INVALID instead of 0? @@ -558,7 +576,9 @@ UINT WINAPI GetNearestPaletteIndex( /*********************************************************************** - * GetNearestColor [GDI32.@] Gets a system color to match + * GetNearestColor [GDI32.@] + * + * Gets a system color to match. * * RETURNS * Success: Color from system palette that corresponds to given color @@ -770,7 +790,9 @@ BOOL16 WINAPI IsDCCurrentPalette16(HDC16 hDC) /*********************************************************************** - * SelectPalette [GDI32.@] Selects logical palette into DC + * SelectPalette [GDI32.@] + * + * Selects logical palette into DC. * * RETURNS * Success: Previous logical palette @@ -786,7 +808,9 @@ HPALETTE WINAPI SelectPalette( /*********************************************************************** - * RealizePalette [GDI32.@] Maps palette entries to system palette + * RealizePalette [GDI32.@] + * + * Maps palette entries to system palette. * * RETURNS * Success: Number of entries in logical palette @@ -803,7 +827,9 @@ typedef HWND (WINAPI *WindowFromDC_funcptr)( HDC ); typedef BOOL (WINAPI *RedrawWindow_funcptr)( HWND, const RECT *, HRGN, UINT ); /********************************************************************** - * UpdateColors [GDI32.@] Remaps current colors to logical palette + * UpdateColors [GDI32.@] + * + * Remaps current colors to logical palette. * * RETURNS * Success: TRUE