/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

int main(int argc,char *argv[])
{
   int c;
   FILE *fp1,*fp2;
   fp1 = fopen("tst.txt", "r", "rfm=var", "ctx=stm");
   fp2 = fopen("tst2.txt", "w", "rfm=var", "ctx=stm");
   while((c = fgetc(fp1)) != -1)
   {
      fputc(c, fp2);
   }
   fclose(fp1);
   fclose(fp2);
   return 0;
}

