zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gxvcommn.c File Reference
#include "gxvcommn.h"

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_gxvcommon
 
#define GXV_LOOKUP_VALUE_LOAD(P, SIGNSPEC)   ( P += 2, gxv_lookup_value_load( P - 2, SIGNSPEC ) )
 
#define GXV_UNITSIZE_VALIDATE(FORMAT, UNITSIZE, NUNITS, CORRECTSIZE)
 

Typedefs

typedef struct GXV_BinSrchHeader_ GXV_BinSrchHeader
 

Functions

 gxv_array_getlimits_byte (FT_Bytes table, FT_Bytes limit, FT_Byte *min, FT_Byte *max, GXV_Validator valid)
 
 gxv_array_getlimits_ushort (FT_Bytes table, FT_Bytes limit, FT_UShort *min, FT_UShort *max, GXV_Validator valid)
 
static void gxv_BinSrchHeader_check_consistency (GXV_BinSrchHeader *binSrchHeader, GXV_Validator valid)
 
 gxv_BinSrchHeader_validate (FT_Bytes table, FT_Bytes limit, FT_UShort *unitSize_p, FT_UShort *nUnits_p, GXV_Validator valid)
 
static void gxv_ClassTable_validate (FT_Bytes table, FT_UShort *length_p, FT_UShort stateSize, FT_Byte *maxClassID_p, GXV_Validator valid)
 
static int gxv_compare_ranges (FT_Bytes table1_start, FT_ULong table1_length, FT_Bytes table2_start, FT_ULong table2_length)
 
static int gxv_compare_ulong_offset (FT_ULong *a, FT_ULong *b)
 
static int gxv_compare_ushort_offset (FT_UShort *a, FT_UShort *b)
 
 gxv_ctlPoint_validate (FT_UShort gid, FT_Short ctl_point, GXV_Validator valid)
 
static void gxv_EntryTable_validate (FT_Bytes table, FT_UShort *length_p, FT_Byte maxEntry, FT_UShort stateArray, FT_UShort stateArray_length, FT_Byte maxClassID, FT_Bytes statetable_table, FT_Bytes statetable_limit, GXV_Validator valid)
 
 gxv_glyphid_validate (FT_UShort gid, GXV_Validator valid)
 
static GXV_LookupValueDesc gxv_lookup_value_load (FT_Bytes p, int signspec)
 
static void gxv_LookupTable_fmt0_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
static void gxv_LookupTable_fmt2_skip_endmarkers (FT_Bytes table, FT_UShort unitSize, GXV_Validator valid)
 
static void gxv_LookupTable_fmt2_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
static void gxv_LookupTable_fmt4_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
static void gxv_LookupTable_fmt6_skip_endmarkers (FT_Bytes table, FT_UShort unitSize, GXV_Validator valid)
 
static void gxv_LookupTable_fmt6_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
static void gxv_LookupTable_fmt8_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
 gxv_LookupTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
 gxv_odtect_add_range (FT_Bytes start, FT_ULong length, const FT_String *name, GXV_odtect_Range odtect)
 
 gxv_odtect_validate (GXV_odtect_Range odtect, GXV_Validator valid)
 
 gxv_set_length_by_ulong_offset (FT_ULong *offset, FT_ULong **length, FT_ULong *buff, FT_UInt nmemb, FT_ULong limit, GXV_Validator valid)
 
 gxv_set_length_by_ushort_offset (FT_UShort *offset, FT_UShort **length, FT_UShort *buff, FT_UInt nmemb, FT_UShort limit, GXV_Validator valid)
 
 gxv_sfntName_validate (FT_UShort name_index, FT_UShort min_index, FT_UShort max_index, GXV_Validator valid)
 
