
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <stdio.h>
void rewind( FILE *fp );
Description:
The rewind function sets the file position indicator for the stream
indicated to by fp to the beginning of the file. It is equivalent to
fseek( fp, 0L, SEEK_SET );
except that the error indicator for the stream is cleared.
Returns:
The rewind function returns no value.
Example:
#include <stdio.h>
static assemble_pass( int passno )
{
printf( "Pass %d\n", passno );
}
void main()
{
FILE *fp;
if( (fp = fopen( "program.asm", "r")) != NULL ) {
assemble_pass( 1 );
rewind( fp );
assemble_pass( 2 );
fclose( fp );
}
}
Classification:
ANSI
Systems:
All, Netware
See Also:
fopen, clearerr
See Also: clearerr
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson