-struct termact {
- int (*pre)(struct termp *,
- const struct mdoc_meta *,
- const struct mdoc_node *);
- void (*post)(struct termp *,
- const struct mdoc_meta *,
- const struct mdoc_node *);
+struct termp {
+ size_t rmargin; /* Current right margin. */
+ size_t maxrmargin; /* Max right margin. */
+ size_t maxcols; /* Max size of buf. */
+ size_t offset; /* Margin offest. */
+ size_t col; /* Bytes in buf. */
+ int flags;
+#define TERMP_NOSPACE (1 << 0) /* No space before words. */
+#define TERMP_NOLPAD (1 << 1) /* No leftpad before flush. */
+#define TERMP_NOBREAK (1 << 2) /* No break after flush. */
+#define TERMP_LITERAL (1 << 3) /* Literal words. */
+#define TERMP_IGNDELIM (1 << 4) /* Delims like regulars. */
+#define TERMP_NONOSPACE (1 << 5) /* No space (no autounset). */
+#define TERMP_NONOBREAK (1 << 7) /* Don't newln NOBREAK. */
+#define TERMP_STYLE 0x0300 /* Style mask. */
+#define TERMP_BOLD (1 << 8) /* Styles... */
+#define TERMP_UNDER (1 << 9)
+ char *buf; /* Output buffer. */
+ enum termenc enc; /* Type of encoding. */
+ void *symtab; /* Encoded-symbol table. */