summaryrefslogtreecommitdiff
path: root/src/freetype2/gxvalid
diff options
context:
space:
mode:
Diffstat (limited to 'src/freetype2/gxvalid')
-rw-r--r--src/freetype2/gxvalid/gxvbsln.c8
-rw-r--r--src/freetype2/gxvalid/gxvcommn.c47
-rw-r--r--src/freetype2/gxvalid/gxvcommn.h21
-rw-r--r--src/freetype2/gxvalid/gxvfeat.c7
-rw-r--r--src/freetype2/gxvalid/gxvjust.c26
-rw-r--r--src/freetype2/gxvalid/gxvkern.c4
-rw-r--r--src/freetype2/gxvalid/gxvlcar.c8
-rw-r--r--src/freetype2/gxvalid/gxvmod.h4
-rw-r--r--src/freetype2/gxvalid/gxvmort.c8
-rw-r--r--src/freetype2/gxvalid/gxvmort.h2
-rw-r--r--src/freetype2/gxvalid/gxvmort0.c6
-rw-r--r--src/freetype2/gxvalid/gxvmort1.c8
-rw-r--r--src/freetype2/gxvalid/gxvmort2.c4
-rw-r--r--src/freetype2/gxvalid/gxvmort4.c8
-rw-r--r--src/freetype2/gxvalid/gxvmort5.c6
-rw-r--r--src/freetype2/gxvalid/gxvmorx.c9
-rw-r--r--src/freetype2/gxvalid/gxvmorx0.c4
-rw-r--r--src/freetype2/gxvalid/gxvmorx1.c16
-rw-r--r--src/freetype2/gxvalid/gxvmorx2.c4
-rw-r--r--src/freetype2/gxvalid/gxvmorx5.c6
-rw-r--r--src/freetype2/gxvalid/gxvopbd.c12
-rw-r--r--src/freetype2/gxvalid/gxvprop.c8
-rw-r--r--src/freetype2/gxvalid/gxvtrak.c2
23 files changed, 120 insertions, 108 deletions
diff --git a/src/freetype2/gxvalid/gxvbsln.c b/src/freetype2/gxvalid/gxvbsln.c
index 6cca658..3d10031 100644
--- a/src/freetype2/gxvalid/gxvbsln.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvcommn.c b/src/freetype2/gxvalid/gxvcommn.c
index 82fd6b3..de7ce6f 100644
--- a/src/freetype2/gxvalid/gxvcommn.c
+++ b/src/freetype2/gxvalid/gxvcommn.c
@@ -4,7 +4,8 @@
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2004, 2005, 2009 */
+/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -50,11 +51,11 @@
FT_UShort* b )
{
if ( *a < *b )
- return ( -1 );
+ return -1;
else if ( *a > *b )
- return ( 1 );
+ return 1;
else
- return ( 0 );
+ return 0;
}
@@ -115,11 +116,11 @@
FT_ULong* b )
{
if ( *a < *b )
- return ( -1 );
+ return -1;
else if ( *a > *b )
- return ( 1 );
+ return 1;
else
- return ( 0 );
+ return 0;
}
@@ -404,8 +405,8 @@
if ( UNITSIZE != CORRECTSIZE ) \
{ \
FT_ERROR(( "unitSize=%d differs from" \
- "expected unitSize=%d" \
- "in LookupTable %s", \
+ " expected unitSize=%d" \
+ " in LookupTable %s\n", \
UNITSIZE, CORRECTSIZE, FORMAT )); \
if ( UNITSIZE != 0 && NUNITS != 0 ) \
{ \
@@ -447,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;
@@ -552,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 );
@@ -630,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 );
}
}
@@ -709,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 );
@@ -749,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;
@@ -1180,7 +1181,7 @@
if ( NULL != valid->statetable.entry_validate_func )
valid->statetable.entry_validate_func( state,
flags,
- glyphOffset,
+ &glyphOffset,
statetable_table,
statetable_limit,
valid );
@@ -1351,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;
}
@@ -1391,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 )
{
@@ -1401,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;
@@ -1555,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/freetype2/gxvalid/gxvcommn.h b/src/freetype2/gxvalid/gxvcommn.h
index 0128eca..404c07f 100644
--- a/src/freetype2/gxvalid/gxvcommn.h
+++ b/src/freetype2/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 );
@@ -275,11 +280,11 @@ FT_BEGIN_HEADER
#else /* !FT_DEBUG_LEVEL_TRACE */
-#define GXV_INIT do ; while ( 0 )
-#define GXV_NAME_ENTER( name ) do ; while ( 0 )
-#define GXV_EXIT do ; while ( 0 )
+#define GXV_INIT do { } while ( 0 )
+#define GXV_NAME_ENTER( name ) do { } while ( 0 )
+#define GXV_EXIT do { } while ( 0 )
-#define GXV_TRACE( s ) do ; while ( 0 )
+#define GXV_TRACE( s ) do { } while ( 0 )
#endif /* !FT_DEBUG_LEVEL_TRACE */
diff --git a/src/freetype2/gxvalid/gxvfeat.c b/src/freetype2/gxvalid/gxvfeat.c
index d7c6ad1..002fec6 100644
--- a/src/freetype2/gxvalid/gxvfeat.c
+++ b/src/freetype2/gxvalid/gxvfeat.c
@@ -4,7 +4,8 @@
/* */
/* TrueTypeGX/AAT feat table validation (body). */
/* */
-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2004, 2005, 2008 by */
+/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -59,7 +60,7 @@
#define GXV_FEAT_DATA( field ) GXV_TABLE_DATA( feat, field )
- typedef enum
+ typedef enum GXV_FeatureFlagsMask_
{
GXV_FEAT_MASK_EXCLUSIVE_SETTINGS = 0x8000U,
GXV_FEAT_MASK_DYNAMIC_DEFAULT = 0x4000,
@@ -198,7 +199,7 @@
FT_UShort feature;
FT_UShort nSettings;
- FT_UInt settingTable;
+ FT_ULong settingTable;
FT_UShort featureFlags;
FT_Bool exclusive;
diff --git a/src/freetype2/gxvalid/gxvjust.c b/src/freetype2/gxvalid/gxvjust.c
index 29bf840..e14f946 100644
--- a/src/freetype2/gxvalid/gxvjust.c
+++ b/src/freetype2/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;
}
@@ -557,7 +557,7 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- FT_UInt table_size;
+ FT_Offset table_size;
GXV_ValidatorRec validrec;
GXV_Validator valid = &validrec;
diff --git a/src/freetype2/gxvalid/gxvkern.c b/src/freetype2/gxvalid/gxvkern.c
index bfb405f..2137db8 100644
--- a/src/freetype2/gxvalid/gxvkern.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvlcar.c b/src/freetype2/gxvalid/gxvlcar.c
index 48821ea..f14fa5b 100644
--- a/src/freetype2/gxvalid/gxvlcar.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmod.h b/src/freetype2/gxvalid/gxvmod.h
index 466584e..d912a8f 100644
--- a/src/freetype2/gxvalid/gxvmod.h
+++ b/src/freetype2/gxvalid/gxvmod.h
@@ -34,6 +34,10 @@
FT_BEGIN_HEADER
+#ifdef FT_CONFIG_OPTION_PIC
+#error "this module does not support PIC yet"
+#endif
+
FT_EXPORT_VAR( const FT_Module_Class ) gxv_module_class;
diff --git a/src/freetype2/gxvalid/gxvmort.c b/src/freetype2/gxvalid/gxvmort.c
index 6fb71b9..0aa0663 100644
--- a/src/freetype2/gxvalid/gxvmort.c
+++ b/src/freetype2/gxvalid/gxvmort.c
@@ -42,7 +42,7 @@
gxv_mort_feature_validate( GXV_mort_feature f,
GXV_Validator valid )
{
- if ( f->featureType > gxv_feat_registry_length )
+ if ( f->featureType >= gxv_feat_registry_length )
{
GXV_TRACE(( "featureType %d is out of registered range, "
"setting %d is unchecked\n",
@@ -85,17 +85,17 @@
/*
- * nFeatureFlags is typed to FT_UInt to accept that in
+ * nFeatureFlags is typed to FT_ULong to accept that in
* mort (typed FT_UShort) and morx (typed FT_ULong).
*/
FT_LOCAL_DEF( void )
gxv_mort_featurearray_validate( FT_Bytes table,
FT_Bytes limit,
- FT_UInt nFeatureFlags,
+ FT_ULong nFeatureFlags,
GXV_Validator valid )
{
FT_Bytes p = table;
- FT_UInt i;
+ FT_ULong i;
GXV_mort_featureRec f = GXV_MORT_FEATURE_OFF;
diff --git a/src/freetype2/gxvalid/gxvmort.h b/src/freetype2/gxvalid/gxvmort.h
index 1d64e69..1e5a1f5 100644
--- a/src/freetype2/gxvalid/gxvmort.h
+++ b/src/freetype2/gxvalid/gxvmort.h
@@ -54,7 +54,7 @@
FT_LOCAL( void )
gxv_mort_featurearray_validate( FT_Bytes table,
FT_Bytes limit,
- FT_UInt nFeatureFlags,
+ FT_ULong nFeatureFlags,
GXV_Validator valid );
FT_LOCAL( void )
diff --git a/src/freetype2/gxvalid/gxvmort0.c b/src/freetype2/gxvalid/gxvmort0.c
index 0902056..0453062 100644
--- a/src/freetype2/gxvalid/gxvmort0.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmort1.c b/src/freetype2/gxvalid/gxvmort1.c
index 0575b12..696d850 100644
--- a/src/freetype2/gxvalid/gxvmort1.c
+++ b/src/freetype2/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 )
{
@@ -202,7 +202,7 @@
if ( dst_gid > valid->face->num_glyphs )
{
- GXV_TRACE(( "substTable include toolarge gid[%d]=%d >"
+ GXV_TRACE(( "substTable include too large gid[%d]=%d >"
" max defined gid #%d\n",
i, dst_gid, valid->face->num_glyphs ));
if ( valid->root->level >= FT_VALIDATE_PARANOID )
diff --git a/src/freetype2/gxvalid/gxvmort2.c b/src/freetype2/gxvalid/gxvmort2.c
index f19d15d..6f77cf3 100644
--- a/src/freetype2/gxvalid/gxvmort2.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmort4.c b/src/freetype2/gxvalid/gxvmort4.c
index a04bc1e..8347098 100644
--- a/src/freetype2/gxvalid/gxvmort4.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmort5.c b/src/freetype2/gxvalid/gxvmort5.c
index a7cabc3..ec0bcb6 100644
--- a/src/freetype2/gxvalid/gxvmort5.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmorx.c b/src/freetype2/gxvalid/gxvmorx.c
index 849d5e9..f8ba5b9 100644
--- a/src/freetype2/gxvalid/gxvmorx.c
+++ b/src/freetype2/gxvalid/gxvmorx.c
@@ -4,7 +4,8 @@
/* */
/* TrueTypeGX/AAT morx table validation (body). */
/* */
-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2005, 2008 by */
+/* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -68,8 +69,8 @@
FT_ULong length;
FT_ULong coverage;
FT_ULong subFeatureFlags;
- FT_UInt type;
- FT_UInt rest;
+ FT_ULong type;
+ FT_ULong rest;
GXV_LIMIT_CHECK( 4 + 4 + 4 );
@@ -129,7 +130,7 @@
gxv_mort_featurearray_validate( p, limit, nFeatureFlags, valid );
p += valid->subtable_length;
- if ( nSubtables >= 0x10000 )
+ if ( nSubtables >= 0x10000L )
FT_INVALID_DATA;
gxv_morx_subtables_validate( p, table + chainLength,
diff --git a/src/freetype2/gxvalid/gxvmorx0.c b/src/freetype2/gxvalid/gxvmorx0.c
index ca92b6c..0159c5a 100644
--- a/src/freetype2/gxvalid/gxvmorx0.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmorx1.c b/src/freetype2/gxvalid/gxvmorx1.c
index 331d4cc..e1c162f 100644
--- a/src/freetype2/gxvalid/gxvmorx1.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmorx2.c b/src/freetype2/gxvalid/gxvmorx2.c
index 5cad516..b4bb335 100644
--- a/src/freetype2/gxvalid/gxvmorx2.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvmorx5.c b/src/freetype2/gxvalid/gxvmorx5.c
index d911561..5e3a164 100644
--- a/src/freetype2/gxvalid/gxvmorx5.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvopbd.c b/src/freetype2/gxvalid/gxvopbd.c
index 8d6fe66..e125060 100644
--- a/src/freetype2/gxvalid/gxvopbd.c
+++ b/src/freetype2/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/freetype2/gxvalid/gxvprop.c b/src/freetype2/gxvalid/gxvprop.c
index 010eeda..66c3ab7 100644
--- a/src/freetype2/gxvalid/gxvprop.c
+++ b/src/freetype2/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;
diff --git a/src/freetype2/gxvalid/gxvtrak.c b/src/freetype2/gxvalid/gxvtrak.c
index 432ee4e..df3fd15 100644
--- a/src/freetype2/gxvalid/gxvtrak.c
+++ b/src/freetype2/gxvalid/gxvtrak.c
@@ -198,7 +198,7 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- FT_UInt table_size;
+ FT_Offset table_size;
GXV_ValidatorRec validrec;
GXV_Validator valid = &validrec;