
------------------------------------------------------------------------------
6.36 Rewind the current file pointer to the top of file. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
rewind
[Syntax]
#include <stdio.h>
void rewind( FILE *stream ) ;
[Arguments]
stream Pointer to a FILE structure.
[Return]
------
[Description]
Rewind a file pointer linked to the stream to the beginning of file.
"rewind" function clears an error indicator of the stream, but
"fseek" doesn't. "rewind" is equivalent to the following "fseek"
except above.
(void) fseek ( *stream, 0L, SEEK_SET ) ;
Both "rewind" and "fseek" functions clear the end of file indicator.
"fseek" function returns a value whether a pointer movement has been
done successfully or not, but "rewind" doesn't. It is possible to
clear the keyboard buffer by calling "rewind" function to the
standard input stream (stdin) linked to the keyboard by default.