- return(1);
-}
-
-
-static struct man_node *
-man_node_alloc(int line, int pos, enum man_type type, int tok)
-{
- struct man_node *p;
-
- p = calloc(1, sizeof(struct man_node));
- if (NULL == p)
- return(NULL);
-
- p->line = line;
- p->pos = pos;
- p->type = type;
- p->tok = tok;
- return(p);
-}
-
-
-int
-man_elem_alloc(struct man *man, int line, int pos, int tok)
-{
- struct man_node *p;
-
- p = man_node_alloc(line, pos, MAN_ELEM, tok);
- if (NULL == p)
- return(0);
- return(man_node_append(man, p));
-}
-
-
-int
-man_word_alloc(struct man *man,
- int line, int pos, const char *word)
-{
- struct man_node *p;
-
- p = man_node_alloc(line, pos, MAN_TEXT, -1);
- if (NULL == p)
- return(0);
- if (NULL == (p->string = strdup(word)))
- return(0);
- return(man_node_append(man, p));
-}