ansilove

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

commit 457063d10498b7a96c6a740c53d46f0380f5a36e
parent 2b3953f133cbe9ffd6d39a0e5849bbd7f624c6ea
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Sun, 26 Jul 2015 22:25:16 +0200

Adding a mode option to specify CED, Workbench and transparent rendering modes

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

diff --git a/src/main.c b/src/main.c @@ -116,6 +116,7 @@ int main(int argc, char *argv[]) int getoptFlag; char *bits = NULL; + char *mode = NULL; char *columns = NULL; char *font = NULL; char *icecolors = NULL; @@ -123,7 +124,7 @@ int main(int argc, char *argv[]) char *input = NULL, *output = NULL; char *retinaout = NULL; - while ((getoptFlag = getopt(argc, argv, "b:c:ef:hi:o:rsv")) != -1) { + while ((getoptFlag = getopt(argc, argv, "b:c:ef:hi:m:o:rsv")) != -1) { switch(getoptFlag) { case 'b': bits = optarg; @@ -143,6 +144,9 @@ int main(int argc, char *argv[]) case 'i': input = optarg; break; + case 'm': + mode = optarg; + break; case 'o': output = optarg; break; @@ -194,6 +198,11 @@ int main(int argc, char *argv[]) bits = "8"; } + // default to empty string if mode option is not specified + if (!mode) { + mode = ""; + } + // default to 160 if columns option is not specified if (!columns) { columns = "160";