home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / libnix-0.8-src.lha / libnix-0.8 / sources / nix / stdio / remove.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  394 b   |  24 lines

  1. #include <stdio.h>
  2. #include <errno.h>
  3. #include <dos/dos.h>
  4. #ifdef __GNUC__
  5. #include <inline/dos.h>
  6. #endif
  7.  
  8. extern void __seterrno(void);
  9. extern char *__amigapath(const char *path);
  10.  
  11. int remove(const char *filename)
  12. #ifdef IXPATHS
  13.   if((filename=__amigapath(filename))==NULL)
  14.     return -1;
  15. #endif
  16.  
  17.   if(DeleteFile((char *)filename))
  18.     return 0;
  19.   else
  20.   { __seterrno();
  21.     return -1; }
  22. }
  23.