From: Tom London Date: Fri, 26 Jan 1979 04:10:36 +0000 (-0500) Subject: Bell 32V development X-Git-Tag: Bell-32V~257 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/5c0bb1e541c531dca1f17012c8147fb2931512ad Bell 32V development Work on file usr/src/cmd/sdb/cdefs.h Co-Authored-By: John Reiser Synthesized-from: 32v --- diff --git a/usr/src/cmd/sdb/cdefs.h b/usr/src/cmd/sdb/cdefs.h new file mode 100644 index 0000000000..e8c946dbac --- /dev/null +++ b/usr/src/cmd/sdb/cdefs.h @@ -0,0 +1,32 @@ +/* type modifiers */ + +# define PTR 020 +# define FTN 040 +# define ARY 060 + +/* type packing constants */ + +# define TMASK 060 +# define TMASK1 0300 +# define TMASK2 0360 +# define BTMASK 017 +# define BTSHIFT 4 +# define TSHIFT 2 + +/* macros */ + +# define BTYPE(x) (x&BTMASK) /* basic type of x */ +# define ISUNSIGNED(x) ((x)<=ULONG&&(x)>=UCHAR) +# define UNSIGNABLE(x) ((x)<=LONG&&(x)>=CHAR) +# define ENUNSIGN(x) ((x)+(UNSIGNED-INT)) +# define DEUNSIGN(x) ((x)+(INT-UNSIGNED)) +# define ISPTR(x) ((x&TMASK)==PTR) +# define ISFTN(x) ((x&TMASK)==FTN) /* is x a function type */ +# define ISARY(x) ((x&TMASK)==ARY) /* is x an array type */ +# define INCREF(x) (((x&~BTMASK)<>TSHIFT)&~BTMASK)|(x&BTMASK)) + /* pack and unpack field descriptors (size and offset) */ +# define PKFIELD(s,o) ((o<<6)|s) +# define UPKFSZ(v) (v&077) +# define UPKFOFF(v) (v>>6) +