projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make m_getfld2() called with an error state a noop
[mmh]
/
sbr
/
cpydgst.c
diff --git
a/sbr/cpydgst.c
b/sbr/cpydgst.c
index
a9e5bc6
..
5e5ef87
100644
(file)
--- a/
sbr/cpydgst.c
+++ b/
sbr/cpydgst.c
@@
-7,6
+7,7
@@
** complete copyright information.
*/
** complete copyright information.
*/
+#include <sysexits.h>
#include <unistd.h>
#include <h/mh.h>
#include <unistd.h>
#include <h/mh.h>
@@
-27,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) \
#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
else \
bp = outbuf
@@
-35,9
+36,9
@@
void
cpydgst(int in, int out, char *ifile, char *ofile)
{
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;
char buffer[BUFSIZ], outbuf[BUFSIZ];
dp = (bp = outbuf) + sizeof outbuf;
@@
-62,6
+63,6
@@
cpydgst(int in, int out, char *ifile, char *ofile)
}
if (i == -1)
}
if (i == -1)
- adios(ifile, "error reading");
+ adios(EX_IOERR, ifile, "error reading");
flush();
}
flush();
}