diff --git a/ChangeLog b/ChangeLog index 15921365d..f51dd4bc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,87 @@ +2009-07-03 suzuki toshiya + + gxvalid: Pass the union by the pointer instead of the value. + + * src/gxvalid/gxvcommn.h: + - Declare new type `GXV_LookupValueCPtr'. + - Update the type of the 2nd argument to pass GXV_LookupValueDesc + data to the function prototyped as GXV_Lookup_Value_Validate_Func, + from GXV_LookupValueDesc to GXV_LookupValueCPtr. + - Likewise for the function prototyped as + GXV_Lookup_Fmt4_Transit_Func. + + - Declare new type `GXV_StateTable_GlyphOffsetCPtr'. + - Update the type of the 3rd argument to pass + GXV_StateTable_GlyphOffsetDesc data to the function prototyped + as GXV_StateTable_Entry_Validate_Func, from + GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr. + + - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'. + - Update the type of the 3rd argument to pass + GXV_XStateTable_GlyphOffsetDesc data to the function prototyped + as GXV_XStateTable_Entry_Validate_Func, + from GXV_XStateTable_GlyphOffsetDesc + to GXV_XStateTable_GlyphOffsetCPtr. + + * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate, + gxv_XClassTable_lookupval_validate, + gxv_XClassTable_lookupfmt4_transit): + Update from GXV_LookupValueDesc to GXV_LookupValueCPtr. + + * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate, + gxv_bsln_LookupFmt4_transit): Ditto. + + * src/gxvalid/gxvjust.c + (gxv_just_pcTable_LookupValue_entry_validate, + gxv_just_classTable_entry_validate, + gxv_just_wdcTable_LookupValue_validate): Ditto. + + * src/gxvalid/gxvkern.c + (gxv_kern_subtable_fmt1_entry_validate): Ditto. + + * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate, + gxv_lcar_LookupFmt4_transit): Ditto. + + * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate, + gxv_opbd_LookupFmt4_transit): Ditto. + + * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate, + gxv_prop_LookupFmt4_transit): Ditto. + + * src/gxvalid/gxvmort4.c + (gxv_mort_subtable_type4_lookupval_validate): Ditto. + + * src/gxvalid/gxvmort0.c + (gxv_mort_subtable_type0_entry_validate): Update + from GXV_StateTable_GlyphOffsetDesc + to GXV_StateTable_GlyphOffsetCPtr. + + * src/gxvalid/gxvmort1.c + (gxv_mort_subtable_type1_entry_validate): Ditto. + + * src/gxvalid/gxvmort2.c + (gxv_mort_subtable_type2_entry_validate): Ditto. + + * src/gxvalid/gxvmort5.c + (gxv_mort_subtable_type5_entry_validate): Ditto. + + * src/gxvalid/gxvmorx2.c + (gxv_morx_subtable_type2_entry_validate): Ditto. + + * src/gxvalid/gxvmorx5.c + (gxv_morx_subtable_type5_entry_validate): Ditto. + + * src/gxvalid/gxvmorx1.c + (gxv_morx_subtable_type1_entry_validate): Ditto. + (gxv_morx_subtable_type1_LookupValue_validate, + gxv_morx_subtable_type1_LookupFmt4_transit): + Update from GXV_LookupValueDesc to GXV_LookupValueCPtr. + + * src/gxvalid/gxvmorx0.c + (gxv_morx_subtable_type0_entry_validate): Update + from GXV_XStateTable_GlyphOffsetDesc + to GXV_XStateTable_GlyphOffsetCPtr. + 2009-06-28 suzuki toshiya ftpatent: Fix a bug by wrong usage of service->table_info(). diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c index 6cca65831..3d1003156 100644 --- a/src/gxvalid/gxvbsln.c +++ b/src/gxvalid/gxvbsln.c @@ -71,10 +71,10 @@ static void gxv_bsln_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { - FT_UShort v = value.u; + FT_UShort v = value_p->u; FT_UShort* ctlPoints; FT_UNUSED( glyph ); @@ -122,7 +122,7 @@ static GXV_LookupValueDesc gxv_bsln_LookupFmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -132,7 +132,7 @@ GXV_LookupValueDesc value; /* XXX: check range ? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + ( relative_gindex * sizeof ( FT_UShort ) ) ); p = valid->lookuptbl_head + offset; diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c index 1ebf7d681..de7ce6fde 100644 --- a/src/gxvalid/gxvcommn.c +++ b/src/gxvalid/gxvcommn.c @@ -448,7 +448,7 @@ } value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); - valid->lookupval_func( i, value, valid ); + valid->lookupval_func( i, &value, valid ); } valid->subtable_length = p - table; @@ -553,7 +553,7 @@ } for ( gid = firstGlyph; gid <= lastGlyph; gid++ ) - valid->lookupval_func( gid, value, valid ); + valid->lookupval_func( gid, &value, valid ); } gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid ); @@ -631,11 +631,11 @@ for ( gid = firstGlyph; gid <= lastGlyph; gid++ ) { value = valid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ), - base_value, + &base_value, limit, valid ); - valid->lookupval_func( gid, value, valid ); + valid->lookupval_func( gid, &value, valid ); } } @@ -710,7 +710,7 @@ } prev_glyph = glyph; - valid->lookupval_func( glyph, value, valid ); + valid->lookupval_func( glyph, &value, valid ); } gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, valid ); @@ -750,7 +750,7 @@ { GXV_LIMIT_CHECK( 2 ); value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); - valid->lookupval_func( (FT_UShort)( firstGlyph + i ), value, valid ); + valid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, valid ); } valid->subtable_length = p - table; @@ -1181,7 +1181,7 @@ if ( NULL != valid->statetable.entry_validate_func ) valid->statetable.entry_validate_func( state, flags, - glyphOffset, + &glyphOffset, statetable_table, statetable_limit, valid ); @@ -1352,15 +1352,15 @@ static void gxv_XClassTable_lookupval_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { FT_UNUSED( glyph ); - if ( value.u >= valid->xstatetable.nClasses ) + if ( value_p->u >= valid->xstatetable.nClasses ) FT_INVALID_DATA; - if ( value.u > valid->xstatetable.maxClassID ) - valid->xstatetable.maxClassID = value.u; + if ( value_p->u > valid->xstatetable.maxClassID ) + valid->xstatetable.maxClassID = value_p->u; } @@ -1392,7 +1392,7 @@ */ static GXV_LookupValueDesc gxv_XClassTable_lookupfmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -1402,7 +1402,7 @@ GXV_LookupValueDesc value; /* XXX: check range? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); p = valid->lookuptbl_head + offset; @@ -1556,7 +1556,7 @@ if ( NULL != valid->xstatetable.entry_validate_func ) valid->xstatetable.entry_validate_func( state, flags, - glyphOffset, + &glyphOffset, xstatetable_table, xstatetable_limit, valid ); diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h index 198d8e4fc..404c07ffa 100644 --- a/src/gxvalid/gxvcommn.h +++ b/src/gxvalid/gxvcommn.h @@ -79,6 +79,8 @@ FT_BEGIN_HEADER } GXV_LookupValueDesc; + typedef const GXV_LookupValueDesc* GXV_LookupValueCPtr; + typedef enum GXV_LookupValue_SignSpec_ { GXV_LOOKUPVALUE_UNSIGNED = 0, @@ -89,12 +91,12 @@ FT_BEGIN_HEADER typedef void (*GXV_Lookup_Value_Validate_Func)( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ); typedef GXV_LookupValueDesc (*GXV_Lookup_Fmt4_Transit_Func)( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ); @@ -134,6 +136,7 @@ FT_BEGIN_HEADER } GXV_StateTable_GlyphOffsetDesc; + typedef const GXV_StateTable_GlyphOffsetDesc* GXV_StateTable_GlyphOffsetCPtr; typedef void (*GXV_StateTable_Subtable_Setup_Func)( FT_UShort table_size, @@ -149,7 +152,7 @@ FT_BEGIN_HEADER (*GXV_StateTable_Entry_Validate_Func)( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes statetable_table, FT_Bytes statetable_limit, GXV_Validator valid ); @@ -175,6 +178,8 @@ FT_BEGIN_HEADER typedef GXV_StateTable_GlyphOffsetDesc GXV_XStateTable_GlyphOffsetDesc; + typedef const GXV_XStateTable_GlyphOffsetDesc* GXV_XStateTable_GlyphOffsetCPtr; + typedef void (*GXV_XStateTable_Subtable_Setup_Func)( FT_ULong table_size, FT_ULong classTable, @@ -189,7 +194,7 @@ FT_BEGIN_HEADER (*GXV_XStateTable_Entry_Validate_Func)( FT_UShort state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes xstatetable_table, FT_Bytes xstatetable_limit, GXV_Validator valid ); diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c index 29bf840b5..e951ce00e 100644 --- a/src/gxvalid/gxvjust.c +++ b/src/gxvalid/gxvjust.c @@ -323,15 +323,15 @@ static void gxv_just_pcTable_LookupValue_entry_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { FT_UNUSED( glyph ); - if ( value.u > GXV_JUST_DATA( pc_offset_max ) ) - GXV_JUST_DATA( pc_offset_max ) = value.u; - if ( value.u < GXV_JUST_DATA( pc_offset_max ) ) - GXV_JUST_DATA( pc_offset_min ) = value.u; + if ( value_p->u > GXV_JUST_DATA( pc_offset_max ) ) + GXV_JUST_DATA( pc_offset_max ) = value_p->u; + if ( value_p->u < GXV_JUST_DATA( pc_offset_max ) ) + GXV_JUST_DATA( pc_offset_min ) = value_p->u; } @@ -384,7 +384,7 @@ gxv_just_classTable_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -395,7 +395,7 @@ FT_UShort currentClass; FT_UNUSED( state ); - FT_UNUSED( glyphOffset ); + FT_UNUSED( glyphOffset_p ); FT_UNUSED( table ); FT_UNUSED( limit ); FT_UNUSED( valid ); @@ -449,15 +449,15 @@ static void gxv_just_wdcTable_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { FT_UNUSED( glyph ); - if ( value.u > GXV_JUST_DATA( wdc_offset_max ) ) - GXV_JUST_DATA( wdc_offset_max ) = value.u; - if ( value.u < GXV_JUST_DATA( wdc_offset_min ) ) - GXV_JUST_DATA( wdc_offset_min ) = value.u; + if ( value_p->u > GXV_JUST_DATA( wdc_offset_max ) ) + GXV_JUST_DATA( wdc_offset_max ) = value_p->u; + if ( value_p->u < GXV_JUST_DATA( wdc_offset_min ) ) + GXV_JUST_DATA( wdc_offset_min ) = value_p->u; } diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c index bfb405f65..2137db842 100644 --- a/src/gxvalid/gxvkern.c +++ b/src/gxvalid/gxvkern.c @@ -256,7 +256,7 @@ gxv_kern_subtable_fmt1_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -268,7 +268,7 @@ FT_UShort kernValue; FT_UNUSED( state ); - FT_UNUSED( glyphOffset ); + FT_UNUSED( glyphOffset_p ); push = (FT_UShort)( ( flags >> 15 ) & 1 ); diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c index 48821ea87..f14fa5b13 100644 --- a/src/gxvalid/gxvlcar.c +++ b/src/gxvalid/gxvlcar.c @@ -83,10 +83,10 @@ static void gxv_lcar_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { - FT_Bytes p = valid->root->base + value.u; + FT_Bytes p = valid->root->base + value_p->u; FT_Bytes limit = valid->root->limit; FT_UShort count; FT_Short partial; @@ -146,7 +146,7 @@ static GXV_LookupValueDesc gxv_lcar_LookupFmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -158,7 +158,7 @@ FT_UNUSED( lookuptbl_limit ); /* XXX: check range? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); p = valid->root->base + offset; limit = valid->root->limit; diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c index 0902056c6..0453062f6 100644 --- a/src/gxvalid/gxvmort0.c +++ b/src/gxvalid/gxvmort0.c @@ -64,7 +64,7 @@ gxv_mort_subtable_type0_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -80,7 +80,7 @@ FT_UNUSED( limit ); FT_UNUSED( GXV_Mort_IndicScript_Msg[verb] ); /* for the non-debugging */ - FT_UNUSED( glyphOffset ); /* case */ + FT_UNUSED( glyphOffset_p ); /* case */ markFirst = (FT_UShort)( ( flags >> 15 ) & 1 ); @@ -91,7 +91,7 @@ verb = (FT_UShort)( flags & 0x000F ); GXV_TRACE(( " IndicScript MorphRule for glyphOffset 0x%04x", - glyphOffset.u )); + glyphOffset_p->u )); GXV_TRACE(( " markFirst=%01d", markFirst )); GXV_TRACE(( " dontAdvance=%01d", dontAdvance )); GXV_TRACE(( " markLast=%01d", markLast )); diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c index 711bbd0ba..696d85032 100644 --- a/src/gxvalid/gxvmort1.c +++ b/src/gxvalid/gxvmort1.c @@ -135,7 +135,7 @@ gxv_mort_subtable_type1_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -154,8 +154,8 @@ dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 ); reserved = (FT_Short)( flags & 0x3FFF ); - markOffset = (FT_Short)( glyphOffset.ul >> 16 ); - currentOffset = (FT_Short)( glyphOffset.ul ); + markOffset = (FT_Short)( glyphOffset_p->ul >> 16 ); + currentOffset = (FT_Short)( glyphOffset_p->ul ); if ( 0 < reserved ) { diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c index f19d15dab..6f77cf39c 100644 --- a/src/gxvalid/gxvmort2.c +++ b/src/gxvalid/gxvmort2.c @@ -189,7 +189,7 @@ gxv_mort_subtable_type2_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -199,7 +199,7 @@ FT_UShort offset; FT_UNUSED( state ); - FT_UNUSED( glyphOffset ); + FT_UNUSED( glyphOffset_p ); FT_UNUSED( limit ); diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c index a04bc1efa..83470988c 100644 --- a/src/gxvalid/gxvmort4.c +++ b/src/gxvalid/gxvmort4.c @@ -40,12 +40,12 @@ static void gxv_mort_subtable_type4_lookupval_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { FT_UNUSED( glyph ); - gxv_glyphid_validate( value.u, valid ); + gxv_glyphid_validate( value_p->u, valid ); } /* @@ -78,7 +78,7 @@ static GXV_LookupValueDesc gxv_mort_subtable_type4_lookupfmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -88,7 +88,7 @@ GXV_LookupValueDesc value; /* XXX: check range? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); p = valid->lookuptbl_head + offset; diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c index a7cabc359..ec0bcb634 100644 --- a/src/gxvalid/gxvmort5.c +++ b/src/gxvalid/gxvmort5.c @@ -139,7 +139,7 @@ gxv_mort_subtable_type5_entry_validate( FT_Byte state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -168,8 +168,8 @@ currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F ); markedInsertCount = (FT_Byte)( flags & 0x001F ); - currentInsertList = (FT_UShort)( glyphOffset.ul >> 16 ); - markedInsertList = (FT_UShort)( glyphOffset.ul ); + currentInsertList = (FT_UShort)( glyphOffset->ul >> 16 ); + markedInsertList = (FT_UShort)( glyphOffset->ul ); if ( 0 != currentInsertList && 0 != currentInsertCount ) { diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c index ca92b6c39..0159c5aef 100644 --- a/src/gxvalid/gxvmorx0.c +++ b/src/gxvalid/gxvmorx0.c @@ -42,7 +42,7 @@ gxv_morx_subtable_type0_entry_validate( FT_UShort state, FT_UShort flags, - GXV_XStateTable_GlyphOffsetDesc glyphOffset, + GXV_XStateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -54,7 +54,7 @@ FT_UShort verb; FT_UNUSED( state ); - FT_UNUSED( glyphOffset ); + FT_UNUSED( glyphOffset_p ); FT_UNUSED( table ); FT_UNUSED( limit ); diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c index 331d4ccda..e1c162fa0 100644 --- a/src/gxvalid/gxvmorx1.c +++ b/src/gxvalid/gxvmorx1.c @@ -103,7 +103,7 @@ gxv_morx_subtable_type1_entry_validate( FT_UShort state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -127,8 +127,8 @@ reserved = (FT_UShort)( flags & 0x3FFF ); - markIndex = (FT_Short)( glyphOffset.ul >> 16 ); - currentIndex = (FT_Short)( glyphOffset.ul ); + markIndex = (FT_Short)( glyphOffset_p->ul >> 16 ); + currentIndex = (FT_Short)( glyphOffset_p->ul ); GXV_TRACE(( " setMark=%01d dontAdvance=%01d\n", setMark, dontAdvance )); @@ -155,14 +155,14 @@ static void gxv_morx_subtable_type1_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { FT_UNUSED( glyph ); /* for the non-debugging case */ - GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value.u )); + GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value_p->u )); - if ( value.u > valid->face->num_glyphs ) + if ( value_p->u > valid->face->num_glyphs ) FT_INVALID_GLYPH_ID; } @@ -170,7 +170,7 @@ static GXV_LookupValueDesc gxv_morx_subtable_type1_LookupFmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -180,7 +180,7 @@ GXV_LookupValueDesc value; /* XXX: check range? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); p = valid->lookuptbl_head + offset; diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c index 5cad5169c..b4bb3353f 100644 --- a/src/gxvalid/gxvmorx2.c +++ b/src/gxvalid/gxvmorx2.c @@ -186,7 +186,7 @@ gxv_morx_subtable_type2_entry_validate( FT_UShort state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -206,7 +206,7 @@ performAction = (FT_UShort)( ( flags >> 13 ) & 1 ); reserved = (FT_UShort)( flags & 0x1FFF ); - ligActionIndex = glyphOffset.u; + ligActionIndex = glyphOffset_p->u; if ( reserved > 0 ) GXV_TRACE(( " reserved 14bit is non-zero\n" )); diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c index d9115618c..5e3a16437 100644 --- a/src/gxvalid/gxvmorx5.c +++ b/src/gxvalid/gxvmorx5.c @@ -136,7 +136,7 @@ gxv_morx_subtable_type5_entry_validate( FT_UShort state, FT_UShort flags, - GXV_StateTable_GlyphOffsetDesc glyphOffset, + GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid ) @@ -165,8 +165,8 @@ currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F ); markedInsertCount = (FT_Byte)( flags & 0x001F ); - currentInsertList = (FT_Byte) ( glyphOffset.ul >> 16 ); - markedInsertList = (FT_UShort)( glyphOffset.ul ); + currentInsertList = (FT_Byte) ( glyphOffset_p->ul >> 16 ); + markedInsertList = (FT_UShort)( glyphOffset_p->ul ); if ( currentInsertList && 0 != currentInsertCount ) gxv_morx_subtable_type5_InsertList_validate( currentInsertList, diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c index 8d6fe669f..e12506094 100644 --- a/src/gxvalid/gxvopbd.c +++ b/src/gxvalid/gxvopbd.c @@ -67,18 +67,18 @@ static void gxv_opbd_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { /* offset in LookupTable is measured from the head of opbd table */ - FT_Bytes p = valid->root->base + value.u; + FT_Bytes p = valid->root->base + value_p->u; FT_Bytes limit = valid->root->limit; FT_Short delta_value; int i; - if ( value.u < GXV_OPBD_DATA( valueOffset_min ) ) - GXV_OPBD_DATA( valueOffset_min ) = value.u; + if ( value_p->u < GXV_OPBD_DATA( valueOffset_min ) ) + GXV_OPBD_DATA( valueOffset_min ) = value_p->u; for ( i = 0; i < 4; i++ ) { @@ -132,7 +132,7 @@ static GXV_LookupValueDesc gxv_opbd_LookupFmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -142,7 +142,7 @@ FT_UNUSED( valid ); /* XXX: check range? */ - value.u = (FT_UShort)( base_value.u + + value.u = (FT_UShort)( base_value_p->u + relative_gindex * 4 * sizeof ( FT_Short ) ); return value; diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c index 010eeda42..66c3ab740 100644 --- a/src/gxvalid/gxvprop.c +++ b/src/gxvalid/gxvprop.c @@ -168,10 +168,10 @@ static void gxv_prop_LookupValue_validate( FT_UShort glyph, - GXV_LookupValueDesc value, + GXV_LookupValueCPtr value_p, GXV_Validator valid ) { - gxv_prop_property_validate( value.u, glyph, valid ); + gxv_prop_property_validate( value_p->u, glyph, valid ); } @@ -204,7 +204,7 @@ static GXV_LookupValueDesc gxv_prop_LookupFmt4_transit( FT_UShort relative_gindex, - GXV_LookupValueDesc base_value, + GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid ) { @@ -214,7 +214,7 @@ GXV_LookupValueDesc value; /* XXX: check range? */ - offset = (FT_UShort)( base_value.u + + offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof( FT_UShort ) ); p = valid->lookuptbl_head + offset; limit = lookuptbl_limit;