X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fcpydata.c;h=c74b2ae85886c5e8a9c7d4e85c12e7a899c1d627;hb=337338b404931f06f0db2119c9e145e8ca5a9860;hp=a8c33758890431cd224e507b1d2c8d2f3fa42765;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/sbr/cpydata.c b/sbr/cpydata.c index a8c3375..c74b2ae 100644 --- a/sbr/cpydata.c +++ b/sbr/cpydata.c @@ -1,8 +1,9 @@ - /* * cpydata.c -- copy all data from one fd to another * - * $Id$ + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include @@ -10,14 +11,14 @@ void cpydata (int in, int out, char *ifile, char *ofile) { - int i; - char buffer[BUFSIZ]; + int i; + char buffer[BUFSIZ]; - while ((i = read(in, buffer, sizeof(buffer))) > 0) { - if (write(out, buffer, i) != i) - adios(ofile, "error writing"); - } + while ((i = read(in, buffer, sizeof(buffer))) > 0) { + if (write(out, buffer, i) != i) + adios(ofile, "error writing"); + } - if (i == -1) - adios(ifile, "error reading"); + if (i == -1) + adios(ifile, "error reading"); }