Commit a6d57b0a authored by Alexandre Julliard's avatar Alexandre Julliard

riched20: Build with msvcrt.

parent baf14b1a
MODULE = riched20.dll MODULE = riched20.dll
IMPORTLIB = riched20 IMPORTLIB = riched20
IMPORTS = uuid usp10 ole32 oleaut32 imm32 user32 gdi32 IMPORTS = uuid usp10 ole32 oleaut32 imm32 user32 gdi32
EXTRADLLFLAGS = -Wl,--image-base,0x7ac00000 EXTRADLLFLAGS = -mno-cygwin -Wl,--image-base,0x7ac00000
C_SRCS = \ C_SRCS = \
caret.c \ caret.c \
......
...@@ -1926,7 +1926,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH ...@@ -1926,7 +1926,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
while (pCurItem && ME_CharCompare( *get_text( &pCurItem->member.run, nCurStart + nMatched ), text[nMatched], (flags & FR_MATCHCASE))) while (pCurItem && ME_CharCompare( *get_text( &pCurItem->member.run, nCurStart + nMatched ), text[nMatched], (flags & FR_MATCHCASE)))
{ {
if ((flags & FR_WHOLEWORD) && isalnumW(wLastChar)) if ((flags & FR_WHOLEWORD) && iswalnum(wLastChar))
break; break;
nMatched++; nMatched++;
...@@ -1950,7 +1950,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH ...@@ -1950,7 +1950,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
else else
wNextChar = ' '; wNextChar = ' ';
if (isalnumW(wNextChar)) if (iswalnum(wNextChar))
break; break;
} }
...@@ -2010,7 +2010,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH ...@@ -2010,7 +2010,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
while (pCurItem && ME_CharCompare( *get_text( &pCurItem->member.run, nCurEnd - nMatched - 1 ), while (pCurItem && ME_CharCompare( *get_text( &pCurItem->member.run, nCurEnd - nMatched - 1 ),
text[nLen - nMatched - 1], (flags & FR_MATCHCASE) )) text[nLen - nMatched - 1], (flags & FR_MATCHCASE) ))
{ {
if ((flags & FR_WHOLEWORD) && isalnumW(wLastChar)) if ((flags & FR_WHOLEWORD) && iswalnum(wLastChar))
break; break;
nMatched++; nMatched++;
...@@ -2036,7 +2036,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH ...@@ -2036,7 +2036,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
else else
wPrevChar = ' '; wPrevChar = ' ';
if (isalnumW(wPrevChar)) if (iswalnum(wPrevChar))
break; break;
} }
...@@ -5284,7 +5284,7 @@ LRESULT WINAPI REExtendedRegisterClass(void) ...@@ -5284,7 +5284,7 @@ LRESULT WINAPI REExtendedRegisterClass(void)
return result; return result;
} }
static int wchar_comp( const void *key, const void *elem ) static int __cdecl wchar_comp( const void *key, const void *elem )
{ {
return *(const WCHAR *)key - *(const WCHAR *)elem; return *(const WCHAR *)key - *(const WCHAR *)elem;
} }
...@@ -5333,7 +5333,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, ...@@ -5333,7 +5333,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor,
while (cursor.nOffset < run_len) while (cursor.nOffset < run_len)
{ {
c = str[cursor.nOffset]; c = str[cursor.nOffset];
if (!isspaceW( c ) && !isurlneutral( c )) if (!iswspace( c ) && !isurlneutral( c ))
{ {
*candidate_min = cursor; *candidate_min = cursor;
candidateStarted = TRUE; candidateStarted = TRUE;
...@@ -5353,7 +5353,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, ...@@ -5353,7 +5353,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor,
while (cursor.nOffset < run_len) while (cursor.nOffset < run_len)
{ {
c = str[cursor.nOffset]; c = str[cursor.nOffset];
if (isspaceW( c )) if (iswspace( c ))
{ {
if (quoted && c != '\r') if (quoted && c != '\r')
{ {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
*/ */
#include "editstr.h" #include "editstr.h"
#include "wine/unicode.h"
struct _RTF_Info; struct _RTF_Info;
...@@ -105,7 +104,7 @@ static inline int ME_IsWSpace(WCHAR ch) ...@@ -105,7 +104,7 @@ static inline int ME_IsWSpace(WCHAR ch)
static inline int ME_CharCompare(WCHAR a, WCHAR b, int caseSensitive) static inline int ME_CharCompare(WCHAR a, WCHAR b, int caseSensitive)
{ {
return caseSensitive ? (a == b) : (toupperW(a) == toupperW(b)); return caseSensitive ? (a == b) : (towupper(a) == towupper(b));
} }
/* note: those two really return the first matching offset (starting from EOS)+1 /* note: those two really return the first matching offset (starting from EOS)+1
......
...@@ -312,7 +312,7 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num ) ...@@ -312,7 +312,7 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num )
{ {
case PFN_ARABIC: case PFN_ARABIC:
default: default:
p += sprintfW( p, fmtW, num ); p += swprintf( p, 20, fmtW, num );
break; break;
case PFN_LCLETTER: case PFN_LCLETTER:
......
...@@ -372,7 +372,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te ...@@ -372,7 +372,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te
case FONT_WEIGHT: case FONT_WEIGHT:
return left->l == right->l; return left->l == right->l;
case FONT_NAME: case FONT_NAME:
return !strcmpW(left->str, right->str); return !wcscmp(left->str, right->str);
case FONT_POSITION: case FONT_POSITION:
case FONT_SIZE: case FONT_SIZE:
case FONT_SPACING: case FONT_SPACING:
...@@ -1688,7 +1688,7 @@ static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR str) ...@@ -1688,7 +1688,7 @@ static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR str)
} }
/* it's safer not to rely on stored BSTR length */ /* it's safer not to rely on stored BSTR length */
len = strlenW(str); len = lstrlenW(str);
cursor = editor->pCursors[0]; cursor = editor->pCursors[0];
ME_CursorFromCharOfs(editor, This->start, &editor->pCursors[0]); ME_CursorFromCharOfs(editor, This->start, &editor->pCursors[0]);
style = ME_GetInsertStyle(editor, 0); style = ME_GetInsertStyle(editor, 0);
...@@ -4537,7 +4537,7 @@ static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR str) ...@@ -4537,7 +4537,7 @@ static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR str)
return CO_E_RELEASED; return CO_E_RELEASED;
editor = This->reOle->editor; editor = This->reOle->editor;
len = strlenW(str); len = lstrlenW(str);
ME_GetSelectionOfs(editor, &from, &to); ME_GetSelectionOfs(editor, &from, &to);
ME_ReplaceSel(editor, FALSE, str, len); ME_ReplaceSel(editor, FALSE, str, len);
......
...@@ -862,7 +862,7 @@ void ME_GetCharFormat(ME_TextEditor *editor, const ME_Cursor *from, ...@@ -862,7 +862,7 @@ void ME_GetCharFormat(ME_TextEditor *editor, const ME_Cursor *from,
{ {
if (!(tmp.dwMask & CFM_FACE)) if (!(tmp.dwMask & CFM_FACE))
pFmt->dwMask &= ~CFM_FACE; pFmt->dwMask &= ~CFM_FACE;
else if (lstrcmpW(pFmt->szFaceName, tmp.szFaceName) || else if (wcscmp(pFmt->szFaceName, tmp.szFaceName) ||
pFmt->bPitchAndFamily != tmp.bPitchAndFamily) pFmt->bPitchAndFamily != tmp.bPitchAndFamily)
pFmt->dwMask &= ~CFM_FACE; pFmt->dwMask &= ~CFM_FACE;
} }
......
...@@ -352,7 +352,7 @@ static BOOL ME_IsFontEqual(const LOGFONTW *p1, const LOGFONTW *p2) ...@@ -352,7 +352,7 @@ static BOOL ME_IsFontEqual(const LOGFONTW *p1, const LOGFONTW *p2)
{ {
if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName))) if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName)))
return FALSE; return FALSE;
if (lstrcmpW(p1->lfFaceName, p2->lfFaceName)) if (wcscmp(p1->lfFaceName, p2->lfFaceName))
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
......
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#define COBJMACROS #define COBJMACROS
#include "editor.h" #include "editor.h"
......
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#define COBJMACROS #define COBJMACROS
#include "editor.h" #include "editor.h"
......
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#define NONAMELESSUNION #define NONAMELESSUNION
#include "editor.h" #include "editor.h"
...@@ -123,17 +120,17 @@ ME_StreamOutMove(ME_OutStream *pStream, const char *buffer, int len) ...@@ -123,17 +120,17 @@ ME_StreamOutMove(ME_OutStream *pStream, const char *buffer, int len)
} }
static BOOL static BOOL WINAPIV
ME_StreamOutPrint(ME_OutStream *pStream, const char *format, ...) ME_StreamOutPrint(ME_OutStream *pStream, const char *format, ...)
{ {
char string[STREAMOUT_BUFFER_SIZE]; /* This is going to be enough */ char string[STREAMOUT_BUFFER_SIZE]; /* This is going to be enough */
int len; int len;
va_list valist; __ms_va_list valist;
va_start(valist, format); __ms_va_start(valist, format);
len = vsnprintf(string, sizeof(string), format, valist); len = vsnprintf(string, sizeof(string), format, valist);
va_end(valist); __ms_va_end(valist);
return ME_StreamOutMove(pStream, string, len); return ME_StreamOutMove(pStream, string, len);
} }
...@@ -245,7 +242,7 @@ static void add_font_to_fonttbl( ME_OutStream *stream, ME_Style *style ) ...@@ -245,7 +242,7 @@ static void add_font_to_fonttbl( ME_OutStream *stream, ME_Style *style )
{ {
for (i = 0; i < stream->nFontTblLen; i++) for (i = 0; i < stream->nFontTblLen; i++)
if (table[i].bCharSet == charset if (table[i].bCharSet == charset
&& (table[i].szFaceName == face || !lstrcmpW(table[i].szFaceName, face))) && (table[i].szFaceName == face || !wcscmp(table[i].szFaceName, face)))
break; break;
if (i == stream->nFontTblLen && i < STREAMOUT_FONTTBL_SIZE) if (i == stream->nFontTblLen && i < STREAMOUT_FONTTBL_SIZE)
...@@ -270,7 +267,7 @@ static BOOL find_font_in_fonttbl( ME_OutStream *stream, CHARFORMAT2W *fmt, unsig ...@@ -270,7 +267,7 @@ static BOOL find_font_in_fonttbl( ME_OutStream *stream, CHARFORMAT2W *fmt, unsig
for (i = 0; i < stream->nFontTblLen; i++) for (i = 0; i < stream->nFontTblLen; i++)
{ {
if (facename == stream->fonttbl[i].szFaceName if (facename == stream->fonttbl[i].szFaceName
|| !lstrcmpW(facename, stream->fonttbl[i].szFaceName)) || !wcscmp(facename, stream->fonttbl[i].szFaceName))
if (!(fmt->dwMask & CFM_CHARSET) if (!(fmt->dwMask & CFM_CHARSET)
|| fmt->bCharSet == stream->fonttbl[i].bCharSet) || fmt->bCharSet == stream->fonttbl[i].bCharSet)
{ {
...@@ -841,7 +838,7 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt) ...@@ -841,7 +838,7 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt)
} }
} }
if (strcmpW(old_fmt->szFaceName, fmt->szFaceName) || if (wcscmp(old_fmt->szFaceName, fmt->szFaceName) ||
old_fmt->bCharSet != fmt->bCharSet) old_fmt->bCharSet != fmt->bCharSet)
{ {
if (find_font_in_fonttbl( pStream, fmt, &i )) if (find_font_in_fonttbl( pStream, fmt, &i ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment