19 #ifndef __OTVCOMMN_H__ 20 #define __OTVCOMMN_H__ 25 #include FT_INTERNAL_DEBUG_H 42 OTV_Validator valid );
61 #ifdef FT_DEBUG_LEVEL_TRACE 70 #define FT_INVALID_( _prefix, _error ) \ 71 ft_validator_error( valid->root, _prefix ## _error ) 73 #define OTV_OPTIONAL_TABLE( _table ) FT_UShort _table; \ 76 #define OTV_OPTIONAL_OFFSET( _offset ) \ 79 _offset = FT_NEXT_USHORT( p ); \ 82 #define OTV_LIMIT_CHECK( _count ) \ 84 if ( p + (_count) > valid->root->limit ) \ 85 FT_INVALID_TOO_SHORT; \ 88 #define OTV_SIZE_CHECK( _size ) \ 90 if ( _size > 0 && _size < table_size ) \ 92 if ( valid->root->level == FT_VALIDATE_PARANOID ) \ 97 FT_Byte* pp = (FT_Byte*)_size ## _p; \ 101 "Invalid offset to optional table `%s'" \ 106 _size = pp[0] = pp[1] = 0; \ 112 #define OTV_NAME_(x) #x 113 #define OTV_NAME(x) OTV_NAME_(x) 115 #define OTV_FUNC_(x) x##Func 116 #define OTV_FUNC(x) OTV_FUNC_(x) 118 #ifdef FT_DEBUG_LEVEL_TRACE 120 #define OTV_NEST1( x ) \ 122 valid->nesting_level = 0; \ 123 valid->func[0] = OTV_FUNC( x ); \ 124 valid->debug_function_name[0] = OTV_NAME( x ); \ 127 #define OTV_NEST2( x, y ) \ 129 valid->nesting_level = 0; \ 130 valid->func[0] = OTV_FUNC( x ); \ 131 valid->func[1] = OTV_FUNC( y ); \ 132 valid->debug_function_name[0] = OTV_NAME( x ); \ 133 valid->debug_function_name[1] = OTV_NAME( y ); \ 136 #define OTV_NEST3( x, y, z ) \ 138 valid->nesting_level = 0; \ 139 valid->func[0] = OTV_FUNC( x ); \ 140 valid->func[1] = OTV_FUNC( y ); \ 141 valid->func[2] = OTV_FUNC( z ); \ 142 valid->debug_function_name[0] = OTV_NAME( x ); \ 143 valid->debug_function_name[1] = OTV_NAME( y ); \ 144 valid->debug_function_name[2] = OTV_NAME( z ); \ 147 #define OTV_INIT valid->debug_indent = 0 151 valid->debug_indent += 2; \ 152 FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ 153 FT_TRACE4(( "%s table\n", \ 154 valid->debug_function_name[valid->nesting_level] )); \ 157 #define OTV_NAME_ENTER( name ) \ 159 valid->debug_indent += 2; \ 160 FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ 161 FT_TRACE4(( "%s table\n", name )); \ 164 #define OTV_EXIT valid->debug_indent -= 2 166 #define OTV_TRACE( s ) \ 168 FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ 174 #define OTV_NEST1( x ) \ 176 valid->nesting_level = 0; \ 177 valid->func[0] = OTV_FUNC( x ); \ 180 #define OTV_NEST2( x, y ) \ 182 valid->nesting_level = 0; \ 183 valid->func[0] = OTV_FUNC( x ); \ 184 valid->func[1] = OTV_FUNC( y ); \ 187 #define OTV_NEST3( x, y, z ) \ 189 valid->nesting_level = 0; \ 190 valid->func[0] = OTV_FUNC( x ); \ 191 valid->func[1] = OTV_FUNC( y ); \ 192 valid->func[2] = OTV_FUNC( z ); \ 195 #define OTV_INIT do { } while ( 0 ) 196 #define OTV_ENTER do { } while ( 0 ) 197 #define OTV_NAME_ENTER( name ) do { } while ( 0 ) 198 #define OTV_EXIT do { } while ( 0 ) 200 #define OTV_TRACE( s ) do { } while ( 0 ) 205 #define OTV_RUN valid->func[0] 244 OTV_Validator valid );
257 OTV_Validator valid );
270 OTV_Validator valid );
274 OTV_Validator valid );
287 OTV_Validator valid );
293 OTV_Validator valid );
306 OTV_Validator valid );
319 OTV_Validator valid );
325 OTV_Validator valid );
336 #define ChainPosClassSetFunc otv_x_Ox 337 #define ChainPosRuleSetFunc otv_x_Ox 338 #define ChainSubClassSetFunc otv_x_Ox 339 #define ChainSubRuleSetFunc otv_x_Ox 340 #define JstfLangSysFunc otv_x_Ox 341 #define JstfMaxFunc otv_x_Ox 342 #define LigGlyphFunc otv_x_Ox 343 #define LigatureArrayFunc otv_x_Ox 344 #define LigatureSetFunc otv_x_Ox 345 #define PosClassSetFunc otv_x_Ox 346 #define PosRuleSetFunc otv_x_Ox 347 #define SubClassSetFunc otv_x_Ox 348 #define SubRuleSetFunc otv_x_Ox 352 OTV_Validator valid );
354 #define AlternateSubstFormat1Func otv_u_C_x_Ox 355 #define ChainContextPosFormat1Func otv_u_C_x_Ox 356 #define ChainContextSubstFormat1Func otv_u_C_x_Ox 357 #define ContextPosFormat1Func otv_u_C_x_Ox 358 #define ContextSubstFormat1Func otv_u_C_x_Ox 359 #define LigatureSubstFormat1Func otv_u_C_x_Ox 360 #define MultipleSubstFormat1Func otv_u_C_x_Ox 364 OTV_Validator valid );
366 #define AlternateSetFunc otv_x_ux 367 #define AttachPointFunc otv_x_ux 368 #define ExtenderGlyphFunc otv_x_ux 369 #define JstfGPOSModListFunc otv_x_ux 370 #define JstfGSUBModListFunc otv_x_ux 371 #define SequenceFunc otv_x_ux 375 OTV_Validator valid );
377 #define PosClassRuleFunc otv_x_y_ux_sy 378 #define PosRuleFunc otv_x_y_ux_sy 379 #define SubClassRuleFunc otv_x_y_ux_sy 380 #define SubRuleFunc otv_x_y_ux_sy 384 OTV_Validator valid );
386 #define ChainPosClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp 387 #define ChainPosRuleFunc otv_x_ux_y_uy_z_uz_p_sp 388 #define ChainSubClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp 389 #define ChainSubRuleFunc otv_x_ux_y_uy_z_uz_p_sp 393 OTV_Validator valid );
395 #define ContextPosFormat2Func otv_u_O_O_x_Onx 396 #define ContextSubstFormat2Func otv_u_O_O_x_Onx 400 OTV_Validator valid );
402 #define ContextPosFormat3Func otv_u_x_y_Ox_sy 403 #define ContextSubstFormat3Func otv_u_x_y_Ox_sy 407 OTV_Validator valid );
409 #define ChainContextPosFormat2Func otv_u_O_O_O_O_x_Onx 410 #define ChainContextSubstFormat2Func otv_u_O_O_O_O_x_Onx 414 OTV_Validator valid );
416 #define ChainContextPosFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp 417 #define ChainContextSubstFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp 421 OTV_Validator valid );
otv_ClassDef_validate(FT_Bytes table, OTV_Validator valid)
otv_LangSys_validate(FT_Bytes table, OTV_Validator valid)
otv_u_x_Ox_y_Oy_z_Oz_p_sp(FT_Bytes table, OTV_Validator valid)
void(* OTV_Validate_Func)(FT_Bytes table, OTV_Validator valid)
otv_u_O_O_O_O_x_Onx(FT_Bytes table, OTV_Validator valid)
otv_x_ux_y_uy_z_uz_p_sp(FT_Bytes table, OTV_Validator valid)
otv_u_C_x_Ox(FT_Bytes table, OTV_Validator valid)
otv_Device_validate(FT_Bytes table, OTV_Validator valid)
otv_x_ux(FT_Bytes table, OTV_Validator valid)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
otv_GSUBGPOS_have_MarkAttachmentType_flag(FT_Bytes table)
otv_ScriptList_validate(FT_Bytes table, FT_Bytes features, OTV_Validator valid)
otv_Coverage_validate(FT_Bytes table, OTV_Validator valid, FT_Int expected_count)
otv_FeatureList_validate(FT_Bytes table, FT_Bytes lookups, OTV_Validator valid)
otv_Coverage_get_first(FT_Bytes table)
otv_u_O_O_x_Onx(FT_Bytes table, OTV_Validator valid)
otv_u_x_y_Ox_sy(FT_Bytes table, OTV_Validator valid)
typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatile * FT_Validator
otv_Coverage_get_count(FT_Bytes table)
OTV_Validate_Func * type_funcs
otv_x_y_ux_sy(FT_Bytes table, OTV_Validator valid)
otv_Script_validate(FT_Bytes table, OTV_Validator valid)
otv_Feature_validate(FT_Bytes table, OTV_Validator valid)
otv_GSUBGPOS_get_Lookup_count(FT_Bytes table)
typedefFT_BEGIN_HEADER struct OTV_ValidatorRec_ * OTV_Validator
otv_LookupList_validate(FT_Bytes table, OTV_Validator valid)
otv_Coverage_get_last(FT_Bytes table)
otv_x_Ox(FT_Bytes table, OTV_Validator valid)
otv_Lookup_validate(FT_Bytes table, OTV_Validator valid)
GLenum GLsizei GLenum GLenum const GLvoid * table
struct OTV_ValidatorRec_ OTV_ValidatorRec