1 /* util.h ....... error message utilities.
2 * C. Scott Ananian <cananian@alumni.princeton.edu>
4 * $Id: util.h,v 1.1.1.1 2002/07/25 06:52:39 honor Exp $
10 void _log(char *func
, char *file
, int line
, char *format
, ...)
11 __attribute__ ((format (printf
, 4, 5)));
12 void _warn(char *func
, char *file
, int line
, char *format
, ...)
13 __attribute__ ((format (printf
, 4, 5)));
14 void _fatal(char *func
, char *file
, int line
, char *format
, ...)
15 __attribute__ ((format (printf
, 4, 5))) __attribute__ ((noreturn
));
17 #define log(format, args...) \
18 _log(__FUNCTION__,__FILE__,__LINE__, format , ## args)
19 #define warn(format, args...) \
20 _warn(__FUNCTION__,__FILE__,__LINE__, format , ## args)
21 #define fatal(format, args...) \
22 _fatal(__FUNCTION__,__FILE__,__LINE__, format , ## args)
24 #endif /* INC_UTIL_H */