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.
11 #include "_PDCLIB_glue.h"
13 int fsetpos( struct _PDCLIB_file_t * stream, const struct _PDCLIB_fpos_t * pos )
15 if ( stream->status & _PDCLIB_FWRITE )
17 if ( _PDCLIB_flushbuffer( stream ) == EOF )
22 if ( _PDCLIB_seek( stream, pos->offset, SEEK_SET ) == EOF )
26 stream->pos.status = pos->status;
27 /* TODO: Add mbstate. */
35 #include "_PDCLIB_test.h"
39 /* fsetpos() tested together with fsetpos(). */