+ if (n->type == ROFFT_BLOCK) {
+ p->flags |= TERMP_PREKEEP;
+ return 1;
+ }
+
+ if (n->type == ROFFT_BODY) {
+ if (n->child == NULL)
+ return 0;
+ p->flags |= TERMP_NOSPACE;
+ cp = NULL;
+ if (n->prev->child != NULL)
+ cp = n->prev->child->string;
+ if (cp == NULL)
+ cp = meta->name;
+ if (cp == NULL)
+ p->tcol->offset += term_len(p, 6);
+ else
+ p->tcol->offset += term_len(p, 1) +
+ term_strlen(p, cp);
+ return 1;
+ }
+
+ if (n->child == NULL)
+ return 0;
+
+ if (n->type == ROFFT_HEAD)
+ synopsis_pre(p, n->parent);
+
+ if (n->type == ROFFT_HEAD &&
+ n->next != NULL && n->next->child != NULL) {
+ p->flags |= TERMP_NOSPACE | TERMP_NOBREAK | TERMP_BRIND;
+ p->trailspace = 1;
+ p->tcol->rmargin = p->tcol->offset + term_len(p, 1);
+ if (n->child == NULL)
+ p->tcol->rmargin += term_strlen(p, meta->name);
+ else if (n->child->type == ROFFT_TEXT) {
+ p->tcol->rmargin += term_strlen(p, n->child->string);
+ if (n->child->next != NULL)
+ p->flags |= TERMP_HANG;
+ } else {
+ p->tcol->rmargin += term_len(p, 5);
+ p->flags |= TERMP_HANG;
+ }
+ }
+
+ term_fontpush(p, TERMFONT_BOLD);
+ return 1;
+}
+
+static void
+termp_nm_post(DECL_ARGS)
+{
+
+ if (n->type == ROFFT_BLOCK) {
+ p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
+ } else if (n->type == ROFFT_HEAD &&
+ NULL != n->next && NULL != n->next->child) {
+ term_flushln(p);
+ p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG);
+ p->trailspace = 0;
+ } else if (n->type == ROFFT_BODY && n->child != NULL)
+ term_flushln(p);
+}