2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
14 "january", "february", "march", "april",
15 "may", "june", "july", "august",
16 "september", "october", "november", "december",
23 long tim
, now
, ghours(), secs
;
24 int day
, month
, year
, *nowp
;
29 nowp
= localtime(&now
);
33 return(now
+ ghours());
38 if(*tim_ptr
>= 'A' && *tim_ptr
<= 'z') {
40 if((month
= swmtch(monp
, &gd_months
)) < 0) {
41 printf("Month \"%s\" Nonexistant.\n", monp
);
53 if(*tim_ptr
== ' ' || *tim_ptr
== '@') {
57 secs
= nowp
[0]+ nowp
[1]*60l + nowp
[2]*3600l;
59 if(year
<1900) year
=+ 1900;
60 for(i
= 1970; i
< year
; i
++)
62 if(dysize(year
) == 366 && month
>= 3)
70 nowp
= localtime(&tim
);
77 secs
=- nowp
[0] + nowp
[1]*60l + nowp
[2]*3600l;
78 if(secs
< 0 && no_add
== 0)
79 secs
=+ 24 * 60l * 60l;
93 if(tim_ptr
- cp
== 4 && *tim_ptr
!= ':') {
100 if(*tim_ptr
== ':') {
106 if(*tim_ptr
== 'p') {
110 return(h
*3600l + m
*60l + s
);
120 while(c
>= '0' && c
<= '9') {
131 register char *c2
, c
;
134 while(((c
= *tim_ptr
) >= 'a' && c
<= 'z') ||
135 (c
>= 'A' && c
<= 'Z')) {