Integration prefs pane update
[MacVim.git] / src / wsdebug.h
blob03da5697c5676f035ddcec3f3792ef4d8294d2f1
1 /* vi:set ts=8 sts=8 sw=8:
3 * VIM - Vi IMproved by Bram Moolenaar
4 * Visual Workshop integration by Gordon Prieur
6 * Do ":help uganda" in Vim to read copying and usage conditions.
7 * Do ":help credits" in Vim to see a list of people who contributed.
8 */
11 #ifndef WSDEBUG_H
12 #define WSDEBUG_H
14 #ifdef WSDEBUG
16 #ifndef ASSERT
17 #define ASSERT(c) \
18 if (!(c)) { \
19 fprintf(stderr, "Assertion failed: line %d, file %s\n", \
20 __LINE__, __FILE__); \
21 fflush(stderr); \
22 abort(); \
24 #endif
26 #define WS_TRACE 0x00000001
27 #define WS_TRACE_VERBOSE 0x00000002
28 #define WS_TRACE_COLONCMD 0x00000004
29 #define WS_DEBUG_ALL 0xffffffff
31 #define WSDLEVEL(flags) (ws_debug != NULL && (ws_dlevel & (flags)))
33 #ifdef USE_WDDUMP
34 #include "wdump.h"
35 #endif
37 #define WSDEBUG_TRACE 1
38 //#define WSDEBUG_SENSE 2
40 typedef enum {
41 WT_ENV = 1, /* look for env var if set */
42 WT_WAIT, /* look for ~/.gvimwait if set */
43 WT_STOP /* look for ~/.gvimstop if set */
44 } WtWait;
47 void wsdebug(char *, ...);
48 void wstrace(char *, ...);
51 extern FILE *ws_debug;
52 extern u_int ws_dlevel; /* ws_debug verbosity level */
54 # else /* not WSDEBUG */
56 #ifndef ASSERT
57 # define ASSERT(c)
58 #endif
61 * The following 2 stubs are needed because a macro cannot be used because of
62 * the variable number of arguments.
65 void
66 wsdebug(
67 char *fmt,
68 ...)
73 void
74 wstrace(
75 char *fmt,
76 ...)
80 #endif /* WSDEBUG */
81 #endif /* WSDEBUG_H */