Annotation of researchv10no/libc/gen/vaxmemmove.c, revision 1.1

1.1     ! root        1: #define CHUNK 65532    /* word boundary */
        !             2: 
        !             3: /* VAX memcpy is OK up to 65535-byte strings */
        !             4: 
        !             5: extern void *memcpy();
        !             6: 
        !             7: void *
        !             8: memmove(vout, vin, n)
        !             9: void *vout, *vin;
        !            10: unsigned n;
        !            11: {
        !            12:        char *out, *in;
        !            13:        register unsigned chunk;
        !            14:        if(n <= CHUNK || vout < vin)
        !            15:                return memcpy(vout, vin, n);
        !            16:        chunk = n%CHUNK;
        !            17:        out = (char*)vout + n;
        !            18:        in = (char*)vin + n;
        !            19:        while(memcpy(out-=chunk, in-=chunk, chunk) > vout)
        !            20:                chunk = CHUNK;
        !            21:        return vout;
        !            22: }

unix.superglobalmegacorp.com

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