Commit f4dc6491 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

oleaut32: Use BOOL type where appropriate.

parent eae8f4ed
......@@ -353,9 +353,9 @@ HRESULT WINAPI OleCreateFontIndirect(
fd.cySize.s.Hi = 0;
fd.sWeight = 0;
fd.sCharset = 0;
fd.fItalic = 0;
fd.fUnderline = 0;
fd.fStrikethrough = 0;
fd.fItalic = FALSE;
fd.fUnderline = FALSE;
fd.fStrikethrough = FALSE;
lpFontDesc = &fd;
}
......
......@@ -2407,7 +2407,7 @@ static void MSFT_GetTdesc(TLBContext *pcx, INT type, TYPEDESC *pTd)
TRACE_(typelib)("vt type = %X\n", pTd->vt);
}
static int TLB_is_propgetput(INVOKEKIND invkind)
static BOOL TLB_is_propgetput(INVOKEKIND invkind)
{
return (invkind == INVOKE_PROPERTYGET ||
invkind == INVOKE_PROPERTYPUT ||
......@@ -5428,7 +5428,8 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
BINDPTR * pBindPtr)
{
ITypeLibImpl *This = impl_from_ITypeComp(iface);
int typemismatch=0, i;
BOOL typemismatch = FALSE;
int i;
TRACE("(%p)->(%s, 0x%x, 0x%x, %p, %p, %p)\n", This, debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr);
......@@ -5469,7 +5470,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
return S_OK;
}
else if (hr == TYPE_E_TYPEMISMATCH)
typemismatch = 1;
typemismatch = TRUE;
}
if ((pTypeInfo->typekind == TKIND_COCLASS) &&
......@@ -5540,7 +5541,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
return S_OK;
}
else if (hr == TYPE_E_TYPEMISMATCH)
typemismatch = 1;
typemismatch = TRUE;
}
}
......
......@@ -4682,10 +4682,10 @@ static unsigned char VARIANT_int_divbychar(DWORD * p, unsigned int n, unsigned c
}
/* check to test if encoded number is a zero. Returns 1 if zero, 0 for nonzero */
static int VARIANT_int_iszero(const DWORD * p, unsigned int n)
static BOOL VARIANT_int_iszero(const DWORD * p, unsigned int n)
{
for (; n > 0; n--) if (*p++ != 0) return 0;
return 1;
for (; n > 0; n--) if (*p++ != 0) return FALSE;
return TRUE;
}
/* multiply two DECIMALS, without changing either one, and place result in third
......@@ -4695,7 +4695,7 @@ static int VARIANT_int_iszero(const DWORD * p, unsigned int n)
*/
static int VARIANT_DI_mul(const VARIANT_DI * a, const VARIANT_DI * b, VARIANT_DI * result)
{
int r_overflow = 0;
BOOL r_overflow = FALSE;
DWORD running[6];
signed int mulstart;
......@@ -4786,12 +4786,12 @@ static int VARIANT_DI_mul(const VARIANT_DI * a, const VARIANT_DI * b, VARIANT_DI
}
/* cast DECIMAL into string. Any scale should be handled properly. en_US locale is
hardcoded (period for decimal separator, dash as negative sign). Returns 0 for
success, nonzero if insufficient space in output buffer.
hardcoded (period for decimal separator, dash as negative sign). Returns TRUE for
success, FALSE if insufficient space in output buffer.
*/
static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
static BOOL VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
{
int overflow = 0;
BOOL overflow = FALSE;
DWORD quotient[3];
unsigned char remainder;
unsigned int i;
......@@ -4802,7 +4802,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
*s++ = '-';
n--;
}
else overflow = 1;
else overflow = TRUE;
}
/* prepare initial 0 */
......@@ -4810,7 +4810,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
if (n >= 2) {
s[0] = '0';
s[1] = '\0';
} else overflow = 1;
} else overflow = TRUE;
}
i = 0;
......@@ -4818,7 +4818,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
while (!overflow && !VARIANT_int_iszero(quotient, sizeof(quotient) / sizeof(DWORD))) {
remainder = VARIANT_int_divbychar(quotient, sizeof(quotient) / sizeof(DWORD), 10);
if (i + 2 > n) {
overflow = 1;
overflow = TRUE;
} else {
s[i++] = '0' + remainder;
s[i] = '\0';
......@@ -4839,7 +4839,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
if (i <= a->scale) {
unsigned int numzeroes = a->scale + 1 - i;
if (i + 1 + numzeroes >= n) {
overflow = 1;
overflow = TRUE;
} else {
memmove(s + numzeroes, s, (i + 1) * sizeof(WCHAR));
i += numzeroes;
......@@ -4853,7 +4853,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
if (a->scale > 0) {
unsigned int periodpos = i - a->scale;
if (i + 2 >= n) {
overflow = 1;
overflow = TRUE;
} else {
memmove(s + periodpos + 1, s + periodpos, (i + 1 - periodpos) * sizeof(WCHAR));
s[periodpos] = '.'; i++;
......@@ -4865,7 +4865,7 @@ static int VARIANT_DI_tostringW(const VARIANT_DI * a, WCHAR * s, unsigned int n)
}
}
return overflow;
return !overflow;
}
/* shift the bits of a DWORD array to the left. p[0] is assumed LSB */
......
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