Listtree.mcc: simplify the drag & drop handling by making the listtree object the...
[AROS.git] / compiler / stdc / fsetpos.c
blob4ce45bdccc34dbbfc69a599b11d1914276886abe
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function fsetpos()
6 */
7 #include <errno.h>
9 /*****************************************************************************
11 NAME */
12 #include <stdio.h>
14 int fsetpos (
16 /* SYNOPSIS */
17 FILE * stream,
18 const fpos_t * pos)
20 /* FUNCTION
21 Change the current position in a stream. This function is eqivalent
22 to fseek() with whence set to SEEK_SET. However, on some systems
23 fpos_t may be a complex structure, so this routine may be the only
24 way to portably reposition a stream.
26 INPUTS
27 stream - Modify this stream
28 pos - The new position in the stream.
30 RESULT
31 0 on success and -1 on error. If an error occurred, the global
32 variable errno is set.
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
41 fgetpos()
43 INTERNALS
45 ******************************************************************************/
47 if ( pos == NULL )
49 errno = EINVAL;
50 return -1;
53 return fseek (stream, *pos, SEEK_SET);
54 } /* fsetpos */