File:  [Research Unix] / researchv10dc / cmd / odist / pax / src / lib / libx / align.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

/*
 * 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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.