** complete copyright information.
*/
+#include <sysexits.h>
#include <unistd.h>
#include <h/mh.h>
#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
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;
}
if (i == -1)
- adios(ifile, "error reading");
+ adios(EX_IOERR, ifile, "error reading");
flush();
}