#define SIZE 4 #define DEFSTYLE STYLE_FORK | STYLE_PRUNE #define SSIZE 2 /* sqrt(SIZE) */ #define SIZEBITS 2 /* ceil(lg(SIZE)) */ #define SIZE1BITS 3 /* ceil(lg(SIZE+1)) */ static char fillchar(int fill) { return('0'+fill); } #define bitcount(x) bitcount_[(x)] static const char bitcount_[] = { 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4 }; #define bitcount_init() /* nothing */ #define FILLEDFMT " %d " #define MASKFMT "-%x-" #define SEP "" #define VECTYPE unsigned int #define SUMDECL unsigned int sum #define SUMINIT sum = 0 static const unsigned int expand[] = { 0x0000, 0x0001, 0x0010, 0x0011, 0x0100, 0x0101, 0x0110, 0x0111, 0x1000, 0x1001, 0x1010, 0x1011, 0x1100, 0x1101, 0x1110, 0x1111 }; #define SUMADD(vec) sum += expand[(vec)]; #define SUMGET(inx) ((sum >> (4*(inx))) & 7) #include "gen.c"