diff options
author | jilles <jilles@FreeBSD.org> | 2010-11-20 14:14:52 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-11-20 14:14:52 +0000 |
commit | 6915411ab291af6eba93647d13c0aa6714621fa2 (patch) | |
tree | bb660239ff9ba03cd107817f9d8d00fabdba49a1 /bin/sh/output.c | |
parent | 6a4a2e62a216ff7f70e10196bcdc7b3f4f76cad8 (diff) | |
download | FreeBSD-src-6915411ab291af6eba93647d13c0aa6714621fa2.zip FreeBSD-src-6915411ab291af6eba93647d13c0aa6714621fa2.tar.gz |
sh: Code size optimizations to buffered output.
This is mainly less use of the outc macro.
No functional change is intended, but code size is about 2K less on i386.
Diffstat (limited to 'bin/sh/output.c')
-rw-r--r-- | bin/sh/output.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/sh/output.c b/bin/sh/output.c index d7fc534..8442a22 100644 --- a/bin/sh/output.c +++ b/bin/sh/output.c @@ -96,6 +96,12 @@ RESET { void +outcslow(int c, struct output *file) +{ + outc(c, file); +} + +void out1str(const char *p) { outstr(p, out1); @@ -149,19 +155,19 @@ outqstr(const char *p, struct output *file) case '\'': /* Can't quote single quotes inside single quotes. */ if (inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 0; outstr("\\'", file); break; default: if (!inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 1; outc(ch, file); } } if (inquotes) - outc('\'', file); + outcslow('\'', file); } void |