summaryrefslogtreecommitdiff
path: root/UICaboodle/UICaboodle.h
blob: 1cf37d13f50219d1c322dd8a599ae2dbf41087f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <objc/objc.h>

#include <sys/time.h>
#include <time.h>

#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