2 * FILE: $Header: /home/egg/src/RCS/examine.c,v 1.1 1998/07/21 11:39:04 ghn Exp $
3 * PURPOSE: Testing data retrieval from database
7 * REVISED: $Log: examine.c,v $
8 * REVISED: Revision 1.1 1998/07/21 11:39:04 ghn
9 * REVISED: Initial revision
11 * Copyright 1998 - Greg Nelson
12 * Redistributable under the terms of the GNU Public Licence (GPL)
20 EggEntry eggtable[MAX_EGGS];
22 int main(int argc, char *argv[]) {
29 if (argc != 1 && argc != 2) {
30 printf("Usage: %s [infile]\n", pgmname);
36 if (argc == 1) fp = stdin;
37 else fp = fopen(argv[1], "r");
41 i = LoadPacket(fp, &pktbuf);
43 printf("Total trials: %d\n", trials);
47 printf("Packet of %d records read\n", pktbuf.hdr.numrec);
48 for (j = 0; j < pktbuf.hdr.numrec; j++) {
49 printf("Record: %d points\n %ld: ",
51 pktbuf.records[j].timestamp);
52 for (k = 0; k < pktbuf.hdr.samp_rec; k++) {
53 printf("%3d ", pktbuf.records[j].trials[k]);