ansilove

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

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

Convert numeric command line flags to integer values (only bits for now)

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

diff --git a/src/main.c b/src/main.c @@ -203,6 +203,14 @@ int main(int argc, char *argv[]) mode = ""; } + // convert numeric command line flags to integer values + int32_t int_bits = atoi(bits); + + // now set bits to 8 if not already value 8 or 9 + if (int_bits != 8 && int_bits != 9) { + int_bits = 8; + } + // default to 160 if columns option is not specified if (!columns) { columns = "160";