/* U(N) sets the code point and name of a glyph not in AGLFN */
#define U(N) 0x ## N, 0x ## N >= 0x10000 ? "u" #N : "uni" #N
-#define ALIAS(alias, canonical) {{},-1,alias,0,canonical}
+#define ALIAS(alias, canonical) {{.alias_of=canonical},-1,alias,IS_ALIAS}
static struct glyph {
- char data[YSIZE];
+ union {
+ char data[YSIZE];
+ char const *alias_of;
+ };
int_least32_t unicode;
char const *name;
uint_least8_t flags;
#define MOS4 0x04 /* 4-cell mosaic graphics character */
#define SEP6 (SEP | MOS6)
#define SEP4 (SEP | MOS4)
- char const *alias_of;
+#define IS_ALIAS 0x08
} glyphs[] = {
/*
* The first batch of glyphs comes from the code tables at the end of
printf("Flags: HW\n");
printf("LayerCount: 2\n");
dolookups(&glyphs[i]);
- if (glyphs[i].alias_of != NULL)
+ if (glyphs[i].flags & IS_ALIAS)
doalias(glyphs[i].alias_of);
else if (glyphs[i].flags & MOS6)
domosaic(glyphs[i].data[0],
unsigned char cols = 0;
int dx = 0, dh = 0;
- while (g->alias_of != NULL)
+ while (g->flags & IS_ALIAS)
g = get_glyph_by_name(g->alias_of);
if (g->flags & (MOS6|MOS4)) return;
/*