1 |
#ifndef _DSHOW_DEBUG_ |
#ifndef _DSHOW_DEBUG_ |
2 |
#define _DSHOW_DEBUG_ |
#define _DSHOW_DEBUG_ |
3 |
|
|
4 |
|
#include <stdio.h> |
5 |
|
|
6 |
|
#ifdef __cplusplus |
7 |
|
extern "C" { |
8 |
|
#endif |
9 |
|
|
10 |
|
void OutputDebugStringf(char *fmt, ...); |
11 |
|
|
12 |
#ifdef _DEBUG |
#ifdef _DEBUG |
13 |
#include <stdio.h> /* vsprintf */ |
#define DPRINTF OutputDebugStringf |
|
#define DPRINTF_BUF_SZ 1024 |
|
|
static __inline void |
|
|
DPRINTF(char *fmt, ...) |
|
|
{ |
|
|
va_list args; |
|
|
char buf[DPRINTF_BUF_SZ]; |
|
|
|
|
|
va_start(args, fmt); |
|
|
vsprintf(buf, fmt, args); |
|
|
OutputDebugString(buf); |
|
|
} |
|
14 |
#else |
#else |
15 |
static __inline void |
static __inline void |
16 |
DPRINTF(char *fmt, ...) { } |
DPRINTF(char *fmt, ...) { } |
17 |
#endif |
#endif |
18 |
|
|
19 |
|
#ifdef __cplusplus |
20 |
|
} |
21 |
|
#endif |
22 |
|
|
23 |
#endif /* _DSHOW_DEBUG */ |
#endif /* _DSHOW_DEBUG */ |