version 1.1, 2019/03/26 18:32:07 |
version 1.4, 2019/04/07 17:00:56 |
Line 28 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
Line 28 static const char *const attrkeys[ATTRKEY__MAX] = { |
|
"choice", |
"choice", |
"class", |
"class", |
"close", |
"close", |
|
"cols", |
|
"endterm", |
"id", |
"id", |
"linkend", |
"linkend", |
"open", |
"open", |
"rep" |
"rep", |
|
"url", |
|
"xlink:href" |
}; |
}; |
|
|
static const char *const attrvals[ATTRVAL__MAX] = { |
static const char *const attrvals[ATTRVAL__MAX] = { |
Line 143 pnode_getattr_raw(struct pnode *pn, enum attrkey key, |
|
Line 147 pnode_getattr_raw(struct pnode *pn, enum attrkey key, |
|
return defval; |
return defval; |
TAILQ_FOREACH(ap, &pn->attrq, child) |
TAILQ_FOREACH(ap, &pn->attrq, child) |
if (ap->key == key) |
if (ap->key == key) |
return ap->val == ATTRVAL__MAX ? ap->rawval : |
return ap->val != ATTRVAL__MAX ? attrvals[ap->val] : |
attrvals[ap->val]; |
ap->rawval != NULL ? ap->rawval : defval; |
return defval; |
return defval; |
} |
} |
|
|