summaryrefslogtreecommitdiffstatshomepage
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
commit0214fa880cd249945951f08bfcf80004d5e6f43f (patch)
tree55b4a2e6eb6657ee1288f835fa1b057fa4e1451d /mdoc_macro.c
parentad41f399a1fe056e9e22b214c75f2057a063ef44 (diff)
downloadmandoc-0214fa880cd249945951f08bfcf80004d5e6f43f.tar.gz
mandoc-0214fa880cd249945951f08bfcf80004d5e6f43f.tar.zst
mandoc-0214fa880cd249945951f08bfcf80004d5e6f43f.zip
`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.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index ef4cc5fc..e54aedc0 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.11 2009/06/11 20:02:37 kristaps Exp $ */
+/* $Id: mdoc_macro.c,v 1.12 2009/06/12 09:18:00 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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))