diff options
Diffstat (limited to 'man_action.c')
-rw-r--r-- | man_action.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/man_action.c b/man_action.c index c4a8cd4c..53f79b3b 100644 --- a/man_action.c +++ b/man_action.c @@ -1,4 +1,4 @@ -/* $Id: man_action.c,v 1.28 2010/03/24 03:46:02 kristaps Exp $ */ +/* $Id: man_action.c,v 1.29 2010/03/24 20:10:53 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -30,6 +30,7 @@ struct actions { }; static int post_TH(struct man *); +static int post_de(struct man *); static int post_fi(struct man *); static int post_nf(struct man *); @@ -69,6 +70,12 @@ const struct actions man_actions[MAN_MAX] = { { NULL }, /* Sp */ { post_nf }, /* Vb */ { post_fi }, /* Ve */ + { post_de }, /* de */ + { post_de }, /* dei */ + { post_de }, /* am */ + { post_de }, /* ami */ + { post_de }, /* ig */ + { NULL }, /* . */ }; @@ -108,6 +115,21 @@ post_fi(struct man *m) static int +post_de(struct man *m) +{ + + /* + * XXX: for the time being, we indiscriminately remove roff + * instructions from the parse stream. + */ + if (MAN_BLOCK == m->last->type) + man_node_delete(m, m->last); + + return(1); +} + + +static int post_nf(struct man *m) { @@ -179,8 +201,10 @@ post_TH(struct man *m) if (n && (n = n->next)) m->meta.vol = mandoc_strdup(n->string); - n = m->last; - man_node_unlink(m, n); - man_node_freelist(n); + /* + * Remove the `TH' node after we've processed it for our + * meta-data. + */ + man_node_delete(m, m->last); return(1); } |