diff options
Diffstat (limited to 'newlib/libc/stdio/rewind.c')
-rw-r--r-- | newlib/libc/stdio/rewind.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/newlib/libc/stdio/rewind.c b/newlib/libc/stdio/rewind.c index 58f4cc3e8..905275741 100644 --- a/newlib/libc/stdio/rewind.c +++ b/newlib/libc/stdio/rewind.c @@ -21,23 +21,16 @@ FUNCTION INDEX rewind -INDEX - _rewind_r ANSI_SYNOPSIS #include <stdio.h> void rewind(FILE *<[fp]>); - void _rewind_r(struct _reent *<[ptr]>, FILE *<[fp]>); TRAD_SYNOPSIS #include <stdio.h> void rewind(<[fp]>) FILE *<[fp]>; - void _rewind_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - DESCRIPTION <<rewind>> returns the file position indicator (if any) for the file or stream identified by <[fp]> to the beginning of the file. It also @@ -56,26 +49,12 @@ No supporting OS subroutines are required. static char sccsid[] = "%W% (Berkeley) %G%"; #endif /* LIBC_SCCS and not lint */ -#include <_ansi.h> -#include <reent.h> #include <stdio.h> -_VOID -_DEFUN(_rewind_r, (ptr, fp), - struct _reent * ptr _AND - register FILE * fp) -{ - _CAST_VOID _fseek_r (ptr, fp, 0L, SEEK_SET); - clearerr (fp); -} - -#ifndef _REENT_ONLY - -_VOID -_DEFUN(rewind, (fp), - register FILE * fp) +void +_DEFUN (rewind, (fp), + register FILE * fp) { - _CAST_VOID _fseek_r (_REENT, fp, 0L, SEEK_SET); + (void) fseek(fp, 0L, SEEK_SET); + clearerr(fp); } - -#endif /* !_REENT_ONLY */ |