diff options
author | yar <yar@FreeBSD.org> | 2007-06-12 12:17:25 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2007-06-12 12:17:25 +0000 |
commit | 49118fb7246970d4e3af10b317776e9bfec3f22a (patch) | |
tree | c6233a394a9d9d97908b12f328878bc532fd7774 /usr.bin/sed/process.c | |
parent | 64e06b67c3cf285a62f1f8cdbed2f005b02418a1 (diff) | |
download | FreeBSD-src-49118fb7246970d4e3af10b317776e9bfec3f22a.zip FreeBSD-src-49118fb7246970d4e3af10b317776e9bfec3f22a.tar.gz |
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)
Diffstat (limited to 'usr.bin/sed/process.c')
-rw-r--r-- | usr.bin/sed/process.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) { |