=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/roff.c,v retrieving revision 1.139 retrieving revision 1.140 diff -c -r1.139 -r1.140 *** src/usr.bin/mandoc/roff.c 2015/04/19 14:25:05 1.139 --- src/usr.bin/mandoc/roff.c 2015/04/19 14:57:16 1.140 *************** *** 1,4 **** ! /* $OpenBSD: roff.c,v 1.139 2015/04/19 14:25:05 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: roff.c,v 1.140 2015/04/19 14:57:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze *************** *** 1092,1097 **** --- 1092,1118 ---- free(n->string); n->string = newstr; man->next = ROFF_NEXT_SIBLING; + } + + void + roff_elem_alloc(struct roff_man *man, int line, int pos, int tok) + { + struct roff_node *n; + + n = roff_node_alloc(man, line, pos, ROFFT_ELEM, tok); + roff_node_append(man, n); + man->next = ROFF_NEXT_CHILD; + } + + struct roff_node * + roff_block_alloc(struct roff_man *man, int line, int pos, int tok) + { + struct roff_node *n; + + n = roff_node_alloc(man, line, pos, ROFFT_BLOCK, tok); + roff_node_append(man, n); + man->next = ROFF_NEXT_CHILD; + return(n); } struct roff_node *