/* Copyright (c) 1979 Regents of the University of California */
* Seek for standard library. Coordinates with buffering.
long fseek(iop
, offset
, ptrname
)
if (iop
->_flag
&_IODIRT
) {
return(lseek(fileno(iop
), offset
, ptrname
));
if (iop
->_flag
&(_IOREAD
|_IOWRT
)) {
if (ptrname
==1) { /* relative */
n
= lseek(fileno(iop
), offset
- n
, ptrname
);
/* The current character is always iop->_cnt characters behind the current
position in the file, except when a file is open and in use for pure writing
in which case it is _IODIRT(y), and will be correctly positioned by fflush */