Removed the space between function names and the opening parenthesis.
[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 <h/mh.h>
10
11 void
12 cpydata(int in, int out, char *ifile, char *ofile)
13 {
14         int i;
15         char buffer[BUFSIZ];
16
17         while ((i = read(in, buffer, sizeof(buffer))) > 0) {
18                 if (write(out, buffer, i) != i)
19                         adios(ofile, "error writing");
20         }
21
22         if (i == -1)
23                 adios(ifile, "error reading");
24 }