home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / smallc21 / smc21lib.lbr / UNLINK.C < prev    next >
Encoding:
C/C++ Source or Header  |  1985-04-01  |  512 b   |  26 lines

  1.  
  2. #define NOCCARGC
  3. #include stdio.h
  4. #include clib.def
  5. /*
  6. ** Unlink (delete) the named file.
  7. ** Entry: fn = Null-terminated CP/M file name.
  8. **             May be prefixed by letter of drive.
  9. ** Returns NULL if successful, else ERR.
  10. */
  11. unlink(fn) char *fn; {
  12.   char fcb[FCBSIZE];
  13.   pad(fcb, NULL, FCBSIZE);
  14.   if(_newfcb(fn, fcb) && _bdos(DELFIL, fcb) != 255)
  15.     return (NULL);
  16.   return (ERR);
  17.   }
  18. #asm
  19. delete    equ unlink
  20.           entry delete
  21. #endasm
  22.  
  23.  
  24.  
  25.   /**** 0 to 9 ****/
  26.     065,06