Lines Matching refs:last
393 if (MDOC_VALID & mdoc->last->flags) in mdoc_valid_post()
395 mdoc->last->flags |= MDOC_VALID; in mdoc_valid_post()
397 switch (mdoc->last->type) { in mdoc_valid_post()
410 if (NULL == mdoc_valids[mdoc->last->tok].post) in mdoc_valid_post()
412 for (p = mdoc_valids[mdoc->last->tok].post; *p; p++) in mdoc_valid_post()
426 if (mdoc->last->type != type) in check_count()
432 if (mdoc->last->nchild < val) in check_count()
437 if (mdoc->last->nchild > val) in check_count()
442 if (val == mdoc->last->nchild) in check_count()
451 mandoc_vmsg(t, mdoc->parse, mdoc->last->line, mdoc->last->pos, in check_count()
453 p, val, mdoc->last->nchild); in check_count()
582 for (node = mdoc->last->parent; node; node = node->parent) in pre_display()
992 if (MDOC_HEAD != mdoc->last->type) { in post_bf()
993 if (ENDBODY_NOT != mdoc->last->end) { in post_bf()
994 assert(mdoc->last->pending); in post_bf()
995 np = mdoc->last->pending->parent->head; in post_bf()
996 } else if (MDOC_BLOCK != mdoc->last->type) { in post_bf()
997 np = mdoc->last->parent->head; in post_bf()
999 np = mdoc->last->head; in post_bf()
1007 np = mdoc->last; in post_bf()
1062 assert(mdoc->last->child); in post_lb()
1063 assert(MDOC_TEXT == mdoc->last->child->type); in post_lb()
1065 p = mdoc_a2lib(mdoc->last->child->string); in post_lb()
1070 free(mdoc->last->child->string); in post_lb()
1071 mdoc->last->child->string = mandoc_strdup(p); in post_lb()
1077 sz = strlen(mdoc->last->child->string) + in post_lb()
1081 mdoc->last->child->string); in post_lb()
1082 free(mdoc->last->child->string); in post_lb()
1083 mdoc->last->child->string = buf; in post_lb()
1091 if (mdoc->last->child) in post_eoln()
1092 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST); in post_eoln()
1110 if (MDOC_BODY != mdoc->last->type) in post_vt()
1113 for (n = mdoc->last->child; n; n = n->next) in post_vt()
1132 if (NULL != mdoc->last->child) { in post_nm()
1134 c = concat(buf, mdoc->last->child, BUFSIZ); in post_nm()
1140 mdoc_nmsg(mdoc, mdoc->last->child, MANDOCERR_MEM); in post_nm()
1143 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NONAME); in post_nm()
1164 if (MDOC_BODY == mdoc->last->type) in post_literal()
1181 if (mdoc->last->child) in post_defaults()
1184 nn = mdoc->last; in post_defaults()
1215 mdoc->last = nn; in post_defaults()
1232 if (NULL == mdoc->last->child) in post_at()
1235 assert(MDOC_TEXT == mdoc->last->child->type); in post_at()
1236 p = mdoc_a2att(mdoc->last->child->string); in post_at()
1239 free(mdoc->last->child->string); in post_at()
1240 mdoc->last->child->string = mandoc_strdup(p); in post_at()
1242 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADATT); in post_at()
1244 q = mdoc->last->child->string; in post_at()
1249 free(mdoc->last->child->string); in post_at()
1250 mdoc->last->child->string = buf; in post_at()
1261 np = mdoc->last; in post_an()
1280 if (MDOC_BLOCK != mdoc->last->type) in post_it()
1283 n = mdoc->last->parent->parent; in post_it()
1287 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_LISTTYPE); in post_it()
1293 if (mdoc->last->head->child) in post_it()
1296 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS); in post_it()
1305 if (NULL == mdoc->last->head->child) in post_it()
1306 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS); in post_it()
1315 if (NULL == mdoc->last->body->child) in post_it()
1316 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY); in post_it()
1319 if (mdoc->last->head->child) in post_it()
1320 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST); in post_it()
1325 assert(NULL == mdoc->last->head->child); in post_it()
1327 if (NULL == mdoc->last->body->child) in post_it()
1328 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY); in post_it()
1330 for (i = 0, c = mdoc->last->child; c; c = c->next) in post_it()
1341 mandoc_vmsg(er, mdoc->parse, mdoc->last->line, in post_it()
1342 mdoc->last->pos, in post_it()
1365 n = mdoc->last; in post_bl_block()
1381 nc = ni->body->last; in post_bl_block()
1404 nc = ni->body->last; in post_bl_block()
1419 n = mdoc->last; in post_bl_block_width()
1474 n = mdoc->last; in post_bl_block_tag()
1531 if (LIST_column != mdoc->last->norm->Bl.type) in post_bl_head()
1548 if (mdoc->last->norm->Bl.ncols && mdoc->last->nchild) { in post_bl_head()
1549 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_COLUMNS); in post_bl_head()
1551 } else if (NULL == mdoc->last->child) in post_bl_head()
1554 np = mdoc->last->parent; in post_bl_head()
1570 np->args->argv[j].sz = (size_t)mdoc->last->nchild; in post_bl_head()
1572 ((size_t)mdoc->last->nchild * sizeof(char *)); in post_bl_head()
1574 mdoc->last->norm->Bl.ncols = np->args->argv[j].sz; in post_bl_head()
1575 mdoc->last->norm->Bl.cols = (void *)np->args->argv[j].value; in post_bl_head()
1577 for (i = 0, nn = mdoc->last->child; nn; i++) { in post_bl_head()
1585 mdoc->last->nchild = 0; in post_bl_head()
1586 mdoc->last->child = NULL; in post_bl_head()
1598 nbody = mdoc->last; in post_bl()
1636 nbody->last = NULL; in post_bl()
1668 if (NULL == mdoc->last->child) { in ebool()
1669 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY); in ebool()
1670 mdoc_node_delete(mdoc, mdoc->last); in ebool()
1675 assert(MDOC_TEXT == mdoc->last->child->type); in ebool()
1677 if (0 == strcmp(mdoc->last->child->string, "on")) { in ebool()
1678 if (MDOC_Sm == mdoc->last->tok) in ebool()
1682 if (0 == strcmp(mdoc->last->child->string, "off")) { in ebool()
1683 if (MDOC_Sm == mdoc->last->tok) in ebool()
1688 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADBOOL); in ebool()
1731 if (NULL == (ch = mdoc->last->child)) { in post_st()
1732 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY); in post_st()
1733 mdoc_node_delete(mdoc, mdoc->last); in post_st()
1740 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADSTANDARD); in post_st()
1741 mdoc_node_delete(mdoc, mdoc->last); in post_st()
1756 switch (mdoc->last->type) { in post_rs()
1761 if (mdoc->last->child) in post_rs()
1776 for (nn = mdoc->last->child; nn; nn = next) { in post_rs()
1783 mdoc->last->norm->Rs.quote_T++; in post_rs()
1798 if (NULL == mdoc->last->child) in post_rs()
1808 for (nn = mdoc->last->child->next; nn; nn = next) { in post_rs()
1857 mdoc->last->child->prev = nn; in post_rs()
1858 nn->next = mdoc->last->child; in post_rs()
1859 mdoc->last->child = nn; in post_rs()
1876 n = mdoc->last; in post_hyph()
1911 if (MDOC_LINE & mdoc->last->flags) in post_ns()
1912 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNNS); in post_ns()
1920 if (MDOC_HEAD == mdoc->last->type) in post_sh()
1922 if (MDOC_BODY == mdoc->last->type) in post_sh()
1942 if (NULL == (n = mdoc->last->child)) { in post_sh_body()
1943 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADNAMESEC); in post_sh_body()
1952 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADNAMESEC); in post_sh_body()
1959 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_BADNAMESEC); in post_sh_body()
1980 if (-1 == (c = concat(buf, mdoc->last->child, BUFSIZ))) { in post_sh_head()
1981 mdoc_nmsg(mdoc, mdoc->last->child, MANDOCERR_MEM); in post_sh_head()
1989 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NAMESECFIRST); in post_sh_head()
2014 mdoc->last->parent->sec = sec; in post_sh_head()
2015 mdoc->last->sec = sec; in post_sh_head()
2016 for (n = mdoc->last->child; n; n = n->next) in post_sh_head()
2030 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_SECREP); in post_sh_head()
2033 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_SECOOO); in post_sh_head()
2056 mdoc->last->line, mdoc->last->pos, buf); in post_sh_head()
2070 if (MDOC_BODY != mdoc->last->type) in post_ignpar()
2073 if (NULL != (np = mdoc->last->child)) in post_ignpar()
2079 if (NULL != (np = mdoc->last->last)) in post_ignpar()
2092 if (NULL == mdoc->last) in pre_par()
2102 if (MDOC_Pp != mdoc->last->tok && in pre_par()
2103 MDOC_Lp != mdoc->last->tok && in pre_par()
2104 MDOC_br != mdoc->last->tok) in pre_par()
2113 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNPAR); in pre_par()
2114 mdoc_node_delete(mdoc, mdoc->last); in pre_par()
2122 if (MDOC_ELEM != mdoc->last->type && in post_par()
2123 MDOC_BLOCK != mdoc->last->type) in post_par()
2126 if (NULL == mdoc->last->prev) { in post_par()
2127 if (MDOC_Sh != mdoc->last->parent->tok && in post_par()
2128 MDOC_Ss != mdoc->last->parent->tok) in post_par()
2131 if (MDOC_Pp != mdoc->last->prev->tok && in post_par()
2132 MDOC_Lp != mdoc->last->prev->tok && in post_par()
2133 (MDOC_br != mdoc->last->tok || in post_par()
2134 (MDOC_sp != mdoc->last->prev->tok && in post_par()
2135 MDOC_br != mdoc->last->prev->tok))) in post_par()
2139 mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNPAR); in post_par()
2140 mdoc_node_delete(mdoc, mdoc->last); in post_par()
2184 n = mdoc->last; in post_dd()
2211 n = mdoc->last; in post_dt()
2321 mdoc_node_delete(mdoc, mdoc->last); in post_prol()
2339 n = mdoc->last->child; in post_bx()
2357 n = mdoc->last; in post_os()
2419 n = mdoc->last; in post_std()
2439 mdoc->last = nn; in post_std()