Annotation of researchv10no/cmd/man/man.c, revision 1.1.1.1

1.1       root        1: #include <sys/types.h>
                      2: #include <sys/stat.h>
                      3: #include <time.h>
                      4: struct stat buf;
                      5: struct tm *tm;
                      6: struct tm *localtime();
                      7: 
                      8: main(argc,argv)
                      9: char **argv;
                     10: {
                     11:        if(argc<=1)
                     12:                return(0);
                     13:        if(stat(argv[1],&buf)==-1)
                     14:                return(0);
                     15:        tm = localtime(&buf.st_mtime);
                     16:        printf("-rd%d -rm%d -ry%d\n",
                     17:                tm->tm_mday,tm->tm_mon,tm->tm_year);
                     18:        return(0);
                     19: }

unix.superglobalmegacorp.com

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