Drop the argument to the OUT macro because it can't emit

anything but the pattern space anyway.  Apply style(9)
to the macro.

Tested with:	md5(1)
This commit is contained in:
Yaroslav Tykhiy 2007-06-12 12:17:25 +00:00
parent 26a5710c40
commit 85ae5d2f94

View File

@ -85,7 +85,7 @@ static regex_t *defpreg;
size_t maxnsub;
regmatch_t *match;
#define OUT(s) { fwrite(s, sizeof(u_char), psl, outfile); fputc('\n', outfile); }
#define OUT() do {fwrite(ps, 1, psl, outfile); fputc('\n', outfile);} while (0)
void
process(void)
@ -168,7 +168,7 @@ process(void)
break;
case 'n':
if (!nflag && !pd)
OUT(ps)
OUT();
flush_appends();
if (!mf_fgets(&PS, REPLACE))
exit(0);
@ -183,7 +183,7 @@ process(void)
case 'p':
if (pd)
break;
OUT(ps)
OUT();
break;
case 'P':
if (pd)
@ -192,13 +192,13 @@ process(void)
oldpsl = psl;
psl = p - ps;
}
OUT(ps)
OUT();
if (p != NULL)
psl = oldpsl;
break;
case 'q':
if (!nflag && !pd)
OUT(ps)
OUT();
flush_appends();
exit(0);
case 'r':
@ -261,7 +261,7 @@ process(void)
} /* for all cp */
new: if (!nflag && !pd)
OUT(ps)
OUT();
flush_appends();
} /* for all lines */
}
@ -442,7 +442,7 @@ substitute(struct s_command *cp)
/* Handle the 'p' flag. */
if (cp->u.s->p)
OUT(ps)
OUT();
/* Handle the 'w' flag. */
if (cp->u.s->wfile && !pd) {