ReactOS 0.4.16-dev-2354-g16de117
fthash.h File Reference
Include dependency graph for fthash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  FT_Hashkey_
 
struct  FT_HashnodeRec_
 
struct  FT_HashRec_
 

Macros

#define ft_hash_num_free   ft_hash_str_free
 

Typedefs

typedef FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
 
typedef struct FT_HashnodeRec_ FT_HashnodeRec
 
typedef struct FT_HashnodeRec_FT_Hashnode
 
typedef FT_ULong(* FT_Hash_LookupFunc) (FT_Hashkey *key)
 
typedef FT_Bool(* FT_Hash_CompareFunc) (FT_Hashkey *a, FT_Hashkey *b)
 
typedef struct FT_HashRec_ FT_HashRec
 
typedef struct FT_HashRec_FT_Hash
 

Functions

FT_Error ft_hash_str_init (FT_Hash hash, FT_Memory memory)
 
FT_Error ft_hash_num_init (FT_Hash hash, FT_Memory memory)
 
void ft_hash_str_free (FT_Hash hash, FT_Memory memory)
 
FT_Error ft_hash_str_insert (const char *key, size_t data, FT_Hash hash, FT_Memory memory)
 
FT_Error ft_hash_num_insert (FT_Int num, size_t data, FT_Hash hash, FT_Memory memory)
 
size_tft_hash_str_lookup (const char *key, FT_Hash hash)
 
size_tft_hash_num_lookup (FT_Int num, FT_Hash hash)
 

Macro Definition Documentation

◆ ft_hash_num_free

#define ft_hash_num_free   ft_hash_str_free

Definition at line 106 of file fthash.h.

Typedef Documentation

◆ FT_Hash

Definition at line 91 of file fthash.h.

◆ FT_Hash_CompareFunc

typedef FT_Bool(* FT_Hash_CompareFunc) (FT_Hashkey *a, FT_Hashkey *b)

Definition at line 73 of file fthash.h.

◆ FT_Hash_LookupFunc

typedef FT_ULong(* FT_Hash_LookupFunc) (FT_Hashkey *key)

Definition at line 70 of file fthash.h.

◆ FT_Hashkey

◆ FT_Hashnode

Definition at line 67 of file fthash.h.

◆ FT_HashnodeRec

◆ FT_HashRec

Function Documentation

◆ ft_hash_num_init()

FT_Error ft_hash_num_init ( FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 203 of file fthash.c.

205 {
206 return hash_init( hash, 1, memory );
207 }
static FT_Error hash_init(FT_Hash hash, FT_Bool is_num, FT_Memory memory)
Definition: fthash.c:165
static char memory[1024 *256]
Definition: process.c:122
Definition: _hash_fun.h:40

Referenced by parse_subrs().

◆ ft_hash_num_insert()

FT_Error ft_hash_num_insert ( FT_Int  num,
size_t  data,
FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 286 of file fthash.c.

290 {
291 FT_Hashkey hk;
292
293
294 hk.num = num;
295
296 return hash_insert( hk, data, hash, memory );
297 }
static FT_Error hash_insert(FT_Hashkey key, size_t data, FT_Hash hash, FT_Memory memory)
Definition: fthash.c:233
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint GLuint num
Definition: glext.h:9618

Referenced by parse_subrs().

◆ ft_hash_num_lookup()

size_t * ft_hash_num_lookup ( FT_Int  num,
FT_Hash  hash 
)

Definition at line 326 of file fthash.c.

328 {
329 FT_Hashkey hk;
330
331
332 hk.num = num;
333
334 return hash_lookup( hk, hash );
335 }
static size_t * hash_lookup(FT_Hashkey key, FT_Hash hash)
Definition: fthash.c:301

Referenced by cf2_interpT2CharString(), t1_decoder_parse_metrics(), and t1_ps_get_font_value().

◆ ft_hash_str_free()

void ft_hash_str_free ( FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 211 of file fthash.c.

213 {
214 if ( hash )
215 {
216 FT_UInt sz = hash->size;
217 FT_Hashnode* bp = hash->table;
218 FT_UInt i;
219
220
221 for ( i = 0; i < sz; i++, bp++ )
222 FT_FREE( *bp );
223
224 FT_FREE( hash->table );
225 }
226 }
#define FT_FREE(ptr)
Definition: ftmemory.h:337
unsigned int FT_UInt
Definition: fttypes.h:231
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

Referenced by bdf_free_font().

◆ ft_hash_str_init()

FT_Error ft_hash_str_init ( FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 195 of file fthash.c.

197 {
198 return hash_init( hash, 0, memory );
199 }

Referenced by _bdf_parse_start().

◆ ft_hash_str_insert()

FT_Error ft_hash_str_insert ( const char key,
size_t  data,
FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 271 of file fthash.c.

275 {
276 FT_Hashkey hk;
277
278
279 hk.str = key;
280
281 return hash_insert( hk, data, hash, memory );
282 }
Definition: copy.c:22

Referenced by _bdf_add_property(), _bdf_parse_start(), and bdf_create_property().

◆ ft_hash_str_lookup()

size_t * ft_hash_str_lookup ( const char key,
FT_Hash  hash 
)

Definition at line 313 of file fthash.c.

315 {
316 FT_Hashkey hk;
317
318
319 hk.str = key;
320
321 return hash_lookup( hk, hash );
322 }

Referenced by _bdf_add_property(), bdf_create_property(), bdf_get_font_property(), and bdf_get_property().