Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 26 lines (16 sloc) 0.49 kB
23e2275 @kr Initial commit
authored
1 #ifndef GEN_H
2 #define GEN_H
3
2ca1d07 @kr Move the datum pointer after the object descriptor.
authored
4 #include <stdlib.h>
5
6 typedef size_t * datum;
23e2275 @kr Initial commit
authored
7
4aeca1d @kr Refactor.
authored
8 #define int2datum(x) ((datum) (((x) << 1) | 1))
23e2275 @kr Initial commit
authored
9 #define datum2int(d) (((int) (d)) >> 1)
4aeca1d @kr Refactor.
authored
10 #define intp(x) (((uint) (x)) & 1)
23e2275 @kr Initial commit
authored
11
12 int truep(datum d);
13
14 void die(const char *m);
15 datum die1(const char *m, datum d);
16
17 #define max(a,b) (((a)>(b))?(a):(b))
18 #define min(a,b) (((a)<(b))?(a):(b))
19
20 #define assert(b) ((b) ? 0 : die("b failed"))
21
181a321 @kr Rename "compiled obj" to "closure".
authored
22 datum memq(datum d, datum alist);
23 datum assq(datum d, datum alist);
4a9a6b7 @kr Modules.
authored
24
23e2275 @kr Initial commit
authored
25 #endif /*GEN_H*/
Something went wrong with that request. Please try again.