home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name fldelete -- Delete a file
- *
- * Synopsis ercode = fldelete(pfile);
- *
- * int ercode DOS function return error code
- * char *pfile Full path name of file to delete
- *
- * Description This function deletes the file specified in the path
- * name.
- *
- * Read-only files cannot be deleted until their attribute
- * is changed (use FLRETATR and FLSETATR). Directories
- * cannot be deleted with FLDELETE (use DRRMDIR).
- *
- * Returns ercode DOS function return error code
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bfile.h>
-
- int fldelete(pfile)
- char *pfile;
- {
- DOSREG dos_reg;
- ADS file_ads;
-
- dos_reg.ax = 0x4100; /* DOS function 0x41 */
- utabsptr(pfile,&file_ads);
- dos_reg.ds = file_ads.s;
- dos_reg.dx = file_ads.r;
-
- return(dos(&dos_reg));
- }