summaryrefslogtreecommitdiffstats
path: root/term_ps.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 23:56:33 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 23:56:33 +0000
commit9c9f7631121018f484084ec3e425239539e5b7f6 (patch)
tree873d294bf44921b9456fdffffc27617dd57eedf9 /term_ps.c
parent54c0fe4b66b6f28b69d70293f915b255af598960 (diff)
downloadmandoc-9c9f7631121018f484084ec3e425239539e5b7f6.tar.gz
Allow open word contexts in -Tps to preserve whitespace, as whitespace
apparently doesn't collapse in PostScript (surprise!). Makes output files much more compact.
Diffstat (limited to 'term_ps.c')
-rw-r--r--term_ps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/term_ps.c b/term_ps.c
index f44c3d01..26762ace 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -268,11 +268,12 @@ ps_letter(struct termp *p, char c)
static void
ps_advance(struct termp *p, size_t len)
{
+ size_t i;
if (PS_INLINE & p->engine.ps.psstate) {
- /* Dump out any existing line scope. */
- ps_printf(p, ") show\n");
- p->engine.ps.psstate &= ~PS_INLINE;
+ for (i = 0; i < len; i++)
+ ps_letter(p, ' ');
+ return;
}
p->engine.ps.pscol += len ? len * PS_CHAR_WIDTH : 0;