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: }

Defined functions

main defined in line 4; never used

Defined variables

buffer defined in line 3; used 2 times
module defined in line 2; used 1 times
  • in line 9

Defined macros

BLKSIZE defined in line 1; used 2 times
  • in line 3, 21
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 586
Valid CSS Valid XHTML 1.0 Strict