Annotation of 3BSD/new/libI77uc/rewind.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * rewind.c  -  f77 file rewind
        !             3:  */
        !             4: 
        !             5: #include "fio.h"
        !             6: 
        !             7: f_rew(a) alist *a;
        !             8: {      int n;
        !             9:        unit *b;
        !            10:        lfname = NULL;
        !            11:        elist = NO;
        !            12:        external = YES;                 /* for err */
        !            13:        lunit = a->aunit;
        !            14:        if(not_legal(lunit)) err(a->aerr,101,"rewind")
        !            15:        b = &units[lunit];
        !            16:        if(!b->ufd && (n=fk_open(READ,SEQ,FMT,lunit)) ) err(a->aerr,n,"rewind")
        !            17:        lfname = b->ufnm;
        !            18:        if(!b->useek) err(a->aerr,106,"rewind")
        !            19:        b->uend = NO;
        !            20:        if(b->uwrt)
        !            21:                if(n=t_runc(b,a->aerr)) return(n);
        !            22:        rewind(b->ufd);
        !            23:        return(OK);
        !            24: }

unix.superglobalmegacorp.com

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