comdlg32: Constify some variables (2 of 3)

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Apr 6 04:56:00 CDT 2007


Changelog:
    comdlg32: Constify some variables.

diff -urN a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h
--- a/dlls/comdlg32/cdlg.h	2007-04-05 17:31:26.000000000 +0100
+++ b/dlls/comdlg32/cdlg.h	2007-04-05 23:11:05.000000000 +0100
@@ -213,10 +213,10 @@
 } CFn_ENUMSTRUCT, *LPCFn_ENUMSTRUCT;
 
 INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
-                  UINT nFontType, LPCHOOSEFONTW lpcf, HWND hwnd,
+                  UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd,
                   LPCFn_ENUMSTRUCT e);
 INT AddFontStyle(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *metrics,
-                 UINT nFontType, LPCHOOSEFONTW lpcf, HWND hcmb2, HWND hcmb3,
+                 UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3,
                  HWND hDlg, BOOL iswin16);
 void _dump_cf_flags(DWORD cflags);
 
@@ -227,6 +227,6 @@
 LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
                       LPCHOOSEFONTW lpcf);
 LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam,
-                      LPCHOOSEFONTW lpcf);
+                      const CHOOSEFONTW *lpcf);
 
 #endif /* _WINE_DLL_CDLG_H */
diff -urN a/dlls/comdlg32/fontdlg16.c b/dlls/comdlg32/fontdlg16.c
--- a/dlls/comdlg32/fontdlg16.c	2007-03-07 17:19:24.000000000 +0000
+++ b/dlls/comdlg32/fontdlg16.c	2007-04-05 22:38:25.000000000 +0100
@@ -72,7 +72,7 @@
     pnm32w->ntmTm.tmExternalLeading = pm16->tmExternalLeading;
 }
 
-static void CFn_CHOOSEFONT16to32W(LPCHOOSEFONT16 chf16, LPCHOOSEFONTW chf32w)
+static void CFn_CHOOSEFONT16to32W(const CHOOSEFONT16 *chf16, LPCHOOSEFONTW chf32w)
 {
   int len;
   if (chf16->Flags & CF_ENABLETEMPLATE)
@@ -106,7 +106,7 @@
 /***********************************************************************
  *                          CFn_HookCallChk                 [internal]
  */
-static BOOL CFn_HookCallChk(LPCHOOSEFONT16 lpcf)
+static BOOL CFn_HookCallChk(const CHOOSEFONT16 *lpcf)
 {
  if (lpcf)
   if(lpcf->Flags & CF_ENABLEHOOK)
diff -urN a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c
--- a/dlls/comdlg32/fontdlg.c	2007-02-13 17:12:32.000000000 +0000
+++ b/dlls/comdlg32/fontdlg.c	2007-04-05 23:00:10.000000000 +0100
@@ -287,7 +287,7 @@
 /***********************************************************************
  *                          CFn_HookCallChk32                 [internal]
  */
-static BOOL CFn_HookCallChk32(LPCHOOSEFONTW lpcf)
+static BOOL CFn_HookCallChk32(const CHOOSEFONTW *lpcf)
 {
     if (lpcf)
         if(lpcf->Flags & CF_ENABLEHOOK)
@@ -300,7 +300,7 @@
  *              AddFontFamily                               [internal]
  */
 INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
-        UINT nFontType, LPCHOOSEFONTW lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
+        UINT nFontType, const CHOOSEFONTW *lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e)
 {
     int i;
     WORD w;
@@ -403,7 +403,7 @@
 /*************************************************************************
  *              AddFontSizeToCombo3                           [internal]
  */
-static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf)
+static int AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf)
 {
     int j;
     WCHAR buffer[20];
@@ -427,7 +427,7 @@
 /*************************************************************************
  *              SetFontSizesToCombo3                           [internal]
  */
-static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTW lpcf)
+static int SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf)
 {
     static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
     int i;
@@ -440,7 +440,7 @@
 /*************************************************************************
  *              CFn_GetDC                           [internal]
  */
-static inline HDC CFn_GetDC(LPCHOOSEFONTW lpcf)
+static inline HDC CFn_GetDC(const CHOOSEFONTW *lpcf)
 {
     HDC ret = ((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC) ?
         lpcf->hDC :
@@ -452,7 +452,7 @@
 /*************************************************************************
  *              CFn_ReleaseDC                           [internal]
  */
-static inline void CFn_ReleaseDC(LPCHOOSEFONTW lpcf, HDC hdc)
+static inline void CFn_ReleaseDC(const CHOOSEFONTW *lpcf, HDC hdc)
 {
         if(!((lpcf->Flags & CF_PRINTERFONTS) && lpcf->hDC))
             ReleaseDC(0, hdc);
@@ -462,7 +462,7 @@
  *                 AddFontStyle                          [internal]
  */
 INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM,
-                UINT nFontType, LPCHOOSEFONTW lpcf, HWND hcmb2, HWND hcmb3,
+                UINT nFontType, const CHOOSEFONTW *lpcf, HWND hcmb2, HWND hcmb3,
                 HWND hDlg, BOOL iswin16)
 {
     int i;
@@ -1075,7 +1075,7 @@
     return TRUE;
 }
 
-LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, LPCHOOSEFONTW lpcf)
+LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, const CHOOSEFONTW *lpcf)
 {
     WINDOWINFO info;
 



More information about the wine-patches mailing list