libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 4358a8f427aa28d41218027edab589914b783b7c
parent 3caac7f24cf1016970f675ebda980a83bbdb263a
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 15 Nov 2018 12:35:10 +0100

Use uint8_t instead of unsigned char everywhere

Diffstat:
Minclude/ansilove.h | 4++--
Msrc/drawchar.c | 4++--
Msrc/drawchar.h | 4++--
Msrc/fonts.c | 48++++++++++++++++++++++++------------------------
Msrc/fonts.h | 50+++++++++++++++++++++++++-------------------------
Msrc/loaders/ansi.c | 6+++---
Msrc/loaders/icedraw.c | 2+-
Msrc/loaders/pcboard.c | 4++--
Msrc/loaders/xbin.c | 6+++---
9 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/include/ansilove.h b/include/ansilove.h @@ -61,12 +61,12 @@ #define ANSILOVE_MODE_WORKBENCH 3 struct ansilove_png { - const unsigned char *buffer; + const uint8_t *buffer; int length; /* Match the parameter type of gdImagePngPtr() */ }; struct ansilove_ctx { - const unsigned char *buffer; + const uint8_t *buffer; size_t length; struct ansilove_png png; uint32_t error; diff --git a/src/drawchar.c b/src/drawchar.c @@ -15,9 +15,9 @@ #include "drawchar.h" -void drawchar(gdImagePtr im, const unsigned char *font_data, uint32_t bits, +void drawchar(gdImagePtr im, const uint8_t *font_data, uint32_t bits, uint32_t height, uint32_t column, uint32_t row, - uint32_t background, uint32_t foreground, unsigned char character) { + uint32_t background, uint32_t foreground, uint8_t character) { uint32_t x, y; gdImageFilledRectangle(im, column * bits, row*height, column * bits + diff --git a/src/drawchar.h b/src/drawchar.h @@ -16,8 +16,8 @@ #ifndef DRAWCHAR_H #define DRAWCHAR_H -void drawchar(gdImagePtr im, const unsigned char *font_data, uint32_t bits, +void drawchar(gdImagePtr im, const uint8_t *font_data, uint32_t bits, uint32_t height, uint32_t column, uint32_t row, - uint32_t background, uint32_t foreground, unsigned char character); + uint32_t background, uint32_t foreground, uint8_t character); #endif /* DRAWCHAR_H */ diff --git a/src/fonts.c b/src/fonts.c @@ -147,7 +147,7 @@ void alSelectFont(struct fontStruct *fontData, int font) { } } -const unsigned char font_pc_80x25[4096] = { +const uint8_t font_pc_80x25[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -406,7 +406,7 @@ const unsigned char font_pc_80x25[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_80x50[2048] = { +const uint8_t font_pc_80x50[2048] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0xd6, 0x10, 0x38, @@ -537,7 +537,7 @@ const unsigned char font_pc_80x50[2048] = { 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_baltic[4096] = { +const uint8_t font_pc_baltic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -796,7 +796,7 @@ const unsigned char font_pc_baltic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_cyrillic[4096] = { +const uint8_t font_pc_cyrillic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -1055,7 +1055,7 @@ const unsigned char font_pc_cyrillic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_french_canadian[4096] = { +const uint8_t font_pc_french_canadian[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -1314,7 +1314,7 @@ const unsigned char font_pc_french_canadian[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_greek[4096] = { +const uint8_t font_pc_greek[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -1573,7 +1573,7 @@ const unsigned char font_pc_greek[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_greek_869[4096] = { +const uint8_t font_pc_greek_869[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -1832,7 +1832,7 @@ const unsigned char font_pc_greek_869[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_hebrew[4096] = { +const uint8_t font_pc_hebrew[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -2091,7 +2091,7 @@ const unsigned char font_pc_hebrew[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_icelandic[4096] = { +const uint8_t font_pc_icelandic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -2350,7 +2350,7 @@ const unsigned char font_pc_icelandic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_latin1[4096] = { +const uint8_t font_pc_latin1[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -2609,7 +2609,7 @@ const unsigned char font_pc_latin1[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_latin2[4096] = { +const uint8_t font_pc_latin2[4096] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -2868,7 +2868,7 @@ const unsigned char font_pc_latin2[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_nordic[4096] = { +const uint8_t font_pc_nordic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -3127,7 +3127,7 @@ const unsigned char font_pc_nordic[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_portuguese[4096] = { +const uint8_t font_pc_portuguese[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -3386,7 +3386,7 @@ const unsigned char font_pc_portuguese[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_russian[4096] = { +const uint8_t font_pc_russian[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -3645,7 +3645,7 @@ const unsigned char font_pc_russian[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_terminus[4096] = { +const uint8_t font_pc_terminus[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x82, 0xaa, 0x82, 0x82, 0xba, 0x92, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xd6, 0xfe, 0xfe, 0xc6, 0xee, 0xfe, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00, @@ -3904,7 +3904,7 @@ const unsigned char font_pc_terminus[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_pc_turkish[4096] = { +const uint8_t font_pc_turkish[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -4163,7 +4163,7 @@ const unsigned char font_pc_turkish[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const unsigned char font_amiga_microknight[4096] = { +const uint8_t font_amiga_microknight[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4422,7 +4422,7 @@ const unsigned char font_amiga_microknight[4096] = { 0x6c, 0x6c, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x7e, 0x06, 0x06, 0x7c, 0x7c }; -const unsigned char font_amiga_microknight_plus[4096] = { +const uint8_t font_amiga_microknight_plus[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4681,7 +4681,7 @@ const unsigned char font_amiga_microknight_plus[4096] = { 0x6c, 0x6c, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x7e, 0x06, 0x06, 0x7c, 0x7c }; -const unsigned char font_amiga_mosoul[4096] = { +const uint8_t font_amiga_mosoul[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -4940,7 +4940,7 @@ const unsigned char font_amiga_mosoul[4096] = { 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x18, 0x30, 0x30 }; -const unsigned char font_amiga_pot_noodle[4096] = { +const uint8_t font_amiga_pot_noodle[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x83, 0x83, 0x39, 0x39, 0x29, 0x29, 0x23, 0x23, 0x3f, 0x3f, 0x81, 0x81, 0xff, 0xff, 0xff, 0xff, 0x83, 0x83, 0x39, 0x39, 0x21, 0x21, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x7f, 0x7f, @@ -5199,7 +5199,7 @@ const unsigned char font_amiga_pot_noodle[4096] = { 0x00, 0x00, 0xc6, 0xc6, 0x80, 0x80, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0xf0, 0xf0 }; -const unsigned char font_amiga_topaz_1200[4096] = { +const uint8_t font_amiga_topaz_1200[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x39, 0x39, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, 0x3f, 0x3f, 0x87, 0x87, 0xff, 0xff, 0xc3, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xff, 0xff, @@ -5458,7 +5458,7 @@ const unsigned char font_amiga_topaz_1200[4096] = { 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x18, 0x30, 0x30 }; -const unsigned char font_amiga_topaz_1200_plus[4096] = { +const uint8_t font_amiga_topaz_1200_plus[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x39, 0x39, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, 0x3f, 0x3f, 0x87, 0x87, 0xff, 0xff, 0xc3, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xff, 0xff, @@ -5717,7 +5717,7 @@ const unsigned char font_amiga_topaz_1200_plus[4096] = { 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x18, 0x30, 0x30 }; -const unsigned char font_amiga_topaz_500[4096] = { +const uint8_t font_amiga_topaz_500[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5976,7 +5976,7 @@ const unsigned char font_amiga_topaz_500[4096] = { 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x18, 0x70, 0x70 }; -const unsigned char font_amiga_topaz_500_plus[4096] = { +const uint8_t font_amiga_topaz_500_plus[4096] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/src/fonts.h b/src/fonts.h @@ -17,7 +17,7 @@ #define FONTS_H struct fontStruct { - const unsigned char *font_data; + const uint8_t *font_data; uint32_t width; uint32_t height; bool isAmigaFont; @@ -25,30 +25,30 @@ struct fontStruct { void alSelectFont(struct fontStruct *fontData, int font); -const unsigned char font_pc_80x25[4096]; -const unsigned char font_pc_80x50[2048]; -const unsigned char font_pc_baltic[4096]; -const unsigned char font_pc_cyrillic[4096]; -const unsigned char font_pc_french_canadian[4096]; -const unsigned char font_pc_greek[4096]; -const unsigned char font_pc_greek_869[4096]; -const unsigned char font_pc_hebrew[4096]; -const unsigned char font_pc_icelandic[4096]; -const unsigned char font_pc_latin1[4096]; -const unsigned char font_pc_latin2[4096]; -const unsigned char font_pc_nordic[4096]; -const unsigned char font_pc_portuguese[4096]; -const unsigned char font_pc_russian[4096]; -const unsigned char font_pc_terminus[4096]; -const unsigned char font_pc_turkish[4096]; +const uint8_t font_pc_80x25[4096]; +const uint8_t font_pc_80x50[2048]; +const uint8_t font_pc_baltic[4096]; +const uint8_t font_pc_cyrillic[4096]; +const uint8_t font_pc_french_canadian[4096]; +const uint8_t font_pc_greek[4096]; +const uint8_t font_pc_greek_869[4096]; +const uint8_t font_pc_hebrew[4096]; +const uint8_t font_pc_icelandic[4096]; +const uint8_t font_pc_latin1[4096]; +const uint8_t font_pc_latin2[4096]; +const uint8_t font_pc_nordic[4096]; +const uint8_t font_pc_portuguese[4096]; +const uint8_t font_pc_russian[4096]; +const uint8_t font_pc_terminus[4096]; +const uint8_t font_pc_turkish[4096]; -const unsigned char font_amiga_microknight[4096]; -const unsigned char font_amiga_microknight_plus[4096]; -const unsigned char font_amiga_mosoul[4096]; -const unsigned char font_amiga_pot_noodle[4096]; -const unsigned char font_amiga_topaz_1200[4096]; -const unsigned char font_amiga_topaz_1200_plus[4096]; -const unsigned char font_amiga_topaz_500[4096]; -const unsigned char font_amiga_topaz_500_plus[4096]; +const uint8_t font_amiga_microknight[4096]; +const uint8_t font_amiga_microknight_plus[4096]; +const uint8_t font_amiga_mosoul[4096]; +const uint8_t font_amiga_pot_noodle[4096]; +const uint8_t font_amiga_topaz_1200[4096]; +const uint8_t font_amiga_topaz_1200_plus[4096]; +const uint8_t font_amiga_topaz_500[4096]; +const uint8_t font_amiga_topaz_500_plus[4096]; #endif /* FONTS_H */ diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -44,7 +44,7 @@ struct ansiChar { int32_t row; uint32_t background; uint32_t foreground; - unsigned char character; + uint8_t character; }; int ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) @@ -94,8 +94,8 @@ int ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) uint32_t ansi_sequence_loop; /* character definitions */ - unsigned char current_character, character; - unsigned char ansi_sequence_character; + uint8_t current_character, character; + uint8_t ansi_sequence_character; /* default color values */ uint32_t background = 0, foreground = 7; diff --git a/src/loaders/icedraw.c b/src/loaders/icedraw.c @@ -48,7 +48,7 @@ int ansilove_icedraw(struct ansilove_ctx *ctx, struct ansilove_options *options) uint32_t idf_sequence_length, idf_sequence_loop, i = 0; /* dynamically allocated memory buffer for IDF data */ - unsigned char *idf_buffer; + uint8_t *idf_buffer; idf_buffer = malloc(2); uint16_t idf_data, idf_data_length; diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c @@ -30,7 +30,7 @@ struct pcbChar { uint32_t row; uint32_t background; uint32_t foreground; - unsigned char character; + uint8_t character; }; int ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) @@ -51,7 +51,7 @@ int ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) /* libgd image pointers */ gdImagePtr canvas; - unsigned char character, current_character, next_character; + uint8_t character, current_character, next_character; uint32_t background = 0, foreground = 7; uint32_t column = 0, row = 0, columnMax = 0, rowMax = 0; diff --git a/src/loaders/xbin.c b/src/loaders/xbin.c @@ -29,8 +29,8 @@ int ansilove_xbin(struct ansilove_ctx *ctx, struct ansilove_options *options) return -1; } - const unsigned char *font_data; - unsigned char *font_data_xbin = NULL; + const uint8_t *font_data; + uint8_t *font_data_xbin = NULL; if (strncmp((char *)ctx->buffer, "XBIN\x1a", 5) != 0) { ctx->error = ANSILOVE_FORMAT_ERROR; @@ -84,7 +84,7 @@ int ansilove_xbin(struct ansilove_ctx *ctx, struct ansilove_options *options) uint32_t numchars = (xbin_flags & 0x10 ? 512 : 256); /* allocate memory to contain the XBin font */ - font_data_xbin = (unsigned char *)malloc(xbin_fontsize * numchars); + font_data_xbin = (uint8_t *)malloc(xbin_fontsize * numchars); if (font_data_xbin == NULL) { ctx->error = ANSILOVE_MEMORY_ERROR; return -1;