usp10: Use BOOL type where appropriate

Michael Stefaniuc mstefani at redhat.com
Wed Feb 26 04:27:22 CST 2014


On 02/26/2014 11:11 AM, 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)...
> 
>> 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
BOOL is a signed integer makes no sense as a type for an 1-bit bitfield.
Yes, MS is still using it in some places.

bye
        michael



More information about the wine-devel mailing list