Lines Matching refs:n

46 		  struct mdoc_node *n
253 const struct mdoc_node *n; in terminal_mdoc() local
269 n = mdoc_node(mdoc); in terminal_mdoc()
274 if (n->child) in terminal_mdoc()
275 print_mdoc_nodelist(p, NULL, meta, n->child); in terminal_mdoc()
285 print_mdoc_node(p, pair, meta, n); in print_mdoc_nodelist()
286 if (n->next) in print_mdoc_nodelist()
287 print_mdoc_nodelist(p, pair, meta, n->next); in print_mdoc_nodelist()
302 n->prev_font = term_fontq(p); in print_mdoc_node()
313 if (n->prev ? (n->prev->lastline != n->line) : in print_mdoc_node()
314 (n->parent && n->parent->line != n->line)) { in print_mdoc_node()
325 switch (n->type) { in print_mdoc_node()
327 if (' ' == *n->string && MDOC_LINE & n->flags) in print_mdoc_node()
329 if (MDOC_DELIMC & n->flags) in print_mdoc_node()
331 term_word(p, n->string); in print_mdoc_node()
332 if (MDOC_DELIMO & n->flags) in print_mdoc_node()
336 term_eqn(p, n->eqn); in print_mdoc_node()
339 term_tbl(p, n->span); in print_mdoc_node()
342 if (termacts[n->tok].pre && ENDBODY_NOT == n->end) in print_mdoc_node()
343 chld = (*termacts[n->tok].pre) in print_mdoc_node()
344 (p, &npair, meta, n); in print_mdoc_node()
348 if (chld && n->child) in print_mdoc_node()
349 print_mdoc_nodelist(p, &npair, meta, n->child); in print_mdoc_node()
352 (ENDBODY_NOT == n->end ? n : n->pending)->prev_font); in print_mdoc_node()
354 switch (n->type) { in print_mdoc_node()
362 if ( ! termacts[n->tok].post || MDOC_ENDED & n->flags) in print_mdoc_node()
364 (void)(*termacts[n->tok].post)(p, &npair, meta, n); in print_mdoc_node()
371 if (ENDBODY_NOT != n->end) in print_mdoc_node()
372 n->pending->flags |= MDOC_ENDED; in print_mdoc_node()
379 if (ENDBODY_NOSPACE == n->end) in print_mdoc_node()
384 if (MDOC_EOS & n->flags) in print_mdoc_node()
570 const struct mdoc_node *n) in print_bvspace() argument
574 assert(n); in print_bvspace()
585 for (nn = n; nn; nn = nn->parent) { in print_bvspace()
600 if (n->prev && MDOC_It == n->prev->tok) in print_bvspace()
606 if (n->prev && MDOC_It == n->prev->tok) { in print_bvspace()
607 assert(n->prev->body); in print_bvspace()
608 if (NULL == n->prev->body->child) in print_bvspace()
626 if (MDOC_BLOCK == n->type) { in termp_it_pre()
627 print_bvspace(p, n->parent->parent, n); in termp_it_pre()
631 bl = n->parent->parent->parent; in termp_it_pre()
647 if (MDOC_HEAD == n->type) in termp_it_pre()
670 for (i = 0, nn = n->prev; in termp_it_pre()
745 if (MDOC_BODY == n->type) in termp_it_pre()
749 if (MDOC_BODY == n->type) in termp_it_pre()
760 if (MDOC_HEAD == n->type) in termp_it_pre()
788 if (MDOC_HEAD != n->type) in termp_it_pre()
794 if (MDOC_HEAD != n->type) in termp_it_pre()
803 if (n->next->child && in termp_it_pre()
804 (MDOC_Bl == n->next->child->tok || in termp_it_pre()
805 MDOC_Bd == n->next->child->tok)) in termp_it_pre()
812 if (MDOC_HEAD != n->type) in termp_it_pre()
818 if (NULL == n->next || NULL == n->next->child) in termp_it_pre()
822 if (MDOC_HEAD == n->type) in termp_it_pre()
825 if (NULL == n->next) { in termp_it_pre()
835 if (MDOC_HEAD != n->type) in termp_it_pre()
859 if (MDOC_HEAD == n->type && n->next->child && in termp_it_pre()
860 (MDOC_Bl == n->next->child->tok || in termp_it_pre()
861 MDOC_Bd == n->next->child->tok)) in termp_it_pre()
874 if (MDOC_HEAD == n->type) in termp_it_pre()
886 if (MDOC_HEAD == n->type) in termp_it_pre()
888 if (NULL == n->next && p->rmargin < p->maxrmargin) in termp_it_pre()
900 if (MDOC_HEAD == n->type) in termp_it_pre()
938 if (MDOC_HEAD == n->type) in termp_it_pre()
942 if (MDOC_HEAD == n->type) in termp_it_pre()
959 if (MDOC_BLOCK == n->type) in termp_it_post()
962 type = n->parent->parent->parent->norm->Bl.type; in termp_it_post()
970 if (MDOC_BODY == n->type) in termp_it_post()
974 if (MDOC_BODY == n->type) in termp_it_post()
1000 if (MDOC_BLOCK == n->type) { in termp_nm_pre()
1005 if (MDOC_BODY == n->type) { in termp_nm_pre()
1006 if (NULL == n->child) in termp_nm_pre()
1010 (NULL == n->prev->child ? in termp_nm_pre()
1012 MDOC_TEXT == n->prev->child->type ? in termp_nm_pre()
1013 term_strlen(p, n->prev->child->string) : in termp_nm_pre()
1018 if (NULL == n->child && NULL == meta->name) in termp_nm_pre()
1021 if (MDOC_HEAD == n->type) in termp_nm_pre()
1022 synopsis_pre(p, n->parent); in termp_nm_pre()
1024 if (MDOC_HEAD == n->type && n->next->child) { in termp_nm_pre()
1028 if (NULL == n->child) { in termp_nm_pre()
1030 } else if (MDOC_TEXT == n->child->type) { in termp_nm_pre()
1031 p->rmargin += term_strlen(p, n->child->string); in termp_nm_pre()
1032 if (n->child->next) in termp_nm_pre()
1041 if (NULL == n->child) in termp_nm_pre()
1052 if (MDOC_BLOCK == n->type) { in termp_nm_post()
1054 } else if (MDOC_HEAD == n->type && n->next->child) { in termp_nm_post()
1058 } else if (MDOC_BODY == n->type && n->child) in termp_nm_post()
1071 if (n->child) in termp_fl_pre()
1073 else if (n->next && n->next->line == n->line) in termp_fl_pre()
1085 if (n->prev && MDOC__A == n->prev->tok) in termp__a_pre()
1086 if (NULL == n->next || MDOC__A != n->next->tok) in termp__a_pre()
1098 if (NULL == n->child) in termp_an_pre()
1110 if (n->sec == SEC_AUTHORS) { in termp_an_pre()
1134 if (n->child) { in termp_an_post()
1135 if (SEC_AUTHORS == n->sec) in termp_an_post()
1140 if (AUTH_split == n->norm->An.auth) { in termp_an_post()
1143 } else if (AUTH_nosplit == n->norm->An.auth) { in termp_an_post()
1156 if ( ! (MDOC_LINE & n->flags)) in termp_ns_pre()
1167 if (SEC_SEE_ALSO != n->sec) in termp_rs_pre()
1169 if (MDOC_BLOCK == n->type && n->prev) in termp_rs_pre()
1184 nchild = n->nchild; in termp_rv_pre()
1185 for (n = n->child; n; n = n->next) { in termp_rv_pre()
1187 term_word(p, n->string); in termp_rv_pre()
1193 if (nchild > 2 && n->next) { in termp_rv_pre()
1198 if (n->next && NULL == n->next->next) in termp_rv_pre()
1230 nchild = n->nchild; in termp_ex_pre()
1231 for (n = n->child; n; n = n->next) { in termp_ex_pre()
1233 term_word(p, n->string); in termp_ex_pre()
1236 if (nchild > 2 && n->next) { in termp_ex_pre()
1241 if (n->next && NULL == n->next->next) in termp_ex_pre()
1262 if (MDOC_BODY != n->type) in termp_nd_pre()
1279 return(MDOC_HEAD != n->type); in termp_bl_pre()
1288 if (MDOC_BLOCK == n->type) in termp_bl_post()
1297 if (NULL == (n = n->child)) in termp_xr_pre()
1300 assert(MDOC_TEXT == n->type); in termp_xr_pre()
1301 term_word(p, n->string); in termp_xr_pre()
1303 if (NULL == (n = n->next)) in termp_xr_pre()
1310 assert(MDOC_TEXT == n->type); in termp_xr_pre()
1311 term_word(p, n->string); in termp_xr_pre()
1325 synopsis_pre(struct termp *p, const struct mdoc_node *n) in synopsis_pre() argument
1331 if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) in synopsis_pre()
1339 if (n->prev->tok == n->tok && in synopsis_pre()
1340 MDOC_Ft != n->tok && in synopsis_pre()
1341 MDOC_Fo != n->tok && in synopsis_pre()
1342 MDOC_Fn != n->tok) { in synopsis_pre()
1352 switch (n->prev->tok) { in synopsis_pre()
1365 if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) { in synopsis_pre()
1381 if (MDOC_ELEM == n->type) { in termp_vt_pre()
1382 synopsis_pre(p, n); in termp_vt_pre()
1383 return(termp_under_pre(p, pair, meta, n)); in termp_vt_pre()
1384 } else if (MDOC_BLOCK == n->type) { in termp_vt_pre()
1385 synopsis_pre(p, n); in termp_vt_pre()
1387 } else if (MDOC_HEAD == n->type) in termp_vt_pre()
1390 return(termp_under_pre(p, pair, meta, n)); in termp_vt_pre()
1409 synopsis_pre(p, n); in termp_fd_pre()
1410 return(termp_bold_pre(p, pair, meta, n)); in termp_fd_pre()
1430 switch (n->type) { in termp_sh_pre()
1432 if (n->prev && MDOC_Sh == n->prev->tok) in termp_sh_pre()
1433 if (NULL == n->prev->body->child) in termp_sh_pre()
1442 if (SEC_AUTHORS == n->sec) in termp_sh_pre()
1457 switch (n->type) { in termp_sh_post()
1487 if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags) in termp_lb_post()
1508 if (MDOC_BLOCK != n->type) in termp_d1_pre()
1522 synopsis_pre(p, n); in termp_ft_pre()
1535 pretty = MDOC_SYNPRETTY & n->flags; in termp_fn_pre()
1537 synopsis_pre(p, n); in termp_fn_pre()
1539 if (NULL == (n = n->child)) in termp_fn_pre()
1548 assert(MDOC_TEXT == n->type); in termp_fn_pre()
1550 term_word(p, n->string); in termp_fn_pre()
1564 for (n = n->next; n; n = n->next) { in termp_fn_pre()
1565 assert(MDOC_TEXT == n->type); in termp_fn_pre()
1569 term_word(p, n->string); in termp_fn_pre()
1572 if (n->next) { in termp_fn_pre()
1597 if (n->parent->tok != MDOC_Fo) { in termp_fa_pre()
1602 for (nn = n->child; nn; nn = nn->next) { in termp_fa_pre()
1608 if (nn->next || (n->next && n->next->tok == MDOC_Fa)) { in termp_fa_pre()
1625 if (MDOC_BLOCK == n->type) { in termp_bd_pre()
1626 print_bvspace(p, n, n); in termp_bd_pre()
1628 } else if (MDOC_HEAD == n->type) in termp_bd_pre()
1631 if (n->norm->Bd.offs) in termp_bd_pre()
1632 p->offset += a2offs(p, n->norm->Bd.offs); in termp_bd_pre()
1642 if (DISP_literal != n->norm->Bd.type && in termp_bd_pre()
1643 DISP_unfilled != n->norm->Bd.type) in termp_bd_pre()
1647 if (DISP_literal == n->norm->Bd.type) in termp_bd_pre()
1654 for (nn = n->child; nn; nn = nn->next) { in termp_bd_pre()
1701 if (MDOC_BODY != n->type) in termp_bd_post()
1707 if (DISP_literal == n->norm->Bd.type || in termp_bd_post()
1708 DISP_unfilled == n->norm->Bd.type) in termp_bd_post()
1724 if (NULL != (n = n->child)) { in termp_bx_pre()
1725 term_word(p, n->string); in termp_bx_pre()
1733 if (NULL != (n = n->next)) { in termp_bx_pre()
1737 term_word(p, n->string); in termp_bx_pre()
1752 switch (n->tok) { in termp_xx_pre()
1777 if (n->child) { in termp_xx_pre()
1780 term_word(p, n->child->string); in termp_xx_pre()
1801 switch (n->type) { in termp_ss_pre()
1804 if (n->prev) in termp_ss_pre()
1824 if (MDOC_HEAD == n->type) in termp_ss_post()
1834 synopsis_pre(p, n); in termp_cd_pre()
1845 synopsis_pre(p, n); in termp_in_pre()
1847 if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags) { in termp_in_pre()
1866 if (MDOC_SYNPRETTY & n->flags) in termp_in_post()
1872 if (MDOC_SYNPRETTY & n->flags) in termp_in_post()
1883 switch (n->tok) { in termp_sp_pre()
1885 len = n->child ? a2height(p, n->child->string) : 1; in termp_sp_pre()
1909 if (MDOC_BODY != n->type && MDOC_ELEM != n->type) in termp_quote_pre()
1912 switch (n->tok) { in termp_quote_pre()
1973 if (MDOC_BODY != n->type && MDOC_ELEM != n->type) in termp_quote_post()
1978 switch (n->tok) { in termp_quote_post()
2038 pretty = MDOC_SYNPRETTY & n->flags; in termp_fo_pre()
2040 if (MDOC_BLOCK == n->type) { in termp_fo_pre()
2041 synopsis_pre(p, n); in termp_fo_pre()
2043 } else if (MDOC_BODY == n->type) { in termp_fo_pre()
2061 if (NULL == n->child) in termp_fo_pre()
2066 assert(n->child->string); in termp_fo_pre()
2068 term_word(p, n->child->string); in termp_fo_pre()
2078 if (MDOC_BODY != n->type) in termp_fo_post()
2084 if (MDOC_SYNPRETTY & n->flags) { in termp_fo_post()
2097 if (MDOC_HEAD == n->type) in termp_bf_pre()
2099 else if (MDOC_BODY != n->type) in termp_bf_pre()
2102 if (FONT_Em == n->norm->Bf.font) in termp_bf_pre()
2104 else if (FONT_Sy == n->norm->Bf.font) in termp_bf_pre()
2118 assert(n->child && MDOC_TEXT == n->child->type); in termp_sm_pre()
2119 if (0 == strcmp("on", n->child->string)) { in termp_sm_pre()
2152 if (MDOC__A == n->tok && n->next && MDOC__A == n->next->tok) in termp____post()
2153 if (NULL == n->next->next || MDOC__A != n->next->next->tok) in termp____post()
2154 if (NULL == n->prev || MDOC__A != n->prev->tok) in termp____post()
2159 if (NULL == n->parent || MDOC_Rs != n->parent->tok) in termp____post()
2163 if (NULL == n->next) { in termp____post()
2187 if (NULL == (link = n->child)) in termp_lk_pre()
2214 switch (n->type) { in termp_bk_pre()
2220 if (n->parent->args || 0 == n->prev->nchild) in termp_bk_pre()
2237 if (MDOC_BODY == n->type) in termp_bk_post()
2250 if (n->parent && MDOC_Rs == n->parent->tok && in termp__t_post()
2251 n->parent->norm->Rs.quote_T) in termp__t_post()
2252 termp_quote_post(p, pair, meta, n); in termp__t_post()
2254 termp____post(p, pair, meta, n); in termp__t_post()
2266 if (n->parent && MDOC_Rs == n->parent->tok && in termp__t_pre()
2267 n->parent->norm->Rs.quote_T) in termp__t_pre()
2268 return(termp_quote_pre(p, pair, meta, n)); in termp__t_pre()