File: glide3x-debug-vaargs

package info (click to toggle)
glide 2002.04.10ds1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,556 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (157 lines) | stat: -rw-r--r-- 6,014 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Status: applied

Index: b/glide3x/cvg/incsrc/gdebug.h
===================================================================
--- a/glide3x/cvg/incsrc/gdebug.h
+++ b/glide3x/cvg/incsrc/gdebug.h
@@ -42,12 +42,12 @@
 // if debug info turned on then GDBG_INFO does something
 #ifdef GDBG_INFO_ON
 
-#define GDBG_INFO gdbg_info
-#define GDBG_INFO_MORE gdbg_info_more
-#define GDBG_PRINTF gdbg_printf
+#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
+#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_AR
+#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
 
-#define GDBG_ERROR_SET_CALLBACK   gdbg_error_set_callback
-#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
+#define GDBG_ERROR_SET_CALLBACK(p)   gdbg_error_set_callback(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
 
 #define GDBG_GET_DEBUGLEVEL	gdbg_get_debuglevel
 #define GDBG_SET_DEBUGLEVEL	gdbg_set_debuglevel
@@ -55,23 +55,12 @@
 // otherwise GDBG_INFO does nothing
 #else
 
-#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
-/* Turn off the dead code warnings. Also changed the macro definitions
- * to use an 'if' rather than the ternary operator because the
- * type of the result sub-expressions must match.
- *
- * w111: Meaningless use of an expression
- * w201: Unreachable code
- */
-#pragma disable_message (111, 201)
-#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
-
-#define GDBG_INFO      0 && (unsigned long)
-#define GDBG_INFO_MORE 0 && (unsigned long)
-#define GDBG_PRINTF    0 && (unsigned long)
+#define GDBG_INFO(level, format, ...)
+#define GDBG_INFO_MORE(level, format, ...)
+#define GDBG_PRINTF(format, ...)
 
-#define GDBG_ERROR_SET_CALLBACK   0 && (unsigned long)
-#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
+#define GDBG_ERROR_SET_CALLBACK(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p)
 
 #define GDBG_GET_DEBUGLEVEL(x) 0
 #define GDBG_SET_DEBUGLEVEL(a,b)
Index: b/glide3x/h3/incsrc/gdebug.h
===================================================================
--- a/glide3x/h3/incsrc/gdebug.h
+++ b/glide3x/h3/incsrc/gdebug.h
@@ -42,12 +42,12 @@
 // if debug info turned on then GDBG_INFO does something
 #ifdef GDBG_INFO_ON
 
-#define GDBG_INFO gdbg_info
-#define GDBG_INFO_MORE gdbg_info_more
-#define GDBG_PRINTF gdbg_printf
+#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
+#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_AR
+#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
 
-#define GDBG_ERROR_SET_CALLBACK   gdbg_error_set_callback
-#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
+#define GDBG_ERROR_SET_CALLBACK(p)   gdbg_error_set_callback(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
 
 #define GDBG_GET_DEBUGLEVEL	gdbg_get_debuglevel
 #define GDBG_SET_DEBUGLEVEL	gdbg_set_debuglevel
@@ -55,24 +55,12 @@
 // otherwise GDBG_INFO does nothing
 #else
 
-#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
-/* Turn off the dead code warnings. Also changed the macro definitions
- * to use an 'if' rather than the ternary operator because the
- * type of the result sub-expressions must match.
- *
- * w111: Meaningless use of an expression
- * w201: Unreachable code
- * w302: Expression only useful for side-effects.
- */
-#pragma disable_message (111, 201, 302)
-#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
-
-#define GDBG_INFO      0 && (unsigned long)
-#define GDBG_INFO_MORE 0 && (unsigned long)
-#define GDBG_PRINTF    0 && (unsigned long)
+#define GDBG_INFO(level, format, ...)
+#define GDBG_INFO_MORE(level, format, ...)
+#define GDBG_PRINTF(format, ...)
 
-#define GDBG_ERROR_SET_CALLBACK   0 && (unsigned long)
-#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
+#define GDBG_ERROR_SET_CALLBACK(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p)
 
 #define GDBG_GET_DEBUGLEVEL(x) 0
 #define GDBG_SET_DEBUGLEVEL(a,b)
Index: b/glide3x/h5/incsrc/gdebug.h
===================================================================
--- a/glide3x/h5/incsrc/gdebug.h
+++ b/glide3x/h5/incsrc/gdebug.h
@@ -42,12 +42,12 @@
 // if debug info turned on then GDBG_INFO does something
 #ifdef GDBG_INFO_ON
 
-#define GDBG_INFO gdbg_info
-#define GDBG_INFO_MORE gdbg_info_more
-#define GDBG_PRINTF gdbg_printf
+#define GDBG_INFO(level, format, ...) gdbg_info(level, format, __VA_ARGS__)
+#define GDBG_INFO_MORE(level, format, ...) gdbg_info_more(level, format, __VA_ARGS__)
+#define GDBG_PRINTF(format, ...) gdbg_printf(format, __VA_ARGS__)
 
-#define GDBG_ERROR_SET_CALLBACK   gdbg_error_set_callback
-#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
+#define GDBG_ERROR_SET_CALLBACK(p)   gdbg_error_set_callback(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p) gdbg_error_clear_callback(p)
 
 #define GDBG_GET_DEBUGLEVEL	gdbg_get_debuglevel
 #define GDBG_SET_DEBUGLEVEL	gdbg_set_debuglevel
@@ -55,24 +55,12 @@
 // otherwise GDBG_INFO does nothing
 #else
 
-#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
-/* Turn off the dead code warnings. Also changed the macro definitions
- * to use an 'if' rather than the ternary operator because the
- * type of the result sub-expressions must match.
- *
- * w111: Meaningless use of an expression
- * w201: Unreachable code
- * w302: Expression only useful for side-effects.
- */
-#pragma disable_message (111, 201, 302)
-#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
-
-#define GDBG_INFO      0 && (unsigned long)
-#define GDBG_INFO_MORE 0 && (unsigned long)
-#define GDBG_PRINTF    0 && (unsigned long)
+#define GDBG_INFO(level, format, ...)
+#define GDBG_INFO_MORE(level, format, ...)
+#define GDBG_PRINTF(format, ...)
 
-#define GDBG_ERROR_SET_CALLBACK   0 && (unsigned long)
-#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
+#define GDBG_ERROR_SET_CALLBACK(p)
+#define GDBG_ERROR_CLEAR_CALLBACK(p)
 
 #define GDBG_GET_DEBUGLEVEL(x) 0
 #define GDBG_SET_DEBUGLEVEL(a,b)