Use uthash for glyph properties as well

This commit is contained in:
Kovid Goyal
2021-05-07 06:58:54 +05:30
parent ec68739585
commit 26e1d6fe5c
3 changed files with 46 additions and 48 deletions
+13 -1
View File
@@ -8,6 +8,8 @@
#include "data-types.h"
void free_glyph_cache_global_resources(void);
#define SpritePositionHead \
bool rendered, colored; \
sprite_index x, y, z; \
@@ -17,7 +19,17 @@ typedef struct SpritePosition {
} SpritePosition;
void free_glyph_cache_global_resources(void);
void free_sprite_position_hash_table(SpritePosition **head);
SpritePosition*
find_or_create_sprite_position(SpritePosition **head, glyph_index *glyphs, glyph_index count, glyph_index ligature_index, bool *created);
#define GlyphPropertiesHead \
uint8_t data;
typedef struct GlyphProperties {
GlyphPropertiesHead
} GlyphProperties;
void free_glyph_properties_hash_table(GlyphProperties **head);
GlyphProperties*
find_or_create_glyph_properties(GlyphProperties **head, unsigned glyph);