diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 23:18:50 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 23:18:50 +0000 |
commit | 0aa4f25b79210adba71044d7536f78537c7b1bc9 (patch) | |
tree | 7764aa1c6a6fb2d02de72503c7ecab6bc45f2f81 /mdocterm.c | |
parent | 5851ee4d2b64ce06c48c8cfb740d681250066ca5 (diff) | |
download | mandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.tar.gz mandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.tar.zst mandoc-0aa4f25b79210adba71044d7536f78537c7b1bc9.zip |
More list work.
Diffstat (limited to 'mdocterm.c')
-rw-r--r-- | mdocterm.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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'); |