/* strip1_c

*/

#include <stdio_h>

main() {
   char c, file1[30], file2[30];

   int
         fd1,
         fd2;

   printf("Enter Input File Name : \n");
   gets(file1);

   printf("Enter Output File Name: \n");
   gets(file2);

   fd1 = fopen(file1,"r");
   if (fd1 == NULL)  {
      printf("Did not open file: %s",file1);
      abort(1);
   }

   fd2 = fopen(file2,"w");
   if (fd2 == NULL) {
      printf("Did not open file: %s",file2);
      abort(1);
   }

   while (( c = getc(fd1)) != EOF) {
      if ( c >= 32 && c <= 126 )
         { putc(c,fd2); }
      if ( c == 10 || c ==13 )
         { c = 10; putc(c,fd2); }
   }
   fclose(fd1);
   fclose(fd2);

}

