=================================================================== RCS file: /cvs/mandoc/Attic/man_action.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -p -r1.28 -r1.29 --- mandoc/Attic/man_action.c 2010/03/24 03:46:02 1.28 +++ mandoc/Attic/man_action.c 2010/03/24 20:10:53 1.29 @@ -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 * @@ -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); }