ansilove

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

commit 2c0324dc141a4b391ae146d2d8029bdd709f54b2
parent 9fad1300ab14b987de7d8547b420a447d6974dd9
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 11 Sep 2018 23:22:13 +0200

Call ansilove_savefile() to create the output file

Diffstat:
Msrc/main.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -269,33 +269,30 @@ int main(int argc, char *argv[]) { ctx.length -= 129 - (saucerec->comments > 0 ? 5 + 64 * saucerec->comments : 0); } - // create the output file by invoking the appropiate function + // create the output PNG data by invoking the appropiate function if (!strcmp(fext, ".pcb")) { - // params: input, output, font, bits, icecolors ansilove_pcboard(&ctx, &options); fileIsPCBoard = true; } else if (!strcmp(fext, ".bin")) { - // params: input, output, columns, font, bits, icecolors ansilove_binary(&ctx, &options); fileIsBinary = true; } else if (!strcmp(fext, ".adf")) { - // params: input, output, bits ansilove_artworx(&ctx, &options); } else if (!strcmp(fext, ".idf")) { - // params: input, output, bits ansilove_icedraw(&ctx, &options); } else if (!strcmp(fext, ".tnd")) { ansilove_tundra(&ctx, &options); fileIsTundra = true; } else if (!strcmp(fext, ".xb")) { - // params: input, output, bits ansilove_xbin(&ctx, &options); } else { - // params: input, output, font, bits, icecolors, fext ansilove_ansi(&ctx, &options); fileIsANSi = true; } + // create the output file + ansilove_savefile(&ctx, options.fileName); + // gather information and report to the command line if (fileIsANSi || fileIsBinary || fileIsPCBoard || fileIsTundra) {