rewind
Sets the file position indicator to the beginning of the file
#include <stdio.h>
void rewind (
FILE *fp);
The rewind function sets the file position indicator for the stream indicated 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.
#include <stdio.h> FILE *fp; if ( (fp = fopen ("program.asm", "r") ) != NULL) { assemble_pass ( 1 ); rewind (fp); assemble_pass ( 2 ); fclose (fp); }