# HG changeset patch # User Matti Hamalainen # Date 1349613235 -10800 # Node ID 8fba01374a2907474fba1fcc130ed22c900d2f4d # Parent 3dc35ce354f7c9483bbcf569ab984d074a048783 Improve C source output of fontconv. diff -r 3dc35ce354f7 -r 8fba01374a29 fontconv.c --- a/fontconv.c Sun Oct 07 15:15:17 2012 +0300 +++ b/fontconv.c Sun Oct 07 15:33:55 2012 +0300 @@ -147,7 +147,7 @@ static int dm_csrc_fopen(DMResource * f) { fprintf(f->fh, - "const Uint8 %s = {\n", (char *) f->data + "const Uint8 %s[] = {\n", (char *) f->data ); return DMERR_OK; } @@ -159,6 +159,8 @@ { fprintf(f->fh, "\n};\n" + "const int %s_size = sizeof(%s) / sizeof(%s[0]);\n", + (char *)f->data, (char *)f->data, (char *)f->data ); fclose(f->fh); f->fh = NULL;