Annotation of coherent/b/bin/c/common/tcpy.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #ifdef vax
        !             3: #include "INC$LIB:mch.h"
        !             4: #include "INC$LIB:stream.h"
        !             5: #include "INC$LIB:ops.h"
        !             6: #else
        !             7: #include "mch.h"
        !             8: #include "stream.h"
        !             9: #include "ops.h"
        !            10: #endif
        !            11: 
        !            12: /*
        !            13:  * Copy debug label information.
        !            14:  */
        !            15: 
        !            16: ival_t icpy();
        !            17: 
        !            18: tcpy(class)
        !            19: {
        !            20:        register int n;
        !            21:        register int nline;
        !            22:        register int c;
        !            23:        register sizeof_t z;
        !            24:        extern int line;
        !            25: 
        !            26:        /* Write class */
        !            27:        bput(class);
        !            28: 
        !            29:        /* Read line number */
        !            30:        nline = icpy();
        !            31: 
        !            32:        /* Get value */
        !            33:        if (class < DC_LINE)
        !            34:                ;
        !            35:        else if (class < DC_AUTO)
        !            36:                line = nline;
        !            37:        else if (class < DC_MOS)
        !            38:                icpy();
        !            39:        else {
        !            40:                bcpy();
        !            41:                bcpy();
        !            42:                icpy();
        !            43:        }
        !            44: 
        !            45:        /* Get name */
        !            46:        while (bcpy() != 0);
        !            47: 
        !            48:        /* Get type */
        !            49:        for (;;) {
        !            50:                c = bcpy();
        !            51:                z = zget();
        !            52:                zput(z);
        !            53:                switch (c) {
        !            54:                case DT_NONE:
        !            55:                case DT_CHAR:
        !            56:                case DT_UCHAR:
        !            57:                case DT_SHORT:
        !            58:                case DT_USHORT:
        !            59:                case DT_INT:
        !            60:                case DT_UINT:
        !            61:                case DT_LONG:
        !            62:                case DT_ULONG:
        !            63:                case DT_FLOAT:
        !            64:                case DT_DOUBLE:
        !            65:                case DT_VOID:
        !            66:                        break;
        !            67:                case DT_STRUCT:
        !            68:                case DT_UNION:
        !            69:                case DT_ENUM:
        !            70:                case DD_PTR:
        !            71:                case DD_FUNC:
        !            72:                case DD_ARRAY:
        !            73:                        continue;
        !            74:                case DX_MEMBS:
        !            75:                        n = z;
        !            76:                        while (--n >= 0) tcpy(bget());
        !            77:                        break;
        !            78:                case DX_NAME:
        !            79:                        while (bcpy() != 0);
        !            80:                        break;
        !            81:                default:
        !            82:                        cbotch("bad type in tcpy: %d", n);
        !            83:                }
        !            84:                break;
        !            85:        }
        !            86: }
        !            87: 
        !            88: static
        !            89: bcpy()
        !            90: {
        !            91:        register int n;
        !            92: 
        !            93:        n = bget();
        !            94:        bput(n);
        !            95:        return (n);
        !            96: }
        !            97: 
        !            98: static ival_t
        !            99: icpy()
        !           100: {
        !           101:        register ival_t i;
        !           102: 
        !           103:        i = iget();
        !           104:        iput(i);
        !           105:        return (i);
        !           106: }

unix.superglobalmegacorp.com

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