ReactOS  0.4.14-dev-384-g5b37caa
fthash.h File Reference
#include <ft2build.h>
Include dependency graph for fthash.h:

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 107 of file fthash.h.

Typedef Documentation

◆ FT_Hash

Definition at line 92 of file fthash.h.

◆ FT_Hash_CompareFunc

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

Definition at line 75 of file fthash.h.

◆ FT_Hash_LookupFunc

typedef FT_ULong(* FT_Hash_LookupFunc) (FT_Hashkey *key)

Definition at line 72 of file fthash.h.

◆ FT_Hashkey

◆ FT_Hashnode

Definition at line 68 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 204 of file fthash.c.

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

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 287 of file fthash.c.

291  {
292  FT_Hashkey hk;
293 
294 
295  hk.num = num;
296 
297  return hash_insert( hk, data, hash, memory );
298  }
static char memory[1024 *256]
Definition: process.c:116
GLuint GLuint num
Definition: glext.h:9618
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
static FT_Error hash_insert(FT_Hashkey key, size_t data, FT_Hash hash, FT_Memory memory)
Definition: fthash.c:234
Definition: _hash_fun.h:40

Referenced by parse_subrs().

◆ ft_hash_num_lookup()

size_t* ft_hash_num_lookup ( FT_Int  num,
FT_Hash  hash 
)

Definition at line 327 of file fthash.c.

329  {
330  FT_Hashkey hk;
331 
332 
333  hk.num = num;
334 
335  return hash_lookup( hk, hash );
336  }
static size_t * hash_lookup(FT_Hashkey key, FT_Hash hash)
Definition: fthash.c:302
GLuint GLuint num
Definition: glext.h:9618
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
Definition: _hash_fun.h:40

Referenced by cf2_interpT2CharString(), and t1_ps_get_font_value().

◆ ft_hash_str_free()

void ft_hash_str_free ( FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 212 of file fthash.c.

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

Referenced by bdf_free_font().

◆ ft_hash_str_init()

FT_Error ft_hash_str_init ( FT_Hash  hash,
FT_Memory  memory 
)

Definition at line 196 of file fthash.c.

198  {
199  return hash_init( hash, 0, memory );
200  }
static char memory[1024 *256]
Definition: process.c:116
Definition: _hash_fun.h:40
static FT_Error hash_init(FT_Hash hash, FT_Bool is_num, FT_Memory memory)
Definition: fthash.c:166

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 272 of file fthash.c.

276  {
277  FT_Hashkey hk;
278 
279 
280  hk.str = key;
281 
282  return hash_insert( hk, data, hash, memory );
283  }
static char memory[1024 *256]
Definition: process.c:116
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
HKEY key
Definition: reg.c:42
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
static FT_Error hash_insert(FT_Hashkey key, size_t data, FT_Hash hash, FT_Memory memory)
Definition: fthash.c:234
Definition: _hash_fun.h:40

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 314 of file fthash.c.

316  {
317  FT_Hashkey hk;
318 
319 
320  hk.str = key;
321 
322  return hash_lookup( hk, hash );
323  }
static size_t * hash_lookup(FT_Hashkey key, FT_Hash hash)
Definition: fthash.c:302
HKEY key
Definition: reg.c:42
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
Definition: _hash_fun.h:40

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