=================================================================== RCS file: /cvs/docbook2mdoc/node.c,v retrieving revision 1.24 retrieving revision 1.28 diff -u -p -r1.24 -r1.28 --- docbook2mdoc/node.c 2019/04/28 15:03:29 1.24 +++ docbook2mdoc/node.c 2019/05/01 12:52:05 1.28 @@ -1,4 +1,4 @@ -/* $Id: node.c,v 1.24 2019/04/28 15:03:29 schwarze Exp $ */ +/* $Id: node.c,v 1.28 2019/05/01 12:52:05 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -32,6 +32,7 @@ struct nodeprop { }; static const struct nodeprop properties[] = { + { "abstract", CLASS_BLOCK }, { "appendix", CLASS_BLOCK }, { "arg", CLASS_ENCL }, { "author", CLASS_LINE }, @@ -61,6 +62,7 @@ static const struct nodeprop properties[] = { { "firstterm", CLASS_LINE }, { "footnote", CLASS_BLOCK }, { "funcdef", CLASS_BLOCK }, + { "funcparams", CLASS_LINE }, { "funcprototype", CLASS_BLOCK }, { "funcsynopsis", CLASS_TRANS }, { "funcsynopsisinfo", CLASS_LINE }, @@ -148,6 +150,7 @@ static const struct nodeprop properties[] = { { "warning", CLASS_BLOCK }, { "wordasword", CLASS_TRANS }, { "xref", CLASS_LINE }, + { "year", CLASS_TRANS }, { "[UNKNOWN]", CLASS_VOID }, { "(t)", CLASS_TEXT }, { "(e)", CLASS_TEXT } @@ -258,6 +261,17 @@ pnode_alloc(struct pnode *np) TAILQ_INIT(&n->attrq); if ((n->parent = np) != NULL) TAILQ_INSERT_TAIL(&np->childq, n, child); + return n; +} + +struct pnode * +pnode_alloc_text(struct pnode *np, const char *text) +{ + struct pnode *n; + + n = pnode_alloc(np); + n->node = NODE_TEXT; + n->b = xstrdup(text); return n; }