From fa079c68523a0b773875701050548e2ed8be26d6 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Fri, 20 May 2016 20:49:16 +0200 Subject: [PATCH] Fixed tio_printf macro --- src/tty.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tty.c b/src/tty.c index d56892f..51c609c 100644 --- a/src/tty.c +++ b/src/tty.c @@ -47,10 +47,11 @@ static bool tainted = false; static int fd; #define tio_printf(format, args...) \ +{ \ if (tainted) putchar('\n'); \ -color_printf("[tio %s] " format, current_time(), ## args); \ -tainted = false; - + color_printf("[tio %s] " format, current_time(), ## args); \ + tainted = false; \ +} void handle_command_sequence(char input_char, char previous_char, char *output_char, bool *forward) { @@ -88,9 +89,7 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c tio_printf(" Parity: %s", option.parity); tio_printf(" Output delay: %d", option.output_delay); if (option.log) - { tio_printf(" Log file: %s", option.log_filename); - } *forward = false; break; case KEY_Q: