-
-int
-mdoc_head_alloc(struct mdoc *m, int line, int pos, enum mdoct tok)
-{
- struct mdoc_node *p;
-
- assert(m->first);
- assert(m->last);
-
- p = node_alloc(m, line, pos, tok, MDOC_HEAD);
- if ( ! node_append(m, p))
- return(0);
- m->next = MDOC_NEXT_CHILD;
- return(1);
-}
-
-
-int
-mdoc_body_alloc(struct mdoc *m, int line, int pos, enum mdoct tok)
-{
- struct mdoc_node *p;
-
- p = node_alloc(m, line, pos, tok, MDOC_BODY);
- if ( ! node_append(m, p))
- return(0);
- m->next = MDOC_NEXT_CHILD;
- return(1);
-}
-
-
-int
-mdoc_block_alloc(struct mdoc *m, int line, int pos,
- enum mdoct tok, struct mdoc_arg *args)
-{
- struct mdoc_node *p;
-
- p = node_alloc(m, line, pos, tok, MDOC_BLOCK);
- p->args = args;
- if (p->args)
- (args->refcnt)++;
- if ( ! node_append(m, p))
- return(0);
- m->next = MDOC_NEXT_CHILD;
- return(1);
-}
-
-
-int
-mdoc_elem_alloc(struct mdoc *m, int line, int pos,
- enum mdoct tok, struct mdoc_arg *args)