callback addr as u32 not a void ptr
[my-code/arm.git] / betty / font2b.c
index fd88252..d155855 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc,char **argv) {
        }
 
        if(stat==CHAR)
-               printf("const unsigned char default_font[%d]={\n",256*8*2);
+               printf("const unsigned char default_font[%d]={\n",256*8);
 
        for(font=0;font<=0xff;font++) {
 
@@ -66,19 +66,16 @@ int main(int argc,char **argv) {
                for(col=0;col<8;col++) {
                        buf=0;
                        for(row=0;row<8;row++)
-                               buf|=(font_data[font*8+row]&(1<<(7-col)));
+                               buf|=(((font_data[font*8+row]>>(7-col))&1)<<row);
                        if(stat==CHAR) {
-                               if(!(col%4))
+                               if(col==0)
                                        printf("\t");
-                               printf("0x%02x,0x%02x",buf,buf);
+                               printf("0x%02x",buf);
                                if((font!=0xff)|(col!=7))
                                        printf(",");
-                               if(col==3)
-                                       printf("\n");
                        }
                        else {
                                write(fd,&buf,1);
-                               write(fd,&buf,1);
                        }
                }
                if(stat==CHAR)