| 331 | */ |
| 332 | |
| 333 | staticfn void |
| 334 | init_glyph_cache(void) |
| 335 | { |
| 336 | size_t glyph; |
| 337 | |
| 338 | /* Cache size of power of 2 not less than 2*MAX_GLYPH */ |
| 339 | glyphid_cache_lsize = 0; |
| 340 | glyphid_cache_size = 1; |
| 341 | while (glyphid_cache_size < 2*MAX_GLYPH) { |
| 342 | ++glyphid_cache_lsize; |
| 343 | glyphid_cache_size <<= 1; |
| 344 | } |
| 345 | |
| 346 | glyphid_cache = (struct glyphid_cache_t *) alloc( |
| 347 | glyphid_cache_size * sizeof (struct glyphid_cache_t)); |
| 348 | for (glyph = 0; glyph < glyphid_cache_size; ++glyph) { |
| 349 | glyphid_cache[glyph].glyphnum = 0; |
| 350 | glyphid_cache[glyph].id = (char *) 0; |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | void |
| 355 | free_glyphid_cache(void) |
no test coverage detected