NetBurner 3.1
debug.h
1 /*NB_REVISION*/
2 
3 #ifndef _DEBUG_H_
4 #define _DEBUG_H_
5 
6 /****************************************************************************
7  *
8  * Copyright (c) 2006 by HCC Embedded
9  *
10  * This software is copyrighted by and is the sole property of
11  * HCC. All rights, title, ownership, or other interests
12  * in the software remain the property of HCC. This
13  * software may only be used in accordance with the corresponding
14  * license agreement. Any unauthorized use, duplication, transmission,
15  * distribution, or disclosure of this software is expressly forbidden.
16  *
17  * This Copyright notice may not be removed or modified without prior
18  * written consent of HCC.
19  *
20  * HCC reserves the right to modify this software without notice.
21  *
22  * HCC Embedded
23  * Budapest 1132
24  * Victor Hugo Utca 11-15
25  * Hungary
26  *
27  * Tel: +36 (1) 450 1302
28  * Fax: +36 (1) 450 1303
29  * http: www.hcc-embedded.com
30  * email: info@hcc-embedded.com
31  *
32  ***************************************************************************/
33 
34 /* set this define to 1 if program is running on PC and debug file is required */
35 #if 0
36 
37 #include <stdio.h>
38 
39 #ifdef _HCC_COMMON_C_
40 FILE *debfile=0;
41 #else
42 extern FILE *debfile;
43 #endif
44 
45 #define DEBOPEN \
46  if (!debfile) debfile = fopen("C:/fattest.txt", "wt+");
47 #define DEBPR0(s) fprintf(debfile, s);
48 #define DEBPR1(s, p1) fprintf(debfile, s, p1);
49 #define DEBPR2(s, p1, p2) fprintf(debfile, s, p1, p2);
50 #define DEBPR3(s, p1, p2, p3) fprintf(debfile, s, p1, p2, p3);
51 
52 #else
53 
54 #define DEBOPEN
55 #define DEBPR0(s)
56 #define DEBPR1(s, p1)
57 #define DEBPR2(s, p1, p2)
58 #define DEBPR3(s, p1, p2, p3)
59 
60 #endif
61 
62 /****************************************************************************
63  *
64  * end of debug.h
65  *
66  ***************************************************************************/
67 
68 #endif /* _DEBUG_H_ */