diff options
author | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-02-08 21:32:38 +0000 |
---|---|---|
committer | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-02-08 21:32:38 +0000 |
commit | 7307d07db6d636b8690c330a65b857dbe1738364 (patch) | |
tree | ff7ef06c4da289753c0ab5f95214f648a3626b95 /lib/libc/stdio/fseek.3 | |
parent | 0d35e40d61a162640b2963d3647050e33c66fab8 (diff) | |
download | src-7307d07db6d636b8690c330a65b857dbe1738364.tar.gz src-7307d07db6d636b8690c330a65b857dbe1738364.zip |
Notes
Diffstat (limited to 'lib/libc/stdio/fseek.3')
-rw-r--r-- | lib/libc/stdio/fseek.3 | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index 5dd79e91aa50..064130a0538f 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -41,8 +41,10 @@ .Sh NAME .Nm fgetpos , .Nm fseek , +.Nm fseeko , .Nm fsetpos , .Nm ftell , +.Nm ftello , .Nm rewind .Nd reposition a stream .Sh SYNOPSIS @@ -57,6 +59,10 @@ .Fn fgetpos "FILE *stream" "fpos_t *pos" .Ft int .Fn fsetpos "FILE *stream" "const fpos_t *pos" +.Ft int +.Fn fseeko "FILE *stream" "off_t offset" "int whence" +.Ft off_t +.Fn ftello "FILE *stream" .Sh DESCRIPTION The .Fn fseek @@ -106,6 +112,22 @@ except that the error indicator for the stream is also cleared .Xr clearerr 3 ) . .Pp The +.Fn fseeko +function is identical to +.Fn fseek , +but take an +.Fa off_t +argument +instead of a +.Fa long . +Likewise, the +.Fn ftello +function is identical to +.Fn ftell , +but returns +.Fa off_t . +.Pp +The .Fn fgetpos and .Fn fsetpos @@ -115,8 +137,8 @@ are alternate interfaces equivalent to and .Fn fseek (with whence set to -.Dv SEEK_SET -), setting and storing the current value of +.Dv SEEK_SET ) , +setting and storing the current value of the file offset into or from the object referenced by .Fa pos . On some @@ -133,10 +155,14 @@ returns no value. Upon successful completion, .Fn fgetpos , .Fn fseek , +.Fn fseeko , +and .Fn fsetpos return 0, and .Fn ftell +and +.Fn ftello returns the current offset. Otherwise, \-1 is returned and the global variable errno is set to indicate the error. @@ -157,14 +183,21 @@ was not .Dv SEEK_END , or .Dv SEEK_CUR . +.It Bq Er EOVERFLOW +For +.Fn ftell , +the resulting file offset would be a value which +cannot be represented correctly in an object of type long. .El .Pp -The function +The functions .Fn fgetpos , .Fn fseek , +.Fn fseeko , .Fn fsetpos , -and -.Fn ftell +.Fn ftell , +and +.Fn ftello may also fail and set .Va errno for any of the errors specified for the routines @@ -186,3 +219,10 @@ and functions conform to .St -ansiC . +.Pp +The +.Fn fseeko +and +.Fn ftello +functions conform to +.St -susv2 . |