Annotation of researchv8dc/sys/chaosld/chutil.c, revision 1.1

1.1     ! root        1: /*
        !             2:  *             C H  U T I L
        !             3:  *
        !             4:  * Utility routines for Chaosnet line discipline and Chroute line discipline.
        !             5:  *
        !             6:  *
        !             7:  * (c) Copyright 1984  Nirvonics, Inc.
        !             8:  *
        !             9:  * Written by Kurt Gollhardt
        !            10:  * Last update Fri Nov  9 18:21:33 1984
        !            11:  *
        !            12:  * This software is the property of Nirvonics, Inc.
        !            13:  * All rights reserved.
        !            14:  *
        !            15:  */
        !            16: 
        !            17: #include "../h/param.h"
        !            18: #include "../h/stream.h"
        !            19: 
        !            20: 
        !            21: #ifdef pdp11
        !            22: /*
        !            23:  * Swap the word of n longs.
        !            24:  */
        !            25: swaplong(lp, n)
        !            26: register short *lp;
        !            27: register int n;
        !            28: {
        !            29:        register short temp;
        !            30: 
        !            31:        if (n)
        !            32:                do {
        !            33:                        temp = *lp++;
        !            34:                        lp[-1] = *lp;
        !            35:                        *lp++ = temp;
        !            36:                } while (--n);
        !            37: }
        !            38: #endif
        !            39: 
        !            40: 
        !            41: chb_put(q, bp)
        !            42:      register struct queue    *q;
        !            43:      register struct block    *bp;
        !            44: {
        !            45:      switch (bp->type) {
        !            46:           case M_DATA:
        !            47:                putq(q, bp);   /* putq does compression into blocks */
        !            48:                break;
        !            49:           case M_DELIM:
        !            50:                putq(q, bp);
        !            51:                qenable(q);
        !            52:                break;
        !            53:           default:
        !            54:                (*q->next->qinfo->putp)(q->next, bp);
        !            55:                break;
        !            56:      }
        !            57: }
        !            58: 
        !            59: 
        !            60: bfill(addr, len, val)
        !            61:      register u_char     *addr;
        !            62:      register unsigned   len;
        !            63:      register u_char     val;
        !            64: {
        !            65:      while (len--)
        !            66:           *addr++ = val;
        !            67: }

unix.superglobalmegacorp.com

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