- i = 0;
- while (*argv) {
- if (ROFF_MAX == (c = rofffindcallable(*argv))) {
- assert(tree->arg);
- if ( ! roffdata(tree, i++, *argv++))
- return(0);
- continue;
- }
- if ( ! roffcall(tree, c, argv))
- return(0);
- break;
- }
-
- /*
- * If there's trailing punctuation in the header, then write it
- * out now. Here we mimic the behaviour of a line-dominant text
- * macro.
- */
-
- if (NULL == *argv) {
- if ( ! (*tree->cb.roffblkheadout)(tree->arg, tok))
- return(0);
- return((*tree->cb.roffblkbodyin)
- (tree->arg, tok, argcp, argvp));
- }
-
- /*
- * Expensive. Scan to the end of line then work backwards until
- * a token isn't punctuation.
- */
-
- if ( ! roffpurgepunct(tree, argv))
- return(0);
-
- if ( ! (*tree->cb.roffblkheadout)(tree->arg, tok))
- return(0);
- return((*tree->cb.roffblkbodyin)
- (tree->arg, tok, argcp, argvp));
-}
-
-
-/* ARGSUSED */
-static int
-roff_ordered(ROFFCALL_ARGS)
-{
- int i, first, c, argcp[ROFF_MAXLINEARG];
- char *ordp[ROFF_MAXLINEARG], *p,
- *argvp[ROFF_MAXLINEARG];
-
- if (ROFF_PRELUDE & tree->state) {
- roff_err(tree, *argv, "`%s' disallowed in prelude",
- toknames[tok]);
- return(0);
- }
-
- first = (*argv == tree->cur);
- p = *argv++;
-
- if ( ! roffparseopts(tree, tok, &argv, argcp, argvp))
- return(0);
-
- if (NULL == *argv)
- return(roffspecial(tree, tok, p, 0, ordp));
-
- i = 0;
- while (*argv && i < ROFF_MAXLINEARG) {
- c = rofffindcallable(*argv);
-
- if (ROFF_MAX == c && ! roffispunct(*argv)) {
- ordp[i++] = *argv++;
- continue;
- }
- ordp[i] = NULL;
-
- if (ROFF_MAX == c)
- break;
-
- if ( ! roffspecial(tree, tok, p, (size_t)i, ordp))
- return(0);
-
- return(roffcall(tree, c, ordp));
- }
-
- assert(i != ROFF_MAXLINEARG);
- ordp[i] = NULL;
-
- if ( ! roffspecial(tree, tok, p, (size_t)i, ordp))
- return(0);
-
- /* FIXME: error if there's stuff after the punctuation. */
-
- if ( ! first || NULL == *argv)
- return(1);
-
- return(roffpurgepunct(tree, argv));
-}
-
-
-/* ARGSUSED */
-static int
-roff_text(ROFFCALL_ARGS)
-{
- int i, j, first, c, argcp[ROFF_MAXLINEARG];
- char *argvp[ROFF_MAXLINEARG];
-
- if (ROFF_PRELUDE & tree->state) {
- roff_err(tree, *argv, "`%s' disallowed in prelude",
- toknames[tok]);
- return(0);