From: Alan Cox Date: Fri, 17 Aug 2018 23:52:44 +0000 (+0100) Subject: fontexpand: fix endian dependancy X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d81033b28189443b3745f754dffd9eb88d537d87;p=FUZIX.git fontexpand: fix endian dependancy I'm still not sure we have it all correct yet --- diff --git a/Kernel/tools/fontexpand.c b/Kernel/tools/fontexpand.c index fa3e56d8..848a27fe 100644 --- a/Kernel/tools/fontexpand.c +++ b/Kernel/tools/fontexpand.c @@ -41,11 +41,12 @@ int main(int argc, char *argv[]) puts("#include \n#include \n"); puts("#ifdef CONFIG_FONT_8X8_EXP2\n"); puts("/* Automatically generated do not edit */\n"); - printf("const uint16_t fontdata_8x8_exp2[%d] = {\n", FONTDATAMAX); + printf("const uint8_t fontdata_8x8_exp2[%d] = {\n", FONTDATAMAX); for (i = 0; i < FONTDATAMAX; i++) { + uint16_t w = widen(*p); if (!(i & 7)) printf("\t/* Character %u */\n", i >> 3); - printf("\t0x%04X,\t/* %s */\n", widen(*p), boolstr(*p)); + printf("\t0x%02X,0x%02X,\t/* %s */\n", w >> 8, w & 0xFF, boolstr(*p)); if ((i & 7) == 7) putchar('\n'); p++;