Annotation of cci/usr/src/usr.lib/libsI77/rewind.c, revision 1.1

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

unix.superglobalmegacorp.com

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