1 /*-
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8 #ifndef lint
9 static char copyright[] =
10 "@(#) Copyright (c) 1980, 1993\n\
11 The Regents of the University of California. All rights reserved.\n";
12 #endif /* not lint */
13
14 #ifndef lint
15 static char sccsid[] = "@(#)version.c 8.1 (Berkeley) 06/06/93";
16 #endif /* not lint */
17
18 #include <sys/time.h>
19 #include <stdio.h>
20
21 extern char version[];
22
main()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