9 |
|
|
10 |
#define DPRINTF_BUF_SZ 1024 |
#define DPRINTF_BUF_SZ 1024 |
11 |
static void |
static void |
12 |
dprintf(char *fmt, |
DPRINTF(char *fmt, |
13 |
...) |
...) |
14 |
{ |
{ |
15 |
va_list args; |
va_list args; |
87 |
|
|
88 |
#elif defined(LINUX) || defined(DJGPP) || defined(FREEBSD) |
#elif defined(LINUX) || defined(DJGPP) || defined(FREEBSD) |
89 |
|
|
90 |
|
#include <stdio.h> |
91 |
|
#include <stdarg.h> |
92 |
|
#define DPRINTF_BUF_SZ 1024 |
93 |
|
static void |
94 |
|
DPRINTF(char *fmt, |
95 |
|
...) |
96 |
|
{ |
97 |
|
va_list args; |
98 |
|
char buf[DPRINTF_BUF_SZ]; |
99 |
|
|
100 |
|
va_start(args, fmt); |
101 |
|
vsprintf(buf, fmt, args); |
102 |
|
fprintf(stdout, "%s\n", buf); |
103 |
|
} |
104 |
|
|
105 |
#ifdef _DEBUG |
#ifdef _DEBUG |
106 |
|
|
107 |
#include <stdio.h> |
#include <stdio.h> |
230 |
|
|
231 |
#else // OTHER OS |
#else // OTHER OS |
232 |
|
|
233 |
|
|
234 |
|
#include <stdio.h> |
235 |
|
#include <stdarg.h> |
236 |
|
#define DPRINTF_BUF_SZ 1024 |
237 |
|
static void |
238 |
|
DPRINTF(char *fmt, |
239 |
|
...) |
240 |
|
{ |
241 |
|
va_list args; |
242 |
|
char buf[DPRINTF_BUF_SZ]; |
243 |
|
|
244 |
|
va_start(args, fmt); |
245 |
|
vsprintf(buf, fmt, args); |
246 |
|
fprintf(stdout, "%s\n", buf); |
247 |
|
} |
248 |
|
|
249 |
|
|
250 |
#define DEBUG(S) |
#define DEBUG(S) |
251 |
#define DEBUG1(S,I) |
#define DEBUG1(S,I) |
252 |
#define DEBUG2(X,A,B) |
#define DEBUG2(X,A,B) |