zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gxvmod.c File Reference
#include <ft2build.h>
#include <FT_TRUETYPE_TABLES_H>
#include <FT_TRUETYPE_TAGS_H>
#include <FT_GX_VALIDATE_H>
#include <FT_INTERNAL_OBJECTS_H>
#include <FT_SERVICE_GX_VALIDATE_H>
#include "gxvmod.h"
#include "gxvalid.h"
#include "gxvcommn.h"

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_gxvmodule
 
#define GXV_TABLE_DECL(_sfnt)
 
#define GXV_TABLE_LOAD(_sfnt)
 
#define GXV_TABLE_SET(_sfnt)
 
#define GXV_TABLE_VALIDATE(_sfnt)
 

Functions

static FT_Error classic_kern_validate (FT_Face face, FT_UInt ckern_flags, FT_Bytes *ckern_table)
 
static FT_Error gxv_load_table (FT_Face face, FT_Tag tag, FT_Byte *volatile *table, FT_ULong *table_len)
 
static FT_Error gxv_validate (FT_Face face, FT_UInt gx_flags, FT_Bytes tables[FT_VALIDATE_GX_LENGTH], FT_UInt table_count)
 
static FT_Pointer gxvalid_get_service (FT_Module module, const char *service_id)
 

Variables

static const
FT_Service_CKERNvalidateRec 
ckernvalid_interface
 
FT_CALLBACK_TABLE_DEF const
FT_Module_Class 
gxv_module_class
 
static const
FT_Service_GXvalidateRec 
gxvalid_interface
 
static const FT_ServiceDescRec gxvalid_services []
 

Macro Definition Documentation

#define FT_COMPONENT   trace_gxvmodule

Definition at line 47 of file gxvmod.c.

#define GXV_TABLE_DECL (   _sfnt)
Value:
FT_Byte* volatile _sfnt = NULL; \
FT_ULong len_ ## _sfnt = 0
unsigned long FT_ULong
Definition: fttypes.h:249
#define NULL
Definition: ftobjs.h:61
unsigned char FT_Byte
Definition: fttypes.h:150

Definition at line 76 of file gxvmod.c.

Referenced by gxv_validate().

#define GXV_TABLE_LOAD (   _sfnt)
Value:
if ( ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) && \
( gx_flags & FT_VALIDATE_ ## _sfnt ) ) \
{ \
error = gxv_load_table( face, TTAG_ ## _sfnt, \
&_sfnt, &len_ ## _sfnt ); \
if ( error ) \
goto Exit; \
}
if(!yyg->yy_init)
FT_Error error
Definition: cffdrivr.c:407
GLenum face
Definition: gl2ext.h:1490
static FT_Error gxv_load_table(FT_Face face, FT_Tag tag, FT_Byte *volatile *table, FT_ULong *table_len)
Definition: gxvmod.c:51

Definition at line 80 of file gxvmod.c.

Referenced by gxv_validate().

#define GXV_TABLE_SET (   _sfnt)
Value:
if ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) \
tables[FT_VALIDATE_ ## _sfnt ## _INDEX] = (FT_Bytes)_sfnt
const FT_Byte * FT_Bytes
Definition: fttypes.h:161

Definition at line 102 of file gxvmod.c.

Referenced by gxv_validate().

#define GXV_TABLE_VALIDATE (   _sfnt)
Value:
if ( _sfnt ) \
{ \
ft_validator_init( &valid, _sfnt, _sfnt + len_ ## _sfnt, \
if ( ft_setjmp( valid.jump_buffer ) == 0 ) \
gxv_ ## _sfnt ## _validate( _sfnt, face, &valid ); \
error = valid.error; \
if ( error ) \
goto Exit; \
}
if(!yyg->yy_init)
FT_Error error
Definition: cffdrivr.c:407
GLenum face
Definition: gl2ext.h:1490
#define ft_setjmp(b)
Definition: ftstdlib.h:162
ft_validator_init(FT_Validator valid, const FT_Byte *base, const FT_Byte *limit, FT_ValidationLevel level)
Definition: ftobjs.c:71

Definition at line 90 of file gxvmod.c.

Referenced by gxv_validate().

Function Documentation

static FT_Error gxv_load_table ( FT_Face  face,
FT_Tag  tag,
FT_Byte *volatile *  table,
FT_ULong table_len 
)
static

Definition at line 51 of file gxvmod.c.

References error, FT_ALLOC, FT_FACE_MEMORY, FT_Load_Sfnt_Table(), and NULL.

Referenced by classic_kern_validate().

static FT_Error gxv_validate ( FT_Face  face,
FT_UInt  gx_flags,
FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
FT_UInt  table_count 
)
static
static FT_Pointer gxvalid_get_service ( FT_Module  module,
const char *  service_id 
)
static

Definition at line 259 of file gxvmod.c.

References ft_service_list_lookup(), and FT_UNUSED.

Variable Documentation

const FT_Service_CKERNvalidateRec ckernvalid_interface
static
Initial value:
=
{
}
static FT_Error classic_kern_validate(FT_Face face, FT_UInt ckern_flags, FT_Bytes *ckern_table)
Definition: gxvmod.c:191

Definition at line 243 of file gxvmod.c.

Initial value:
=
{
0,
sizeof ( FT_ModuleRec ),
"gxvalid",
0x10000L,
0x20000L,
0,
}
static FT_Pointer gxvalid_get_service(FT_Module module, const char *service_id)
Definition: gxvmod.c:259
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
Definition: ftmodapi.h:126
struct FT_ModuleRec_ FT_ModuleRec
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:109
FT_Error(* FT_Module_Constructor)(FT_Module module)
Definition: ftmodapi.h:94

Definition at line 269 of file gxvmod.c.

const FT_Service_GXvalidateRec gxvalid_interface
static
Initial value:
=
{
}
static FT_Error gxv_validate(FT_Face face, FT_UInt gx_flags, FT_Bytes tables[FT_VALIDATE_GX_LENGTH], FT_UInt table_count)
Definition: gxvmod.c:108

Definition at line 236 of file gxvmod.c.

const FT_ServiceDescRec gxvalid_services[]
static
Initial value:
=
{
{ NULL, NULL }
}
#define NULL
Definition: ftobjs.h:61
static const FT_Service_CKERNvalidateRec ckernvalid_interface
Definition: gxvmod.c:243
#define FT_SERVICE_ID_CLASSICKERN_VALIDATE
Definition: svgxval.h:38
#define FT_SERVICE_ID_GX_VALIDATE
Definition: svgxval.h:37
static const FT_Service_GXvalidateRec gxvalid_interface
Definition: gxvmod.c:236

Definition at line 250 of file gxvmod.c.