#ifndef WSDEBUG_H
#define WSDEBUG_H
#ifdef WSDEBUG
#ifndef ASSERT
#define ASSERT(c) \
if (!(c)) { \
fprintf(stderr, "Assertion failed: line %d, file %s\n", \
__LINE__, __FILE__); \
fflush(stderr); \
abort(); \
}
#endif
#define WS_TRACE 0x00000001
#define WS_TRACE_VERBOSE 0x00000002
#define WS_TRACE_COLONCMD 0x00000004
#define WS_DEBUG_ALL 0xffffffff
#define WSDLEVEL(flags) (ws_debug != NULL && (ws_dlevel & (flags)))
#ifdef USE_WDDUMP
#include "wdump.h"
#endif
#define WSDEBUG_TRACE 1
typedef enum {
WT_ENV = 1,
WT_WAIT,
WT_STOP
} WtWait;
void wsdebug(char *, ...);
void wstrace(char *, ...);
extern FILE *ws_debug;
extern u_int ws_dlevel;
# else
#ifndef ASSERT
# define ASSERT(c)
#endif
void
wsdebug(
char *fmt,
...)
{
}
void
wstrace(
char *fmt,
...)
{
}
#endif
#endif