Module: wine Branch: refs/heads/master Commit: 0c96a42a594ff52b2be678ad87b7e517c20536e2 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0c96a42a594ff52b2be678ad...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Fri Jul 21 21:05:00 2006 +0100
riched20: Write-strings warnings fix.
The string members of the FINDTEXT and FINDTEXTEX structs are declared constant in the SDK.
---
dlls/riched20/editor.c | 4 ++-- dlls/riched20/tests/editor.c | 4 ++-- include/richedit.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index eaab0f7..0bdfcd6 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -769,7 +769,7 @@ ME_FindItemAtOffset(ME_TextEditor *edito
static int -ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CHARRANGE *chrgText) +ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, const WCHAR *text, CHARRANGE *chrgText) { const int nLen = lstrlenW(text); const int nTextLen = ME_GetTextLength(editor); @@ -2675,7 +2675,7 @@ LRESULT WINAPI REExtendedRegisterClass(v int ME_AutoURLDetect(ME_TextEditor *editor, WCHAR curChar) { struct prefix_s { - char *text; + const char *text; int length; } prefixes[12] = { {"http:", 5}, diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index c71ca7f..7aa5a5f 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -44,7 +44,7 @@ static const char haystack[] = "WINEWine struct find_s { int start; int end; - char *needle; + const char *needle; int flags; int expected_loc; int _todo_wine; @@ -565,7 +565,7 @@ static HWND new_static_wnd(HWND parent) static void test_EM_AUTOURLDETECT(void) { struct urls_s { - char *text; + const char *text; int is_url; } urls[12] = { {"winehq.org", 0}, diff --git a/include/richedit.h b/include/richedit.h index 9798fc6..ffbf661 100644 --- a/include/richedit.h +++ b/include/richedit.h @@ -434,25 +434,25 @@ typedef struct _ensaveclipboard {
typedef struct _findtextA { CHARRANGE chrg; - LPSTR lpstrText; + LPCSTR lpstrText; } FINDTEXTA;
typedef struct _findtextW { CHARRANGE chrg; - LPWSTR lpstrText; + LPCWSTR lpstrText; } FINDTEXTW;
DECL_WINELIB_TYPE_AW(FINDTEXT)
typedef struct _findtextexA { CHARRANGE chrg; - LPSTR lpstrText; + LPCSTR lpstrText; CHARRANGE chrgText; } FINDTEXTEXA;
typedef struct _findtextexW { CHARRANGE chrg; - LPWSTR lpstrText; + LPCWSTR lpstrText; CHARRANGE chrgText; } FINDTEXTEXW;