#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

void test_file(char *fname);

int main(int argc, char *argv[])
{
	time_t t;
	int i;	
	t = time(NULL);
	for (i=1; i<argc; i++) {
		printf("Processing %s\n",argv[i]);	
		test_file(argv[i]);
	}
	printf("Elapsed time %d seconds\n",time(NULL)-t);
    return 0;
}
void test_file(char *fname)
{
 	FILE *f;
	int i;
	char bf[10000];
	f = fopen(fname,"r");
 	if (f==NULL) return;

	for (i=0; i<100; i++) {
 		fseek(f,i*50000,SEEK_SET);
		fread(bf,1,4000,f);
	}
}
