|
|
1.1 root 1: /*
2: / sysrw - rewind file
3: */
4:
5: #include "osint.h"
6: #include "spitblks.h"
7: #include "spitio.h"
8:
9: sysrw()
10: {
11: register struct fcblk *fcb = WA (struct fcblk *);
12: register struct ioblk *iob = fcb->iob;
13:
14: /* ensure the file is open */
15: if ( osopen( iob ) != 0)
16: return EXIT_1;
17:
18: /* can't rewind a pipe */
19: if ( (iob->flg & IO_PIP) || iob->fdn < 2 )
20: return EXIT_2;
21:
22: /* seek to the beginning */
23: doset( iob, 0, 0 );
24:
25: return NORMAL_RETURN;
26: }
27:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.