25#include FT_INTERNAL_DEBUG_H
61#ifdef FT_DEBUG_LEVEL_TRACE
70#define FT_INVALID_( _error ) \
71 ft_validator_error( otvalid->root, FT_THROW( _error ) )
73#define OTV_OPTIONAL_TABLE( _table ) FT_UShort _table; \
76#define OTV_OPTIONAL_TABLE32( _table ) FT_ULong _table; \
79#define OTV_OPTIONAL_OFFSET( _offset ) \
82 _offset = FT_NEXT_USHORT( p ); \
85#define OTV_OPTIONAL_OFFSET32( _offset ) \
88 _offset = FT_NEXT_ULONG( p ); \
91#define OTV_LIMIT_CHECK( _count ) \
93 if ( p + (_count) > otvalid->root->limit ) \
94 FT_INVALID_TOO_SHORT; \
97#define OTV_SIZE_CHECK( _size ) \
99 if ( _size > 0 && _size < table_size ) \
101 if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
106 FT_Byte* pp = (FT_Byte*)_size ## _p; \
110 "Invalid offset to optional table `%s'" \
114 _size = pp[0] = pp[1] = 0; \
119#define OTV_SIZE_CHECK32( _size ) \
121 if ( _size > 0 && _size < table_size ) \
123 if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \
128 FT_Byte* pp = (FT_Byte*)_size ## _p; \
132 "Invalid offset to optional table `%s'" \
136 _size = pp[0] = pp[1] = pp[2] = pp[3] = 0; \
142#define OTV_NAME_(x) #x
143#define OTV_NAME(x) OTV_NAME_(x)
145#define OTV_FUNC_(x) x##Func
146#define OTV_FUNC(x) OTV_FUNC_(x)
148#ifdef FT_DEBUG_LEVEL_TRACE
150#define OTV_NEST1( x ) \
152 otvalid->nesting_level = 0; \
153 otvalid->func[0] = OTV_FUNC( x ); \
154 otvalid->debug_function_name[0] = OTV_NAME( x ); \
157#define OTV_NEST2( x, y ) \
159 otvalid->nesting_level = 0; \
160 otvalid->func[0] = OTV_FUNC( x ); \
161 otvalid->func[1] = OTV_FUNC( y ); \
162 otvalid->debug_function_name[0] = OTV_NAME( x ); \
163 otvalid->debug_function_name[1] = OTV_NAME( y ); \
166#define OTV_NEST3( x, y, z ) \
168 otvalid->nesting_level = 0; \
169 otvalid->func[0] = OTV_FUNC( x ); \
170 otvalid->func[1] = OTV_FUNC( y ); \
171 otvalid->func[2] = OTV_FUNC( z ); \
172 otvalid->debug_function_name[0] = OTV_NAME( x ); \
173 otvalid->debug_function_name[1] = OTV_NAME( y ); \
174 otvalid->debug_function_name[2] = OTV_NAME( z ); \
177#define OTV_INIT otvalid->debug_indent = 0
181 otvalid->debug_indent += 2; \
182 FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
183 FT_TRACE4(( "%s table\n", \
184 otvalid->debug_function_name[otvalid->nesting_level] )); \
187#define OTV_NAME_ENTER( name ) \
189 otvalid->debug_indent += 2; \
190 FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
191 FT_TRACE4(( "%s table\n", name )); \
194#define OTV_EXIT otvalid->debug_indent -= 2
196#define OTV_TRACE( s ) \
198 FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \
204#define OTV_NEST1( x ) \
206 otvalid->nesting_level = 0; \
207 otvalid->func[0] = OTV_FUNC( x ); \
210#define OTV_NEST2( x, y ) \
212 otvalid->nesting_level = 0; \
213 otvalid->func[0] = OTV_FUNC( x ); \
214 otvalid->func[1] = OTV_FUNC( y ); \
217#define OTV_NEST3( x, y, z ) \
219 otvalid->nesting_level = 0; \
220 otvalid->func[0] = OTV_FUNC( x ); \
221 otvalid->func[1] = OTV_FUNC( y ); \
222 otvalid->func[2] = OTV_FUNC( z ); \
225#define OTV_INIT do { } while ( 0 )
226#define OTV_ENTER do { } while ( 0 )
227#define OTV_NAME_ENTER( name ) do { } while ( 0 )
228#define OTV_EXIT do { } while ( 0 )
230#define OTV_TRACE( s ) do { } while ( 0 )
235#define OTV_RUN otvalid->func[0]
366#define ChainPosClassSetFunc otv_x_Ox
367#define ChainPosRuleSetFunc otv_x_Ox
368#define ChainSubClassSetFunc otv_x_Ox
369#define ChainSubRuleSetFunc otv_x_Ox
370#define JstfLangSysFunc otv_x_Ox
371#define JstfMaxFunc otv_x_Ox
372#define LigGlyphFunc otv_x_Ox
373#define LigatureArrayFunc otv_x_Ox
374#define LigatureSetFunc otv_x_Ox
375#define PosClassSetFunc otv_x_Ox
376#define PosRuleSetFunc otv_x_Ox
377#define SubClassSetFunc otv_x_Ox
378#define SubRuleSetFunc otv_x_Ox
384#define AlternateSubstFormat1Func otv_u_C_x_Ox
385#define ChainContextPosFormat1Func otv_u_C_x_Ox
386#define ChainContextSubstFormat1Func otv_u_C_x_Ox
387#define ContextPosFormat1Func otv_u_C_x_Ox
388#define ContextSubstFormat1Func otv_u_C_x_Ox
389#define LigatureSubstFormat1Func otv_u_C_x_Ox
390#define MultipleSubstFormat1Func otv_u_C_x_Ox
396#define AlternateSetFunc otv_x_ux
397#define AttachPointFunc otv_x_ux
398#define ExtenderGlyphFunc otv_x_ux
399#define JstfGPOSModListFunc otv_x_ux
400#define JstfGSUBModListFunc otv_x_ux
401#define SequenceFunc otv_x_ux
407#define PosClassRuleFunc otv_x_y_ux_sy
408#define PosRuleFunc otv_x_y_ux_sy
409#define SubClassRuleFunc otv_x_y_ux_sy
410#define SubRuleFunc otv_x_y_ux_sy
416#define ChainPosClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp
417#define ChainPosRuleFunc otv_x_ux_y_uy_z_uz_p_sp
418#define ChainSubClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp
419#define ChainSubRuleFunc otv_x_ux_y_uy_z_uz_p_sp
425#define ContextPosFormat2Func otv_u_O_O_x_Onx
426#define ContextSubstFormat2Func otv_u_O_O_x_Onx
432#define ContextPosFormat3Func otv_u_x_y_Ox_sy
433#define ContextSubstFormat3Func otv_u_x_y_Ox_sy
439#define ChainContextPosFormat2Func otv_u_O_O_O_O_x_Onx
440#define ChainContextSubstFormat2Func otv_u_O_O_O_O_x_Onx
446#define ChainContextPosFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
447#define ChainContextSubstFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatile * FT_Validator
otv_LangSys_validate(FT_Bytes table, OTV_Validator otvalid)
otv_x_Ox(FT_Bytes table, OTV_Validator otvalid)
typedefFT_BEGIN_HEADER struct OTV_ValidatorRec_ * OTV_Validator
struct OTV_ValidatorRec_ OTV_ValidatorRec
otv_Script_validate(FT_Bytes table, OTV_Validator otvalid)
otv_ScriptList_validate(FT_Bytes table, FT_Bytes features, OTV_Validator otvalid)
otv_x_y_ux_sy(FT_Bytes table, OTV_Validator otvalid)
void(* OTV_Validate_Func)(FT_Bytes table, OTV_Validator otvalid)
otv_ClassDef_validate(FT_Bytes table, OTV_Validator otvalid)
otv_GSUBGPOS_have_MarkAttachmentType_flag(FT_Bytes table)
otv_u_x_y_Ox_sy(FT_Bytes table, OTV_Validator otvalid)
otv_u_O_O_O_O_x_Onx(FT_Bytes table, OTV_Validator otvalid)
otv_Coverage_get_last(FT_Bytes table)
otv_u_O_O_x_Onx(FT_Bytes table, OTV_Validator otvalid)
otv_u_C_x_Ox(FT_Bytes table, OTV_Validator otvalid)
otv_Coverage_validate(FT_Bytes table, OTV_Validator otvalid, FT_Int expected_count)
otv_Coverage_get_count(FT_Bytes table)
otv_FeatureList_validate(FT_Bytes table, FT_Bytes lookups, OTV_Validator otvalid)
otv_Device_validate(FT_Bytes table, OTV_Validator otvalid)
otv_Coverage_get_first(FT_Bytes table)
otv_x_ux(FT_Bytes table, OTV_Validator otvalid)
otv_LookupList_validate(FT_Bytes table, OTV_Validator otvalid)
otv_GSUBGPOS_get_Lookup_count(FT_Bytes table)
otv_Feature_validate(FT_Bytes table, OTV_Validator otvalid)
otv_Lookup_validate(FT_Bytes table, OTV_Validator otvalid)
otv_u_x_Ox_y_Oy_z_Oz_p_sp(FT_Bytes table, OTV_Validator otvalid)
otv_x_ux_y_uy_z_uz_p_sp(FT_Bytes table, OTV_Validator otvalid)
OTV_Validate_Func * type_funcs