summaryrefslogtreecommitdiffstatshomepage
path: root/mdocterm.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 23:18:50 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 23:18:50 +0000
commit0aa4f25b79210adba71044d7536f78537c7b1bc9 (patch)
tree7764aa1c6a6fb2d02de72503c7ecab6bc45f2f81 /mdocterm.c
parent5851ee4d2b64ce06c48c8cfb740d681250066ca5 (diff)
downloadmandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.tar.gz
mandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.tar.zst
mandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.zip
More list work.
Diffstat (limited to 'mdocterm.c')
-rw-r--r--mdocterm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mdocterm.c b/mdocterm.c
index 9a344639..c0ac1f54 100644
--- a/mdocterm.c
+++ b/mdocterm.c
@@ -1,4 +1,4 @@
-/* $Id: mdocterm.c,v 1.13 2009/02/25 17:02:47 kristaps Exp $ */
+/* $Id: mdocterm.c,v 1.14 2009/02/25 23:18:50 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
if (NULL == (termp.buf = malloc(termp.maxcols)))
err(1, "malloc");
- header(&termp, mdoc_meta(mdoc));
+ /*header(&termp, mdoc_meta(mdoc));*/
body(&termp, NULL, mdoc_meta(mdoc), mdoc_node(mdoc));
footer(&termp, mdoc_meta(mdoc));
@@ -168,7 +168,7 @@ flushln(struct termp *p)
* the line with TERMP_NOBREAK).
*/
- if (vis && vis + vsz >= maxvis) {
+ if (vis && vis + vsz > maxvis) {
/* FIXME */
if (p->flags & TERMP_NOBREAK)
errx(1, "word breaks right margin");
@@ -176,7 +176,7 @@ flushln(struct termp *p)
for (j = 0; j < p->offset; j++)
putchar(' ');
vis = 0;
- } else if (vis + vsz >= maxvis)
+ } else if (vis + vsz > maxvis)
/* FIXME */
errx(1, "word breaks right margin");
@@ -203,8 +203,9 @@ flushln(struct termp *p)
*/
if (p->flags & TERMP_NOBREAK) {
- for ( ; vis < maxvis; vis++)
- putchar(' ');
+ if ( ! (p->flags & TERMP_NORPAD))
+ for ( ; vis < maxvis; vis++)
+ putchar(' ');
} else
putchar('\n');