From 80d80c66af82ce1bd4c3538304580d880a0d69f1 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Fri, 6 Apr 2007 10:55:44 +0100 Subject: [PATCH] comdlg32: Constify some variables. --- dlls/comdlg32/finddlg16.c | 12 ++++++------ dlls/comdlg32/finddlg32.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/comdlg32/finddlg16.c b/dlls/comdlg32/finddlg16.c index 113b15d6156..f30bae80172 100644 --- a/dlls/comdlg32/finddlg16.c +++ b/dlls/comdlg32/finddlg16.c @@ -228,7 +228,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find ) * FINDDLG_WMInitDialog [internal] */ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags, - LPSTR lpstrFindWhat, BOOL fUnicode) + LPCSTR lpstrFindWhat, BOOL fUnicode) { SetWindowLongPtrW(hWnd, DWLP_USER, lParam); *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM); @@ -237,7 +237,7 @@ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags, * FindNext (IDOK) button. Only after typing some text, the button should be * enabled. */ - if (fUnicode) SetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat); + if (fUnicode) SetDlgItemTextW(hWnd, edt1, (LPCWSTR)lpstrFindWhat); else SetDlgItemTextA(hWnd, edt1, lpstrFindWhat); CheckRadioButton(hWnd, rad1, rad2, (*lpFlags & FR_DOWN) ? rad2 : rad1); if (*lpFlags & (FR_HIDEUPDOWN | FR_NOUPDOWN)) { @@ -341,8 +341,8 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam, * REPLACEDLG_WMInitDialog [internal] */ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam, - LPDWORD lpFlags, LPSTR lpstrFindWhat, - LPSTR lpstrReplaceWith, BOOL fUnicode) + LPDWORD lpFlags, LPCSTR lpstrFindWhat, + LPCSTR lpstrReplaceWith, BOOL fUnicode) { SetWindowLongPtrW(hWnd, DWLP_USER, lParam); *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM); @@ -353,8 +353,8 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam, */ if (fUnicode) { - SetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat); - SetDlgItemTextW(hWnd, edt2, (LPWSTR)lpstrReplaceWith); + SetDlgItemTextW(hWnd, edt1, (LPCWSTR)lpstrFindWhat); + SetDlgItemTextW(hWnd, edt2, (LPCWSTR)lpstrReplaceWith); } else { SetDlgItemTextA(hWnd, edt1, lpstrFindWhat); diff --git a/dlls/comdlg32/finddlg32.c b/dlls/comdlg32/finddlg32.c index 2d655263060..5485804733d 100644 --- a/dlls/comdlg32/finddlg32.c +++ b/dlls/comdlg32/finddlg32.c @@ -299,8 +299,8 @@ static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPA * FALSE: Failure */ static BOOL COMDLG32_FR_CheckPartial( - LPFINDREPLACEA pfr, /* [in] Find structure */ - BOOL Replace /* [in] True if called as replace */ + const FINDREPLACEA *pfr, /* [in] Find structure */ + BOOL Replace /* [in] True if called as replace */ ) { if(!pfr) {