1 // currently unused
2 /*
3  * [ ==========================================================
4  * Debug Support:
5  */
6 
7 #ifdef _DEBUG
8 //TODO -- change to static inline functions...
9 
10 #define _Developer_Debug glctx.debug
11 
12 #define DCALL(F,X) if (_Developer_Debug & DBG_##F) X
13 #define DPRINTF(F,X) if (_Developer_Debug & DBG_##F) _dprintf X
14 #define	STATIC
15 #define DENTER(F) DPRINTF(F, ("%s() entered.\n",fname))
16 #define DEXIT(F)  DPRINTF(F, ("%s() exiting.\n",fname))
17 #define DEXIT_STATUS(F,S) \
18 	DPRINTF(F, ("%s() returning status = %d\n", fname, S))
19 
20 
21 /*
22  *     _Developer_Debug - enable/disable debug messages
23  *
24  *     = 0 turn off debug messages (Normal Case).
25  *
26  *     OR in one or more DBG_* definitions [see below] to enable
27  *     debug messages..
28  */
29 
30 #define DBG_INOUT	0x0001	/* display function entry/exit */
31 #define DBG_ERRORS	0x0002	/* display various error conditions */
32 #define DBG_INFO  	0x0004	/* display other debug info */
33 #define DBG_ARGS  	0x0008
34 
35 #define DBG_BUFS  	0x0010	/* display buffer configuration info */
36 #define DBG_XMIT    0x0020	/* display buffer transmits */
37 #define DBG_RECV    0x0040	/* display buffer receipts */
38 
39 #define DBG_ALL (DBG_INOUT|DBG_ERRORS|DBG_INFO|DBG_ARGS)
40 
41 #else  /* !def _DEBUG */
42 
43 #define DCALL
44 #define DPRINTF(F,X)
45 #define	STATIC static
46 #define DENTER(F)
47 #define DEXIT(F)
48 #define DEXIT_STATUS(F,S)
49 
50 #endif /* _DEBUG */
51 
52 /*
53  * always define FNAME macro for use in non-debug messages
54  */
55 #define FNAME(NAME)	static const char *fname = #NAME
56 
57 /*
58  * End of Debug Support
59  * ] ==========================================================
60  */
61 
62