projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed RFC 1864 (Content-MD5) support. I.e. -check switches.
[mmh]
/
sbr
/
cpydgst.c
diff --git
a/sbr/cpydgst.c
b/sbr/cpydgst.c
index
04ca76e
..
b788fef
100644
(file)
--- a/
sbr/cpydgst.c
+++ b/
sbr/cpydgst.c
@@
-25,14
+25,14
@@
#define S2 1
#define output(c) if (bp >= dp) {flush(); *bp++ = c;} else *bp++ = c
#define S2 1
#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"); \
+#define flush() if ((j = bp - outbuf) && write(out, outbuf, j) != j) \
+ adios(ofile, "error writing"); \
else \
bp = outbuf
void
else \
bp = outbuf
void
-cpydgst (int in, int out, char *ifile, char *ofile)
+cpydgst(int in, int out, char *ifile, char *ofile)
{
register int i, j, state;
register char *cp, *ep;
{
register int i, j, state;
register char *cp, *ep;
@@
-40,27
+40,27
@@
cpydgst (int in, int out, char *ifile, char *ofile)
char buffer[BUFSIZ], outbuf[BUFSIZ];
dp = (bp = outbuf) + sizeof outbuf;
char buffer[BUFSIZ], outbuf[BUFSIZ];
dp = (bp = outbuf) + sizeof outbuf;
- for (state = S1; (i = read (in, buffer, sizeof buffer)) > 0;)
+ for (state = S1; (i = read(in, buffer, sizeof buffer)) > 0;)
for (ep = (cp = buffer) + i; cp < ep; cp++) {
if (*cp == '\0')
continue;
switch (state) {
for (ep = (cp = buffer) + i; cp < ep; cp++) {
if (*cp == '\0')
continue;
switch (state) {
- case S1:
- if (*cp == '-') {
- output ('-');
- output (' ');
- }
- state = S2; /* fall */
+ case S1:
+ if (*cp == '-') {
+ output('-');
+ output(' ');
+ }
+ state = S2; /* fall */
- case S2:
- output (*cp);
- if (*cp == '\n')
- state = S1;
- break;
+ case S2:
+ output(*cp);
+ if (*cp == '\n')
+ state = S1;
+ break;
}
}
if (i == -1)
}
}
if (i == -1)
- adios (ifile, "error reading");
+ adios(ifile, "error reading");
flush();
}
flush();
}