28 lines
487 B
C
28 lines
487 B
C
#pragma once
|
|
|
|
#if defined(ERR) || defined(EXPLAIN)
|
|
void l(const char *fmt, ...);
|
|
#endif
|
|
|
|
#ifdef ERR
|
|
#define L(...) l(__VA_ARGS__)
|
|
#else
|
|
#define L(...)
|
|
#endif
|
|
|
|
#ifdef EXPLAIN
|
|
extern int explain;
|
|
#define E(...) if (explain) { \
|
|
l(__VA_ARGS__); \
|
|
} else
|
|
#else
|
|
#define E(...)
|
|
#endif
|
|
|
|
#ifdef PERF
|
|
#define PS() long __start = clock()
|
|
#define PE() l("%s: %fs", __func__, ((double) (clock() - __start)) / CLOCKS_PER_SEC)
|
|
#else
|
|
#define PS()
|
|
#define PE()
|
|
#endif
|