aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 09:18:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-02-09 09:18:15 +0000
commitdfc3c322d2d9553a0f7c08a28a772b13beec5e7f (patch)
tree9f45d0bb1130a5791c96e9accdc1069bd14bc4d3 /man.c
parent7e1515051811beb532cd49dfdf82f778dde90e81 (diff)
downloadmandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.tar.gz
mandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.tar.zst
mandoc-dfc3c322d2d9553a0f7c08a28a772b13beec5e7f.zip
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.c18
1 files changed, 17 insertions, 1 deletions
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 <kristaps@bsd.lv>
*
@@ -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)