1REWIND(3P)                 POSIX Programmer's Manual                REWIND(3P)
2
3
4

PROLOG

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
11

NAME

13       rewind — reset the file position indicator in a stream
14

SYNOPSIS

16       #include <stdio.h>
17
18       void rewind(FILE *stream);
19

DESCRIPTION

21       The functionality described on this reference page is aligned with  the
22       ISO C  standard.  Any  conflict between the requirements described here
23       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
24       defers to the ISO C standard.
25
26       The call:
27
28           rewind(stream)
29
30       shall be equivalent to:
31
32           (void) fseek(stream, 0L, SEEK_SET)
33
34       except that rewind() shall also clear the error indicator.
35
36       Since  rewind()  does  not  return  a  value, an application wishing to
37       detect errors should clear errno, then call rewind(), and if  errno  is
38       non-zero, assume an error has occurred.
39

RETURN VALUE

41       The rewind() function shall not return a value.
42

ERRORS

44       Refer to fseek() with the exception of [EINVAL] which does not apply.
45
46       The following sections are informative.
47

EXAMPLES

49       None.
50

APPLICATION USAGE

52       None.
53

RATIONALE

55       None.
56

FUTURE DIRECTIONS

58       None.
59

SEE ALSO

61       Section 2.5, Standard I/O Streams, fseek()
62
63       The Base Definitions volume of POSIX.1‐2008, <stdio.h>
64
66       Portions  of  this text are reprinted and reproduced in electronic form
67       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
68       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
69       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
70       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
71       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
72       event of any discrepancy between this version and the original IEEE and
73       The Open Group Standard, the original IEEE and The Open Group  Standard
74       is  the  referee document. The original Standard can be obtained online
75       at http://www.unix.org/online.html .
76
77       Any typographical or formatting errors that appear  in  this  page  are
78       most likely to have been introduced during the conversion of the source
79       files to man page format. To report such errors,  see  https://www.ker
80       nel.org/doc/man-pages/reporting_bugs.html .
81
82
83
84IEEE/The Open Group                  2013                           REWIND(3P)
Impressum