2 * tio - a simple TTY terminal I/O application
4 * Copyright (c) 2014-2017 Martin Lund
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 #define ANSI_COLOR_GRAY "\x1b[1;30m"
26 #define ANSI_COLOR_RED "\x1b[1;31m"
27 #define ANSI_COLOR_GREEN "\x1b[1;32m"
28 #define ANSI_COLOR_YELLOW "\x1b[1;33m"
29 #define ANSI_COLOR_BLUE "\x1b[1;34m"
30 #define ANSI_COLOR_PINK "\x1b[1;35m"
31 #define ANSI_COLOR_CYAN "\x1b[1;36m"
32 #define ANSI_COLOR_WHITE "\x1b[1;37m"
33 #define ANSI_COLOR_RESET "\x1b[0m"
35 #define color_printf(format, args...) \
37 fprintf (stdout, "\r" ANSI_COLOR_YELLOW format ANSI_COLOR_RESET "\r\n", ## args); \
41 #define warning_printf(format, args...) \
43 fprintf (stdout, "\rWarning: " format "\r\n", ## args); \
48 #define debug_printf(format, args...) \
49 fprintf (stdout, "[debug] " format, ## args)
50 #define debug_printf_raw(format, args...) \
51 fprintf (stdout, "" format, ## args)
53 #define debug_printf(format, args...)
54 #define debug_printf_raw(format, args...)