/*
 * AT&T Bell Laboratories
 * alignment and pointer pun definitions
 * : : generated by mkhdr and  genhdr : :
 */

#ifndef __ALIGN_H__
#define __ALIGN_H__

typedef unsigned long INTEGRAL;

#define CHUNK		8192
#define INTEGRAL	long
#define INTEGER(x)	((INTEGRAL)(x))
#define POINTER(x)	((char*)(x))
#define ROUND(x,y)	POINTER(INTEGER((x)+(y)-1)&~((y)-1))

#define BOUND		BOUND2
#define ALIGN(x)	ALIGN2(x)
#define TRUNC(x)	TRUNC2(x)

#define BIT1		0x1
#define BOUND1		BOUND2
#define ALIGN1(x)	ALIGN2(x)
#define TRUNC1(x)	TRUNC2(x)
#define CLRBIT1(x)	POINTER(INTEGER(x)&0xfffffffe)
#define SETBIT1(x)	POINTER(INTEGER(x)|0x1)
#define TSTBIT1(x)	POINTER(INTEGER(x)&0x1)

#define BIT2		0x2
#define BOUND2		4
#define ALIGN2(x)	TRUNC2((x)+3)
#define TRUNC2(x)	POINTER(INTEGER(x)&0xfffffffc)
#define CLRBIT2(x)	POINTER(INTEGER(x)&0xfffffffd)
#define SETBIT2(x)	POINTER(INTEGER(x)|0x2)
#define TSTBIT2(x)	POINTER(INTEGER(x)&0x2)

#endif
