Annotation of researchv10dc/cmd/sdb/cdefs.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * almost verbatim from common/manifest.h in the c compiler
                      3:  */
                      4: 
                      5: /* type modifiers */
                      6: 
                      7: # define PTR  040
                      8: # define FTN  0100
                      9: # define ARY  0140
                     10: 
                     11: /* type packing constants */
                     12: 
                     13: # define MTMASK 03
                     14: # define BTMASK 037
                     15: # define BTSHIFT 5 
                     16: # define TSHIFT 2
                     17: # define TMASK (MTMASK<<BTSHIFT)
                     18: # define TMASK1 (MTMASK<<(BTSHIFT+TSHIFT))
                     19: # define TMASK2  (TMASK||MTMASK)
                     20: 
                     21: /*     macros  */
                     22: 
                     23: # define ONEBIT(n) (1L<<(n))
                     24: # define MODTYPE(x,y) x = (x&(~BTMASK))|y  /* set basic type of x to y */
                     25: # define BTYPE(x)  (x&BTMASK)   /* basic type of x */
                     26: # define ISUNSIGNED(x) ((x)<=ULONG&&(x)>=UCHAR)
                     27: # define UNSIGNABLE(x) ((x)<=LONG&&(x)>=CHAR)
                     28: # define ENUNSIGN(x) ((x)+(UNSIGNED-INT))
                     29: # define DEUNSIGN(x) ((x)+(INT-UNSIGNED))
                     30: # define ISPTR(x) ((x&TMASK)==PTR)
                     31: # define ISFTN(x)  ((x&TMASK)==FTN)  /* is x a function type */
                     32: # define ISARY(x)   ((x&TMASK)==ARY)   /* is x an array type */
                     33: # define INCREF(x) (((x&~BTMASK)<<TSHIFT)|PTR|(x&BTMASK))
                     34: # define DECREF(x) (((x>>TSHIFT)&~BTMASK)|(x&BTMASK))
                     35: # define PKFIELD(s,o) (((o)<<6)|(s))
                     36: # define UPKFSZ(v)  ((v)&077)
                     37: # define UPKFOFF(v) ((v)>>6)
                     38: 
                     39: #define        MAXTYPE 16      /* largest meaningful type; currently == void */

unix.superglobalmegacorp.com

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