Annotation of researchv10no/cmd/btree/lib.c, revision 1.1.1.1

1.1       root        1: #include "cbt.h"
                      2: mvgbt(to, from, ln) register char *from, *to;
                      3: {
                      4:        if(from > to)
                      5:                while(ln-- > 0) *to++ = *from++;
                      6:        else if(from < to)
                      7:        {       from += ln-1;
                      8:                to += ln-1;
                      9:                while(ln-- > 0) *to-- = *from--;
                     10:        }
                     11: }
                     12: 
                     13: prnode(b)
                     14: hdr *b;
                     15: {      int i;
                     16:        char *p;
                     17:        dkey *d;
                     18: 
                     19:        printf("kcnt %d htype %d hlev %d nfree %d ndsz %d\n", b->kcnt, b->htype,
                     20:                b->hlev, nfree(b), NDSZ);
                     21:        for(i = 0, p = (char *)(b+1); i < b->kcnt; i++) {
                     22:                d = (dkey *)p;
                     23:                prdkey(d);
                     24:                p += d->dlen;
                     25:        }
                     26:        putchar('\n');
                     27: }
                     28: 
                     29: prdkey(d)
                     30: dkey *d;
                     31: {      int i;
                     32:        printf("(%d,%d,", d->dlen, d->dcom);
                     33:        for(i = 0; i < MAXKLEN &&i < d->dlen - DKEYSZ; i++) /* dlen unsigned */
                     34:                putchar(d->dkey[i]);
                     35:        printf("),");
                     36: }
                     37: static struct D { struct D *a; char *b;} VER = {&VER,"\n82/10/9:lib.c\n"};
                     38: /*1001101011001110*/

unix.superglobalmegacorp.com

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