ifpps: remove unused member from struct
[netsniff.git] / src / tprintf.h
blobdb5b2e1542a4ca74a437ef4871894b7df8d99dbc
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>
4 * Copyright 2009, 2010 Daniel Borkmann.
5 * Subject to the GPL, version 2.
6 */
8 #ifndef TPRINTF_H
9 #define TPRINTF_H
11 #include "built_in.h"
13 #define DEFAULT_TTY_SIZE 80
15 extern void tprintf_init(void);
16 extern void tprintf(char *msg, ...) __check_format_printf(1, 2);
17 extern void tprintf_flush(void);
18 extern void tprintf_cleanup(void);
20 #define __reset "0"
21 #define __bold "1"
22 #define __black "30"
23 #define __red "31"
24 #define __green "32"
25 #define __yellow "33"
26 #define __blue "34"
27 #define __magenta "35"
28 #define __cyan "36"
29 #define __white "37"
30 #define __on_black "40"
31 #define __on_red "41"
32 #define __on_green "42"
33 #define __on_yellow "43"
34 #define __on_blue "44"
35 #define __on_magenta "45"
36 #define __on_cyan "46"
37 #define __on_white "47"
39 #define colorize_start(fore) "\033[" __##fore "m"
40 #define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m"
41 #define colorize_end() "\033[" __reset "m"
42 #define colorize_str(fore, text) \
43 colorize_start(fore) text colorize_end()
44 #define colorize_full_str(fore, back, text) \
45 colorize_start_full(fore, back) text colorize_end()
47 #endif /* TPRINTF_H */