static void gxv_StateArray_validate (FT_Bytes table, FT_UShort *length_p, FT_Byte maxClassID, FT_UShort stateSize, FT_Byte *maxState_p, FT_Byte *maxEntry_p, GXV_Validator valid)
 
 gxv_StateTable_subtable_setup (FT_UShort table_size, FT_UShort classTable, FT_UShort stateArray, FT_UShort entryTable, FT_UShort *classTable_length_p, FT_UShort *stateArray_length_p, FT_UShort *entryTable_length_p, GXV_Validator valid)
 
 gxv_StateTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
static GXV_LookupValueDesc gxv_XClassTable_lookupfmt4_transit (FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator valid)
 
static void gxv_XClassTable_lookupval_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator valid)
 
static void gxv_XEntryTable_validate (FT_Bytes table, FT_ULong *length_p, FT_UShort maxEntry, FT_ULong stateArray_length, FT_UShort maxClassID, FT_Bytes xstatetable_table, FT_Bytes xstatetable_limit, GXV_Validator valid)
 
static void gxv_XStateArray_validate (FT_Bytes table, FT_ULong *length_p, FT_UShort maxClassID, FT_ULong stateSize, FT_UShort *maxState_p, FT_UShort *maxEntry_p, GXV_Validator valid)
 
 gxv_XStateTable_subtable_setup (FT_ULong table_size, FT_ULong classTable, FT_ULong stateArray, FT_ULong entryTable, FT_ULong *classTable_length_p, FT_ULong *stateArray_length_p, FT_ULong *entryTable_length_p, GXV_Validator valid)
 
 gxv_XStateTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 

Macro Definition Documentation

#define FT_COMPONENT   trace_gxvcommon

Definition at line 38 of file gxvcommn.c.

#define GXV_LOOKUP_VALUE_LOAD (   P,
  SIGNSPEC 
)    ( P += 2, gxv_lookup_value_load( P - 2, SIGNSPEC ) )
#define GXV_UNITSIZE_VALIDATE (   FORMAT,
  UNITSIZE,
  NUNITS,
  CORRECTSIZE 
)
Value:
if ( UNITSIZE != CORRECTSIZE ) \
{ \
FT_ERROR(( "unitSize=%d differs from" \
" expected unitSize=%d" \
" in LookupTable %s\n", \
UNITSIZE, CORRECTSIZE, FORMAT )); \
if ( UNITSIZE != 0 && NUNITS != 0 ) \
{ \
FT_ERROR(( " cannot validate anymore\n" )); \
} \
FT_ERROR(( " forcibly continues\n" )); \
} \
#define FT_INVALID_FORMAT
Definition: ftvalid.h:133
if(!yyg->yy_init)
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
#define FT_END_STMNT
Definition: ftconfig.h:301

Definition at line 402 of file gxvcommn.c.

Referenced by gxv_LookupTable_fmt2_validate(), gxv_LookupTable_fmt4_validate(), and gxv_LookupTable_fmt6_validate().

Typedef Documentation

typedef struct GXV_BinSrchHeader_ GXV_BinSrchHeader

Function Documentation

gxv_array_getlimits_byte ( FT_Bytes  table,
FT_Bytes  limit,
FT_Byte min,
FT_Byte max,
GXV_Validator  valid 
)

Definition at line 181 of file gxvcommn.c.

References FT_MAX, FT_MIN, FT_NEXT_BYTE, and GXV_LIMIT_CHECK.

Referenced by gxv_kern_subtable_fmt3_validate().

gxv_array_getlimits_ushort ( FT_Bytes  table,
FT_Bytes  limit,
FT_UShort min,
FT_UShort max,
GXV_Validator  valid 
)

Definition at line 210 of file gxvcommn.c.

References FT_MAX, FT_MIN, FT_NEXT_USHORT, and GXV_LIMIT_CHECK.

Referenced by gxv_kern_subtable_fmt2_clstbl_validate().

static void gxv_BinSrchHeader_check_consistency ( GXV_BinSrchHeader binSrchHeader,
GXV_Validator  valid 
)
static

Definition at line 258 of file gxvcommn.c.

References FT_INVALID_DATA, GXV_SET_ERR_IF_PARANOID, and GXV_TRACE.

