blob: e0b9af8ff317266c08ceaedfc59a918363da3e99 (
plain)
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
|
#include <objc/objc.h>
#include <sys/time.h>
#include <time.h>
#define _forever \
for (;;)
#define _trace() do { \
struct timeval _tv; \
gettimeofday(&_tv, NULL); \
fprintf(stderr, "%lu.%.6u:_trace()@%s:%u[%s]\n", _tv.tv_sec, _tv.tv_usec, __FILE__, __LINE__, __FUNCTION__); \
} while (false)
#define _assert(test) do \
if (!(test)) { \
fprintf(stderr, "_assert(%d:%s)@%s:%u[%s]\n", errno, #test, __FILE__, __LINE__, __FUNCTION__); \
exit(-1); \
} \
while (false)
#define _not(type) ((type) ~ (type) 0)
#define _transient
#define _label__(x) _label ## x
#define _label_(y) _label__(y)
#define _label _label_(__LINE__)
|