diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2007-06-12 12:17:25 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2007-06-12 12:17:25 +0000 |
commit | 85ae5d2f948c2ece5b8401ecfc33206a4c2b4708 (patch) | |
tree | c6233a394a9d9d97908b12f328878bc532fd7774 /usr.bin | |
parent | 26a5710c40b83c69c0193be82ffc100b2159fe65 (diff) | |
download | src-85ae5d2f948c2ece5b8401ecfc33206a4c2b4708.tar.gz src-85ae5d2f948c2ece5b8401ecfc33206a4c2b4708.zip |
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)
Notes
Notes:
svn path=/head/; revision=170609
Diffstat (limited to 'usr.bin')
-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 ca21ec7e66b9..fb3f9004f9e0 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) { |