forked from mandovinnie/Lute-Tab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbg.cc
81 lines (78 loc) · 1.42 KB
/
dbg.cc
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
#include "win.h"
#include <stdlib.h>
#include "dbg.h"
#include <stdio.h>
int debug_flag=0;
void dbg_set(const dbg_type type)
{
debug_flag |= type;
}
void dbg5(const int type, const char *fmt,
void *a, void *b, void *c, void *d, void *e)
{
if (type & debug_flag) {
#ifdef MAC
my_printf ( fmt, a, b, c, d, e);
#else
printf ( fmt, a, b, c, d, e);
#endif
}
if (type == Error) exit(-1);//longjmp(b_env, 5);
}
void dbg4(const int type, const char *fmt,
void *a, void *b, void *c, void *d)
{
if (type & debug_flag) {
#ifdef MAC
my_printf (fmt, a, b, c, d);
#else
printf ( fmt, a, b, c, d);
#endif
}
if (type == Error)
exit(-1);
}
void dbg3(const int type, const char *fmt, void *a, void *b, void *c)
{
if (type & debug_flag) {
#ifdef MAC
my_printf (fmt, a, b, c);
#else
printf ( fmt, a, b, c);
#endif
}
if (type == Error) exit(-1);
}
void dbg2(const int type, const char *fmt, void *a, void *b)
{
if (type & debug_flag) {
#ifdef MAC
my_printf (fmt, a, b);
#else
printf ( fmt, a, b);
#endif
}
if (type == Error) exit(-1);
}
void dbg1(const int type, const char *fmt, void *a)
{
if (type & debug_flag) {
#ifdef MAC
my_printf (fmt, a);
#else
printf ( fmt, a);
#endif
}
if (type == Error) exit(-1);
}
void dbg0(const int type, const char *fmt)
{
if (type & debug_flag) {
#ifdef MAC
my_printf (fmt);
#else
printf (fmt);
#endif
}
if (type == Error) exit(-1);
}