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
BSD 4_1_snap release
[unix-history]
/
usr
/
src
/
libc
/
stdio
/
ftell.c
diff --git
a/usr/src/libc/stdio/ftell.c
b/usr/src/libc/stdio/ftell.c
index
b33252b
..
e2226c8
100644
(file)
--- a/
usr/src/libc/stdio/ftell.c
+++ b/
usr/src/libc/stdio/ftell.c
@@
-1,3
+1,4
@@
+/* @(#)ftell.c 4.2 (Berkeley) 3/9/81 */
/*
* Return file offset.
* Coordinates with buffering.
/*
* Return file offset.
* Coordinates with buffering.
@@
-17,9
+18,9
@@
FILE *iop;
iop->_cnt = 0;
if (iop->_flag&_IOREAD)
adjust = - iop->_cnt;
iop->_cnt = 0;
if (iop->_flag&_IOREAD)
adjust = - iop->_cnt;
- else if (iop->_flag&
_IOWRT
) {
+ else if (iop->_flag&
(_IOWRT|_IORW)
) {
adjust = 0;
adjust = 0;
- if (iop->_base && (iop->_flag&_IONBF)==0)
+ if (iop->_
flag&_IOWRT && iop->_
base && (iop->_flag&_IONBF)==0)
adjust = iop->_ptr - iop->_base;
} else
return(-1);
adjust = iop->_ptr - iop->_base;
} else
return(-1);