=================================================================== RCS file: /cvs/docbook2mdoc/macro.h,v retrieving revision 1.4 retrieving revision 1.7 diff -u -p -r1.4 -r1.7 --- docbook2mdoc/macro.h 2019/04/11 04:23:22 1.4 +++ docbook2mdoc/macro.h 2019/05/01 17:20:47 1.7 @@ -1,4 +1,4 @@ -/* $Id: macro.h,v 1.4 2019/04/11 04:23:22 schwarze Exp $ */ +/* $Id: macro.h,v 1.7 2019/05/01 17:20:47 schwarze Exp $ */ /* * Copyright (c) 2019 Ingo Schwarze * @@ -26,14 +26,22 @@ enum linestate { LINE_MACRO /* In the middle of a macro line. */ }; +enum parastate { + PARA_HAVE, /* Just printed .Pp or equivalent. */ + PARA_MID, /* In the middle of a paragraph. */ + PARA_WANT /* Need .Pp before printing anything else. */ +}; + struct format { int level; /* Header level, starting at 1. */ + int nofill; /* Level of no-fill block nesting. */ int flags; #define FMT_NOSPC (1 << 0) /* Suppress space before next node. */ #define FMT_ARG (1 << 1) /* May add argument to current macro. */ #define FMT_CHILD (1 << 2) /* Expect a single child macro. */ #define FMT_IMPL (1 << 3) /* Partial implicit block is open. */ enum linestate linestate; + enum parastate parastate; }; #define ARG_SPACE 1 /* Insert whitespace before this argument. */ @@ -51,5 +59,6 @@ void macro_argline(struct format *, const char *, con void macro_addnode(struct format *, struct pnode *, int); void macro_nodeline(struct format *, const char *, struct pnode *, int); +void para_check(struct format *); void print_text(struct format *, const char *, int); void print_textnode(struct format *, struct pnode *);