comdlg32: Constify some variables (1 of 3)
Andrew Talbot
Andrew.Talbot at talbotville.com
Fri Apr 6 04:55:44 CDT 2007
Changelog:
comdlg32: Constify some variables.
diff -urN a/dlls/comdlg32/finddlg16.c b/dlls/comdlg32/finddlg16.c
--- a/dlls/comdlg32/finddlg16.c 2006-10-13 15:38:19.000000000 +0100
+++ b/dlls/comdlg32/finddlg16.c 2007-04-05 23:07:19.000000000 +0100
@@ -228,7 +228,7 @@
* 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 @@
* 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 @@
* 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 @@
*/
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 -urN a/dlls/comdlg32/finddlg32.c b/dlls/comdlg32/finddlg32.c
--- a/dlls/comdlg32/finddlg32.c 2006-10-13 15:38:19.000000000 +0100
+++ b/dlls/comdlg32/finddlg32.c 2007-04-05 22:18:55.000000000 +0100
@@ -299,8 +299,8 @@
* 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)
{
More information about the wine-patches
mailing list