3 * manipulate date types
5 * $Header: date.c 1.4 92/12/07 $
7 * Revision 1.4 92/12/07 17:17:47 duplain
10 * Revision 1.3 92/11/06 12:43:06 duplain
11 * Removed check for "time-stamped header" in makedate().
13 * Revision 1.2 92/10/06 12:12:10 duplain
16 * Revision 1.1 92/09/29 18:02:17 duplain
24 static char *monthnames
[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
25 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
29 * Build date structure from load and exec fields
32 makedate(Header
*header
)
35 register Halfword arcdate
= header
->date
;
36 register Halfword arctime
= header
->time
;
38 date
.second
= (arctime
& 0x1f) * 2;
39 date
.minute
= (arctime
>> 5) & 0x3f;
40 date
.hour
= (arctime
>> 11) & 0x1f;
41 date
.day
= arcdate
& 0x1f;
42 date
.month
= (arcdate
>> 5) & 0x0f;
43 date
.year
= ((arcdate
>> 9) & 0x7f) + 80;
50 if (month
> 0 && month
< 13)
51 return (monthnames
[month
- 1]);