-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtrc.h
More file actions
59 lines (48 loc) · 1.25 KB
/
trc.h
File metadata and controls
59 lines (48 loc) · 1.25 KB
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
#ifndef _DMPYTHON_TRC_H
#define _DMPYTHON_TRC_H
#include <time.h>
#include <stdarg.h>
#include "DPItypes.h"
#include <Python.h>
#define DMPYTHON_TRACE_OFF 0
#define DMPYTHON_TRACE_ON 1
extern udint4 dmpython_trace_mod;
#ifdef WIN32
#define DMPYTHON_TRACE_FILE ".\\dmPython_trace.log"
#else
#define DMPYTHON_TRACE_FILE "./dmPython_trace.log"
#endif
#ifdef DM64
#ifdef WIN32
#define slengthprefix "%I64d"
#else
#define slengthprefix "%lld"
#endif
#else
#define slengthprefix "%ld"
#endif
#define DMPYTHON_TRACE_INFO(act)\
if (dmpython_trace_mod != DMPYTHON_TRACE_OFF)\
{\
act;\
}\
void
dpy_trace(
PyObject* statement,
PyObject* args,
sdbyte* info,
...
);
unsigned int /*dst的数据长度*/
aq_sprintf_inner(
char* dst, /*IN:目标缓冲区*/
int dst_len, /*IN:目标长度*/
char* fmt, /*IN:格式串*/
... /*IN:格式串中的参数*/
);
#ifdef _DEBUG
#define aq_sprintf(dst, dst_len, fmt, ...) aq_sprintf_inner(dst, dst_len, fmt, ##__VA_ARGS__)
#else
#define aq_sprintf(dst, dst_len, fmt, ...) sprintf((char*)dst, (const char*)fmt, ##__VA_ARGS__)
#endif
#endif #_DMPATHON_TRC_H