mlib update: new isnan()/isnanf() implementation
[tangerine.git] / compiler / clib / rename.c
blob71afc1b8261f017e8ddc3af73f77efbb1b316e1d
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function rename().
6 */
8 #include <proto/dos.h>
9 #include "__errno.h"
11 /*****************************************************************************
13 NAME */
14 #include <stdio.h>
16 int rename (
18 /* SYNOPSIS */
19 const char * oldpath,
20 const char * newpath)
22 /* FUNCTION
23 Renames a file or directory.
25 INPUTS
26 oldpath - Complete path to existing file or directory.
27 newpath - Complete path to the new file or directory.
29 RESULT
30 0 on success and -1 on error. In case of an error, errno is set.
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 ******************************************************************************/
44 if (!Rename ((STRPTR)oldpath,(STRPTR)newpath))
46 errno = IoErr2errno (IoErr());
47 return -1;
50 return 0;
52 } /* rename */