ansilove

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

commit 8b4fb601abdfbfea2807333d2044de1ac21e1265
parent 19c61846011ab9ef312f9458526994c3befb0eaa
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 28 Sep 2018 23:11:36 +0200

Use width from the SAUCE record if present and if -c wasn't specified

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

diff --git a/src/main.c b/src/main.c @@ -273,6 +273,11 @@ int main(int argc, char *argv[]) { ctx.length -= 129 - (saucerec->comments > 0 ? 5 + 64 * saucerec->comments : 0); } + // use width from the SAUCE record if present and if -c wasn't specified + if (!options.columns && fileHasSAUCE && record->tinfo1) { + options.columns = record->tinfo1; + } + // create the output PNG data by invoking the appropiate function if (!strcmp(fext, ".pcb")) { ansilove_pcboard(&ctx, &options);