xref: /original-bsd/usr.bin/pascal/libpc/DATE.c (revision 0b685140)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)DATE.c 1.1 10/30/80";
4 
5 char	_pd_date[] = {
6 	8, 9, 10, 4, 5, 6, 10, 22, 23, 10, 0
7 };
8 
9 extern char *ctime();
10 
11 DATE(alfap)
12 
13 	register char *alfap;
14 {
15 	register char *ap, *cp, *dp;
16 	long a;
17 
18 	time(&a);
19 	cp = ctime(&a);
20 	ap = alfap;
21 	for (dp = _pd_date; *dp; *ap++ = cp[*dp++]);
22 }
23