home *** CD-ROM | disk | FTP | other *** search
- /*****
- unpacktime()
-
- This function collapses the time into an unsigned integer by using
- the DOS disk format with bits: 0x00 - 0x04 = day, 0x05 - 0x08 = month,
- 0x09 - 0x0f = year. The year is formed relative to 1980 and can only
- be used for dates after 12/31/79.
-
- Argument list: int *sec the day
- int *min the month
- int *hour the hour
- int num the packed number
-
- Return value: void
-
- *****/
-
- void unpacktime(int *sec, int *min, int *hour, int num)
- {
- *sec = (num & 0x1f) * 2;
- *min = (num & 0x7e0) >> 0x05;
- *hour = (num & 0xf800) >> 0x0b;
- }
-