-
Notifications
You must be signed in to change notification settings - Fork 163
/
log2.h
57 lines (44 loc) · 1.01 KB
/
log2.h
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
#ifndef __log
#define __log
#ifdef LINUX
#define HAVE_PRINTF
#define logout stdout
#endif
#ifdef BCCWIN
#define HAVE_PRINTF
#define logout stdout
#endif
#ifdef KEILC51
#endif
#ifdef DOS
#define HAVE_PRINTF
#define logout stdout
#endif
#ifdef AVR
#define NO_PRINT_CODE
#endif
#ifdef HAVE_PRINTF
#define LOG1(x) fprintf(logout,x)
#define LOG2(x,y) fprintf(logout,x,y)
#define LOG3(a,b,c) fprintf(logout,a,b,c)
#define LOG4(a,b,c,d) fprintf(logout,a,b,c,d)
#define LOG5(a,b,c,d,e) fprintf(logout,a,b,c,d,e)
#define LOG6(a,b,c,d,e,f) fprintf(logout,a,b,c,d,e,f)
#define LOG7(a,b,c,d,e,f,g) fprintf(logout,a,b,c,d,e,f,g)
#define FLUSH fflush(logout)
#define LOG_1(a) fprintf(logout,a)
#define LOG_2(a,b) fprintf(logout,a,b)
#endif /* HAVE_PRINTF */
#ifdef NO_PRINT_CODE
#define LOG1(x)
#define LOG2(x,y)
#define LOG3(a,b,c)
#define LOG4(a,b,c,d)
#define LOG5(a,b,c,d,e)
#define LOG6(a,b,c,d,e,f)
#define LOG7(a,b,c,d,e,f,g)
#define FLUSH
#define LOG_1(a)
#define LOG_2(a,b)
#endif /* NO_PRINT_CODE */
#endif /* __log */