Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Elaborate a bit on fseeko() and ftello().



details:   https://anonhg.NetBSD.org/src/rev/640ec882c437
branches:  trunk
changeset: 494568:640ec882c437
user:      kleink <kleink%NetBSD.org@localhost>
date:      Sat Jul 08 14:13:05 2000 +0000

description:
Elaborate a bit on fseeko() and ftello().

diffstat:

 lib/libc/stdio/fseek.3 |  48 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 40 insertions(+), 8 deletions(-)

diffs (101 lines):

diff -r e31ce6cb27d9 -r 640ec882c437 lib/libc/stdio/fseek.3
--- a/lib/libc/stdio/fseek.3    Sat Jul 08 13:59:24 2000 +0000
+++ b/lib/libc/stdio/fseek.3    Sat Jul 08 14:13:05 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: fseek.3,v 1.14 2000/07/08 13:59:24 kleink Exp $
+.\"    $NetBSD: fseek.3,v 1.15 2000/07/08 14:13:05 kleink Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -54,13 +54,13 @@
 .Sh SYNOPSIS
 .Fd #include <stdio.h>
 .Ft int
-.Fn fseek "FILE *stream" "long offset" "int whence"
+.Fn fseek "FILE *stream" "long int offset" "int whence"
 .Ft int
 .Fn fseeko "FILE *stream" "off_t offset" "int whence"
-.Ft long
+.Ft long int
 .Fn ftell "FILE *stream"
 .Ft off_t
-.Fn ftell "FILE *stream"
+.Fn ftello "FILE *stream"
 .Ft void
 .Fn rewind "FILE *stream"
 .Ft int
@@ -95,6 +95,15 @@
 function on the same stream.
 .Pp
 The
+.Fn fseeko
+function is identical to the
+.Fn fseek
+function except that the
+.Fa offset
+argument is of type
+.Fa off_t .
+.Pp
+The
 .Fn ftell
 function
 obtains the current value of the file position indicator for the
@@ -102,6 +111,13 @@
 .Fa stream .
 .Pp
 The
+.Fn ftello
+function is identical to the
+.Fn ftell
+function except that the return value is of type
+.Fa off_t .
+.Pp
+The
 .Fn rewind
 function sets the file position indicator for the stream pointed
 to by
@@ -121,9 +137,11 @@
 .Fn fsetpos
 functions
 are alternative interfaces equivalent to
-.Fn ftell
+.Fn ftell ,
+.Fn ftello ,
+.Fn fseek
 and
-.Fn fseek
+.Fn fseeko
 (with whence set to
 .Dv SEEK_SET
 ), setting and storing the current value of
@@ -174,14 +192,28 @@
 .Dv SEEK_END ,
 or
 .Dv SEEK_CUR .
+.\" .It Bq Er EOVERFLOW
+.\" For
+.\" .Fn ftell ,
+.\" the current file offset cannot be represented correctly in an object of type
+.\" .Fa long .
+.\" .Pp
+.\" For
+.\" .Fn fseek ,
+.\" the resulting file offset would be a value which cannot be represented
+.\" correctly in an object of type
+.\" .Fa long.
 .El
 .Pp
 The function
 .Fn fgetpos ,
 .Fn fseek ,
+.Fn fseeko ,
 .Fn fsetpos ,
-and 
-.Fn ftell
+.Fn ftell ,
+.Fn ftello ,
+and
+.Fn rewind
 may also fail and set
 .Va errno
 for any of the errors specified for the routines



Home | Main Index | Thread Index | Old Index