update for HEAD-2003091401
[reactos.git] / lib / crtdll / stdio / rewind.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
3 #include <msvcrt/stdio.h>
4 #include <msvcrt/io.h>
5 #include <msvcrt/internal/file.h>
6
7
8 /*
9  * @implemented
10  */
11 void rewind(FILE *f)
12 {
13   fflush(f);
14   lseek(fileno(f), 0L, SEEK_SET);
15   f->_cnt = 0;
16   f->_ptr = f->_base;
17   f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD);
18 }