bgpq3 - complete rewrite of bgpq

This commit is contained in:
snar
2007-03-22 18:12:32 +00:00
commit bbea84badd
12 changed files with 5083 additions and 0 deletions

24
sx_report.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef SX_REPORT_H_
#define SX_REPORT_H_
typedef enum {
SX_DEBUG = 0,
SX_NOTICE,
SX_ERROR,
SX_MISFEATURE,
SX_FATAL
} sx_report_t;
/* opens syslog and disables logging to stderr */
void sx_openlog(char* progname);
int sx_report(sx_report_t, char* fmt, ...)
__attribute__ ((format (printf, 2, 3)));
int sx_debug(char const* const, char const* const, int const, char* fmt, ...)
__attribute__ ((format (printf, 4, 5)));
#define SX_DEBUG(a,b,c...) if(a) sx_debug(__FILE__,__FUNCTION__,__LINE__,\
b, ## c);
#endif