+ if (n == man->last && (FL_NLINE & man_flags[tok])) {
+ if (MAN_NLINE & man->flags)
+ return(man_perr(man, line, ppos, WLNSCOPE));
+ man->flags |= MAN_NLINE;
+ return(1);
+ }
+
+ if (FL_TLINE & man_flags[tok]) {
+ if (MAN_NLINE & man->flags)
+ return(man_perr(man, line, ppos, WLNSCOPE));
+ man->flags |= MAN_NLINE;
+ return(1);
+ }
+
+ /*
+ * Note that when TH is pruned, we'll be back at the root, so
+ * make sure that we don't clobber as its sibling.
+ */
+
+ for ( ; man->last; man->last = man->last->parent) {
+ if (man->last == n)
+ break;
+ if (man->last->type == MAN_ROOT)
+ break;
+ if ( ! man_valid_post(man))
+ return(0);
+ if ( ! man_action_post(man))
+ return(0);
+ }
+
+ assert(man->last);
+
+ /*
+ * Same here regarding whether we're back at the root.
+ */
+
+ if (man->last->type != MAN_ROOT && ! man_valid_post(man))
+ return(0);
+ if (man->last->type != MAN_ROOT && ! man_action_post(man))
+ return(0);
+ if (man->last->type != MAN_ROOT)
+ man->next = MAN_NEXT_SIBLING;
+
+ return(1);
+}
+
+
+int
+man_macroend(struct man *m)
+{
+
+ for ( ; m->last && m->last != m->first;
+ m->last = m->last->parent) {
+ if ( ! man_valid_post(m))
+ return(0);
+ if ( ! man_action_post(m))
+ return(0);
+ }
+ assert(m->last == m->first);