Lines Matching refs:n

40 			  struct roff_node *n, \
247 synopsis_pre(struct html *h, struct roff_node *n) in synopsis_pre() argument
251 if ((n->flags & NODE_SYNPRETTY) == 0 || in synopsis_pre()
252 (np = roff_node_prev(n)) == NULL) in synopsis_pre()
255 if (np->tok == n->tok && in synopsis_pre()
256 MDOC_Fo != n->tok && in synopsis_pre()
257 MDOC_Ft != n->tok && in synopsis_pre()
258 MDOC_Fn != n->tok) { in synopsis_pre()
271 if (n->tok != MDOC_Fn && n->tok != MDOC_Fo) in synopsis_pre()
286 struct roff_node *n; in html_mdoc() local
290 n = mdoc->first->child; in html_mdoc()
295 if (n != NULL && n->type == ROFFT_COMMENT) in html_mdoc()
296 print_gen_comment(h, n); in html_mdoc()
305 print_mdoc_nodelist(mdoc, n, h); in html_mdoc()
337 while (n != NULL) { in print_mdoc_nodelist()
338 print_mdoc_node(meta, n, h); in print_mdoc_nodelist()
339 n = n->next; in print_mdoc_nodelist()
349 if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) in print_mdoc_node()
352 if ((n->flags & NODE_NOFILL) == 0) in print_mdoc_node()
355 n->tok != ROFF_fi && n->flags & NODE_LINE) in print_mdoc_node()
359 n->flags &= ~NODE_ENDED; in print_mdoc_node()
360 switch (n->type) { in print_mdoc_node()
362 if (n->flags & NODE_LINE) { in print_mdoc_node()
363 switch (*n->string) { in print_mdoc_node()
370 (n->flags & NODE_NOFILL) == 0) in print_mdoc_node()
379 if (n->flags & NODE_DELIMC) in print_mdoc_node()
381 if (n->flags & NODE_HREF) in print_mdoc_node()
382 print_tagged_text(h, n->string, n); in print_mdoc_node()
384 print_text(h, n->string); in print_mdoc_node()
385 if (n->flags & NODE_DELIMO) in print_mdoc_node()
391 print_eqn(h, n->eqn); in print_mdoc_node()
399 print_tbl(h, n->span); in print_mdoc_node()
412 if (n->tok < ROFF_MAX) { in print_mdoc_node()
413 roff_html_pre(h, n); in print_mdoc_node()
418 assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX); in print_mdoc_node()
419 if (mdoc_html_acts[n->tok - MDOC_Dd].pre != NULL && in print_mdoc_node()
420 (n->end == ENDBODY_NOT || n->child != NULL)) in print_mdoc_node()
421 child = (*mdoc_html_acts[n->tok - MDOC_Dd].pre)(meta, in print_mdoc_node()
422 n, h); in print_mdoc_node()
426 if (h->flags & HTML_KEEP && n->flags & NODE_LINE) { in print_mdoc_node()
431 if (child && n->child != NULL) in print_mdoc_node()
432 print_mdoc_nodelist(meta, n->child, h); in print_mdoc_node()
437 switch (n->type) { in print_mdoc_node()
442 if (mdoc_html_acts[n->tok - MDOC_Dd].post == NULL || in print_mdoc_node()
443 n->flags & NODE_ENDED) in print_mdoc_node()
445 (*mdoc_html_acts[n->tok - MDOC_Dd].post)(meta, n, h); in print_mdoc_node()
446 if (n->end != ENDBODY_NOT) in print_mdoc_node()
447 n->body->flags |= NODE_ENDED; in print_mdoc_node()
510 print_otag_id(h, TAG_CODE, roff_name[n->tok], n); in mdoc_code_pre()
522 switch (n->type) { in mdoc_sh_pre()
527 n->sec <= SEC_SYNOPSIS) { in mdoc_sh_pre()
533 for (sn = n->next; sn != NULL; sn = sn->next) in mdoc_sh_pre()
543 for (sn = n; sn != NULL; sn = sn->next) { in mdoc_sh_pre()
574 print_otag_id(h, TAG_H1, "Sh", n); in mdoc_sh_pre()
577 if (n->sec == SEC_AUTHORS) in mdoc_sh_pre()
589 switch (n->type) { in mdoc_ss_pre()
595 print_otag_id(h, TAG_H2, "Ss", n); in mdoc_ss_pre()
610 print_otag_id(h, TAG_CODE, "Fl", n); in mdoc_fl_pre()
612 if (n->child != NULL || in mdoc_fl_pre()
613 ((nn = roff_node_next(n)) != NULL && in mdoc_fl_pre()
624 switch (n->type) { in mdoc_nd_pre()
642 switch (n->type) { in mdoc_nm_pre()
658 synopsis_pre(h, n); in mdoc_nm_pre()
667 if (NULL == n->child) in mdoc_xr_pre()
672 n->child->string, n->child->next == NULL ? in mdoc_xr_pre()
673 NULL : n->child->next->string); in mdoc_xr_pre()
677 n = n->child; in mdoc_xr_pre()
678 print_text(h, n->string); in mdoc_xr_pre()
680 if (NULL == (n = n->next)) in mdoc_xr_pre()
686 print_text(h, n->string); in mdoc_xr_pre()
697 if ((id = html_make_id(n, 1)) != NULL) { in mdoc_tg_pre()
708 if ( ! (NODE_LINE & n->flags)) in mdoc_ns_pre()
733 bl = n->parent; in mdoc_it_pre()
744 switch (n->type) { in mdoc_it_pre()
748 print_otag_id(h, TAG_LI, NULL, n); in mdoc_it_pre()
758 switch (n->type) { in mdoc_it_pre()
760 print_otag_id(h, TAG_DT, NULL, n); in mdoc_it_pre()
770 switch (n->type) { in mdoc_it_pre()
772 print_otag_id(h, TAG_DT, NULL, n); in mdoc_it_pre()
775 if (n->child == NULL) { in mdoc_it_pre()
786 switch (n->type) { in mdoc_it_pre()
793 print_otag_id(h, TAG_TR, NULL, n); in mdoc_it_pre()
809 switch (n->type) { in mdoc_bl_pre()
821 bl = &n->norm->Bl; in mdoc_bl_pre()
860 bl->comp ? "Bl-tag Bl-compact" : "Bl-tag", n->body); in mdoc_bl_pre()
873 print_otag_id(h, elemtype, cattr, n->body); in mdoc_bl_pre()
880 if (roff_node_prev(n) != NULL) in mdoc_ex_pre()
895 print_otag_id(h, TAG_I, "Em", n); in mdoc_em_pre()
902 switch (n->type) { in mdoc_d1_pre()
913 print_otag_id(h, TAG_DIV, "Bd Bd-indent", n); in mdoc_d1_pre()
914 if (n->tok == MDOC_Dl) in mdoc_d1_pre()
924 id = html_make_id(n, 0); in mdoc_sx_pre()
937 switch (n->type) { in mdoc_bd_pre()
951 comp = n->norm->Bd.comp; in mdoc_bd_pre()
952 for (nn = n; nn != NULL && comp == 0; nn = nn->parent) { in mdoc_bd_pre()
966 if (n->norm->Bd.offs != NULL && in mdoc_bd_pre()
967 strcmp(n->norm->Bd.offs, "left") != 0) in mdoc_bd_pre()
970 if (n->norm->Bd.type == DISP_literal) in mdoc_bd_pre()
973 print_otag_id(h, TAG_DIV, buf, n); in mdoc_bd_pre()
994 if (n->norm->An.auth == AUTH_split) { in mdoc_an_pre()
999 if (n->norm->An.auth == AUTH_nosplit) { in mdoc_an_pre()
1008 if (n->sec == SEC_AUTHORS && ! (h->flags & HTML_NOSPLIT)) in mdoc_an_pre()
1018 synopsis_pre(h, n); in mdoc_cd_pre()
1029 if (n->parent->tok != MDOC_Fo) { in mdoc_fa_pre()
1033 for (nn = n->child; nn != NULL; nn = nn->next) { in mdoc_fa_pre()
1042 if (n->child != NULL && in mdoc_fa_pre()
1043 (nn = roff_node_next(n)) != NULL && in mdoc_fa_pre()
1057 synopsis_pre(h, n); in mdoc_fd_pre()
1059 if (NULL == (n = n->child)) in mdoc_fd_pre()
1062 assert(n->type == ROFFT_TEXT); in mdoc_fd_pre()
1064 if (strcmp(n->string, "#include")) { in mdoc_fd_pre()
1070 print_text(h, n->string); in mdoc_fd_pre()
1072 if (NULL != (n = n->next)) { in mdoc_fd_pre()
1073 assert(n->type == ROFFT_TEXT); in mdoc_fd_pre()
1076 cp = n->string; in mdoc_fd_pre()
1088 print_text(h, n->string); in mdoc_fd_pre()
1091 n = n->next; in mdoc_fd_pre()
1094 for ( ; n; n = n->next) { in mdoc_fd_pre()
1095 assert(n->type == ROFFT_TEXT); in mdoc_fd_pre()
1096 print_text(h, n->string); in mdoc_fd_pre()
1105 if (n->type == ROFFT_BLOCK) { in mdoc_vt_pre()
1106 synopsis_pre(h, n); in mdoc_vt_pre()
1108 } else if (n->type == ROFFT_ELEM) { in mdoc_vt_pre()
1109 synopsis_pre(h, n); in mdoc_vt_pre()
1110 } else if (n->type == ROFFT_HEAD) in mdoc_vt_pre()
1120 synopsis_pre(h, n); in mdoc_ft_pre()
1133 pretty = NODE_SYNPRETTY & n->flags; in mdoc_fn_pre()
1134 synopsis_pre(h, n); in mdoc_fn_pre()
1137 assert(n->child->string); in mdoc_fn_pre()
1138 sp = n->child->string; in mdoc_fn_pre()
1155 t = print_otag_id(h, TAG_CODE, "Fn", n); in mdoc_fn_pre()
1166 for (n = n->child->next; n; n = n->next) { in mdoc_fn_pre()
1167 if (NODE_SYNPRETTY & n->flags) in mdoc_fn_pre()
1172 print_text(h, n->string); in mdoc_fn_pre()
1174 if (n->next) { in mdoc_fn_pre()
1195 if (NULL == n->child) in mdoc_sm_pre()
1197 else if (0 == strcmp("on", n->child->string)) in mdoc_sm_pre()
1220 if (n->flags & NODE_NOFILL) { in mdoc_pp_pre()
1222 if (n->flags & NODE_ID) in mdoc_pp_pre()
1223 mdoc_tg_pre(meta, n, h); in mdoc_pp_pre()
1230 id = n->flags & NODE_ID ? html_make_id(n, 1) : NULL; in mdoc_pp_pre()
1243 if ((link = n->child) == NULL) in mdoc_lk_pre()
1247 punct = n->last; in mdoc_lk_pre()
1280 for (n = n->child; n; n = n->next) { in mdoc_mt_pre()
1281 assert(n->type == ROFFT_TEXT); in mdoc_mt_pre()
1282 mandoc_asprintf(&cp, "mailto:%s", n->string); in mdoc_mt_pre()
1284 print_text(h, n->string); in mdoc_mt_pre()
1296 switch (n->type) { in mdoc_fo_pre()
1298 synopsis_pre(h, n); in mdoc_fo_pre()
1301 if (n->child != NULL) { in mdoc_fo_pre()
1302 t = print_otag_id(h, TAG_CODE, "Fn", n); in mdoc_fo_pre()
1303 print_text(h, n->child->string); in mdoc_fo_pre()
1320 if (n->type != ROFFT_BODY) in mdoc_fo_post()
1333 synopsis_pre(h, n); in mdoc_in_pre()
1343 if (NODE_SYNPRETTY & n->flags && NODE_LINE & n->flags) in mdoc_in_pre()
1349 if (NULL != (n = n->child)) { in mdoc_in_pre()
1350 assert(n->type == ROFFT_TEXT); in mdoc_in_pre()
1353 t = print_otag(h, TAG_A, "chI", "In", n->string); in mdoc_in_pre()
1356 print_text(h, n->string); in mdoc_in_pre()
1359 n = n->next; in mdoc_in_pre()
1365 for ( ; n; n = n->next) { in mdoc_in_pre()
1366 assert(n->type == ROFFT_TEXT); in mdoc_in_pre()
1367 print_text(h, n->string); in mdoc_in_pre()
1393 switch (n->type) { in mdoc_bf_pre()
1405 if (FONT_Em == n->norm->Bf.font) in mdoc_bf_pre()
1407 else if (FONT_Sy == n->norm->Bf.font) in mdoc_bf_pre()
1409 else if (FONT_Li == n->norm->Bf.font) in mdoc_bf_pre()
1429 if ( ! (n->next == NULL || n->next->flags & NODE_LINE)) in mdoc_pf_post()
1436 switch (n->type) { in mdoc_rs_pre()
1438 if (n->sec == SEC_SEE_ALSO) in mdoc_rs_pre()
1444 if (n->sec == SEC_SEE_ALSO) in mdoc_rs_pre()
1457 print_otag_id(h, TAG_SPAN, roff_name[n->tok], n); in mdoc_no_pre()
1464 print_otag_id(h, TAG_B, "Sy", n); in mdoc_sy_pre()
1471 if (n->sec == SEC_LIBRARY && in mdoc_lb_pre()
1472 n->flags & NODE_LINE && in mdoc_lb_pre()
1473 roff_node_prev(n) != NULL) in mdoc_lb_pre()
1489 switch (n->tok) { in mdoc__x_pre()
1492 if ((nn = roff_node_prev(n)) != NULL && nn->tok == MDOC__A && in mdoc__x_pre()
1493 ((nn = roff_node_next(n)) == NULL || nn->tok != MDOC__A)) in mdoc__x_pre()
1533 print_otag(h, TAG_A, "ch", "RsU", n->child->string); in mdoc__x_pre()
1551 if (n->tok == MDOC__A && in mdoc__x_post()
1552 (nn = roff_node_next(n)) != NULL && nn->tok == MDOC__A && in mdoc__x_post()
1554 ((nn = roff_node_prev(n)) == NULL || nn->tok != MDOC__A)) in mdoc__x_post()
1559 if (n->parent == NULL || n->parent->tok != MDOC_Rs) in mdoc__x_post()
1563 print_text(h, roff_node_next(n) ? "," : "."); in mdoc__x_post()
1570 switch (n->type) { in mdoc_bk_pre()
1576 if (n->parent->args != NULL || n->prev->child == NULL) in mdoc_bk_pre()
1590 if (n->type == ROFFT_BODY) in mdoc_bk_post()
1597 if (n->type != ROFFT_BODY) in mdoc_quote_pre()
1600 switch (n->tok) { in mdoc_quote_pre()
1603 print_text(h, n->child != NULL && n->child->next == NULL && in mdoc_quote_pre()
1604 n->child->tok == MDOC_Mt ? "<" : "\\(la"); in mdoc_quote_pre()
1628 if (NULL == n->norm->Es || in mdoc_quote_pre()
1629 NULL == n->norm->Es->child) in mdoc_quote_pre()
1631 print_text(h, n->norm->Es->child->string); in mdoc_quote_pre()
1666 if (n->type != ROFFT_BODY && n->type != ROFFT_ELEM) in mdoc_quote_post()
1671 switch (n->tok) { in mdoc_quote_post()
1674 print_text(h, n->child != NULL && n->child->next == NULL && in mdoc_quote_post()
1675 n->child->tok == MDOC_Mt ? ">" : "\\(ra"); in mdoc_quote_post()
1688 if (n->norm->Es == NULL || in mdoc_quote_post()
1689 n->norm->Es->child == NULL || in mdoc_quote_post()
1690 n->norm->Es->child->next == NULL) in mdoc_quote_post()
1693 print_text(h, n->norm->Es->child->next->string); in mdoc_quote_post()
1721 if (n->type != ROFFT_BODY) in mdoc_eo_pre()
1724 if (n->end == ENDBODY_NOT && in mdoc_eo_pre()
1725 n->parent->head->child == NULL && in mdoc_eo_pre()
1726 n->child != NULL && in mdoc_eo_pre()
1727 n->child->end != ENDBODY_NOT) in mdoc_eo_pre()
1729 else if (n->end != ENDBODY_NOT ? n->child != NULL : in mdoc_eo_pre()
1730 n->parent->head->child != NULL && (n->child != NULL || in mdoc_eo_pre()
1731 (n->parent->tail != NULL && n->parent->tail->child != NULL))) in mdoc_eo_pre()
1741 if (n->type != ROFFT_BODY) in mdoc_eo_post()
1744 if (n->end != ENDBODY_NOT) { in mdoc_eo_post()
1749 body = n->child != NULL || n->parent->head->child != NULL; in mdoc_eo_post()
1750 tail = n->parent->tail != NULL && n->parent->tail->child != NULL; in mdoc_eo_post()