forked from Mirrors/wine-wine
riched20: Use BOOL type where appropriate.
parent
3ec514382f
commit
5f88ba5b61
|
@ -904,7 +904,7 @@ static ME_DisplayItem* ME_FindPixelPosInTableRow(int x, int y,
|
|||
}
|
||||
|
||||
static BOOL ME_FindRunInRow(ME_TextEditor *editor, ME_DisplayItem *pRow,
|
||||
int x, ME_Cursor *cursor, int *pbCaretAtEnd)
|
||||
int x, ME_Cursor *cursor, BOOL *pbCaretAtEnd)
|
||||
{
|
||||
ME_DisplayItem *pNext, *pLastRun;
|
||||
ME_Row *row = &pRow->member.row;
|
||||
|
@ -964,7 +964,7 @@ static BOOL ME_FindPixelPos(ME_TextEditor *editor, int x, int y,
|
|||
y -= editor->rcFormat.top;
|
||||
|
||||
if (is_eol)
|
||||
*is_eol = 0;
|
||||
*is_eol = FALSE;
|
||||
|
||||
/* find paragraph */
|
||||
for (; p != editor->pBuffer->pLast; p = p->member.para.next_para)
|
||||
|
@ -1109,8 +1109,7 @@ static void ME_ExtendAnchorSelection(ME_TextEditor *editor)
|
|||
void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum)
|
||||
{
|
||||
ME_Cursor tmp_cursor;
|
||||
int is_selection = 0;
|
||||
BOOL is_shift;
|
||||
BOOL is_selection = FALSE, is_shift;
|
||||
|
||||
editor->nUDArrowX = -1;
|
||||
|
||||
|
@ -1535,14 +1534,14 @@ ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl)
|
|||
ME_CheckCharOffsets(editor);
|
||||
switch(nVKey) {
|
||||
case VK_LEFT:
|
||||
editor->bCaretAtEnd = 0;
|
||||
editor->bCaretAtEnd = FALSE;
|
||||
if (ctrl)
|
||||
success = ME_MoveCursorWords(editor, &tmp_curs, -1);
|
||||
else
|
||||
success = ME_MoveCursorChars(editor, &tmp_curs, -1);
|
||||
break;
|
||||
case VK_RIGHT:
|
||||
editor->bCaretAtEnd = 0;
|
||||
editor->bCaretAtEnd = FALSE;
|
||||
if (ctrl)
|
||||
success = ME_MoveCursorWords(editor, &tmp_curs, +1);
|
||||
else
|
||||
|
@ -1565,7 +1564,7 @@ ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl)
|
|||
ME_ArrowCtrlHome(editor, &tmp_curs);
|
||||
else
|
||||
ME_ArrowHome(editor, &tmp_curs);
|
||||
editor->bCaretAtEnd = 0;
|
||||
editor->bCaretAtEnd = FALSE;
|
||||
break;
|
||||
}
|
||||
case VK_END:
|
||||
|
|
|
@ -1633,7 +1633,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
|
|||
ME_Cursor linebreakCursor = *selEnd;
|
||||
|
||||
ME_MoveCursorChars(editor, &linebreakCursor, -linebreakSize);
|
||||
ME_GetTextW(editor, lastchar, 2, &linebreakCursor, linebreakSize, 0);
|
||||
ME_GetTextW(editor, lastchar, 2, &linebreakCursor, linebreakSize, FALSE);
|
||||
if (lastchar[0] == '\r' && (lastchar[1] == '\n' || lastchar[1] == '\0')) {
|
||||
ME_InternalDeleteText(editor, &linebreakCursor, linebreakSize, FALSE);
|
||||
}
|
||||
|
@ -2003,12 +2003,12 @@ static int ME_GetTextRange(ME_TextEditor *editor, WCHAR *strText,
|
|||
{
|
||||
if (!strText) return 0;
|
||||
if (unicode) {
|
||||
return ME_GetTextW(editor, strText, INT_MAX, start, nLen, 0);
|
||||
return ME_GetTextW(editor, strText, INT_MAX, start, nLen, FALSE);
|
||||
} else {
|
||||
int nChars;
|
||||
WCHAR *p = ALLOC_N_OBJ(WCHAR, nLen+1);
|
||||
if (!p) return 0;
|
||||
nChars = ME_GetTextW(editor, p, nLen, start, nLen, 0);
|
||||
nChars = ME_GetTextW(editor, p, nLen, start, nLen, FALSE);
|
||||
WideCharToMultiByte(CP_ACP, 0, p, nChars+1, (char *)strText,
|
||||
nLen+1, NULL, NULL);
|
||||
FREE_OBJ(p);
|
||||
|
@ -4702,7 +4702,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
|
|||
int nLen;
|
||||
|
||||
/* bCRLF flag is only honored in 2.0 and up. 1.0 must always return text verbatim */
|
||||
if (editor->bEmulateVersion10) bCRLF = 0;
|
||||
if (editor->bEmulateVersion10) bCRLF = FALSE;
|
||||
|
||||
pRun = start->pRun;
|
||||
assert(pRun);
|
||||
|
@ -4987,7 +4987,7 @@ static BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, const ME_Cursor *start, i
|
|||
WCHAR bufferW[MAX_PREFIX_LEN + 1];
|
||||
unsigned int i;
|
||||
|
||||
ME_GetTextW(editor, bufferW, MAX_PREFIX_LEN, start, nChars, 0);
|
||||
ME_GetTextW(editor, bufferW, MAX_PREFIX_LEN, start, nChars, FALSE);
|
||||
for (i = 0; i < sizeof(prefixes) / sizeof(*prefixes); i++)
|
||||
{
|
||||
if (nChars < prefixes[i].length) continue;
|
||||
|
|
|
@ -256,7 +256,7 @@ void RTFInit(RTF_Info *info)
|
|||
info->rtfLineNum = 0;
|
||||
info->rtfLinePos = 0;
|
||||
info->prevChar = EOF;
|
||||
info->bumpLine = 0;
|
||||
info->bumpLine = FALSE;
|
||||
|
||||
info->dwCPOutputCount = 0;
|
||||
if (!info->cpOutputBuffer)
|
||||
|
@ -722,7 +722,7 @@ static void _RTFGetToken2(RTF_Info *info)
|
|||
static int GetChar(RTF_Info *info)
|
||||
{
|
||||
int c;
|
||||
int oldBumpLine;
|
||||
BOOL oldBumpLine;
|
||||
|
||||
if ((c = _RTFGetChar(info)) != EOF)
|
||||
{
|
||||
|
@ -730,16 +730,16 @@ static int GetChar(RTF_Info *info)
|
|||
info->rtfTextBuf[info->rtfTextLen] = '\0';
|
||||
}
|
||||
if (info->prevChar == EOF)
|
||||
info->bumpLine = 1;
|
||||
oldBumpLine = info->bumpLine; /* non-zero if prev char was line ending */
|
||||
info->bumpLine = 0;
|
||||
info->bumpLine = TRUE;
|
||||
oldBumpLine = info->bumpLine; /* TRUE if prev char was line ending */
|
||||
info->bumpLine = FALSE;
|
||||
if (c == '\r')
|
||||
info->bumpLine = 1;
|
||||
info->bumpLine = TRUE;
|
||||
else if (c == '\n')
|
||||
{
|
||||
info->bumpLine = 1;
|
||||
info->bumpLine = TRUE;
|
||||
if (info->prevChar == '\r') /* oops, previous \r wasn't */
|
||||
oldBumpLine = 0; /* really a line ending */
|
||||
oldBumpLine = FALSE; /* really a line ending */
|
||||
}
|
||||
++info->rtfLinePos;
|
||||
if (oldBumpLine) /* were we supposed to increment the */
|
||||
|
|
|
@ -1139,7 +1139,7 @@ struct _RTF_Info {
|
|||
char *pushedTextBuf;
|
||||
|
||||
int prevChar;
|
||||
int bumpLine;
|
||||
BOOL bumpLine;
|
||||
|
||||
/* Document-wide attributes */
|
||||
RTFFont *fontList; /* these lists MUST be */
|
||||
|
|
Loading…
Reference in New Issue