diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-02 12:09:32 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-02 12:09:32 +0000 |
commit | c6e959568733601f6b74e21b18a4243e63f53f3b (patch) | |
tree | 40dba3e139e152316fa47d4e0d0e2308077204a5 /term.c | |
parent | 77cb4c746cb1f605faa4b563da216a44b380a6ab (diff) | |
download | mandoc-c6e959568733601f6b74e21b18a4243e63f53f3b.tar.gz mandoc-c6e959568733601f6b74e21b18a4243e63f53f3b.tar.zst mandoc-c6e959568733601f6b74e21b18a4243e63f53f3b.zip |
Support for maxrmargin-breaking with TERMP_NOBREAK.
Tabs auto-converted to spaces.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.33 2009/03/01 23:27:14 kristaps Exp $ */ +/* $Id: term.c,v 1.34 2009/03/02 12:09:32 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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"); } |