1: #define BLKSIZE 1024 2: char module[] = "bcopy"; /* module name -- used by trap */ 3: char buffer[BLKSIZE]; 4: main() 5: { 6: int c, o, i; 7: char buf[50]; 8: 9: printf("%s\n",module); 10: do { 11: printf("Infile: "); 12: gets(buf); 13: i = open(buf, 0); 14: } while (i <= 0); 15: do { 16: printf("Outfile: "); 17: gets(buf); 18: o = open(buf, 1); 19: } while (i <= 0); 20: 21: while ((c = read(i, buffer, BLKSIZE)) > 0) 22: write(o,buffer, c); 23: exit(0); 24: }