3 /* remove( const char * )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
9 /* This is an example implementation of remove() fit for use with POSIX kernels.
18 extern struct _PDCLIB_file_t * _PDCLIB_filelist;
20 extern int unlink( const char * pathname );
22 int remove( const char * pathname )
24 struct _PDCLIB_file_t * current = _PDCLIB_filelist;
25 while ( current != NULL )
27 if ( ( current->filename != NULL ) && ( strcmp( current->filename, pathname ) == 0 ) )
31 current = current->next;
33 return unlink( pathname );
39 #include <_PDCLIB_test.h>
43 /* Testing covered by ftell.c (and several others) */