-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug.h
More file actions
30 lines (22 loc) · 746 Bytes
/
debug.h
File metadata and controls
30 lines (22 loc) · 746 Bytes
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
#ifndef DEBUG_H_INCLUDED
#define DEBUG_H_INCLUDED
#include <stdio.h>
#include <assert.h>
#ifdef NDEBUG
#define ERR(...) printf(__VA_ARGS__)
#define WARN(...)
#define INFO(...)
#define TRACE(fmt, ...)
#define UNIMPLEMENTED(fmt, ...)
#define ASSERT(...)
#define MxfsDump(...)
#else // NDEBUG
#define ERR(...) printf(__VA_ARGS__)
#define WARN(...) printf(__VA_ARGS__)
#define INFO(...) //printf(__VA_ARGS__)
#define TRACE(fmt, ...) //printf("Trace: %s(" fmt ")\n", __func__, ##__VA_ARGS__)
#define UNIMPLEMENTED(fmt, ...) printf("Unimplemented function %s(" fmt ") called\n", __func__, ##__VA_ARGS__)
#define ASSERT(...) assert(__VA_ARGS__)
void MxfsDump(const void *pvBuf, unsigned uSize);
#endif // NDEBUG
#endif // DEBUG_H_INCLUDED