ansilove

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

commit 5abe7c856976c65acb6b3546b8f510f719d15f03
parent b7f72c680820633d3936e0649d32fa615b5b4cf9
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Sun, 26 Jul 2015 17:48:13 +0200

Specifying default values for bits and font when not specified + enabling iCE colours by default

Diffstat:
Msrc/main.c | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c @@ -163,12 +163,25 @@ int main(int argc, char *argv[]) argv += optind; // create output file name if output is not specified - if (!output) { + if (!output) { int outputLen = strlen(input) + 5; output = malloc(outputLen); snprintf(output, outputLen, "%s%s", input, ".png"); } + // default to 8 if bits option is not specified + if (!bits) { + bits = "8"; + } + + // default to 80x25 font if font option is not specified + if (!font) { + font = "80x25"; + } + + // enabling iCE colors by default (For now) + icecolors = "1"; + // get file extension char *fext = strrchr(input, '.'); fext = fext ? strtolower(fext) : "none";