Annotation of 43BSD/contrib/notes/utility/seq-cvt/seqtoascii.c, revision 1.1

1.1     ! root        1: #include "../../src/parms.h"
        !             2: #include "../../src/structs.h"
        !             3: 
        !             4: main (argc, argv)
        !             5: int     argc;
        !             6: char  **argv;
        !             7: {
        !             8:     int     i,
        !             9:             j,
        !            10:             k;
        !            11:     char   *p,
        !            12:            *q,
        !            13:            *r;
        !            14:     FILE * fp;
        !            15:     struct seq_f    buf;
        !            16: 
        !            17:     i = open (argv[1], 0);
        !            18: 
        !            19:     while (read (i, &buf, sizeof buf) == sizeof buf)
        !            20:     {
        !            21: #ifdef DEBUG
        !            22:        /*
        !            23:         * normally we don't print the gmttime field...
        !            24:         * the seqtobinary program doesn't expect to see it...
        !            25:         *
        !            26:         * You are welcome to use it if you want...
        !            27:         */
        !            28:        printf ("%-20s: %d:%d %d/%d/%d (%ld)\n", buf.nfname,
        !            29:                buf.lastin.w_hours, buf.lastin.w_mins,
        !            30:                buf.lastin.w_day, buf.lastin.w_month, buf.lastin.w_year,
        !            31:                buf.lastin.w_gmttime);
        !            32: #else
        !            33:        printf ("%-20s: %d:%d %d/%d/%d\n", buf.nfname,
        !            34:                buf.lastin.w_hours, buf.lastin.w_mins,
        !            35:                buf.lastin.w_day, buf.lastin.w_month, buf.lastin.w_year);
        !            36: #endif
        !            37:     }
        !            38: 
        !            39: }

unix.superglobalmegacorp.com

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