chiark / gitweb /
Put bitmap data and alias target into a union
A character can't both be an alias and have its own bitmap data, so we
may as well overlap them. Wrapping them in a union doesn't require any
changes to the syntax of the glyphs array because C allows for
incomplete bracketing of initialisers. Because the union doesn't have a
name, its members can be accessed as though they're members of the
containing struct, which means that accesses to them don't need to
change.
There is a new flag to mark a glyph as an alias since "alias_of == NULL"
no longer works, and a corresponding change to the ALIAS() macro.
This saves about 20K of bedstead's data segment on a 64-bit system,
which is kind of silly but it's satisfying nonetheless.