1: /* cpydata.c - copy from one fd to another */
   2: 
   3: #include "../h/mh.h"
   4: #include <stdio.h>
   5: 
   6: 
   7: void cpydata (in, out, ifile, ofile)
   8: register int    in,
   9:                 out;
  10: register char  *ifile,
  11:                *ofile;
  12: {
  13:     register int    i;
  14:     char    buffer[BUFSIZ];
  15: 
  16:     while ((i = read (in, buffer, sizeof buffer)) > 0)
  17:     if (write (out, buffer, i) != i)
  18:         adios (ofile, "error writing");
  19: 
  20:     if (i == NOTOK)
  21:     adios (ifile, "error reading");
  22: }

Defined functions

cpydata defined in line 7; never used
Last modified: 1985-09-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 747
Valid CSS Valid XHTML 1.0 Strict