#include "stdio.h" #include "flatfile.h" /* ----------------------------------------------------------------------- function - get_time this function simply returns the time cooresponding to 'row'. This was not available in the original flatfile series of code, but it is a valuable add on. -------------------------------------------------------------------------- */ double get_time(int unit, long row) { double t; FILE *fp; fp = ff_pointer[unit]; if (fp == NULL) { printf("File is not opened, can not find time requested.\n"); t = 0.0; } else { fseek(fp, row*((long) ff_c_tot[unit]), SEEK_SET); fread(&t, sizeof(t), 1, fp); } return t; }