1REWIND(P) POSIX Programmer's Manual REWIND(P)
2
3
4
6 rewind - reset the file position indicator in a stream
7
9 #include <stdio.h>
10
11 void rewind(FILE *stream);
12
13
15 The call:
16
17
18 rewind(stream)
19
20 shall be equivalent to:
21
22
23 (void) fseek(stream, 0L, SEEK_SET)
24
25 except that rewind() shall also clear the error indicator.
26
27 Since rewind() does not return a value, an application wishing to
28 detect errors should clear errno, then call rewind(), and if errno is
29 non-zero, assume an error has occurred.
30
32 The rewind() function shall not return a value.
33
35 Refer to fseek() with the exception of [EINVAL] which does not apply.
36
37 The following sections are informative.
38
40 None.
41
43 None.
44
46 None.
47
49 None.
50
52 fseek() , the Base Definitions volume of IEEE Std 1003.1-2001,
53 <stdio.h>
54
56 Portions of this text are reprinted and reproduced in electronic form
57 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
58 -- Portable Operating System Interface (POSIX), The Open Group Base
59 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
60 Electrical and Electronics Engineers, Inc and The Open Group. In the
61 event of any discrepancy between this version and the original IEEE and
62 The Open Group Standard, the original IEEE and The Open Group Standard
63 is the referee document. The original Standard can be obtained online
64 at http://www.opengroup.org/unix/online.html .
65
66
67
68IEEE/The Open Group 2003 REWIND(P)