Annotation of researchv8dc/lib/libcbt/diskrd.c, revision 1.1.1.1

1.1       root        1: #include "cbt.h"
                      2: 
                      3: extern bfile *curbf;
                      4: extern long lseek();
                      5: 
                      6: ndrd(lev, where) ndaddr where;
                      7: {
                      8:        if(mustwrite(curbf, lev)) {
                      9:                /* do we ever get here? (yes, while splitting) */
                     10:                if(ndwrt(curbf->path[lev], curbf->loc[lev]) == EOF)
                     11:                        return(EOF);
                     12:                mustwrite(curbf, lev) = 0;
                     13:        }
                     14:        if(lseek(curbf->tfd, where * (long)NDSZ, 0) == -1)
                     15:                return(EOF);
                     16:        if(read(curbf->tfd, (char *)curbf->path[lev], NDSZ) != NDSZ) {
                     17:                errno = BRDERR;
                     18:                return(EOF);
                     19:        }
                     20:        curbf->loc[lev] = where;
                     21:        return(0);
                     22: }
                     23: 
                     24: getincore(lev, where) ndaddr where;
                     25: {
                     26:        if(ndrd(lev, where) == EOF)
                     27:                return(EOF);
                     28:        if(curbf->path[lev]->hlev != lev) {
                     29:                errno = BRDERR;
                     30:                curbf->fatal++;
                     31:                return(EOF);
                     32:        }
                     33:        return(0);
                     34: }
                     35: static struct D { struct D *a; char *b;} VER = {&VER,"\n81/8/9:diskrd.c\n"};
                     36: /*1010100001000111*/

unix.superglobalmegacorp.com

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