Annotation of 42BSD/ucb/pascal/pxp/version.c, revision 1.1.1.1

1.1       root        1: static char *sccsid = "@(#)version.c   1.1 (Berkeley) 82/08/13";
                      2: 
                      3: #include <time.h>
                      4: #include <stdio.h>
                      5: 
                      6: extern char    version[];
                      7: 
                      8: main()
                      9: {
                     10:     long       time();
                     11:     long       clock;
                     12:     struct tm  *localtime();
                     13:     struct tm  *tmp;
                     14:     int                major;
                     15:     int                minor;
                     16: 
                     17:     time(&clock);
                     18:     tmp = localtime(&clock);
                     19:     sscanf(version, "%d.%d", &major, &minor);
                     20:     minor += 1;
                     21:     printf("char       version[] = \"%d.%d (%d/%d/%d)\";\n",
                     22:            major, minor, tmp->tm_mon+1, tmp->tm_mday, tmp->tm_year);
                     23: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.