From dfc3c322d2d9553a0f7c08a28a772b13beec5e7f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 9 Feb 2011 09:18:15 +0000 Subject: 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. --- man.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'man.c') diff --git a/man.c b/man.c index 3a217af3..1ee3e1ff 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.100 2011/02/08 07:40:23 kristaps Exp $ */ +/* $Id: man.c,v 1.101 2011/02/09 09:18:15 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -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) -- cgit v1.2.3