ReactOS 0.4.15-dev-8241-g63935f8
ftvalid.h File Reference
#include <ft2build.h>
Include dependency graph for ftvalid.h:

Go to the source code of this file.

Classes

struct  FT_ValidatorRec_
 

Macros

#define FT_VALIDATOR(x)   ( (FT_Validator)( x ) )
 
#define FT_INVALID(_error)   FT_INVALID_( _error )
 
#define FT_INVALID_(_error)    ft_validator_error( valid, FT_THROW( _error ) )
 
#define FT_INVALID_TOO_SHORT    FT_INVALID( Invalid_Table )
 
#define FT_INVALID_OFFSET    FT_INVALID( Invalid_Offset )
 
#define FT_INVALID_FORMAT    FT_INVALID( Invalid_Table )
 
#define FT_INVALID_GLYPH_ID    FT_INVALID( Invalid_Glyph_Index )
 
#define FT_INVALID_DATA    FT_INVALID( Invalid_Table )
 

Typedefs

typedef typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatileFT_Validator
 
typedef enum FT_ValidationLevel_ FT_ValidationLevel
 
typedef struct FT_ValidatorRec_ FT_ValidatorRec
 

Enumerations

enum  FT_ValidationLevel_ { FT_VALIDATE_DEFAULT = 0 , FT_VALIDATE_TIGHT , FT_VALIDATE_PARANOID }
 

Functions

 ft_validator_init (FT_Validator valid, const FT_Byte *base, const FT_Byte *limit, FT_ValidationLevel level)
 
 ft_validator_run (FT_Validator valid)
 
 ft_validator_error (FT_Validator valid, FT_Error error)
 

Macro Definition Documentation

◆ FT_INVALID

#define FT_INVALID (   _error)    FT_INVALID_( _error )

Definition at line 129 of file ftvalid.h.

◆ FT_INVALID_

#define FT_INVALID_ (   _error)     ft_validator_error( valid, FT_THROW( _error ) )

Definition at line 130 of file ftvalid.h.

◆ FT_INVALID_DATA

#define FT_INVALID_DATA    FT_INVALID( Invalid_Table )

Definition at line 150 of file ftvalid.h.

◆ FT_INVALID_FORMAT

#define FT_INVALID_FORMAT    FT_INVALID( Invalid_Table )

Definition at line 142 of file ftvalid.h.

◆ FT_INVALID_GLYPH_ID

#define FT_INVALID_GLYPH_ID    FT_INVALID( Invalid_Glyph_Index )

Definition at line 146 of file ftvalid.h.

◆ FT_INVALID_OFFSET

#define FT_INVALID_OFFSET    FT_INVALID( Invalid_Offset )

Definition at line 138 of file ftvalid.h.

◆ FT_INVALID_TOO_SHORT

#define FT_INVALID_TOO_SHORT    FT_INVALID( Invalid_Table )

Definition at line 134 of file ftvalid.h.

◆ FT_VALIDATOR

#define FT_VALIDATOR (   x)    ( (FT_Validator)( x ) )

Definition at line 103 of file ftvalid.h.

Typedef Documentation

◆ FT_ValidationLevel

◆ FT_Validator

typedef typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatile* FT_Validator

Definition at line 42 of file ftvalid.h.

◆ FT_ValidatorRec

Enumeration Type Documentation

◆ FT_ValidationLevel_

Enumerator
FT_VALIDATE_DEFAULT 
FT_VALIDATE_TIGHT 
FT_VALIDATE_PARANOID 

Definition at line 70 of file ftvalid.h.

71 {
75
@ FT_VALIDATE_DEFAULT
Definition: ftvalid.h:72
@ FT_VALIDATE_TIGHT
Definition: ftvalid.h:73
@ FT_VALIDATE_PARANOID
Definition: ftvalid.h:74
enum FT_ValidationLevel_ FT_ValidationLevel

Function Documentation

◆ ft_validator_error()

ft_validator_error ( FT_Validator  valid,
FT_Error  error 
)

Definition at line 145 of file ftobjs.c.

147 {
148 /* since the cast below also disables the compiler's */
149 /* type check, we introduce a dummy variable, which */
150 /* will be optimized away */
151 volatile ft_jmp_buf* jump_buffer = &valid->jump_buffer;
152
153
154 valid->error = error;
155
156 /* throw away volatileness; use `jump_buffer' or the */
157 /* compiler may warn about an unused local variable */
158 ft_longjmp( *(ft_jmp_buf*) jump_buffer, 1 );
159 }
#define ft_jmp_buf
Definition: ftstdlib.h:158
#define ft_longjmp
Definition: ftstdlib.h:162
BOOLEAN valid
#define error(str)
Definition: mkdosfs.c:1605

◆ ft_validator_init()

ft_validator_init ( FT_Validator  valid,
const FT_Byte base,
const FT_Byte limit,
FT_ValidationLevel  level 
)

Definition at line 122 of file ftobjs.c.

126 {
127 valid->base = base;
128 valid->limit = limit;
129 valid->level = level;
130 valid->error = FT_Err_Ok;
131 }
return FT_Err_Ok
Definition: ftbbox.c:511
GLint level
Definition: gl.h:1546
GLint limit
Definition: glext.h:10326

Referenced by classic_kern_validate(), otv_validate(), and tt_face_build_cmaps().

◆ ft_validator_run()

ft_validator_run ( FT_Validator  valid)

Definition at line 135 of file ftobjs.c.

136 {
137 /* This function doesn't work! None should call it. */
138 FT_UNUSED( valid );
139
140 return -1;
141 }
#define FT_UNUSED(arg)
Definition: ftconfig.h:101