libansilove

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

commit ee4758728171e6809133239a549cbc3ac2330205
parent 117e7e72db072089db266f1bc5d70881bb3b49ee
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 15 Nov 2018 11:40:23 +0100

Define and use the ESC macro for escape

Diffstat:
Msrc/loaders/ansi.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -36,6 +36,7 @@ #define CR '\r' #define TAB '\t' #define SUB 26 +#define ESC 27 /* Character structure */ struct ansiChar { @@ -141,7 +142,7 @@ int ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) case SUB: loop = ctx->length; break; - case 27: /* ANSi sequence */ + case ESC: /* ANSi sequence */ if (next_character == 91) { for (ansi_sequence_loop = 0; ansi_sequence_loop < ANSI_SEQUENCE_MAX_LENGTH; ansi_sequence_loop++) { ansi_sequence_character = ctx->buffer[loop + 2 + ansi_sequence_loop];