4 unsigned long fileSize (char *filename){
7 fpText = fopen(filename,"rb");
13 ////fprintf(stderr,"fileSize = %ld",fsize);
18 /*copies from infile to outfile */
19 void copyFile (char *infile, char *outfile){
23 if ( (in = fopen(infile,"rb")) <0) {
24 printf("Cannot open file %s\n", infile); exit(0);
28 if( (out = fopen(outfile, "w")) < 0) {
29 printf("Cannot open file %s\n", outfile);
33 fsize=fileSize(infile);
35 char *buff = (char *) malloc(sizeof(char)*fsize);
36 if (fread(buff,sizeof(char),fsize,in)) {
37 fwrite(buff,sizeof(char),fsize,out);