xref: /csrg-svn/usr.bin/pascal/pxp/version.c (revision 62193)
148112Sbostic /*-
2*62193Sbostic  * Copyright (c) 1980, 1993
3*62193Sbostic  *	The Regents of the University of California.  All rights reserved.
448112Sbostic  *
548112Sbostic  * %sccs.include.redist.c%
622242Sdist  */
77744Speter 
822242Sdist #ifndef lint
9*62193Sbostic static char copyright[] =
10*62193Sbostic "@(#) Copyright (c) 1980, 1993\n\
11*62193Sbostic 	The Regents of the University of California.  All rights reserved.\n";
1248112Sbostic #endif /* not lint */
1322242Sdist 
1422242Sdist #ifndef lint
15*62193Sbostic static char sccsid[] = "@(#)version.c	8.1 (Berkeley) 06/06/93";
1648112Sbostic #endif /* not lint */
1722242Sdist 
1816275Speter #include <sys/time.h>
197744Speter #include <stdio.h>
207744Speter 
217744Speter extern char	version[];
227744Speter 
main()237744Speter main()
247744Speter {
257744Speter     long	time();
267744Speter     long	clock;
277744Speter     struct tm	*localtime();
287744Speter     struct tm	*tmp;
297744Speter     int		major;
307744Speter     int		minor;
317744Speter 
327744Speter     time(&clock);
337744Speter     tmp = localtime(&clock);
347744Speter     sscanf(version, "%d.%d", &major, &minor);
357744Speter     minor += 1;
367744Speter     printf("char	version[] = \"%d.%d (%d/%d/%d)\";\n",
377744Speter 	    major, minor, tmp->tm_mon+1, tmp->tm_mday, tmp->tm_year);
3844351Sbostic     exit(0);
397744Speter }
40