version 1.59, 2019/03/22 16:55:44 |
version 1.60, 2019/03/22 17:01:10 |
|
|
|
|
static const char *attrkeys[ATTRKEY__MAX] = { |
static const char *attrkeys[ATTRKEY__MAX] = { |
"choice", |
"choice", |
|
"class", |
"close", |
"close", |
"id", |
"id", |
"linkend", |
"linkend", |
Line 85 static const char *attrkeys[ATTRKEY__MAX] = { |
|
Line 86 static const char *attrkeys[ATTRKEY__MAX] = { |
|
}; |
}; |
|
|
static const char *attrvals[ATTRVAL__MAX] = { |
static const char *attrvals[ATTRVAL__MAX] = { |
|
"monospaced", |
"norepeat", |
"norepeat", |
"opt", |
"opt", |
"plain", |
"plain", |
Line 491 pnode_unlinksub(struct pnode *pn) |
|
Line 493 pnode_unlinksub(struct pnode *pn) |
|
} |
} |
|
|
/* |
/* |
|
* Retrieve an enumeration attribute from a node. |
|
* Return ATTRVAL__MAX if the node has no such attribute. |
|
*/ |
|
enum attrval |
|
pnode_getattr(struct pnode *pn, enum attrkey key) |
|
{ |
|
struct pattr *ap; |
|
|
|
TAILQ_FOREACH(ap, &pn->attrq, child) |
|
if (ap->key == key) |
|
return ap->val; |
|
return(ATTRVAL__MAX); |
|
} |
|
|
|
/* |
* Retrieve an attribute string from a node. |
* Retrieve an attribute string from a node. |
* Return defval if the node has no such attribute. |
* Return defval if the node has no such attribute. |
*/ |
*/ |
Line 1369 pnode_print(struct parse *p, struct pnode *pn) |
|
Line 1386 pnode_print(struct parse *p, struct pnode *pn) |
|
pnode_printmopen(p); |
pnode_printmopen(p); |
fputs("Li", stdout); |
fputs("Li", stdout); |
break; |
break; |
|
case (NODE_LITERALLAYOUT): |
|
assert(p->newln); |
|
puts(".Bd -literal"); |
|
break; |
case (NODE_MML_MFENCED): |
case (NODE_MML_MFENCED): |
pnode_printmathfenced(p, pn); |
pnode_printmathfenced(p, pn); |
pnode_unlinksub(pn); |
pnode_unlinksub(pn); |
Line 1411 pnode_print(struct parse *p, struct pnode *pn) |
|
Line 1432 pnode_print(struct parse *p, struct pnode *pn) |
|
pnode_printmopen(p); |
pnode_printmopen(p); |
fputs("Qo", stdout); |
fputs("Qo", stdout); |
break; |
break; |
case (NODE_LITERALLAYOUT): |
|
/* FALLTHROUGH */ |
|
case (NODE_PROGRAMLISTING): |
case (NODE_PROGRAMLISTING): |
/* FALLTHROUGH */ |
|
case (NODE_SCREEN): |
case (NODE_SCREEN): |
assert(p->newln); |
assert(p->newln); |
puts(".Bd -literal"); |
printf(".Bd %s\n", ATTRVAL_MONOSPACED == |
|
pnode_getattr(pn, ATTRKEY_CLASS) ? |
|
"-literal" : "-unfilled"); |
break; |
break; |
case (NODE_REFENTRYINFO): |
case (NODE_REFENTRYINFO): |
/* Suppress. */ |
/* Suppress. */ |