home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name drsetstp -- Set date/time stamp of open file
- *
- * Synopsis ercode = drsetstp(handle,fdate,ftime);
- *
- * int ercode DOS function error code
- * int handle File handle of open file
- * unsigned fdate Date to set
- * unsigned ftime Time to set
- *
- * Description This function sets the date and time stamp of the file
- * associated with the specified handle.
- *
- * The date and time are represented as 16-bit quantities
- * in the following format:
- *
- * ********** bits ***********
- * 1 1 1 1 1 1
- * 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
- *
- * y y y y y y y m m m m d d d d d = fdate
- *
- * h h h h h m m m m m m s s s s s = ftime
- *
- * where the year bits represent 0 - 119 (1980 to 2099) and
- * the second bits represent two-second increments. This
- * is the same format used by DRRETSTP, DRSFIRST, and
- * DRSNEXT.
- *
- * No checking is done to ensure that the words are in the
- * right format; it is the programmer's responsibility to
- * guarantee that the format is proper.
- *
- * Use DRDT2STP and DRTM2STP to create date and time
- * stamps.
- *
- * Returns ercode DOS function return code
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bdirect.h>
- #include <butility.h>
-
- int drsetstp(handle,fdate,ftime)
- int handle;
- unsigned fdate,ftime;
- {
- DOSREG dos_reg;
-
- dos_reg.ax = 0x5701; /* DOS function 0x57, set stamp */
- dos_reg.bx = handle;
- dos_reg.cx = ftime;
- dos_reg.dx = fdate;
-
- return(dos(&dos_reg));
- }