muimaster.library: support Listview_List in List
[AROS.git] / compiler / posixc / fsetpos.c
blobddcf666c1ee81792ccdf77c11488e3c70d677a58
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 Change the position in a stream.
6 */
8 #include <errno.h>
10 /*****************************************************************************
12 NAME */
13 #include <stdio.h>
15 int fsetpos (
17 /* SYNOPSIS */
18 FILE * stream,
19 const fpos_t * pos)
21 /* FUNCTION
22 Change the current position in a stream. This function is eqivalent
23 to fseek() with whence set to SEEK_SET. However, on some systems
24 fpos_t may be a complex structure, so this routine may be the only
25 way to portably reposition a stream.
27 INPUTS
28 stream - Modify this stream
29 pos - The new position in the stream.
31 RESULT
32 0 on success and -1 on error. If an error occurred, the global
33 variable errno is set.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
42 fgetpos()
44 INTERNALS
46 ******************************************************************************/
48 int retval;
50 if ( pos == NULL )
52 errno = EINVAL;
53 return -1;
56 retval = fseek (stream, *pos, SEEK_SET);
58 return retval;
59 } /* fsetpos */