Annotation of 42BSD/ucb/dbx/mkdate.c, revision 1.1

1.1     ! root        1: /* Copyright (c) 1982 Regents of the University of California */
        !             2: 
        !             3: static char sccsid[] = "@(#)mkdate.c 1.2 7/3/83";
        !             4: 
        !             5: #include <stdio.h>
        !             6: #include <sys/time.h>
        !             7: 
        !             8: main()
        !             9: {
        !            10:     struct tm *t;
        !            11:     long clock;
        !            12:     char name[100];
        !            13:     int namelen;
        !            14: 
        !            15:     printf("char *date = \"");
        !            16:     clock = time(0);
        !            17:     t = localtime(&clock);
        !            18:     printf("%d/%d/%d ", t->tm_mon + 1, t->tm_mday, t->tm_year % 100);
        !            19:     printf("%d:%02d", t->tm_hour, t->tm_min);
        !            20:     gethostname(name, &namelen);
        !            21:     printf(" (%s)", name);
        !            22:     printf("\";\n");
        !            23: }

unix.superglobalmegacorp.com

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