ReactOS  0.4.15-dev-2701-g34593d9
gxvlcar.c File Reference
#include "gxvalid.h"
#include "gxvcommn.h"
Include dependency graph for gxvlcar.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GXV_lcar_DataRec_
 

Macros

#define FT_COMPONENT   trace_gxvlcar
 
#define GXV_LCAR_DATA(FIELD)   GXV_TABLE_DATA( lcar, FIELD )
 

Typedefs

typedef struct GXV_lcar_DataRec_ GXV_lcar_DataRec
 
typedef struct GXV_lcar_DataRec_GXV_lcar_Data
 

Functions

static void gxv_lcar_partial_validate (FT_Short partial, FT_UShort glyph, GXV_Validator gxvalid)
 
static void gxv_lcar_LookupValue_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
 
static GXV_LookupValueDesc gxv_lcar_LookupFmt4_transit (FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
 
 gxv_lcar_validate (FT_Bytes table, FT_Face face, FT_Validator ftvalid)
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_gxvlcar

Definition at line 39 of file gxvlcar.c.

◆ GXV_LCAR_DATA

#define GXV_LCAR_DATA (   FIELD)    GXV_TABLE_DATA( lcar, FIELD )

Definition at line 57 of file gxvlcar.c.

Typedef Documentation

◆ GXV_lcar_Data

◆ GXV_lcar_DataRec

Function Documentation

◆ gxv_lcar_LookupFmt4_transit()

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

Definition at line 149 of file gxvlcar.c.

153  {
154  FT_Bytes p;
155  FT_Bytes limit;
158 
159  FT_UNUSED( lookuptbl_limit );
160 
161  /* XXX: check range? */
162  offset = (FT_UShort)( base_value_p->u +
163  relative_gindex * sizeof ( FT_UShort ) );
164  p = gxvalid->root->base + offset;
165  limit = gxvalid->root->limit;
166 
167  GXV_LIMIT_CHECK ( 2 );
168  value.u = FT_NEXT_USHORT( p );
169 
170  return value;
171  }
Definition: pdh_main.c:93
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
GLint limit
Definition: glext.h:10326
FT_Validator root
Definition: gxvcommn.h:239
GLintptr offset
Definition: glext.h:5920
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLsizei const GLfloat * value
Definition: glext.h:6069
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_lcar_validate().

◆ gxv_lcar_LookupValue_validate()

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

Definition at line 86 of file gxvlcar.c.

89  {
90  FT_Bytes p = gxvalid->root->base + value_p->u;
91  FT_Bytes limit = gxvalid->root->limit;
93  FT_Short partial;
94  FT_UShort i;
95 
96 
97  GXV_NAME_ENTER( "element in lookupTable" );
98 
99  GXV_LIMIT_CHECK( 2 );
100  count = FT_NEXT_USHORT( p );
101 
102  GXV_LIMIT_CHECK( 2 * count );
103  for ( i = 0; i < count; i++ )
104  {
105  partial = FT_NEXT_SHORT( p );
106  gxv_lcar_partial_validate( partial, glyph, gxvalid );
107  }
108 
109  GXV_EXIT;
110  }
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint limit
Definition: glext.h:10326
static void gxv_lcar_partial_validate(FT_Short partial, FT_UShort glyph, GXV_Validator gxvalid)
Definition: gxvlcar.c:69
#define GXV_EXIT
Definition: gxvcommn.h:302
FT_Validator root
Definition: gxvcommn.h:239
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
signed short FT_Short
Definition: fttypes.h:198
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
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
#define FT_NEXT_SHORT(buffer)
Definition: ftstream.h:223
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_lcar_validate().

◆ gxv_lcar_partial_validate()

static void gxv_lcar_partial_validate ( FT_Short  partial,
FT_UShort  glyph,
GXV_Validator  gxvalid 
)
static

Definition at line 69 of file gxvlcar.c.

72  {
73  GXV_NAME_ENTER( "partial" );
74 
75  if ( GXV_LCAR_DATA( format ) != 1 )
76  goto Exit;
77 
78  gxv_ctlPoint_validate( glyph, (FT_UShort)partial, gxvalid );
79 
80  Exit:
81  GXV_EXIT;
82  }
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define GXV_EXIT
Definition: gxvcommn.h:302
static void Exit(void)
Definition: sock.c:1331
#define GXV_LCAR_DATA(FIELD)
Definition: gxvlcar.c:57
gxv_ctlPoint_validate(FT_UShort gid, FT_UShort ctl_point, GXV_Validator gxvalid)
Definition: gxvcommn.c:846
unsigned short FT_UShort
Definition: fttypes.h:209

Referenced by gxv_lcar_LookupValue_validate().

◆ gxv_lcar_validate()

gxv_lcar_validate ( FT_Bytes  table,
FT_Face  face,
FT_Validator  ftvalid 
)

Definition at line 183 of file gxvlcar.c.

186  {
187  FT_Bytes p = table;
188  FT_Bytes limit = 0;
189  GXV_ValidatorRec gxvalidrec;
190  GXV_Validator gxvalid = &gxvalidrec;
191 
192  GXV_lcar_DataRec lcarrec;
193  GXV_lcar_Data lcar = &lcarrec;
194 
196 
197 
198  gxvalid->root = ftvalid;
199  gxvalid->table_data = lcar;
200  gxvalid->face = face;
201 
202  FT_TRACE3(( "validating `lcar' table\n" ));
203  GXV_INIT;
204 
205  GXV_LIMIT_CHECK( 4 + 2 );
206  version = FT_NEXT_LONG( p );
208 
209  if ( version != 0x00010000UL)
211 
212  if ( GXV_LCAR_DATA( format ) > 1 )
214 
218  gxv_LookupTable_validate( p, limit, gxvalid );
219 
220  FT_TRACE4(( "\n" ));
221  }
#define FT_NEXT_LONG(buffer)
Definition: ftstream.h:235
#define FT_INVALID_FORMAT
Definition: ftvalid.h:142
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GXV_LookupValue_SignSpec lookupval_sign
Definition: gxvcommn.h:246
GLint limit
Definition: glext.h:10326
GXV_Lookup_Fmt4_Transit_Func lookupfmt4_trans
Definition: gxvcommn.h:248
GXV_Lookup_Value_Validate_Func lookupval_func
Definition: gxvcommn.h:247
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:755
#define FT_TRACE4(varformat)
Definition: ftdebug.h:161
void * table_data
Definition: gxvcommn.h:242
static const WCHAR version[]
Definition: asmname.c:66
static void gxv_lcar_LookupValue_validate(FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
Definition: gxvlcar.c:86
FT_Validator root
Definition: gxvcommn.h:239
WORD face[3]
Definition: mesh.c:4747
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define GXV_LCAR_DATA(FIELD)
Definition: gxvlcar.c:57
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160
signed long FT_Fixed
Definition: fttypes.h:288
static GXV_LookupValueDesc gxv_lcar_LookupFmt4_transit(FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
Definition: gxvlcar.c:149
GLfloat GLfloat p
Definition: glext.h:8902
#define GXV_INIT
Definition: gxvcommn.h:300
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272