Annotation of researchv10no/cmd/odist/opkg/mkcsum.c, revision 1.1

1.1     ! root        1: #include "seal.h"
        !             2: 
        !             3: unsigned long
        !             4: mkcsum (unsigned long csum, char *start, char *limit)
        !             5: {
        !             6:        register int c;
        !             7: 
        !             8:        while (start < limit) {
        !             9:                c = (unsigned char) *start++;
        !            10:                if (csum & 1)
        !            11:                        csum = (csum >> 1) | CSHIBIT;
        !            12:                else
        !            13: 
        !            14:                        csum >>= 1;
        !            15:                csum += c;
        !            16:                csum &= CSMASK;
        !            17:        }
        !            18:        return csum;
        !            19: }

unix.superglobalmegacorp.com

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