diff options
Diffstat (limited to 'newlib/libc/stdio/remove.c')
-rw-r--r-- | newlib/libc/stdio/remove.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/newlib/libc/stdio/remove.c b/newlib/libc/stdio/remove.c index b24ce713f..e026ce567 100644 --- a/newlib/libc/stdio/remove.c +++ b/newlib/libc/stdio/remove.c @@ -1,4 +1,21 @@ /* + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* FUNCTION <<remove>>---delete a file's name @@ -9,7 +26,7 @@ ANSI_SYNOPSIS #include <stdio.h> int remove(char *<[filename]>); - int _remove_r(void *<[reent]>, char *<[filename]>); + int _remove_r(struct _reent *<[reent]>, char *<[filename]>); TRAD_SYNOPSIS #include <stdio.h> @@ -17,7 +34,7 @@ TRAD_SYNOPSIS char *<[filename]>; int _remove_r(<[reent]>, <[filename]>) - char *<[reent]>; + struct _reent *<[reent]>; char *<[filename]>; DESCRIPTION @@ -44,13 +61,14 @@ open file may vary among implementations. Supporting OS subroutine required: <<unlink>>. */ -#include <stdio.h> +#include <_ansi.h> #include <reent.h> +#include <stdio.h> int -_remove_r (ptr, filename) - struct _reent *ptr; - _CONST char *filename; +_DEFUN(_remove_r, (ptr, filename), + struct _reent *ptr _AND + _CONST char *filename) { if (_unlink_r (ptr, filename) == -1) return -1; @@ -61,8 +79,8 @@ _remove_r (ptr, filename) #ifndef _REENT_ONLY int -remove (filename) - _CONST char *filename; +_DEFUN(remove, (filename), + _CONST char *filename) { return _remove_r (_REENT, filename); } |