WINGs: Make w*() print message origins

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
Tamas TEVESZ authored and Carlos R. Mafra committed 2010-10-07 12:04:30 +02:00
1 parent 34293e072a
commit 8594c39a0b
2 files changed
+25 -15

No files matched your search

+6 -5
View File
@@ -173,12 +173,13 @@ enum {
WMESSAGE_TYPE_FATAL
};
#define wmessage(fmt, args...) __wmessage( WMESSAGE_TYPE_MESSAGE, fmt, ## args)
#define wwarning(fmt, args...) __wmessage( WMESSAGE_TYPE_WARNING, fmt, ## args)
#define werror(fmt, args...) __wmessage( WMESSAGE_TYPE_ERROR, fmt, ## args)
#define wfatal(fmt, args...) __wmessage( WMESSAGE_TYPE_FATAL, fmt, ## args)
#define wmessage(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_MESSAGE, fmt, ## args)
#define wwarning(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_WARNING, fmt, ## args)
#define werror(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_ERROR, fmt, ## args)
#define wfatal(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_FATAL, fmt, ## args)
void __wmessage(int type, const char *msg, ...) __attribute__((__format__(printf,2,3)));
void __wmessage(const char *func, const char *file, int line, int type, const char *msg, ...)
__attribute__((__format__(printf,5,6)));
char* wfindfile(char *paths, char *file);