diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-08-19 08:24:50 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-08-19 08:24:50 +0000 |
| commit | c5981656eaccc5bd8321310f0414ab044a51698f (patch) | |
| tree | db330589e130de92889000694518c35e6f5429f1 /lib/libc/stdio | |
| parent | 5979df34a6c99dad5b4bf34995c9afd8efe5a1e2 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio')
| -rw-r--r-- | lib/libc/stdio/fseek.3 | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index d7c808645bb1..73a79f20158d 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -115,6 +115,17 @@ except that the error indicator for the stream is also cleared (see .Xr clearerr 3 ) . .Pp +Since +.Fn rewind +does not return a value, +an application wishing to detect errors should clear +.Va errno , +then call +.Fn rewind , +and if +.Va errno +is non-zero, assume an error has occurred. +.Pp The .Fn fseeko function is identical to @@ -168,8 +179,9 @@ and and .Fn ftello return the current offset. -Otherwise, \-1 is returned and the global variable errno is set to -indicate the error. +Otherwise, \-1 is returned and the global variable +.Va errno +is set to indicate the error. .Sh ERRORS .Bl -tag -width Er .It Bq Er EBADF @@ -180,20 +192,25 @@ is not a seekable stream. .It Bq Er EINVAL The .Fa whence -argument is invalid. -The resulting file-position +argument is invalid or +the resulting file-position indicator would be set to a negative value. .It Bq Er EOVERFLOW The resulting file offset would be a value which -cannot be represented correctly in an object of type off_t +cannot be represented correctly in an object of type +.Fa off_t for .Fn fseeko and .Fn ftello -or long for +or +.Fa long +for .Fn fseek and .Fn ftell . +.It Bq Er ESPIPE +The file descriptor underlying stream is associated with a pipe or FIFO. .El .Pp The functions |
