#include #include #include FILE * OpenFile(char * filename, char * mode) { /* Generic Open File function with error checking */ FILE *fp; if ((fp=fopen(filename,mode))==NULL) { printf("Cannot open file %s\n",filename); exit(1); } return fp; } int main (int argc, char *argv[]) { /* If Initial Filter Coefficient flag (-f) is set, filter coeffs. */ /* are preset to LAST values of filter file. This file will be */ /* overwritten during excution of code. */ FILE *fpin, *fpout; int i=0; short int hd_data=0; fpin = OpenFile (argv[1], "rb"); fpout = OpenFile (argv[2], "wb"); fseek (fpin, -2*atol(argv[3]), SEEK_END); while(i