1 /* fsetpos( FILE *, const fpos_t * )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
10 #include <_PDCLIB_glue.h>
12 int fsetpos( struct _PDCLIB_file_t * stream, const struct _PDCLIB_fpos_t * pos )
14 if ( stream->status & _PDCLIB_FWRITE )
16 if ( _PDCLIB_flushbuffer( stream ) == EOF )
21 if ( _PDCLIB_seek( stream, pos->offset, SEEK_SET ) == EOF )
25 stream->pos.status = pos->status;
26 /* TODO: Add mbstate. */
33 #include <_PDCLIB_test.h>
37 /* fsetpos() tested together with fsetpos(). */