- /* The macro is sane. Jump to the next word. */
-
- while (buf[i] && ' ' == buf[i])
- i++;
-
- /* Begin recursive parse sequence. */
-
- if ( ! man_macro(m, c, ln, ppos, &i, buf))
- goto err;
-
-out:
- if (fl) {
- /*
- * A NLINE macro has been immediately followed with
- * another. Close out the preceding macro's scope, and
- * continue.
- */
- assert(MAN_ROOT != m->last->type);
- assert(m->last->parent);
- assert(MAN_ROOT != m->last->parent->type);
-
- if (n != m->last)
- m->last = m->last->parent;
-
- if ( ! man_valid_post(m))
- return(0);
- if ( ! man_action_post(m))
- return(0);
- m->next = MAN_NEXT_SIBLING;
- m->flags &= ~MAN_NLINE;
- }
-
- return(1);
-
-err: /* Error out. */
-
- m->flags |= MAN_HALT;
- return(0);
-}
-
-
-int
-man_verr(struct man *man, int ln, int pos, const char *fmt, ...)
-{
- char buf[256];
- va_list ap;
-
- if (NULL == man->cb.man_err)
- return(0);
-
- va_start(ap, fmt);
- (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
- va_end(ap);
- return((*man->cb.man_err)(man->data, ln, pos, buf));
-}
-
-
-int
-man_vwarn(struct man *man, int ln, int pos, const char *fmt, ...)
-{
- char buf[256];
- va_list ap;
-
- if (NULL == man->cb.man_warn)
- return(0);
-
- va_start(ap, fmt);
- (void)vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
- va_end(ap);
- return((*man->cb.man_warn)(man->data, ln, pos, buf));
-}
-