winex11.drv: Replace const pointer parameters with correct
non-const pointers
Andrew Talbot
Andrew.Talbot at talbotville.com
Fri Mar 9 16:24:16 CST 2007
Note: In the case of XFONT_LookupCachedFont(), I am just removing the pointless
const qualifier from a pointer parameter (plf): I cannot also constify it in
the normal way, because the pointer is being used for writing.
-- Andy.
---
Changelog:
winex11.drv: Replace const pointer parameters with correct non-const pointer.
diff -urN a/dlls/winex11.drv/xfont.c b/dlls/winex11.drv/xfont.c
--- a/dlls/winex11.drv/xfont.c 2007-02-06 17:51:12.000000000 +0000
+++ b/dlls/winex11.drv/xfont.c 2007-03-09 21:43:11.000000000 +0000
@@ -400,14 +400,14 @@
/***********************************************************************
* Checksums
*/
-static UINT16 __lfCheckSum( LPLOGFONT16 plf )
+static UINT16 __lfCheckSum( const LOGFONT16 *plf )
{
CHAR font[LF_FACESIZE];
UINT16 checksum = 0;
- UINT16 *ptr;
+ const UINT16 *ptr;
int i;
- ptr = (UINT16 *)plf;
+ ptr = (const UINT16 *)plf;
for (i = 0; i < 9; i++) checksum ^= *ptr++;
for (i = 0; i < LF_FACESIZE; i++)
{
@@ -1033,7 +1033,7 @@
* font info - http://www.microsoft.com/kb/articles/q65/1/23.htm
* Windows font metrics - http://www.microsoft.com/kb/articles/q32/6/67.htm
*/
-static void XFONT_GetLeading( const LPIFONTINFO16 pFI, const XFontStruct* x_fs,
+static void XFONT_GetLeading( const IFONTINFO16 *pFI, const XFontStruct* x_fs,
INT16* pIL, INT16* pEL, const XFONTTRANS *XFT )
{
unsigned long height;
@@ -2727,7 +2727,7 @@
}
}
-static fontObject* XFONT_LookupCachedFont( const LPLOGFONT16 plf, UINT16* checksum )
+static fontObject* XFONT_LookupCachedFont( const LOGFONT16 *plf, UINT16* checksum )
{
UINT16 cs = __lfCheckSum( plf );
int i = fontMRU, prev = -1;
@@ -3017,7 +3017,7 @@
/***********************************************************************
* X Device Font Objects
*/
-static X_PHYSFONT XFONT_RealizeFont( const LPLOGFONT16 plf,
+static X_PHYSFONT XFONT_RealizeFont( LPLOGFONT16 plf,
LPCSTR* faceMatched, BOOL bSubFont,
WORD internal_charset,
WORD* pcharsetMatched )
More information about the wine-patches
mailing list