version 1.19, 2019/04/12 11:37:09 |
version 1.22, 2019/04/13 13:06:35 |
|
|
*/ |
*/ |
|
|
/* |
/* |
|
* How the output from each node behaves |
|
* with respect to mdoc(7) structure. |
|
*/ |
|
enum nodeclass { |
|
CLASS_VOID = 0, /* No output at all, children are skipped. */ |
|
CLASS_TEXT, /* Node prints only text, no macros. */ |
|
CLASS_TRANS, /* Transparent: only the children are shown. */ |
|
CLASS_LINE, /* Generates only simple in-line macros. */ |
|
CLASS_ENCL, /* Explicit or implicit partial blocks. */ |
|
CLASS_BLOCK /* Output linebreak before and after. */ |
|
}; |
|
|
|
/* |
* All node types used for formatting purposes. |
* All node types used for formatting purposes. |
* More DocBook XML elements are recognized, but remapped or discarded. |
* More DocBook XML elements are recognized, but remapped or discarded. |
*/ |
*/ |
enum nodeid { |
enum nodeid { |
NODE_DELETE_WARN, |
|
NODE_DELETE, |
|
NODE_IGNORE, |
|
/* Alpha-ordered hereafter. */ |
|
NODE_AFFILIATION, |
NODE_AFFILIATION, |
NODE_APPENDIX, |
NODE_APPENDIX, |
NODE_APPLICATION, |
NODE_APPLICATION, |
|
|
NODE_ENTRY, |
NODE_ENTRY, |
NODE_ENVAR, |
NODE_ENVAR, |
NODE_ERRORNAME, |
NODE_ERRORNAME, |
NODE_ESCAPE, |
|
NODE_FIELDSYNOPSIS, |
NODE_FIELDSYNOPSIS, |
NODE_FILENAME, |
NODE_FILENAME, |
NODE_FIRSTTERM, |
NODE_FIRSTTERM, |
|
|
NODE_PREFACE, |
NODE_PREFACE, |
NODE_PROGRAMLISTING, |
NODE_PROGRAMLISTING, |
NODE_PROMPT, |
NODE_PROMPT, |
|
NODE_PUBDATE, |
NODE_QUOTE, |
NODE_QUOTE, |
NODE_REFCLASS, |
NODE_REFCLASS, |
NODE_REFDESCRIPTOR, |
NODE_REFDESCRIPTOR, |
|
|
NODE_TABLE, |
NODE_TABLE, |
NODE_TBODY, |
NODE_TBODY, |
NODE_TERM, |
NODE_TERM, |
NODE_TEXT, |
|
NODE_TFOOT, |
NODE_TFOOT, |
NODE_TGROUP, |
NODE_TGROUP, |
NODE_THEAD, |
NODE_THEAD, |
NODE_TIP, |
NODE_TIP, |
NODE_TITLE, |
NODE_TITLE, |
NODE_TYPE, |
NODE_TYPE, |
NODE_ULINK, |
|
NODE_VARIABLELIST, |
NODE_VARIABLELIST, |
NODE_VARLISTENTRY, |
NODE_VARLISTENTRY, |
NODE_VARNAME, |
NODE_VARNAME, |
NODE_WARNING, |
NODE_WARNING, |
NODE_WORDASWORD, |
NODE_WORDASWORD, |
NODE_YEAR, |
NODE_YEAR, |
NODE__MAX |
NODE_UNKNOWN, |
|
NODE_TEXT, |
|
NODE_ESCAPE, |
|
NODE_IGNORE, |
|
NODE_DELETE, |
|
NODE_DELETE_WARN |
}; |
}; |
|
|
/* |
/* |
|
|
|
|
|
|
enum attrkey attrkey_parse(const char *); |
enum attrkey attrkey_parse(const char *); |
|
const char *attrkey_name(enum attrkey); |
enum attrval attrval_parse(const char *); |
enum attrval attrval_parse(const char *); |
|
const char *attr_getval(const struct pattr *a); |
|
enum nodeid pnode_parse(const char *name); |
|
const char *pnode_name(enum nodeid); |
|
enum nodeclass pnode_class(enum nodeid); |
|
|
struct pnode *pnode_alloc(struct pnode *); |
struct pnode *pnode_alloc(struct pnode *); |
void pnode_unlink(struct pnode *); |
void pnode_unlink(struct pnode *); |
void pnode_unlinksub(struct pnode *); |
void pnode_unlinksub(struct pnode *); |
enum attrval pnode_getattr(struct pnode *, enum attrkey); |
enum attrval pnode_getattr(struct pnode *, enum attrkey); |
const char *pnode_getattr_raw(struct pnode *, enum attrkey, const char *); |
const char *pnode_getattr_raw(struct pnode *, enum attrkey, const char *); |
struct pnode *pnode_findfirst(struct pnode *, enum nodeid); |
struct pnode *pnode_findfirst(struct pnode *, enum nodeid); |
|
struct pnode *pnode_takefirst(struct pnode *, enum nodeid); |