| 34 | } |
| 35 | |
| 36 | int |
| 37 | set_map_u(glyph_map *gmap, uint32 utf32ch, const uint8 *utf8str) |
| 38 | { |
| 39 | glyph_map *tmpgm = gmap; |
| 40 | |
| 41 | if (!tmpgm || !utf32ch) |
| 42 | return 0; |
| 43 | |
| 44 | if (gmap->u == 0) { |
| 45 | gmap->u = |
| 46 | (struct unicode_representation *) alloc(sizeof *gmap->u); |
| 47 | gmap->u->utf8str = 0; |
| 48 | } |
| 49 | if (gmap->u->utf8str != 0) { |
| 50 | free(gmap->u->utf8str); |
| 51 | gmap->u->utf8str = 0; |
| 52 | } |
| 53 | gmap->u->utf8str = (uint8 *) dupstr((const char *) utf8str); |
| 54 | gmap->u->utf32ch = utf32ch; |
| 55 | return 1; |
| 56 | } |
| 57 | |
| 58 | void |
| 59 | free_all_glyphmap_u(void) |
no test coverage detected