Remove not used code (JLR define)
[mmh] / sbr / cpydata.c
1 /*
2 ** cpydata.c -- copy all data from one fd to another
3 **
4 ** This code is Copyright (c) 2002, by the authors of nmh.  See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
7 */
8
9 #include <sysexits.h>
10 #include <unistd.h>
11 #include <h/mh.h>
12
13 void
14 cpydata(int in, int out, char *ifile, char *ofile)
15 {
16         int i;
17         char buffer[BUFSIZ];
18
19         while ((i = read(in, buffer, sizeof(buffer))) > 0) {
20                 if (write(out, buffer, i) != i)
21                         adios(EX_IOERR, ofile, "error writing");
22         }
23
24         if (i == -1)
25                 adios(EX_IOERR, ifile, "error reading");
26 }