=================================================================== RCS file: /cvs/mandoc/man.c,v retrieving revision 1.100 retrieving revision 1.102 diff -u -p -r1.100 -r1.102 --- mandoc/man.c 2011/02/08 07:40:23 1.100 +++ mandoc/man.c 2011/03/07 01:35:51 1.102 @@ -1,6 +1,6 @@ -/* $Id: man.c,v 1.100 2011/02/08 07:40:23 kristaps Exp $ */ +/* $Id: man.c,v 1.102 2011/03/07 01:35:51 schwarze Exp $ */ /* - * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons + * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -146,8 +146,8 @@ man_free1(struct man *man) free(man->meta.title); if (man->meta.source) free(man->meta.source); - if (man->meta.rawdate) - free(man->meta.rawdate); + if (man->meta.date) + free(man->meta.date); if (man->meta.vol) free(man->meta.vol); if (man->meta.msec) @@ -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)