diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2011-07-05 15:30:11 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2011-07-05 15:30:11 +0000 |
commit | fb70ad4bd2769e12a8ace12c2bbc0f45190c68fd (patch) | |
tree | 28c04ce38936fc80ca8de9563f3e75a21c5bf003 /lib | |
parent | 6dd8db85f4d239ce9ba57e47601637e18c15461d (diff) |
from Tim van der Molen:
- State that ftell() and ftello() return -1 on error rather than just a
non-zero value. The latter is not specific enough, because these
functions can also return non-zero on success.
- For clarity and search-friendliness, don't refer to fgetpos() and
fsetpos() as "the others", but mention them by name.
ok millert otto
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdio/fseek.3 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index acbd41301e1..a8e2bac50ee 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fseek.3,v 1.11 2007/05/31 19:19:31 jmc Exp $ +.\" $OpenBSD: fseek.3,v 1.12 2011/07/05 15:30:10 jmc Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: July 5 2011 $ .Dt FSEEK 3 .Os .Sh NAME @@ -148,6 +148,7 @@ Upon successful completion, .Fn fgetpos , .Fn fseek , .Fn fseeko , +and .Fn fsetpos return 0 and .Fn ftell @@ -155,10 +156,16 @@ and .Fn ftello return the current offset. Otherwise, -.Fn fseek +.Fn fseek , +.Fn fseeko , +.Fn ftell , and -.Fn fseeko -return \-1 and the others return a non-zero value and the global variable +.Fn ftello +return \-1 and +.Fn fgetpos +and +.Fn fsetpos +return a non-zero value and the global variable .Va errno is set to indicate the error. .Sh ERRORS |