diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-02-09 09:18:15 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-02-09 09:18:15 +0000 |
commit | 75f227792a0d34031aeeaec473483f07aa7c793c (patch) | |
tree | 4e0793668e9010ae4476bc9d1838485b6350b00b /man.c | |
parent | 31585348ea96dc3d531dd9a8fdbea4ad5ce4b927 (diff) | |
download | mandoc-75f227792a0d34031aeeaec473483f07aa7c793c.tar.gz |
Allow -man to process EQN as well. Also fix a segfault in missing case
statements in the post-handler for EQN in -mdoc and -man.
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -346,6 +346,22 @@ man_node_delete(struct man *m, struct man_node *p) man_node_free(p); } +int +man_addeqn(struct man *m, const struct eqn *ep) +{ + struct man_node *n; + + assert( ! (MAN_HALT & m->flags)); + + n = man_node_alloc(m, ep->line, ep->pos, MAN_EQN, MAN_MAX); + n->eqn = ep; + + if ( ! man_node_append(m, n)) + return(0); + + m->next = MAN_NEXT_SIBLING; + return(man_descope(m, ep->line, ep->pos)); +} int man_addspan(struct man *m, const struct tbl_span *sp) |