Merge pull request #59 from electronjoe/graceful-SIGTERM-handling
[netsniff-ng-old.git] / tprintf.h
blobdc4349afb3a0f8f1114f3cdaa9e77d1c90e51a28
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Subject to the GPL, version 2.
5 */
7 #ifndef TPRINTF_H
8 #define TPRINTF_H
10 #include "built_in.h"
11 #include "colors.h"
13 extern void tprintf_init(void);
14 extern void tprintf(char *msg, ...) __check_format_printf(1, 2);
15 extern void tprintf_flush(void);
16 extern void tprintf_cleanup(void);
18 extern void tputchar_safe(int c);
19 extern void tputs_safe(const char *str, size_t len);
21 #define colorize_start(fore) "\033[" __##fore "m"
22 #define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m"
23 #define colorize_end() "\033[" __reset "m"
25 #define DEFAULT_TTY_SIZE 80
27 #endif /* TPRINTF_H */