libansilove

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

commit 1d5ff0b0c4a02a1185737a9b863ee9c1f0c98e1d
parent 2d2f258440a7da47dfa7000c350a1d1304087cf8
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri,  4 Oct 2019 09:56:01 +0200

Use type size_t for loop and structIndex variables.

Diffstat:
Msrc/loaders/ansi.c | 2+-
Msrc/loaders/pcboard.c | 6+-----
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -110,7 +110,7 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) char *seqTok = NULL; /* ANSi buffer structure array definition */ - uint32_t structIndex = 0; + size_t structIndex = 0; struct ansiChar *ptr, *ansi_buffer; size_t ansi_buffer_size = ANSI_BUFFER_SIZE; diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c @@ -44,7 +44,7 @@ ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) } struct fontStruct fontData; - uint32_t loop, structIndex; + size_t loop = 0, structIndex = 0; /* font selection */ alSelectFont(&fontData, options->font); @@ -62,10 +62,6 @@ ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) /* PCB buffer dynamic memory allocation */ pcboard_buffer = malloc(sizeof (struct pcbChar)); - /* reset loop */ - loop = 0; - structIndex = 0; - while (loop < ctx->length) { cursor = &ctx->buffer[loop];