home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name flsetatr -- Set file attributes
- *
- * Synopsis ercode = flsetatr(pfile,attrib);
- *
- * int ercode Returned DOS function error code
- * char *pfile File path name
- * int attrib File attribute
- *
- * Description This function sets the file attribute of the specified
- * file. See FLCREATE for the possible attributes. Note
- * that the attributes AT_VOLUME and AT_DIR may not be
- * changed.
- *
- * Returns ercode DOS 2.0 function return error code
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bfile.h>
-
- int flsetatr(pfile,attrib)
- char *pfile;
- int attrib;
- {
- DOSREG dos_reg;
- ADS file_ads;
-
- dos_reg.ax = 0x4301; /* Function 0x43, set attribute */
- dos_reg.cx = (unsigned)attrib;
- utabsptr(pfile,&file_ads);
- dos_reg.ds = file_ads.s;
- dos_reg.dx = file_ads.r;
-
- return(dos(&dos_reg));
- }