|
|
1.1 root 1: /*
2: * AT&T Bell Laboratories
3: * alignment and pointer pun definitions
4: * : : generated by mkhdr and genhdr : :
5: */
6:
7: #ifndef __ALIGN_H__
8: #define __ALIGN_H__
9:
10: typedef unsigned long INTEGRAL;
11:
12: #define CHUNK 8192
13: #define INTEGRAL long
14: #define INTEGER(x) ((INTEGRAL)(x))
15: #define POINTER(x) ((char*)(x))
16: #define ROUND(x,y) POINTER(INTEGER((x)+(y)-1)&~((y)-1))
17:
18: #define BOUND BOUND2
19: #define ALIGN(x) ALIGN2(x)
20: #define TRUNC(x) TRUNC2(x)
21:
22: #define BIT1 0x1
23: #define BOUND1 BOUND2
24: #define ALIGN1(x) ALIGN2(x)
25: #define TRUNC1(x) TRUNC2(x)
26: #define CLRBIT1(x) POINTER(INTEGER(x)&0xfffffffe)
27: #define SETBIT1(x) POINTER(INTEGER(x)|0x1)
28: #define TSTBIT1(x) POINTER(INTEGER(x)&0x1)
29:
30: #define BIT2 0x2
31: #define BOUND2 4
32: #define ALIGN2(x) TRUNC2((x)+3)
33: #define TRUNC2(x) POINTER(INTEGER(x)&0xfffffffc)
34: #define CLRBIT2(x) POINTER(INTEGER(x)&0xfffffffd)
35: #define SETBIT2(x) POINTER(INTEGER(x)|0x2)
36: #define TSTBIT2(x) POINTER(INTEGER(x)&0x2)
37:
38: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.