ReactOS 0.4.16-dev-297-gc569aee
gxvopbd.c File Reference
#include "gxvalid.h"
#include "gxvcommn.h"
Include dependency graph for gxvopbd.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GXV_opbd_DataRec_
 

Macros

#define FT_COMPONENT   trace_gxvopbd
 
#define GXV_OPBD_DATA(FIELD)   GXV_TABLE_DATA( opbd, FIELD )
 

Typedefs

typedef struct GXV_opbd_DataRec_ GXV_opbd_DataRec
 
typedef struct GXV_opbd_DataRec_GXV_opbd_Data
 

Functions

static void gxv_opbd_LookupValue_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
 
static GXV_LookupValueDesc gxv_opbd_LookupFmt4_transit (FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
 
 gxv_opbd_validate (FT_Bytes table, FT_Face face, FT_Validator ftvalid)
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_gxvopbd

Definition at line 39 of file gxvopbd.c.

◆ GXV_OPBD_DATA

#define GXV_OPBD_DATA (   FIELD)    GXV_TABLE_DATA( opbd, FIELD )

Definition at line 58 of file gxvopbd.c.

Typedef Documentation

◆ GXV_opbd_Data

◆ GXV_opbd_DataRec

Function Documentation

◆ gxv_opbd_LookupFmt4_transit()

static GXV_LookupValueDesc gxv_opbd_LookupFmt4_transit ( FT_UShort  relative_gindex,
GXV_LookupValueCPtr  base_value_p,
FT_Bytes  lookuptbl_limit,
GXV_Validator  gxvalid 
)
static

Definition at line 135 of file gxvopbd.c.

139 {
141
142 FT_UNUSED( lookuptbl_limit );
143 FT_UNUSED( gxvalid );
144
145 /* XXX: check range? */
146 value.u = (FT_UShort)( base_value_p->u +
147 relative_gindex * 4 * sizeof ( FT_Short ) );
148
149 return value;
150 }
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
unsigned short FT_UShort
Definition: fttypes.h:209
signed short FT_Short
Definition: fttypes.h:198
Definition: pdh_main.c:94
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by gxv_opbd_validate().

◆ gxv_opbd_LookupValue_validate()

static void gxv_opbd_LookupValue_validate ( FT_UShort  glyph,
GXV_LookupValueCPtr  value_p,
GXV_Validator  gxvalid 
)
static

Definition at line 70 of file gxvopbd.c.

73 {
74 /* offset in LookupTable is measured from the head of opbd table */
75 FT_Bytes p = gxvalid->root->base + value_p->u;
76 FT_Bytes limit = gxvalid->root->limit;
77 FT_Short delta_value;
78 int i;
79
80
81 if ( value_p->u < GXV_OPBD_DATA( valueOffset_min ) )
82 GXV_OPBD_DATA( valueOffset_min ) = value_p->u;
83
84 for ( i = 0; i < 4; i++ )
85 {
86 GXV_LIMIT_CHECK( 2 );
87 delta_value = FT_NEXT_SHORT( p );
88
89 if ( GXV_OPBD_DATA( format ) ) /* format 1, value is ctrl pt. */
90 {
91 if ( delta_value == -1 )
92 continue;
93
94 gxv_ctlPoint_validate( glyph, (FT_UShort)delta_value, gxvalid );
95 }
96 else /* format 0, value is distance */
97 continue;
98 }
99 }
#define FT_NEXT_SHORT(buffer)
Definition: ftstream.h:223
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLint limit
Definition: glext.h:10326
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
gxv_ctlPoint_validate(FT_UShort gid, FT_UShort ctl_point, GXV_Validator gxvalid)
Definition: gxvcommn.c:846
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272
#define GXV_OPBD_DATA(FIELD)
Definition: gxvopbd.c:58
FT_Validator root
Definition: gxvcommn.h:239
Definition: format.c:58

Referenced by gxv_opbd_validate().

◆ gxv_opbd_validate()

gxv_opbd_validate ( FT_Bytes  table,
FT_Face  face,
FT_Validator  ftvalid 
)

Definition at line 162 of file gxvopbd.c.

165 {
166 GXV_ValidatorRec gxvalidrec;
167 GXV_Validator gxvalid = &gxvalidrec;
168 GXV_opbd_DataRec opbdrec;
169 GXV_opbd_Data opbd = &opbdrec;
170 FT_Bytes p = table;
171 FT_Bytes limit = 0;
172
174
175
176 gxvalid->root = ftvalid;
177 gxvalid->table_data = opbd;
178 gxvalid->face = face;
179
180 FT_TRACE3(( "validating `opbd' table\n" ));
181 GXV_INIT;
182 GXV_OPBD_DATA( valueOffset_min ) = 0xFFFFU;
183
184
185 GXV_LIMIT_CHECK( 4 + 2 );
188
189
190 /* only 0x00010000 is defined (1996) */
191 GXV_TRACE(( "(version=0x%08x)\n", version ));
192 if ( 0x00010000UL != version )
194
195 /* only values 0 and 1 are defined (1996) */
196 GXV_TRACE(( "(format=0x%04x)\n", GXV_OPBD_DATA( format ) ));
197 if ( 0x0001 < GXV_OPBD_DATA( format ) )
199
203
204 gxv_LookupTable_validate( p, limit, gxvalid );
205 p += gxvalid->subtable_length;
206
207 if ( p > table + GXV_OPBD_DATA( valueOffset_min ) )
208 {
209 GXV_TRACE((
210 "found overlap between LookupTable and opbd_value array\n" ));
212 }
213
214 FT_TRACE4(( "\n" ));
215 }
WORD face[3]
Definition: mesh.c:4747
static const WCHAR version[]
Definition: asmname.c:66
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160
#define FT_TRACE4(varformat)
Definition: ftdebug.h:161
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
unsigned long FT_ULong
Definition: fttypes.h:253
#define FT_INVALID_FORMAT
Definition: ftvalid.h:142
#define FT_INVALID_OFFSET
Definition: ftvalid.h:138
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:755
@ GXV_LOOKUPVALUE_UNSIGNED
Definition: gxvcommn.h:100
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
#define GXV_INIT
Definition: gxvcommn.h:300
static GXV_LookupValueDesc gxv_opbd_LookupFmt4_transit(FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
Definition: gxvopbd.c:135
static void gxv_opbd_LookupValue_validate(FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
Definition: gxvopbd.c:70
GXV_Lookup_Fmt4_Transit_Func lookupfmt4_trans
Definition: gxvcommn.h:248
void * table_data
Definition: gxvcommn.h:242
FT_ULong subtable_length
Definition: gxvcommn.h:244
GXV_Lookup_Value_Validate_Func lookupval_func
Definition: gxvcommn.h:247
GXV_LookupValue_SignSpec lookupval_sign
Definition: gxvcommn.h:246