Lines Matching refs:man

30 #include "man.h"
88 man_unscope(struct roff_man *man, const struct roff_node *to)
93 n = man->last;
99 if (man->flags & (MAN_BLINE | MAN_ELINE) &&
102 man->parse, n->line, n->pos,
105 if (man->flags & MAN_ELINE)
106 man->flags &= ~MAN_ELINE;
110 man->flags &= ~MAN_BLINE;
112 man->last = n;
114 roff_node_delete(man, man->last);
120 man->parse, n->line, n->pos,
125 * We might delete the man->last node
131 man->last = n;
133 man->last->flags |= MAN_VALID;
143 man->next = (man->last == to) ?
153 rew_scope(struct roff_man *man, int tok)
159 n = man->last;
173 man_unscope(man, n);
184 man_unscope(man, n);
185 n = man->last;
205 if ( ! man_args(man, line, pos, buf, &p))
207 for (nn = man->last->parent; nn; nn = nn->parent)
212 mandoc_vmsg(MANDOCERR_ARG_EXCESS, man->parse,
218 mandoc_vmsg(MANDOCERR_RE_NOTOPEN, man->parse,
230 for (nn = man->last->parent; nn; nn = nn->parent)
235 mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse,
237 rew_scope(man, MAN_PP);
239 line = man->last->line;
240 ppos = man->last->pos;
241 ntok = man->last->tok;
242 man_unscope(man, nn);
248 blk_imp(man, ntok, line, ppos, pos, buf);
260 rew_scope(man, tok);
261 roff_block_alloc(man, line, ppos, tok);
262 head = roff_head_alloc(man, line, ppos, tok);
265 if (man_args(man, line, pos, buf, &p))
266 roff_word_alloc(man, line, la, p);
270 man->parse, line, *pos, "%s ... %s",
273 man_unscope(man, head);
274 roff_body_alloc(man, line, ppos, tok);
290 rew_scope(man, tok);
291 n = roff_block_alloc(man, line, ppos, tok);
293 man->flags &= ~MAN_LITERAL;
294 n = roff_head_alloc(man, line, ppos, tok);
300 if ( ! man_args(man, line, pos, buf, &p))
302 roff_word_alloc(man, line, la, p);
312 (tok == MAN_TP || n == man->last)) {
313 man->flags |= MAN_BLINE;
319 man_unscope(man, n);
320 roff_body_alloc(man, line, ppos, tok);
330 roff_elem_alloc(man, line, ppos, tok);
331 n = man->last;
337 man->parse, line, *pos, "%s %s",
341 if (buf[*pos] != '\0' && man->last != n &&
344 man->parse, line, *pos, "%s ... %s",
349 if ( ! man_args(man, line, pos, buf, &p))
352 man->last->type == ROFFT_TEXT)
353 roff_word_append(man, p);
355 roff_word_alloc(man, line, la, p);
363 if (n != man->last &&
364 mandoc_eos(man->last->string, strlen(man->last->string)))
365 man->last->flags |= MAN_EOS;
373 if (n == man->last && man_macros[tok].flags & MAN_SCOPED) {
375 man->flags |= MAN_ELINE;
379 assert(man->last->type != ROFFT_ROOT);
380 man->next = ROFF_NEXT_SIBLING;
384 for ( ; man->last; man->last = man->last->parent) {
385 man_state(man, man->last);
386 if (man->last == n)
392 man_endparse(struct roff_man *man)
395 man_unscope(man, man->first);
396 man->flags &= ~MAN_LITERAL;
400 man_args(struct roff_man *man, int line, int *pos, char *buf, char **v)
411 *v = mandoc_getarg(man->parse, v, line, pos);