make it possible to compile new versions of db that load against
[unix-history] / usr / src / lib / libc / stdio / rewind.c
CommitLineData
14c61dfe 1/*-
7860c229
KB
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
45ead4dd 4 *
14c61dfe
KB
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
019bea33 8 * %sccs.include.redist.c%
45ead4dd
KB
9 */
10
2ce81398 11#if defined(LIBC_SCCS) && !defined(lint)
7860c229 12static char sccsid[] = "@(#)rewind.c 8.1 (Berkeley) %G%";
45ead4dd 13#endif /* LIBC_SCCS and not lint */
b8f253e8 14
14c61dfe 15#include <errno.h>
45ead4dd 16#include <stdio.h>
8c222d3d 17
14c61dfe
KB
18void
19rewind(fp)
20 register FILE *fp;
8c222d3d 21{
14c61dfe
KB
22 (void) fseek(fp, 0L, SEEK_SET);
23 clearerr(fp);
24 errno = 0; /* not required, but seems reasonable */
8c222d3d 25}