=================================================================== RCS file: /cvs/docbook2mdoc/node.h,v retrieving revision 1.32 retrieving revision 1.37 diff -u -p -r1.32 -r1.37 --- docbook2mdoc/node.h 2019/04/21 14:48:11 1.32 +++ docbook2mdoc/node.h 2019/05/01 12:52:05 1.37 @@ -1,4 +1,4 @@ -/* $Id: node.h,v 1.32 2019/04/21 14:48:11 schwarze Exp $ */ +/* $Id: node.h,v 1.37 2019/05/01 12:52:05 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -40,6 +40,7 @@ enum nodeclass { * More DocBook XML elements are recognized, but remapped or discarded. */ enum nodeid { + NODE_ABSTRACT, NODE_APPENDIX, NODE_ARG, NODE_AUTHOR, @@ -69,6 +70,7 @@ enum nodeid { NODE_FIRSTTERM, NODE_FOOTNOTE, NODE_FUNCDEF, + NODE_FUNCPARAMS, NODE_FUNCPROTOTYPE, NODE_FUNCSYNOPSIS, NODE_FUNCSYNOPSISINFO, @@ -156,6 +158,7 @@ enum nodeid { NODE_WARNING, NODE_WORDASWORD, NODE_XREF, + NODE_YEAR, NODE_UNKNOWN, NODE_TEXT, NODE_ESCAPE, @@ -231,8 +234,10 @@ struct pattr { struct pnode { enum nodeid node; /* Node type. */ char *b; /* String value. */ - int spc; /* Whitespace before this node. */ struct pnode *parent; /* Parent node or NULL. */ + int flags; +#define NFLAG_LINE (1 << 0) /* New line before this node. */ +#define NFLAG_SPC (1 << 1) /* Whitespace before this node. */ struct pnodeq childq; /* Queue of children. */ struct pattrq attrq; /* Attributes of the node. */ TAILQ_ENTRY(pnode) child; @@ -259,6 +264,7 @@ const char *pnode_name(enum nodeid); enum nodeclass pnode_class(enum nodeid); struct pnode *pnode_alloc(struct pnode *); +struct pnode *pnode_alloc_text(struct pnode *, const char *); void pnode_unlink(struct pnode *); void pnode_unlinksub(struct pnode *); enum attrval pnode_getattr(struct pnode *, enum attrkey);