version 1.11, 2019/04/12 19:14:50 |
version 1.19, 2019/04/15 00:34:15 |
Line 31 struct nodeprop { |
|
Line 31 struct nodeprop { |
|
}; |
}; |
|
|
static const struct nodeprop properties[] = { |
static const struct nodeprop properties[] = { |
{ "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 47 static const struct nodeprop properties[] = { |
|
Line 45 static const struct nodeprop properties[] = { |
|
{ "command", CLASS_LINE }, |
{ "command", CLASS_LINE }, |
{ "constant", CLASS_LINE }, |
{ "constant", CLASS_LINE }, |
{ "contrib", CLASS_TRANS }, |
{ "contrib", CLASS_TRANS }, |
{ "copyright", CLASS_TRANS }, |
{ "copyright", CLASS_LINE }, |
{ "date", CLASS_TRANS }, |
{ "date", CLASS_TRANS }, |
{ "!DOCTYPE", CLASS_VOID }, |
{ "!DOCTYPE", CLASS_VOID }, |
{ "editor", CLASS_LINE }, |
{ "editor", CLASS_LINE }, |
Line 60 static const struct nodeprop properties[] = { |
|
Line 58 static const struct nodeprop properties[] = { |
|
{ "fieldsynopsis", CLASS_TRANS }, |
{ "fieldsynopsis", CLASS_TRANS }, |
{ "filename", CLASS_LINE }, |
{ "filename", CLASS_LINE }, |
{ "firstterm", CLASS_LINE }, |
{ "firstterm", CLASS_LINE }, |
{ "footnote", CLASS_TRANS }, |
{ "footnote", CLASS_BLOCK }, |
{ "funcdef", CLASS_BLOCK }, |
{ "funcdef", CLASS_BLOCK }, |
{ "funcprototype", CLASS_BLOCK }, |
{ "funcprototype", CLASS_BLOCK }, |
{ "funcsynopsis", CLASS_TRANS }, |
{ "funcsynopsis", CLASS_TRANS }, |
Line 68 static const struct nodeprop properties[] = { |
|
Line 66 static const struct nodeprop properties[] = { |
|
{ "function", CLASS_LINE }, |
{ "function", CLASS_LINE }, |
{ "glossterm", CLASS_LINE }, |
{ "glossterm", CLASS_LINE }, |
{ "group", CLASS_ENCL }, |
{ "group", CLASS_ENCL }, |
{ "holder", CLASS_TRANS }, |
{ "imagedata", CLASS_TEXT }, |
{ "xi:include", CLASS_VOID }, |
{ "xi:include", CLASS_VOID }, |
{ "index", CLASS_TRANS }, |
{ "index", CLASS_TRANS }, |
{ "info", CLASS_TRANS }, |
{ "info", CLASS_TRANS }, |
Line 95 static const struct nodeprop properties[] = { |
|
Line 93 static const struct nodeprop properties[] = { |
|
{ "mml:msup", CLASS_LINE }, |
{ "mml:msup", CLASS_LINE }, |
{ "modifier", CLASS_LINE }, |
{ "modifier", CLASS_LINE }, |
{ "note", CLASS_BLOCK }, |
{ "note", CLASS_BLOCK }, |
|
{ "olink", CLASS_ENCL }, |
{ "option", CLASS_LINE }, |
{ "option", CLASS_LINE }, |
{ "orderedlist", CLASS_BLOCK }, |
{ "orderedlist", CLASS_BLOCK }, |
{ "orgname", CLASS_TRANS }, |
|
{ "para", CLASS_BLOCK }, |
{ "para", CLASS_BLOCK }, |
{ "paramdef", CLASS_LINE }, |
{ "paramdef", CLASS_LINE }, |
{ "parameter", CLASS_LINE }, |
{ "parameter", CLASS_LINE }, |
Line 105 static const struct nodeprop properties[] = { |
|
Line 103 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 118 static const struct nodeprop properties[] = { |
|
Line 117 static const struct nodeprop properties[] = { |
|
{ "refnamediv", CLASS_BLOCK }, |
{ "refnamediv", CLASS_BLOCK }, |
{ "refpurpose", CLASS_LINE }, |
{ "refpurpose", CLASS_LINE }, |
{ "refsynopsisdiv", CLASS_BLOCK }, |
{ "refsynopsisdiv", CLASS_BLOCK }, |
{ "releaseinfo", CLASS_TRANS }, |
|
{ "replaceable", CLASS_LINE }, |
{ "replaceable", CLASS_LINE }, |
{ "row", CLASS_BLOCK }, |
{ "row", CLASS_BLOCK }, |
{ "sbr", CLASS_BLOCK }, |
{ "sbr", CLASS_BLOCK }, |
{ "screen", CLASS_BLOCK }, |
{ "screen", CLASS_BLOCK }, |
{ "section", CLASS_BLOCK }, |
{ "section", CLASS_BLOCK }, |
{ "simplelist", CLASS_TRANS }, |
{ "simplelist", CLASS_TRANS }, |
|
{ "simplesect", CLASS_BLOCK }, |
{ "spanspec", CLASS_TRANS }, |
{ "spanspec", CLASS_TRANS }, |
{ "subtitle", CLASS_TRANS }, |
{ "subscript", CLASS_TEXT }, |
|
{ "subtitle", CLASS_BLOCK }, |
|
{ "superscript", CLASS_TEXT }, |
{ "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 142 static const struct nodeprop properties[] = { |
|
Line 144 static const struct nodeprop properties[] = { |
|
{ "varname", CLASS_LINE }, |
{ "varname", CLASS_LINE }, |
{ "warning", CLASS_BLOCK }, |
{ "warning", CLASS_BLOCK }, |
{ "wordasword", CLASS_TRANS }, |
{ "wordasword", CLASS_TRANS }, |
{ "year", CLASS_TRANS }, |
|
{ "[UNKNOWN]", CLASS_VOID }, |
{ "[UNKNOWN]", CLASS_VOID }, |
{ "(t)", CLASS_TEXT }, |
{ "(t)", CLASS_TEXT }, |
{ "(e)", CLASS_TEXT } |
{ "(e)", CLASS_TEXT } |
Line 155 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
Line 156 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
"cols", |
"cols", |
"DEFINITION", |
"DEFINITION", |
"endterm", |
"endterm", |
|
"entityref", |
|
"fileref", |
"href", |
"href", |
"id", |
"id", |
"linkend", |
"linkend", |
|
"localinfo", |
"NAME", |
"NAME", |
"open", |
"open", |
"PUBLIC", |
"PUBLIC", |
"rep", |
"rep", |
"SYSTEM", |
"SYSTEM", |
|
"targetdoc", |
|
"targetptr", |
"url", |
"url", |
"xlink:href" |
"xlink:href" |
}; |
}; |
|
|
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 349 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; |
} |
} |