Commit a6d57b0a authored by Alexandre Julliard's avatar Alexandre Julliard

riched20: Build with msvcrt.

parent baf14b1a
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 \
......
......@@ -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')
{
......
......@@ -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
......
......@@ -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:
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ))
......
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