Code:
	
#define FONTBITS(a,b,c,d,e,f,g) \
  { FONTCOL (4, a,b,c,d,e,f,g), \
    FONTCOL (3, a,b,c,d,e,f,g), \
    FONTCOL (2, a,b,c,d,e,f,g), \
    FONTCOL (1, a,b,c,d,e,f,g), \
    FONTCOL (0, a,b,c,d,e,f,g) }
#define FONTCOL(x,a,b,c,d,e,f,g) \
 ( DOT (a,x,0) | \
   DOT (b,x,1) | \
   DOT (c,x,2) | \
   DOT (d,x,3) | \
   DOT (e,x,4) | \
   DOT (f,x,5) | \
   DOT (g,x,6) )
#define DOT(a,x,y) \
  (a & (1 << x) ? (1 << y)  : 0)
   
// Hier ein 'A', muss natürlich noch in einen Initializer :-)
FONTBITS (01110,
          10001,
          10001,
          11111,
          10001,
          10001,
          10001);
 Das ganze gibt viel Code, der aber vom Compiler komplett zusammengefaltet wird! Die 8 Werte werden zu 5 Bytes, die man in einem Initializer verwenden kann.
Lesezeichen