home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name qysettim -- Set the system time
- *
- * Synopsis ercode = qysettim(hours,mins,secs,hunds);
- *
- * int ercode 1 if the time is invalid, 0 otherwise
- * int hours The hour (0 - 23) to set
- * int mins The minutes (0 - 59) to set
- * int secs The seconds (0 - 59) to set
- * int hunds The hundredths of seconds to set.
- *
- * Description QYSETTIM sets the system time to the values specified.
- * If the format is invalid, the error code is returned
- * with a value of 1; otherwise zero. Note that only the
- * ranges listed above are checked.
- *
- * Returns ercode 1 if the time is invalid, 0 otherwise
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bquery.h>
-
- int qysettim(hours,mins,secs,hunds)
- int hours,mins,secs,hunds;
- {
- DOSREG dos_reg;
-
- dos_reg.ax = 0x2d00;
- dos_reg.cx = utbyword(hours,mins);
- dos_reg.dx = utbyword(secs,hunds);
- dos(&dos_reg);
-
- if (utlobyte(dos_reg.ax))
- return(1);
-
- return(0);
- }