diff --git a/dlls/riched20/Makefile.in b/dlls/riched20/Makefile.in index 8f8aeee8f51..76f78d3e8f0 100644 --- a/dlls/riched20/Makefile.in +++ b/dlls/riched20/Makefile.in @@ -1,7 +1,7 @@ MODULE = riched20.dll IMPORTLIB = riched20 IMPORTS = uuid usp10 ole32 oleaut32 imm32 user32 gdi32 -EXTRADLLFLAGS = -Wl,--image-base,0x7ac00000 +EXTRADLLFLAGS = -mno-cygwin -Wl,--image-base,0x7ac00000 C_SRCS = \ caret.c \ diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index b826a2cbe9f..1b78eab1daf 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -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))) { - if ((flags & FR_WHOLEWORD) && isalnumW(wLastChar)) + if ((flags & FR_WHOLEWORD) && iswalnum(wLastChar)) break; nMatched++; @@ -1950,7 +1950,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH else wNextChar = ' '; - if (isalnumW(wNextChar)) + if (iswalnum(wNextChar)) break; } @@ -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 ), text[nLen - nMatched - 1], (flags & FR_MATCHCASE) )) { - if ((flags & FR_WHOLEWORD) && isalnumW(wLastChar)) + if ((flags & FR_WHOLEWORD) && iswalnum(wLastChar)) break; nMatched++; @@ -2036,7 +2036,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH else wPrevChar = ' '; - if (isalnumW(wPrevChar)) + if (iswalnum(wPrevChar)) break; } @@ -5284,7 +5284,7 @@ LRESULT WINAPI REExtendedRegisterClass(void) 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; } @@ -5333,7 +5333,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, while (cursor.nOffset < run_len) { c = str[cursor.nOffset]; - if (!isspaceW( c ) && !isurlneutral( c )) + if (!iswspace( c ) && !isurlneutral( c )) { *candidate_min = cursor; candidateStarted = TRUE; @@ -5353,7 +5353,7 @@ static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, while (cursor.nOffset < run_len) { c = str[cursor.nOffset]; - if (isspaceW( c )) + if (iswspace( c )) { if (quoted && c != '\r') { diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 68264e7a75c..f56d2a25de0 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -19,7 +19,6 @@ */ #include "editstr.h" -#include "wine/unicode.h" struct _RTF_Info; @@ -105,7 +104,7 @@ static inline int ME_IsWSpace(WCHAR ch) 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 diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 6eec6b5906b..5b6cf77010c 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -312,7 +312,7 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num ) { case PFN_ARABIC: default: - p += sprintfW( p, fmtW, num ); + p += swprintf( p, 20, fmtW, num ); break; case PFN_LCLETTER: diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index c1119200153..5a102a7607d 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -372,7 +372,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te case FONT_WEIGHT: return left->l == right->l; case FONT_NAME: - return !strcmpW(left->str, right->str); + return !wcscmp(left->str, right->str); case FONT_POSITION: case FONT_SIZE: case FONT_SPACING: @@ -1688,7 +1688,7 @@ static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR str) } /* it's safer not to rely on stored BSTR length */ - len = strlenW(str); + len = lstrlenW(str); cursor = editor->pCursors[0]; ME_CursorFromCharOfs(editor, This->start, &editor->pCursors[0]); style = ME_GetInsertStyle(editor, 0); @@ -4537,7 +4537,7 @@ static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR str) return CO_E_RELEASED; editor = This->reOle->editor; - len = strlenW(str); + len = lstrlenW(str); ME_GetSelectionOfs(editor, &from, &to); ME_ReplaceSel(editor, FALSE, str, len); diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 66c24f88b70..6772e2f7630 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -862,7 +862,7 @@ void ME_GetCharFormat(ME_TextEditor *editor, const ME_Cursor *from, { if (!(tmp.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->dwMask &= ~CFM_FACE; } diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 3b9d7717ebc..1be1c15a157 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -352,7 +352,7 @@ static BOOL ME_IsFontEqual(const LOGFONTW *p1, const LOGFONTW *p2) { if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName))) return FALSE; - if (lstrcmpW(p1->lfFaceName, p2->lfFaceName)) + if (wcscmp(p1->lfFaceName, p2->lfFaceName)) return FALSE; return TRUE; } diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index fc489f2c1f7..3f25625ed52 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #define COBJMACROS #include "editor.h" diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 941b8a366c2..9ce1d476013 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #define COBJMACROS #include "editor.h" diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c index 2bd97d8db25..94001ee44b2 100644 --- a/dlls/riched20/writer.c +++ b/dlls/riched20/writer.c @@ -18,9 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #define NONAMELESSUNION #include "editor.h" @@ -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, ...) { char string[STREAMOUT_BUFFER_SIZE]; /* This is going to be enough */ 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); - va_end(valist); - + __ms_va_end(valist); + return ME_StreamOutMove(pStream, string, len); } @@ -245,7 +242,7 @@ static void add_font_to_fonttbl( ME_OutStream *stream, ME_Style *style ) { for (i = 0; i < stream->nFontTblLen; i++) if (table[i].bCharSet == charset - && (table[i].szFaceName == face || !lstrcmpW(table[i].szFaceName, face))) + && (table[i].szFaceName == face || !wcscmp(table[i].szFaceName, face))) break; if (i == stream->nFontTblLen && i < STREAMOUT_FONTTBL_SIZE) @@ -270,7 +267,7 @@ static BOOL find_font_in_fonttbl( ME_OutStream *stream, CHARFORMAT2W *fmt, unsig for (i = 0; i < stream->nFontTblLen; i++) { if (facename == stream->fonttbl[i].szFaceName - || !lstrcmpW(facename, stream->fonttbl[i].szFaceName)) + || !wcscmp(facename, stream->fonttbl[i].szFaceName)) if (!(fmt->dwMask & CFM_CHARSET) || fmt->bCharSet == stream->fonttbl[i].bCharSet) { @@ -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) { if (find_font_in_fonttbl( pStream, fmt, &i ))