root/vtcross/branches/bhilburn/src/include/vtcross/debug.h @ 146

Revision 146, 371 bytes (checked in by bhilburn, 15 years ago)

The DEBUG and LOG functions now support a variable number of arguments.

Line 
1/* Virginia Tech Cognitive Radio Open Source Systems
2 * Virginia Tech, 2009
3 *
4 * LICENSE INFORMATION GOES HERE
5 */
6
7/* DESCRIPTION OF FILE.
8 */
9
10#ifndef DEBUG_H
11#define DEBUG_H
12
13#include <cstdio>
14
15extern bool VTCROSS_DEBUG;
16
17#define DEBUG(...) \
18    if(VTCROSS_DEBUG) \
19        fprintf(stderr, __VA_ARGS__);
20
21#define LOG(...) \
22    fprintf(stdout, __VA_ARGS__);
23
24#endif
Note: See TracBrowser for help on using the browser.