File:  [CSRG BSD Unix] / 43BSD / contrib / notes / utility / seq-cvt / seqtoascii.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#include "../../src/parms.h"
#include "../../src/structs.h"

main (argc, argv)
int     argc;
char  **argv;
{
    int     i,
            j,
            k;
    char   *p,
           *q,
           *r;
    FILE * fp;
    struct seq_f    buf;

    i = open (argv[1], 0);

    while (read (i, &buf, sizeof buf) == sizeof buf)
    {
#ifdef	DEBUG
	/*
	 * normally we don't print the gmttime field...
	 * the seqtobinary program doesn't expect to see it...
	 *
	 * You are welcome to use it if you want...
	 */
	printf ("%-20s: %d:%d %d/%d/%d (%ld)\n", buf.nfname,
		buf.lastin.w_hours, buf.lastin.w_mins,
		buf.lastin.w_day, buf.lastin.w_month, buf.lastin.w_year,
		buf.lastin.w_gmttime);
#else
	printf ("%-20s: %d:%d %d/%d/%d\n", buf.nfname,
		buf.lastin.w_hours, buf.lastin.w_mins,
		buf.lastin.w_day, buf.lastin.w_month, buf.lastin.w_year);
#endif
    }

}

unix.superglobalmegacorp.com

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