version 1.11, 2019/04/12 19:14:50 |
version 1.14, 2019/04/14 14:00:16 |
Line 33 struct nodeprop { |
|
Line 33 struct nodeprop { |
|
static const struct nodeprop properties[] = { |
static const struct nodeprop properties[] = { |
{ "affiliation", CLASS_TRANS }, |
{ "affiliation", CLASS_TRANS }, |
{ "appendix", CLASS_BLOCK }, |
{ "appendix", CLASS_BLOCK }, |
{ "application", CLASS_LINE }, |
|
{ "arg", CLASS_ENCL }, |
{ "arg", CLASS_ENCL }, |
{ "author", CLASS_LINE }, |
{ "author", CLASS_LINE }, |
{ "authorgroup", CLASS_BLOCK }, |
{ "authorgroup", CLASS_BLOCK }, |
Line 105 static const struct nodeprop properties[] = { |
|
Line 104 static const struct nodeprop properties[] = { |
|
{ "preface", CLASS_BLOCK }, |
{ "preface", CLASS_BLOCK }, |
{ "programlisting", CLASS_BLOCK }, |
{ "programlisting", CLASS_BLOCK }, |
{ "prompt", CLASS_TRANS }, |
{ "prompt", CLASS_TRANS }, |
|
{ "pubdate", CLASS_TRANS }, |
{ "quote", CLASS_ENCL }, |
{ "quote", CLASS_ENCL }, |
{ "refclass", CLASS_TRANS }, |
{ "refclass", CLASS_TRANS }, |
{ "refdescriptor", CLASS_TRANS }, |
{ "refdescriptor", CLASS_TRANS }, |
Line 128 static const struct nodeprop properties[] = { |
|
Line 128 static const struct nodeprop properties[] = { |
|
{ "spanspec", CLASS_TRANS }, |
{ "spanspec", CLASS_TRANS }, |
{ "subtitle", CLASS_TRANS }, |
{ "subtitle", CLASS_TRANS }, |
{ "synopsis", CLASS_BLOCK }, |
{ "synopsis", CLASS_BLOCK }, |
|
{ "systemitem", CLASS_LINE }, |
{ "table", CLASS_TRANS }, |
{ "table", CLASS_TRANS }, |
{ "tbody", CLASS_TRANS }, |
{ "tbody", CLASS_TRANS }, |
{ "term", CLASS_LINE }, |
{ "term", CLASS_LINE }, |
Line 168 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
Line 169 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
}; |
}; |
|
|
static const char *const attrvals[ATTRVAL__MAX] = { |
static const char *const attrvals[ATTRVAL__MAX] = { |
|
"event", |
|
"ipaddress", |
"monospaced", |
"monospaced", |
"norepeat", |
"norepeat", |
"opt", |
"opt", |
"plain", |
"plain", |
"repeat", |
"repeat", |
"req" |
"req", |
|
"systemname" |
}; |
}; |
|
|
enum attrkey |
enum attrkey |
Line 340 pnode_findfirst(struct pnode *n, enum nodeid node) |
|
Line 344 pnode_findfirst(struct pnode *n, enum nodeid node) |
|
{ |
{ |
struct pnode *nc, *res; |
struct pnode *nc, *res; |
|
|
|
if (n == NULL) |
|
return NULL; |
if (n->node == node) |
if (n->node == node) |
return n; |
return n; |
TAILQ_FOREACH(nc, &n->childq, child) |
TAILQ_FOREACH(nc, &n->childq, child) |
if ((res = pnode_findfirst(nc, node)) != NULL) |
if ((res = pnode_findfirst(nc, node)) != NULL) |
return res; |
return res; |
return NULL; |
return NULL; |
|
} |
|
|
|
/* |
|
* Like pnode_findfirst(), but also take the node out of the tree. |
|
*/ |
|
struct pnode * |
|
pnode_takefirst(struct pnode *n, enum nodeid node) |
|
{ |
|
struct pnode *nc; |
|
|
|
if ((nc = pnode_findfirst(n, node)) != NULL && nc->parent != NULL) |
|
TAILQ_REMOVE(&nc->parent->childq, nc, child); |
|
return nc; |
} |
} |