From 36691e8bdf08a643f1f3b028c247e6ec1566879e Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sun, 21 Oct 2018 02:14:18 +0200 Subject: [PATCH] Cleanup print macros --- src/include/tio/print.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/include/tio/print.h b/src/include/tio/print.h index 56894c2..99729e7 100644 --- a/src/include/tio/print.h +++ b/src/include/tio/print.h @@ -33,12 +33,16 @@ #define ANSI_COLOR_RESET "\x1b[0m" #define color_printf(format, args...) \ - fprintf (stdout, "\r" ANSI_COLOR_YELLOW format ANSI_COLOR_RESET "\r\n", ## args); \ - fflush(stdout); + { \ + fprintf (stdout, "\r" ANSI_COLOR_YELLOW format ANSI_COLOR_RESET "\r\n", ## args); \ + fflush(stdout); \ + } #define warning_printf(format, args...) \ - fprintf (stdout, "\rWarning: " format "\r\n", ## args); \ - fflush(stdout); + { \ + fprintf (stdout, "\rWarning: " format "\r\n", ## args); \ + fflush(stdout); \ + } #ifdef DEBUG #define debug_printf(format, args...) \