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