#include <ft2build.h>
Go to the source code of this file.
|
static FT_ULong | hash_str_lookup (FT_Hashkey *key) |
|
static FT_ULong | hash_num_lookup (FT_Hashkey *key) |
|
static FT_Bool | hash_str_compare (FT_Hashkey *a, FT_Hashkey *b) |
|
static FT_Bool | hash_num_compare (FT_Hashkey *a, FT_Hashkey *b) |
|
static FT_Hashnode * | hash_bucket (FT_Hashkey key, FT_Hash hash) |
|
static FT_Error | hash_rehash (FT_Hash hash, FT_Memory memory) |
|
static FT_Error | hash_init (FT_Hash hash, FT_Bool is_num, FT_Memory memory) |
|
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) |
|
static FT_Error | hash_insert (FT_Hashkey key, size_t data, 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) |
|
static size_t * | hash_lookup (FT_Hashkey key, FT_Hash hash) |
|
size_t * | ft_hash_str_lookup (const char *key, FT_Hash hash) |
|
size_t * | ft_hash_num_lookup (FT_Int num, FT_Hash hash) |
|
◆ INITIAL_HT_SIZE
◆ ft_hash_num_init()
Definition at line 204 of file fthash.c.
206 {
208 }
static FT_Error hash_init(FT_Hash hash, FT_Bool is_num, FT_Memory memory)
static char memory[1024 *256]
Referenced by parse_subrs().
◆ ft_hash_num_insert()
Definition at line 287 of file fthash.c.
291 {
293
294
296
298 }
static FT_Error hash_insert(FT_Hashkey key, size_t data, FT_Hash hash, FT_Memory memory)
FT_BEGIN_HEADER union FT_Hashkey_ FT_Hashkey
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Referenced by parse_subrs().
◆ ft_hash_num_lookup()
◆ ft_hash_str_free()
Definition at line 212 of file fthash.c.
214 {
216 {
220
221
222 for (
i = 0;
i < sz;
i++, bp++ )
224
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
Referenced by bdf_free_font().
◆ ft_hash_str_init()
◆ ft_hash_str_insert()
◆ ft_hash_str_lookup()
◆ hash_bucket()
Definition at line 106 of file fthash.c.
108 {
112
113
115
116 ndp = bp + (
res %
hash->size );
117 while ( *ndp )
118 {
119 if ( (
hash->compare)( &(*ndp)->key, &
key ) )
120 break;
121
122 ndp--;
123 if ( ndp < bp )
124 ndp = bp + (
hash->size - 1 );
125 }
126
127 return ndp;
128 }
◆ hash_init()
Definition at line 166 of file fthash.c.
169 {
172
173
175 hash->limit = sz / 3;
177
179 {
182 }
183 else
184 {
187 }
188
190
192 }
static BOOL is_num(WCHAR val)
static FT_ULong hash_num_lookup(FT_Hashkey *key)
static FT_Bool hash_str_compare(FT_Hashkey *a, FT_Hashkey *b)
static FT_Bool hash_num_compare(FT_Hashkey *a, FT_Hashkey *b)
static FT_ULong hash_str_lookup(FT_Hashkey *key)
#define FT_MEM_NEW_ARRAY(ptr, count)
Referenced by BCryptCreateHash(), ft_hash_num_init(), and ft_hash_str_init().
◆ hash_insert()
Definition at line 234 of file fthash.c.
238 {
242
243
244 nn = *bp;
245 if ( !nn )
246 {
249 *bp = nn;
250
253
255 {
259 }
260
262 }
263 else
265
268 }
static FT_Error hash_rehash(FT_Hash hash, FT_Memory memory)
Referenced by ft_hash_num_insert(), and ft_hash_str_insert().
◆ hash_lookup()
◆ hash_num_compare()
Definition at line 95 of file fthash.c.
97 {
98 if (
a->num ==
b->num )
99 return 1;
100
101 return 0;
102 }
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
Referenced by hash_init().
◆ hash_num_lookup()
◆ hash_rehash()
Definition at line 132 of file fthash.c.
134 {
138
141
142
145
148
149 for (
i = 0, bp = obp;
i < sz;
i++, bp++ )
150 {
151 if ( *bp )
152 {
154 *nbp = *bp;
155 }
156 }
157
159
162 }
#define FT_NEW_ARRAY(ptr, count)
Referenced by hash_insert().
◆ hash_str_compare()
Definition at line 83 of file fthash.c.
85 {
86 if (
a->str[0] ==
b->str[0] &&
88 return 1;
89
90 return 0;
91 }
Referenced by hash_init().
◆ hash_str_lookup()
Definition at line 51 of file fthash.c.
52 {
53 const char* kp =
key->str;
55
56
57
58 while ( *kp )
60
62 }
Referenced by hash_init().