=================================================================== RCS file: /cvs/docbook2mdoc/node.h,v retrieving revision 1.29 retrieving revision 1.33 diff -u -p -r1.29 -r1.33 --- docbook2mdoc/node.h 2019/04/15 19:15:19 1.29 +++ docbook2mdoc/node.h 2019/04/24 18:38:02 1.33 @@ -1,4 +1,4 @@ -/* $Id: node.h,v 1.29 2019/04/15 19:15:19 schwarze Exp $ */ +/* $Id: node.h,v 1.33 2019/04/24 18:38:02 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -31,7 +31,8 @@ enum nodeclass { 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. */ + CLASS_BLOCK, /* Output linebreak before and after. */ + CLASS_NOFILL /* Block preserving leading whitespace. */ }; /* @@ -109,6 +110,7 @@ enum nodeid { NODE_PARAMETER, NODE_PERSONNAME, NODE_PREFACE, + NODE_PRODUCTNAME, NODE_PROGRAMLISTING, NODE_PROMPT, NODE_PUBDATE, @@ -150,6 +152,7 @@ enum nodeid { NODE_VARIABLELIST, NODE_VARLISTENTRY, NODE_VARNAME, + NODE_VOID, NODE_WARNING, NODE_WORDASWORD, NODE_XREF, @@ -228,8 +231,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;