ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit f4df54a60fc846713c1073000179c741fb5be162
parent cb7f9635c266091e5790456c53862b92f0ec8be9
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 14 Feb 2020 18:18:17 +0100

Assign filetype for each format, to allow refactoring information display.

Diffstat:
Msrc/ansilove.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -78,6 +78,7 @@ main(int argc, char *argv[]) char *fileName = NULL; char *font = NULL; char *type = NULL; + int filetype = 0; static struct ansilove_ctx ctx; static struct ansilove_options options; @@ -243,6 +244,7 @@ main(int argc, char *argv[]) for (size_t loop = 0; loop < 7; loop++) { if (!strcmp(types[loop], type)) { loader = loaders[loop]; + filetype = filetypes[loop]; break; } } @@ -253,6 +255,7 @@ main(int argc, char *argv[]) for (size_t loop = 0; loop < 7; loop++) { if (!strcmp(types[loop], fext)) { loader = loaders[loop]; + filetype = filetypes[loop]; break; } } @@ -260,6 +263,7 @@ main(int argc, char *argv[]) if (!loader) { loader = ansilove_ansi; + filetype = ANSILOVE_FILETYPE_ANS; } if (loader(&ctx, &options) == -1)