summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_action.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_action.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_action.c')
-rw-r--r--mdoc_action.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index d8a28a62..23da04f8 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.9 2009/06/10 20:18:43 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.10 2009/06/12 09:18:00 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -56,6 +56,7 @@ static int post_bl_tagwidth(POST_ARGS);
static int post_dd(POST_ARGS);
static int post_display(POST_ARGS);
static int post_dt(POST_ARGS);
+static int post_lk(POST_ARGS);
static int post_nm(POST_ARGS);
static int post_os(POST_ARGS);
static int post_prol(POST_ARGS);
@@ -179,7 +180,7 @@ const struct actions mdoc_actions[MDOC_MAX] = {
{ NULL, NULL }, /* Lb */
{ NULL, NULL }, /* Ap */
{ NULL, NULL }, /* Lp */
- { NULL, NULL }, /* Lk */
+ { NULL, post_lk }, /* Lk */
{ NULL, NULL }, /* Mt */
{ NULL, NULL }, /* Brq */
{ NULL, NULL }, /* Bro */
@@ -669,6 +670,27 @@ post_bl(POST_ARGS)
static int
+post_lk(POST_ARGS)
+{
+ struct mdoc_node *n;
+
+ if (m->last->child)
+ return(1);
+
+ n = m->last;
+ m->next = MDOC_NEXT_CHILD;
+ /* FIXME: this isn't documented anywhere! */
+ if ( ! mdoc_word_alloc(m, m->last->line,
+ m->last->pos, "~"))
+ return(0);
+
+ m->last = n;
+ m->next = MDOC_NEXT_SIBLING;
+ return(1);
+}
+
+
+static int
post_ar(POST_ARGS)
{
struct mdoc_node *n;