libansilove

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

commit b0cffb18916afeb9eb4f4f245c074ceceecab9d2
parent f1b7471ba97dbfe7e18869f354ad3c33fda2fdb3
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 15 Nov 2018 23:11:46 +0100

Stop using uint32_t everywhere, start using more appropriate types

Diffstat:
Minclude/ansilove.h | 12++++++------
Msrc/loaders/ansi.c | 2+-
Msrc/loaders/tundra.c | 2+-
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/ansilove.h b/include/ansilove.h @@ -69,7 +69,7 @@ struct ansilove_ctx { const uint8_t *buffer; size_t length; struct ansilove_png png; - uint32_t error; + uint8_t error; }; struct ansilove_options { @@ -77,11 +77,11 @@ struct ansilove_options { bool dos; bool icecolors; bool truecolor; - int32_t columns; - uint32_t font; - uint32_t bits; - uint32_t mode; - uint32_t scale_factor; + int16_t columns; + uint8_t font; + uint8_t bits; + uint8_t mode; + uint8_t scale_factor; }; int ansilove_init(struct ansilove_ctx *, struct ansilove_options *); diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -62,7 +62,7 @@ int ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) /* Default to 80 columns if columns option wasn't set */ options->columns = options->columns ? options->columns : 80; - int32_t columns = options->columns; + int16_t columns = options->columns; bool ced = false; bool transparent = false; diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -45,7 +45,7 @@ int ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) char tundra_version; options->columns = options->columns ? options->columns : 80; - int32_t columns = options->columns; + int16_t columns = options->columns; /* font selection */ alSelectFont(&fontData, options->font);