summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-02 12:09:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-02 12:09:32 +0000
commitaaee43f80d524f98453fc13d60a657085867666f (patch)
treef6b8376da6ae9f8513fd063a8964c90196ea74b0 /term.c
parente903ad85303a8374b9733895ec177aa5d7b558a7 (diff)
downloadmandoc-aaee43f80d524f98453fc13d60a657085867666f.tar.gz
Support for maxrmargin-breaking with TERMP_NOBREAK.
Tabs auto-converted to spaces.
Diffstat (limited to 'term.c')
-rw-r--r--term.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/term.c b/term.c
index 66a967b2..d742795b 100644
--- a/term.c
+++ b/term.c
@@ -25,8 +25,6 @@
#include "term.h"
-#define INDENT 6
-
/*
* Performs actions on nodes of the abstract syntax tree. Both pre- and
* post-fix operations are defined here.
@@ -934,6 +932,9 @@ static int
termp_ft_pre(DECL_ARGS)
{
+ if (SEC_SYNOPSIS == node->sec)
+ if (node->prev && MDOC_Fo == node->prev->tok)
+ vspace(p);
TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_FUNC_TYPE]);
return(1);
}
@@ -944,7 +945,7 @@ static void
termp_ft_post(DECL_ARGS)
{
- if (node->sec == SEC_SYNOPSIS)
+ if (SEC_SYNOPSIS == node->sec)
newln(p);
}
@@ -1141,7 +1142,8 @@ static void
termp_bx_post(DECL_ARGS)
{
- p->flags |= TERMP_NOSPACE;
+ if (node->child)
+ p->flags |= TERMP_NOSPACE;
word(p, "BSD");
}