Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<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.

See Also:
    fopen, clearerr

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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson