Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/mty-makai/debug.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 192 - (show annotations) (download) (as text)
Mon May 26 06:29:35 2008 UTC (15 years, 10 months ago) by notanpe
File MIME type: text/x-chdr
File size: 1000 byte(s)
シーズン 2 に向けて
1 /***********************************************************************
2 *
3 * file: debug.h
4 *
5 * $Id: debug.h 168 2007-08-22 12:51:58Z chapuni $
6 *
7 */
8
9 #ifndef DEBUG_H__
10 #define DEBUG_H__
11
12 #include <stdio.h>
13
14 #ifndef DEBUG
15 #define DEBUG 0
16 #endif
17
18 /***************************************************************
19 *
20 * uint64_t を%08X%08Xに喰わせるためのマクロ
21 *
22 */
23
24 #define F016LLX "%08X%08X"
25 #define A016LLX(n) (unsigned)((uint64_t)(n) >> 32), (unsigned)(uint64_t)(n)
26
27 /***************************************************************
28 *
29 * デバッグ出力
30 *
31 */
32
33 #if DEBUG>=1
34
35 #define debug_printf(lvl,...) do {if (DEBUG>=(lvl)) printf(__VA_ARGS__);} while (0)
36 #define debug_eprintf(lvl,...) do {if (DEBUG>=(lvl)) fprintf(stderr, __VA_ARGS__);} while (0)
37
38 #else
39
40 #define debug_printf(lvl,...) do; while(0)
41 #define debug_eprintf(lvl,...) do; while(0)
42
43 #endif
44
45 #endif /* DEBUG_H__ */
46
47 /*
48 * Local Variables:
49 * tab-width: 4
50 * End:
51 *
52 * EOF */

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26