# 2.11BSD#431 - /usr/src/sys/pdpstand/OLD/bcopy.c

##### Functions

    main              X

##### Variables

    buffer            X
    module            X

##### Macros

    BLKSIZE           X

       1: /*
       2:  * Copyright (c) 1986 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)bcopy.c	1.1 (2.10BSD Berkeley) 7/25/87
       7:  */
       8:
       9: #define BLKSIZE 1024
      10: char module[] = "bcopy";        /* module name -- used by trap */
      11: char buffer[BLKSIZE];
      12: main()
      13: {
      14:     int c, o, i;
      15:     char buf[50];
      16:
      17:     printf("%s\n",module);
      18:     do {
      19:         printf("Infile: ");
      20:         gets(buf);
      21:         i = open(buf, 0);
      22:     } while (i <= 0);
      23:     do {
      24:         printf("Outfile: ");
      25:         gets(buf);
      26:         o = open(buf, 1);
      27:     } while (o <= 0);
      28:
      29:     if ((c = read(i, buffer, BLKSIZE)) > 0)
      30:         write(o, buffer, c > 512 ? 512 : c);
      31:     exit(0);
      32: }

#### Defined functions

main defined in line 12; never used

#### Defined variables

buffer defined in line 11; used 2 times

- in line 29-30(2)

module defined in line 10; used 1 times

- in line 17

#### Defined macros

BLKSIZE defined in line 9; used 2 times

- in line 11, 29

Last modified: 1987-07-26 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 740 |