summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-12 09:18:00 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-12 09:18:00 +0000
commit81a387c030a677e4c49c020a270294d21c564320 (patch)
tree5edd66188f498f18a740574c6d45f2d103ab9af4 /mdoc_macro.c
parentc3b3cef562cad122a19ef12743ef5aa73df002b5 (diff)
downloadmandoc-81a387c030a677e4c49c020a270294d21c564320.tar.gz
`Lk' is correctly handled as CALLABLE (note groff munges nested output).
`Mt' is now CALLABLE. Fixed missing validate/action of zero-element, non-called inline elements. Fixed missing validate/action of nested inline element re-calls. Fixed bogus column argv index in validator.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 0dd18d0b..79134d56 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -183,8 +183,8 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
{ in_line_eoln, 0 }, /* Lb */
{ in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* Ap */
{ in_line, 0 }, /* Lp */
- { in_line, MDOC_PARSED }, /* Lk */
- { in_line, MDOC_PARSED }, /* Mt */
+ { in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Lk */
+ { in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Mt */
{ blk_part_imp, MDOC_CALLABLE | MDOC_PARSED }, /* Brq */
{ blk_part_exp, MDOC_CALLABLE | MDOC_PARSED | MDOC_EXPLICIT }, /* Bro */
{ blk_exp_close, MDOC_EXPLICIT | MDOC_CALLABLE | MDOC_PARSED }, /* Brc */
@@ -813,6 +813,8 @@ in_line(MACRO_PROT_ARGS)
/* FALLTHROUGH */
case (MDOC_Fl):
/* FALLTHROUGH */
+ case (MDOC_Lk):
+ /* FALLTHROUGH */
case (MDOC_Ar):
nc = 1;
break;
@@ -868,7 +870,8 @@ in_line(MACRO_PROT_ARGS)
if ( ! mdoc_elem_alloc(mdoc, line, ppos,
tok, arg))
return(0);
- mdoc->next = MDOC_NEXT_SIBLING;
+ if ( ! rew_last(mdoc, mdoc->last))
+ return(0);
} else if ( ! nc && 0 == cnt) {
mdoc_argv_free(arg);
if ( ! pwarn(mdoc, line, ppos, WIGNE))
@@ -923,7 +926,8 @@ in_line(MACRO_PROT_ARGS)
c = mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
if (0 == c)
return(0);
- mdoc->next = MDOC_NEXT_SIBLING;
+ if ( ! rew_last(mdoc, mdoc->last))
+ return(0);
} else if ( ! nc && 0 == cnt) {
mdoc_argv_free(arg);
if ( ! pwarn(mdoc, line, ppos, WIGNE))