home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / c / delete.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  510 b   |  30 lines

  1. #include <exec/memory.h>
  2. #include <exec/execbase.h>
  3. #include <clib/exec_protos.h>
  4. #include <dos/dos.h>
  5. #include <clib/dos_protos.h>
  6. #include <utility/tagitem.h>
  7.  
  8. int main (int argc, char ** argv)
  9. {
  10.     STRPTR args[1]={ 0 };
  11.     struct RDArgs *rda;
  12.     LONG error=0;
  13.  
  14.     rda=ReadArgs("FILE/A",(IPTR *)args,NULL);
  15.  
  16.     if(rda!=NULL)
  17.     {
  18.     if (!DeleteFile(args[0]))
  19.         error = RETURN_ERROR;
  20.  
  21.     FreeArgs(rda);
  22.     }
  23.     else
  24.     error=RETURN_FAIL;
  25.  
  26.     if(error)
  27.     PrintFault(IoErr(),"Delete");
  28.     return error;
  29. }
  30.