Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
msg.h
Go to the documentation of this file.
1#ifndef __MSG_H__
2#define __MSG_H__
3
4#include <stdio.h>
5
6#define prefs_show_msg 1
7
8#define D_STMT_START do
9#define D_STMT_END while (0)
10
11/*
12 * You can disable any MSG* macro by adding the '_' prefix.
13 */
14#define _MSG(...)
15#define _MSG_WARN(...)
16
17
18#define MSG(...) \
19 D_STMT_START { \
20 if (prefs_show_msg){ \
21 printf(__VA_ARGS__); \
22 fflush (stdout); \
23 } \
24 } D_STMT_END
25
26#define MSG_WARN(...) \
27 D_STMT_START { \
28 if (prefs_show_msg) \
29 printf("** WARNING **: " __VA_ARGS__); \
30 } D_STMT_END
31
32#define MSG_ERR(...) \
33 D_STMT_START { \
34 if (prefs_show_msg) \
35 printf("** ERROR **: " __VA_ARGS__); \
36 } D_STMT_END
37
38#endif /* __MSG_H__ */