Annotation of researchv10no/cmd/spitbol/ocint/sysrw.c, revision 1.1.1.1

1.1       root        1: #include "inter.h"
                      2: #include "spitblks.h"
                      3: #include "spitio.h"
                      4: 
                      5: sysrw()
                      6: {
                      7:        register struct fcblk *fcb = WA (struct fcblk *);
                      8:        register struct ioblk *iob = fcb->iob;
                      9: 
                     10:        /* ensure the file is open */
                     11:        if (osopen (iob) != 0)
                     12:                return 0;
                     13:        
                     14:        /* can't rewind a pipe */
                     15:        if ((iob->flg & IO_PIP) || iob->fdn < 2)
                     16:                return 1;
                     17:        
                     18:        /* seek to the beginning */
                     19:        doset (iob, 0, 0);
                     20: 
                     21:        return 3;
                     22: }

unix.superglobalmegacorp.com

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