xref: /csrg-svn/lib/libc/stdio/rewind.c (revision 61180)
146100Sbostic /*-
2*61180Sbostic  * Copyright (c) 1990, 1993
3*61180Sbostic  *	The Regents of the University of California.  All rights reserved.
432735Sbostic  *
546100Sbostic  * This code is derived from software contributed to Berkeley by
646100Sbostic  * Chris Torek.
746100Sbostic  *
842633Sbostic  * %sccs.include.redist.c%
932735Sbostic  */
1032735Sbostic 
1126659Sdonn #if defined(LIBC_SCCS) && !defined(lint)
12*61180Sbostic static char sccsid[] = "@(#)rewind.c	8.1 (Berkeley) 06/04/93";
1332735Sbostic #endif /* LIBC_SCCS and not lint */
1422144Smckusick 
1546100Sbostic #include <errno.h>
1632735Sbostic #include <stdio.h>
172030Swnj 
1846100Sbostic void
rewind(fp)1946100Sbostic rewind(fp)
2046100Sbostic 	register FILE *fp;
212030Swnj {
2246100Sbostic 	(void) fseek(fp, 0L, SEEK_SET);
2346100Sbostic 	clearerr(fp);
2446100Sbostic 	errno = 0;      /* not required, but seems reasonable */
252030Swnj }
26