From 49118fb7246970d4e3af10b317776e9bfec3f22a Mon Sep 17 00:00:00 2001 From: yar Date: Tue, 12 Jun 2007 12:17:25 +0000 Subject: 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) --- usr.bin/sed/process.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.bin/sed') diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index ca21ec7..fb3f900 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -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 @@ redirect: break; case 'n': if (!nflag && !pd) - OUT(ps) + OUT(); flush_appends(); if (!mf_fgets(&PS, REPLACE)) exit(0); @@ -183,7 +183,7 @@ redirect: case 'p': if (pd) break; - OUT(ps) + OUT(); break; case 'P': if (pd) @@ -192,13 +192,13 @@ redirect: 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 @@ redirect: } /* 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) { -- cgit v1.1