version 1.8, 2019/04/11 04:23:22 |
version 1.9, 2019/04/12 04:39:24 |
Line 74 attrval_parse(const char *name) |
|
Line 74 attrval_parse(const char *name) |
|
return val; |
return val; |
} |
} |
|
|
|
struct pnode * |
|
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); |
|
} |
|
return n; |
|
} |
|
|
/* |
/* |
* Recursively free a node (NULL is ok). |
* Recursively free a node (NULL is ok). |
*/ |
*/ |