version 1.22, 2019/04/16 21:21:27 |
version 1.24, 2019/04/28 15:03:29 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
#include "xmalloc.h" |
#include "node.h" |
#include "node.h" |
|
|
/* |
/* |
Line 143 static const struct nodeprop properties[] = { |
|
Line 144 static const struct nodeprop properties[] = { |
|
{ "variablelist", CLASS_BLOCK }, |
{ "variablelist", CLASS_BLOCK }, |
{ "varlistentry", CLASS_BLOCK }, |
{ "varlistentry", CLASS_BLOCK }, |
{ "varname", CLASS_LINE }, |
{ "varname", CLASS_LINE }, |
|
{ "void", CLASS_TEXT }, |
{ "warning", CLASS_BLOCK }, |
{ "warning", CLASS_BLOCK }, |
{ "wordasword", CLASS_TRANS }, |
{ "wordasword", CLASS_TRANS }, |
{ "xref", CLASS_LINE }, |
{ "xref", CLASS_LINE }, |
Line 251 pnode_alloc(struct pnode *np) |
|
Line 253 pnode_alloc(struct pnode *np) |
|
{ |
{ |
struct pnode *n; |
struct pnode *n; |
|
|
if ((n = calloc(1, sizeof(*n))) != NULL) { |
n = xcalloc(1, sizeof(*n)); |
TAILQ_INIT(&n->childq); |
TAILQ_INIT(&n->childq); |
TAILQ_INIT(&n->attrq); |
TAILQ_INIT(&n->attrq); |
if ((n->parent = np) != NULL) |
if ((n->parent = np) != NULL) |
TAILQ_INSERT_TAIL(&np->childq, n, child); |
TAILQ_INSERT_TAIL(&np->childq, n, child); |
} |
|
return n; |
return n; |
} |
} |
|
|