From 27a4f9c4ac45ff65f941964f7351b64b1e6a9f35 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 20 Oct 2009 17:20:18 +0000 Subject: *** empty log message *** --- src/freetype2/gxvalid/gxvcommn.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'src/freetype2/gxvalid/gxvcommn.c') 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 ); -- cgit v1.2.3