Referenced by gxv_BinSrchHeader_validate().

static void gxv_ClassTable_validate ( FT_Bytes  table,
FT_UShort length_p,
FT_UShort  stateSize,
FT_Byte maxClassID_p,
GXV_Validator  valid 
)
static
static int gxv_compare_ranges ( FT_Bytes  table1_start,
FT_ULong  table1_length,
FT_Bytes  table2_start,
FT_ULong  table2_length 
)
static

Definition at line 1674 of file gxvcommn.c.

Referenced by gxv_odtect_validate().

static int gxv_compare_ulong_offset ( FT_ULong a,
FT_ULong b 
)
static

Definition at line 115 of file gxvcommn.c.

Referenced by gxv_set_length_by_ulong_offset().

static int gxv_compare_ushort_offset ( FT_UShort a,
FT_UShort b 
)
static

Definition at line 50 of file gxvcommn.c.

Referenced by gxv_set_length_by_ushort_offset().

static GXV_LookupValueDesc gxv_lookup_value_load ( FT_Bytes  p,
int  signspec 
)
static
static void gxv_LookupTable_fmt2_skip_endmarkers ( FT_Bytes  table,
FT_UShort  unitSize,
GXV_Validator  valid 
)
static
static void gxv_LookupTable_fmt6_skip_endmarkers ( FT_Bytes  table,
FT_UShort  unitSize,
GXV_Validator  valid 
)
static

Definition at line 646 of file gxvcommn.c.

References GXV_ValidatorRec_::subtable_length.

Referenced by gxv_LookupTable_fmt6_validate().

gxv_set_length_by_ulong_offset ( FT_ULong offset,
FT_ULong **  length,
FT_ULong buff,
FT_UInt  nmemb,
FT_ULong  limit,
GXV_Validator  valid 
)
gxv_set_length_by_ushort_offset ( FT_UShort offset,
FT_UShort **  length,
FT_UShort buff,
FT_UInt  nmemb,
FT_UShort  limit,
GXV_Validator  valid 
)
static void gxv_StateArray_validate ( FT_Bytes  table,
FT_UShort length_p,
FT_Byte  maxClassID,
FT_UShort  stateSize,
FT_Byte maxState_p,
FT_Byte maxEntry_p,
GXV_Validator  valid 
)
static

Definition at line 1019 of file gxvcommn.c.

References FT_MAX, FT_NEXT_BYTE, FT_UNUSED, GXV_EXIT, GXV_LIMIT_CHECK, GXV_NAME_ENTER, and GXV_TRACE.

Referenced by gxv_StateTable_validate().

gxv_StateTable_subtable_setup ( FT_UShort  table_size,
FT_UShort  classTable,
FT_UShort  stateArray,
FT_UShort  entryTable,
FT_UShort classTable_length_p,
FT_UShort stateArray_length_p,
FT_UShort entryTable_length_p,
GXV_Validator  valid 
)
static GXV_LookupValueDesc gxv_XClassTable_lookupfmt4_transit ( FT_UShort  relative_gindex,
GXV_LookupValueCPtr  base_value_p,
FT_Bytes  lookuptbl_limit,
GXV_Validator  valid 
)
static
static void gxv_XStateArray_validate ( FT_Bytes  table,
FT_ULong length_p,
FT_UShort  maxClassID,
FT_ULong  stateSize,
FT_UShort maxState_p,
FT_UShort maxEntry_p,
GXV_Validator  valid 
)
static
gxv_XStateTable_subtable_setup ( FT_ULong  table_size,
FT_ULong  classTable,
FT_ULong  stateArray,
FT_ULong  entryTable,
FT_ULong classTable_length_p,
FT_ULong stateArray_length_p,
FT_ULong entryTable_length_p,
GXV_Validator  valid 
)

Definition at line 1316 of file gxvcommn.c.

References gxv_set_length_by_ulong_offset().

Referenced by gxv_XStateTable_validate().