Francois Gouget : riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX.
Alexandre Julliard
julliard at winehq.org
Wed Feb 6 07:27:49 CST 2008
Module: wine
Branch: master
Commit: 1552f22acfc32a61c20405f3bb198bea28664e7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1552f22acfc32a61c20405f3bb198bea28664e7d
Author: Francois Gouget <fgouget at free.fr>
Date: Wed Feb 6 04:07:40 2008 +0100
riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX.
---
dlls/riched20/editor.c | 4 ++--
dlls/riched20/tests/editor.c | 36 ++++++++++++++++++------------------
include/richedit.h | 2 +-
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 3584525..6aa21a7 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2426,7 +2426,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ex.flags = GT_USECRLF;
ex.codepage = unicode ? 1200 : CP_ACP;
ex.lpDefaultChar = NULL;
- ex.lpUsedDefaultChar = NULL;
+ ex.lpUsedDefChar = NULL;
rc = RichEditWndProc_common(hWnd, EM_GETTEXTEX, (WPARAM)&ex, unicode ? (LPARAM)bufferW : (LPARAM)bufferA, unicode);
if (unicode)
@@ -2480,7 +2480,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
buffer = heap_alloc((crlfmul*nCount + 1) * sizeof(WCHAR));
buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF);
- rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefaultChar);
+ rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefChar);
if (rc) rc--; /* do not count 0 terminator */
heap_free(buffer);
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 73f87fa..090eaad 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -1134,7 +1134,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1);
@@ -1150,7 +1150,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@@ -1167,7 +1167,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem2) == 0,
@@ -1182,7 +1182,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_USECRLF; /* <-- asking for CR -> CRLF conversion */
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem1) == 0,
@@ -1195,7 +1195,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@@ -1208,7 +1208,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@@ -1221,7 +1221,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@@ -1829,7 +1829,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1") == 0,
"EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
@@ -1844,7 +1844,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1873,7 +1873,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1902,7 +1902,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1921,7 +1921,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1940,7 +1940,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r \r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1959,7 +1959,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1978,7 +1978,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -1997,7 +1997,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\rX\r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -2015,7 +2015,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@@ -2034,7 +2034,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
- getText.lpUsedDefaultChar = NULL;
+ getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
diff --git a/include/richedit.h b/include/richedit.h
index ffbf661..cb278f6 100644
--- a/include/richedit.h
+++ b/include/richedit.h
@@ -531,7 +531,7 @@ typedef struct _gettextex {
DWORD flags;
UINT codepage;
LPCSTR lpDefaultChar;
- LPBOOL lpUsedDefaultChar;
+ LPBOOL lpUsedDefChar;
} GETTEXTEX;
#define SF_TEXT 0x00000001
More information about the wine-cvs
mailing list