Annotation of 43BSD/contrib/icon/rt/dblocks.c, revision 1.1

1.1     ! root        1: #include "../h/rt.h"
        !             2: 
        !             3: /*
        !             4:  * Heap block size table (sizes given in bytes).  A size of -1 is used
        !             5:  *  for types that have no heap blocks; a size of 0 indicates that the
        !             6:  *  second word of the block contains the size; a value greater than
        !             7:  *  0 is used for types with constant sized blocks.
        !             8:  */
        !             9: 
        !            10: int bsizes[] = {
        !            11:     -1,                                /* 0, not used */
        !            12:     -1,                                /* 1, not used */
        !            13:      sizeof(struct b_int),     /* T_LONGINT (2), long integer type */
        !            14:      sizeof(struct b_real),    /* T_REAL (3), real number */
        !            15:      sizeof(struct b_cset),    /* T_CSET (4), cset */
        !            16:      sizeof(struct b_file),    /* T_FILE (5), file block */
        !            17:      0,                                /* T_PROC (6), procedure block */
        !            18:      sizeof(struct b_list),    /* T_LIST (7), list header block */
        !            19:      sizeof(struct b_table),   /* T_TABLE (8), table header block */
        !            20:      0,                                /* T_RECORD (9), record block */
        !            21:      sizeof(struct b_telem),   /* T_TELEM (10), table element block */
        !            22:      0,                                /* T_LELEM (11), list element block */
        !            23:      sizeof(struct b_tvsubs),  /* T_TVSUBS (12), substring trapped variable */
        !            24:     -1,                                /* 13, not used */
        !            25:      sizeof(struct b_tvtbl),   /* T_TVTBL (14), table element trapped variable */
        !            26:     -1,                                /* T_TVPOS (15), &pos trapped variable */
        !            27:     -1,                                /* T_TVRAND (16), &random trapped variable */
        !            28:     -1,                                /* T_TVTACE (17), &trace trapped variable */
        !            29:     -1,                                /* T_ESTACK (18), expression stack header */
        !            30:      0                         /* T_EBLOCK (19), expression heap block */
        !            31: #ifdef SETS
        !            32:     ,
        !            33:      sizeof(struct b_set),     /* T_SET  (20), set header block */
        !            34:      sizeof(struct b_selem)    /* T_SELEM  (21), set element block */
        !            35: #endif SETS
        !            36:     };
        !            37: 
        !            38: /*
        !            39:  * Table of offsets (in bytes) to first descriptor in blocks.  -1 is for
        !            40:  *  non-heap types, 0 for blocks with no descriptors.
        !            41:  */
        !            42: int firstd[] = {
        !            43:     -1,                                /* 0, not used */
        !            44:     -1,                                /* 1, not used */
        !            45:      0,                                /* T_LONGINT (2), long integer type */
        !            46:      0,                                /* T_REAL (3), real number */
        !            47:      0,                                /* T_CSET (4), cset */
        !            48:      3*WORDSIZE,               /* T_FILE (5), file block */
        !            49:      7*WORDSIZE,               /* T_PROC (6), procedure block */
        !            50:      2*WORDSIZE,               /* T_LIST (7), list header block */
        !            51:      2*WORDSIZE,               /* T_TABLE (8), table header block */
        !            52:      3*WORDSIZE,               /* T_RECORD (9), record block */
        !            53:      2*WORDSIZE,               /* T_TELEM (10), table element block */
        !            54:      5*WORDSIZE,               /* T_LELEM (11), list element block */
        !            55:      3*WORDSIZE,               /* T_TVSUBS (12), substring trapped variable */
        !            56:     -1,                                /* 13, not used */
        !            57:      2*WORDSIZE,               /* T_TVTBL (14), table element trapped variable */
        !            58:     -1,                                /* T_TVPOS (15), &pos trapped variable */
        !            59:     -1,                                /* T_TVRAND (16), &random trapped variable*/
        !            60:     -1,                                /* T_TVTACE (17), &trace trapped variable */
        !            61:     -1,                                /* T_ESTACK (18), expression stack header */
        !            62:      5*WORDSIZE                        /* T_EBLOCK (19), expression heap block */
        !            63: #ifdef SETS
        !            64:    ,
        !            65:      2*WORDSIZE,               /* T_SET  (20), set header block */
        !            66:      2*WORDSIZE                        /* T_SELEM  (21), set element block */
        !            67: #endif SETS
        !            68:     };
        !            69: 
        !            70: /*
        !            71:  * Table of block names used by debugging functions.
        !            72:  */
        !            73: char *blkname[] = {
        !            74:    "illegal name",             /* 0, not used */
        !            75:    "illegal name",             /* 1, not used */
        !            76:    "long integer",             /* T_LONGINT (2), long integer type */
        !            77:    "real number",              /* T_REAL (3), real number */
        !            78:    "cset",                     /* T_CSET (4), cset */
        !            79:    "file",                     /* T_FILE (5), file block */
        !            80:    "procedure",                        /* T_PROC (6), procedure block */
        !            81:    "list header block",                /* T_LIST (7), list header block */
        !            82:    "table header block",       /* T_TABLE  (8), table header block */
        !            83:    "record",                   /* T_RECORD (9), record block */
        !            84:    "table element block",      /* T_TELEM (10), table element block  */
        !            85:    "list element block",       /* T_LELEM (11), list element block */
        !            86:    "substring tv",             /* T_TVSUBS (12), substring trapped variable */
        !            87:    "illegal name",             /* 13, not used */
        !            88:    "table element tv",         /* T_TVTBL (14), table element trapped variable */
        !            89:    "illegal name",             /* T_TVPOS (15), &pos trapped variable */
        !            90:    "illegal name",             /* T_TVRAND (16), &random trapped variable */
        !            91:    "illegal name",             /* T_TVTACE (17), &trace trapped variable */
        !            92:    "expression stack",         /* T_ESTACK (18), expression stack header */
        !            93:    "refresh block"             /* T_EBLOCK (19), expression heap block */
        !            94: #ifdef SETS
        !            95:    ,
        !            96:    "set header block",         /* T_SET  (20), set header block */
        !            97:    "set member"                        /* T_SELEM  (21), set element block */
        !            98: #endif SETS
        !            99:    };

unix.superglobalmegacorp.com

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