=================================================================== RCS file: /cvs/docbook2mdoc/node.c,v retrieving revision 1.21 retrieving revision 1.24 diff -u -p -r1.21 -r1.24 --- docbook2mdoc/node.c 2019/04/16 14:58:19 1.21 +++ docbook2mdoc/node.c 2019/04/28 15:03:29 1.24 @@ -1,4 +1,4 @@ -/* $Id: node.c,v 1.21 2019/04/16 14:58:19 schwarze Exp $ */ +/* $Id: node.c,v 1.24 2019/04/28 15:03:29 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -19,6 +19,7 @@ #include #include +#include "xmalloc.h" #include "node.h" /* @@ -101,6 +102,7 @@ static const struct nodeprop properties[] = { { "parameter", CLASS_LINE }, { "personname", CLASS_TRANS }, { "preface", CLASS_BLOCK }, + { "productname", CLASS_LINE }, { "programlisting", CLASS_NOFILL }, { "prompt", CLASS_TRANS }, { "pubdate", CLASS_TRANS }, @@ -142,6 +144,7 @@ static const struct nodeprop properties[] = { { "variablelist", CLASS_BLOCK }, { "varlistentry", CLASS_BLOCK }, { "varname", CLASS_LINE }, + { "void", CLASS_TEXT }, { "warning", CLASS_BLOCK }, { "wordasword", CLASS_TRANS }, { "xref", CLASS_LINE }, @@ -250,12 +253,11 @@ pnode_alloc(struct pnode *np) { struct pnode *n; - if ((n = calloc(1, sizeof(*n))) != NULL) { - TAILQ_INIT(&n->childq); - TAILQ_INIT(&n->attrq); - if ((n->parent = np) != NULL) - TAILQ_INSERT_TAIL(&np->childq, n, child); - } + n = xcalloc(1, sizeof(*n)); + TAILQ_INIT(&n->childq); + TAILQ_INIT(&n->attrq); + if ((n->parent = np) != NULL) + TAILQ_INSERT_TAIL(&np->childq, n, child); return n; }