diff options
author | 2011-03-20 23:36:42 +0000 | |
---|---|---|
committer | 2011-03-20 23:36:42 +0000 | |
commit | 8d973ab119273c11ad7f320bfed8d32e8a0d6d10 (patch) | |
tree | e658fb3bb47acda8528f51b78b59375134ad24ba /usr.bin/mandoc/man.c | |
parent | Add two missing lines that got missed when I did the initial at + cron (diff) | |
download | wireguard-openbsd-8d973ab119273c11ad7f320bfed8d32e8a0d6d10.tar.xz wireguard-openbsd-8d973ab119273c11ad7f320bfed8d32e8a0d6d10.zip |
Import the foundation for eqn(7) support.
Written by kristaps@.
For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r-- | usr.bin/mandoc/man.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index 9eba4001fee..29d879b1563 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.56 2011/03/07 01:35:33 schwarze Exp $ */ +/* $Id: man.c,v 1.57 2011/03/20 23:36:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -342,6 +342,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) |