X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fcpydgst.c;h=5e5ef87f2ea306bdad881a8c05843d5fb2ea144b;hp=b788fefbaa07ac1b8a94b285b0e96d7391e75bbf;hb=c29e62470a481bcd4d54760b0578ca4bc1201681;hpb=5b792c4424571f05bc2008e3109797d18d7d00d1 diff --git a/sbr/cpydgst.c b/sbr/cpydgst.c index b788fef..5e5ef87 100644 --- a/sbr/cpydgst.c +++ b/sbr/cpydgst.c @@ -7,6 +7,8 @@ ** complete copyright information. */ +#include +#include #include /* @@ -26,7 +28,7 @@ #define output(c) if (bp >= dp) {flush(); *bp++ = c;} else *bp++ = c #define flush() if ((j = bp - outbuf) && write(out, outbuf, j) != j) \ - adios(ofile, "error writing"); \ + adios(EX_IOERR, ofile, "error writing"); \ else \ bp = outbuf @@ -34,9 +36,9 @@ void cpydgst(int in, int out, char *ifile, char *ofile) { - register int i, j, state; - register char *cp, *ep; - register char *bp, *dp; + int i, j, state; + char *cp, *ep; + char *bp, *dp; char buffer[BUFSIZ], outbuf[BUFSIZ]; dp = (bp = outbuf) + sizeof outbuf; @@ -61,6 +63,6 @@ cpydgst(int in, int out, char *ifile, char *ofile) } if (i == -1) - adios(ifile, "error reading"); + adios(EX_IOERR, ifile, "error reading"); flush(); }