Lines Matching refs:n
38 #define CHKARGS struct man *man, struct man_node *n
130 man_valid_pre(struct man *man, struct man_node *n) in man_valid_pre() argument
134 switch (n->type) { in man_valid_pre()
147 if (NULL == (cp = man_valids[n->tok].pres)) in man_valid_pre()
150 if ( ! (*cp)(man, n)) in man_valid_pre()
194 man_nmsg(man, n, MANDOCERR_SCOPEEXIT); in check_root()
196 man_nmsg(man, n, MANDOCERR_SCOPEEXIT); in check_root()
202 man_nmsg(man, n, MANDOCERR_NODOCBODY); in check_root()
205 man_nmsg(man, n, MANDOCERR_NOTITLE); in check_root()
215 (man->parse, NULL, n->line, n->pos); in check_root()
229 cp = n->string; in check_text()
231 man_pmsg(man, n->line, (int)(p - cp), MANDOCERR_BADTAB); in check_text()
238 if (n->nchild ineq (x)) \
240 mandoc_vmsg(MANDOCERR_ARGCOUNT, man->parse, n->line, n->pos, \
242 #ineq, (x), n->nchild); \
256 if (MAN_HEAD == n->type && 1 != n->nchild) in check_head1()
257 mandoc_vmsg(MANDOCERR_ARGCOUNT, man->parse, n->line, in check_head1()
258 n->pos, "line arguments eq 1 (have %d)", n->nchild); in check_head1()
269 if (0 == n->nchild) in post_ft()
273 cp = n->child->string; in post_ft()
306 n->line, n->pos, "%s", cp); in post_ft()
310 if (1 < n->nchild) in post_ft()
312 (MANDOCERR_ARGCOUNT, man->parse, n->line, in post_ft()
313 n->pos, "want one child (have %d)", in post_ft()
314 n->nchild); in post_ft()
323 if (MAN_BLOCK == n->type) in pre_sec()
332 if ( ! (MAN_HEAD == n->type && 0 == n->nchild)) in post_sec()
335 man_nmsg(man, n, MANDOCERR_SYNTARGCOUNT); in post_sec()
343 if (MAN_BODY == n->type && 0 == n->nchild) in check_part()
344 mandoc_msg(MANDOCERR_ARGCWARN, man->parse, n->line, in check_part()
345 n->pos, "want children (have none)"); in check_part()
355 switch (n->type) { in check_par()
357 if (0 == n->body->nchild) in check_par()
358 man_node_delete(man, n); in check_par()
361 if (0 == n->nchild) in check_par()
362 man_nmsg(man, n, MANDOCERR_IGNPAR); in check_par()
365 if (n->nchild) in check_par()
366 man_nmsg(man, n, MANDOCERR_ARGSLOST); in check_par()
379 switch (n->type) { in post_IP()
381 if (0 == n->head->nchild && 0 == n->body->nchild) in post_IP()
382 man_node_delete(man, n); in post_IP()
385 if (0 == n->parent->head->nchild && 0 == n->nchild) in post_IP()
386 man_nmsg(man, n, MANDOCERR_IGNPAR); in post_IP()
406 line = n->line; in post_TH()
407 pos = n->pos; in post_TH()
413 n = n->child; in post_TH()
414 if (n && n->string) { in post_TH()
415 for (p = n->string; '\0' != *p; p++) { in post_TH()
419 man_nmsg(man, n, MANDOCERR_UPPERCASE); in post_TH()
423 man->meta.title = mandoc_strdup(n->string); in post_TH()
429 if (n) in post_TH()
430 n = n->next; in post_TH()
431 if (n && n->string) in post_TH()
432 man->meta.msec = mandoc_strdup(n->string); in post_TH()
438 if (n) in post_TH()
439 n = n->next; in post_TH()
440 if (n && n->string && '\0' != n->string[0]) { in post_TH()
441 pos = n->pos; in post_TH()
443 (man->parse, n->string, line, pos); in post_TH()
449 if (n && (n = n->next)) in post_TH()
450 man->meta.source = mandoc_strdup(n->string); in post_TH()
455 if (n && (n = n->next)) in post_TH()
456 man->meta.vol = mandoc_strdup(n->string); in post_TH()
474 man_nmsg(man, n, MANDOCERR_SCOPEREP); in post_nf()
485 man_nmsg(man, n, MANDOCERR_WNOSCOPE); in post_fi()
504 n = n->child; in post_UC()
506 if (NULL == n || MAN_TEXT != n->type) in post_UC()
509 s = n->string; in post_UC()
542 n = n->child; in post_AT()
544 if (NULL == n || MAN_TEXT != n->type) in post_AT()
547 s = n->string; in post_AT()
553 nn = n->next; in post_AT()
571 if (NULL != n->prev) in post_vs()
574 switch (n->parent->tok) { in post_vs()
578 man_nmsg(man, n, MANDOCERR_IGNPAR); in post_vs()
585 man_node_delete(man, n); in post_vs()