xref: /original-bsd/usr.bin/pascal/pxp/version.c (revision 93ab02a6)
1 /*-
2  * Copyright (c) 1980 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 char copyright[] =
10 "@(#) Copyright (c) 1980 The Regents of the University of California.\n\
11  All rights reserved.\n";
12 #endif /* not lint */
13 
14 #ifndef lint
15 static char sccsid[] = "@(#)version.c	5.3 (Berkeley) 04/16/91";
16 #endif /* not lint */
17 
18 #include <sys/time.h>
19 #include <stdio.h>
20 
21 extern char	version[];
22 
23 main()
24 {
25     long	time();
26     long	clock;
27     struct tm	*localtime();
28     struct tm	*tmp;
29     int		major;
30     int		minor;
31 
32     time(&clock);
33     tmp = localtime(&clock);
34     sscanf(version, "%d.%d", &major, &minor);
35     minor += 1;
36     printf("char	version[] = \"%d.%d (%d/%d/%d)\";\n",
37 	    major, minor, tmp->tm_mon+1, tmp->tm_mday, tmp->tm_year);
38     exit(0);
39 }
40