summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-31 15:42:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-31 15:42:09 +0000
commit4e6de631247e651c0cdb6f83ef3f819d7c8fd390 (patch)
treeeadbef674d38c1fbee07a8ed27dfb2e5b3388bac /mdoc_macro.c
parent57a28b7a61012e5f8378170afd8bf060000a4a08 (diff)
downloadmandoc-4e6de631247e651c0cdb6f83ef3f819d7c8fd390.tar.gz
Add ability to interpret initial free-form lines as part of a `Bl
-column' up until the first `It'. This is UGLY and should have all sorts of warnings, and will. On the one hand, it fits with groff's notion of tabs and tab-spaces. On the other hand, it's not really "free-form" text any more. Note that this does not yet accomodate for macros coming on these lines.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 008efdd0..f9a6f7a1 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1118,7 +1118,7 @@ blk_full(MACRO_PROT_ARGS)
/* If we've already opened our body, exit now. */
if (NULL != body)
- return(1);
+ goto out;
#ifdef UGLY
/*
@@ -1145,6 +1145,16 @@ blk_full(MACRO_PROT_ARGS)
if ( ! mdoc_body_alloc(m, line, ppos, tok))
return(0);
+out:
+ if ( ! (MDOC_FREECOL & m->flags))
+ return(1);
+
+ if ( ! rew_sub(MDOC_BODY, m, tok, line, ppos))
+ return(0);
+ if ( ! rew_sub(MDOC_BLOCK, m, tok, line, ppos))
+ return(0);
+
+ m->flags &= ~MDOC_FREECOL;
return(1);
}