Andrew Talbot : comdlg32: Constify some variables.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 6 06:07:59 CDT 2007


Module: wine
Branch: master
Commit: a855ba87da2c9107444fb35ff993b768b6ca2a2a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a855ba87da2c9107444fb35ff993b768b6ca2a2a

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Fri Apr  6 10:56:00 2007 +0100

comdlg32: Constify some variables.

---

 dlls/comdlg32/cdlg.h      |    6 +++---
 dlls/comdlg32/fontdlg.c   |   16 ++++++++--------
 dlls/comdlg32/fontdlg16.c |    4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h
index 1d091cc..22cd5a2 100644
--- a/dlls/comdlg32/cdlg.h
+++ b/dlls/comdlg32/cdlg.h
@@ -213,10 +213,10 @@ typedef struct
 } 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_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam);
 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 --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c
index 2f01b3b..42833f1 100644
--- a/dlls/comdlg32/fontdlg.c
+++ b/dlls/comdlg32/fontdlg.c
@@ -287,7 +287,7 @@ static const COLORREF textcolors[TEXT_COLORS]=
 /***********************************************************************
  *                          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 @@ static BOOL CFn_HookCallChk32(LPCHOOSEFONTW lpcf)
  *              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 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
 /*************************************************************************
  *              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 @@ static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf)
 /*************************************************************************
  *              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 @@ static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTW lpcf)
 /*************************************************************************
  *              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 @@ static inline HDC CFn_GetDC(LPCHOOSEFONTW lpcf)
 /*************************************************************************
  *              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 @@ static inline void CFn_ReleaseDC(LPCHOOSEFONTW lpcf, HDC hdc)
  *                 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 @@ static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam, LPCHOOSEFO
     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;
 
diff --git a/dlls/comdlg32/fontdlg16.c b/dlls/comdlg32/fontdlg16.c
index 297952c..7ed63dc 100644
--- a/dlls/comdlg32/fontdlg16.c
+++ b/dlls/comdlg32/fontdlg16.c
@@ -72,7 +72,7 @@ static void FONT_Metrics16To32W( const TEXTMETRIC16 *pm16,
     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 @@ static void CFn_CHOOSEFONT16to32W(LPCHOOSEFONT16 chf16, LPCHOOSEFONTW chf32w)
 /***********************************************************************
  *                          CFn_HookCallChk                 [internal]
  */
-static BOOL CFn_HookCallChk(LPCHOOSEFONT16 lpcf)
+static BOOL CFn_HookCallChk(const CHOOSEFONT16 *lpcf)
 {
  if (lpcf)
   if(lpcf->Flags & CF_ENABLEHOOK)




More information about the wine-cvs mailing list