Bumped revision and date; removed unnecessary check for NULL.
[AROS.git] / compiler / stdc / remove.c
blobdfb64d55d96921f1bce0c83fd949be13d984610f
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function remove().
6 */
8 #include <proto/dos.h>
9 #include <errno.h>
11 /*****************************************************************************
13 NAME */
14 #include <stdio.h>
16 int remove (
18 /* SYNOPSIS */
19 const char * pathname)
21 /* FUNCTION
22 Deletes a file or directory.
24 INPUTS
25 pathname - Complete path to the file or directory.
27 RESULT
28 0 on success and -1 on error. In case of an error, errno is set.
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
38 INTERNALS
40 ******************************************************************************/
42 if (!DeleteFile (pathname))
44 errno = __stdc_ioerr2errno (IoErr());
45 return -1;
48 return 0;
49 } /* remove */