diff --git a/caca/font.c b/caca/font.c index 9779709..9ad4ffc 100644 --- a/caca/font.c +++ b/caca/font.c @@ -118,9 +118,9 @@ caca_font_t *caca_load_font(void const *data, size_t size) if(size == 0) { if(!strcasecmp(data, "Monospace 9")) - return caca_load_font((char *)&mono9_data, mono9_size); + return caca_load_font(mono9_data, mono9_size); if(!strcasecmp(data, "Monospace Bold 12")) - return caca_load_font((char *)&monobold12_data, monobold12_size); + return caca_load_font(monobold12_data, monobold12_size); seterrno(ENOENT); return NULL; diff --git a/caca/mono9.data b/caca/mono9.data index 9a3bcf4..06c71a6 100644 --- a/caca/mono9.data +++ b/caca/mono9.data @@ -4,8 +4,8 @@ * tools/makefont mono9 "Monospace 9" 96 4 */ -static unsigned int const mono9_size = 246854; -static char mono9_data[246854] = +static size_t const mono9_size = 246854; +static uint8_t mono9_data[246854] = { /* file: */ 0xCA,0xCA, /* caca_header */ diff --git a/caca/monobold12.data b/caca/monobold12.data index ed61494..1aed61a 100644 --- a/caca/monobold12.data +++ b/caca/monobold12.data @@ -4,8 +4,8 @@ * tools/makefont monobold12 "Monospace Bold 12" 96 4 */ -static unsigned int const monobold12_size = 419205; -static char monobold12_data[419205] = +static size_t const monobold12_size = 419205; +static uint8_t monobold12_data[419205] = { /* file: */ 0xCA,0xCA, /* caca_header */ diff --git a/tools/makefont.c b/tools/makefont.c index c0723c0..e4a027b 100644 --- a/tools/makefont.c +++ b/tools/makefont.c @@ -187,9 +187,10 @@ int main(int argc, char *argv[]) printf(" */\n"); printf("\n"); - printf("static unsigned int const %s_size = %i;\n", + printf("static size_t const %s_size = %i;\n", + prefix, 4 + control_size + data_size); + printf("static uint8_t %s_data[%i] =\n", prefix, 4 + control_size + data_size); - printf("static char %s_data[%i] =\n", prefix, 4 + control_size + data_size); printf("{\n"); printf("/* file: */\n");