=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.267 retrieving revision 1.268 diff -u -p -r1.267 -r1.268 --- mandoc/roff.c 2015/04/19 14:25:41 1.267 +++ mandoc/roff.c 2015/04/19 14:57:38 1.268 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.267 2015/04/19 14:25:41 schwarze Exp $ */ +/* $Id: roff.c,v 1.268 2015/04/19 14:57:38 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -1094,6 +1094,27 @@ roff_word_append(struct roff_man *man, const char *wor 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 *