1 /* remove( const char * )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
7 /* This is an example implementation of remove() fit for use with POSIX kernels.
13 #include <_PDCLIB_io.h>
16 extern FILE * _PDCLIB_filelist;
18 extern int unlink( const char * pathname );
20 int remove( const char * pathname )
22 FILE * current = _PDCLIB_filelist;
23 while ( current != NULL )
25 if ( ( current->filename != NULL ) && ( strcmp( current->filename, pathname ) == 0 ) )
29 current = current->next;
31 return unlink( pathname );
37 #include <_PDCLIB_test.h>
41 /* Testing covered by ftell.c (and several others) */