summaryrefslogtreecommitdiff
path: root/src/base/msg.h
blob: e9bdb3b3cd8ced0fbc5c94b743d3e08c1d495967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef MSG_H
#define MSG_H

#ifdef DEBUG
#define debug(msg,arg...)	fprintf(stdout, "%s ", _("[Debug]"));   fprintf(stdout, _(msg), ##arg); fprintf(stdout, "\n")
#else /* DEBUG */
#define debug(msg,arg...)
#endif /* DEBUG */

#define warning(msg,arg...)	fprintf(stderr, "%s ", _("[Warning]")); fprintf(stderr, _(msg) "\n", ##arg)
#define error(msg,arg...)	fprintf(stderr, "%s ", _("[Error]"));   fprintf(stderr, _(msg) "\n", ##arg)
#define fatal(msg,arg...)								\
{											\
	fprintf(stderr, "%s ", _("[Fatal]")); fprintf(stderr, _(msg) "\n", ##arg);	\
	abort(0);									\
}

#endif /* MSG_H */