summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 15:05:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-30 15:05:02 +0000
commitede8bcaa90143c5c1db99caeef3eb5c8fafb3ea4 (patch)
tree645822e4896c2314b3813aa0686ba97e6edcdf20
parent47348b61f2e7662f12af380fa5654b9a8043d0f1 (diff)
downloadmandoc-ede8bcaa90143c5c1db99caeef3eb5c8fafb3ea4.tar.gz
Correct dimensions for DocumentMedia. Noted by schwarze@, as gv(1) was
puking on input.
-rw-r--r--term_ps.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/term_ps.c b/term_ps.c
index b7091573..58473e45 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -594,10 +594,9 @@ ps_begin(struct termp *p)
printf("%%%%Orientation: Portrait\n");
printf("%%%%Pages: (atend)\n");
printf("%%%%PageOrder: Ascend\n");
- printf("%%%%Orientation: Portrait\n");
printf("%%%%DocumentMedia: Default %zu %zu 0 () ()\n",
- p->engine.ps.width,
- p->engine.ps.height);
+ AFM2PNT(p, p->engine.ps.width),
+ AFM2PNT(p, p->engine.ps.height));
printf("%%%%DocumentNeededResources: font");
for (i = 0; i < (int)TERMFONT__MAX; i++)
printf(" %s", fonts[i].name);
@@ -806,11 +805,11 @@ ps_endline(struct termp *p)
assert(p->engine.ps.psmarg && p->engine.ps.psmarg[0]);
printf("%s", p->engine.ps.psmarg);
+ printf("showpage\n");
+ p->engine.ps.pages++;
printf("%%%%Page: %zu %zu\n",
p->engine.ps.pages + 1,
p->engine.ps.pages + 1);
- printf("showpage\n");
- p->engine.ps.pages++;
p->engine.ps.psrow = p->engine.ps.top;
}