projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feldman's stdio changes
[unix-history]
/
usr
/
src
/
lib
/
libc
/
stdio
/
rewind.c
diff --git
a/usr/src/lib/libc/stdio/rewind.c
b/usr/src/lib/libc/stdio/rewind.c
index
63356b0
..
bb66005
100644
(file)
--- a/
usr/src/lib/libc/stdio/rewind.c
+++ b/
usr/src/lib/libc/stdio/rewind.c
@@
-1,4
+1,4
@@
-/* @(#)rewind.c 4.
1
(Berkeley) %G% */
+/* @(#)rewind.c 4.
2
(Berkeley) %G% */
#include <stdio.h>
rewind(iop)
#include <stdio.h>
rewind(iop)
@@
-9,4
+9,6
@@
register struct _iobuf *iop;
iop->_cnt = 0;
iop->_ptr = iop->_base;
iop->_flag &= ~(_IOERR|_IOEOF);
iop->_cnt = 0;
iop->_ptr = iop->_base;
iop->_flag &= ~(_IOERR|_IOEOF);
+ if (iop->_flag & _IORW)
+ iop->_flag &= ~(_IOREAD|_IOWRT);
}
}