From 30b2092fcb3283a42447e47a549e216fd90945ec Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 4 Jul 2002 19:33:54 +0000 Subject: 2002-07-04 Jeff Johnston * libc/include/stdio.h: Add new prototypes. * libc/stdio/Makefile.am: Add fseeko.c and ftello.c. * libc/stdio/Makefile.in: Regenerated. * libc/stdio/fseek.c: Add fseeko documentation. * libc/stdio/ftell.c: Add ftello documentation. * libc/stdio/fseeko.c: New file. * libc/stdio/ftello.c: New file. --- newlib/libc/stdio/fseek.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'newlib/libc/stdio/fseek.c') diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c index 27f527545..8912dd60c 100644 --- a/newlib/libc/stdio/fseek.c +++ b/newlib/libc/stdio/fseek.c @@ -17,14 +17,17 @@ /* FUNCTION -<>---set file position +<>, <>---set file position INDEX fseek +INDEX + fseeko ANSI_SYNOPSIS #include int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>) + int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>) TRAD_SYNOPSIS #include @@ -33,12 +36,17 @@ TRAD_SYNOPSIS long <[offset]>; int <[whence]>; + int fseeko(<[fp]>, <[offset]>, <[whence]>) + FILE *<[fp]>; + off_t <[offset]>; + int <[whence]>; + DESCRIPTION Objects of type <> can have a ``position'' that records how much of the file your program has already read. Many of the <> functions depend on this position, and many change it as a side effect. -You can use <> to set the position for the file identified by +You can use <>/<> to set the position for the file identified by <[fp]>. The value of <[offset]> determines the new position, in one of three ways selected by the value of <[whence]> (defined as macros in `<>'): @@ -53,10 +61,10 @@ from the beginning of the file) desired. <[offset]> must be positive. <[offset]> can meaningfully be either positive (to increase the size of the file) or negative. -See <> to determine the current file position. +See <>/<> to determine the current file position. RETURNS -<> returns <<0>> when successful. If <> fails, the +<>/<> return <<0>> when successful. On failure, the result is <>. The reason for failure is indicated in <>: either <> (the stream identified by <[fp]> doesn't support repositioning) or <> (invalid file position). @@ -64,6 +72,8 @@ repositioning) or <> (invalid file position). PORTABILITY ANSI C requires <>. +<> is defined by the Single Unix specification. + Supporting OS subroutines required: <>, <>, <>, <>, <>, <>, <>. */ -- cgit v1.2.3