usp10: Use BOOL type where appropriate

Nikolay Sivov bunglehead at gmail.com
Wed Feb 26 04:18:16 CST 2014


On 2/26/2014 14:11, Frédéric Delanoy wrote:
> On Wed, Feb 26, 2014 at 8:29 AM, Nikolay Sivov <bunglehead at gmail.com> wrote:
>> On 2/26/2014 11:12, Frédéric Delanoy wrote:
>>> cf.
>>> http://msdn.microsoft.com/en-us/library/windows/desktop/dd374096%28v=vs.85%29.aspx
>>> ---
>>>    dlls/usp10/opentype.c | 32 ++++++++++++++++----------------
>>>    dlls/usp10/shape.c    | 36 ++++++++++++++++++------------------
>>>    dlls/usp10/usp10.c    | 26 +++++++++++++-------------
>>>    3 files changed, 47 insertions(+), 47 deletions(-)
>>>
>>> diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
>>> index 166d823..5b3bdc7 100644
>>> --- a/dlls/usp10/opentype.c
>>> +++ b/dlls/usp10/opentype.c
>>> @@ -645,34 +645,34 @@ void OpenType_GDEF_UpdateGlyphProps(ScriptCache
>>> *psc, const WORD *pwGlyphs, cons
>>>            {
>>>                case 0:
>>>                case BaseGlyph:
>>> -                pGlyphProp[i].sva.fClusterStart = 1;
>>> -                pGlyphProp[i].sva.fDiacritic = 0;
>>> -                pGlyphProp[i].sva.fZeroWidth = 0;
>>> +                pGlyphProp[i].sva.fClusterStart = TRUE;
>>> +                pGlyphProp[i].sva.fDiacritic = FALSE;
>>> +                pGlyphProp[i].sva.fZeroWidth = FALSE;
>>>                    break;
>> I think it's a wrong change.Even if msdn says you can use TRUE/FALSE here,
> MSDN says explicitly the possible values *are* TRUE and FALSE
> (http://msdn.microsoft.com/en-us/library/windows/desktop/dd374046%28v=vs.85%29.aspx)...
It says a lot of things.
>
>> field is not defined as of 'BOOL' type.
> Because it defines the field as bitfield WORD:1 to get an unsigned
> type; Microsoft isn't always consistent about using appropriate field
> type, especially when using bitfields
>
It doesn't mean we shouldn't be consistent too. My opinion on this is 
that if it's not BOOL type explicitly - don't use BOOL-kind of constants.



More information about the wine-devel mailing list