Lines Matching refs:n

50 		  struct roff_node *n
251 struct roff_node *n, *nn; in terminal_mdoc() local
261 n = mdoc->first->child; in terminal_mdoc()
263 for (nn = NULL; n != NULL; n = n->next) { in terminal_mdoc()
264 if (n->tok != MDOC_Sh) in terminal_mdoc()
266 if (n->sec == SEC_SYNOPSIS) in terminal_mdoc()
268 if (nn == NULL && n->sec == SEC_NAME) in terminal_mdoc()
269 nn = n; in terminal_mdoc()
271 if (n == NULL) in terminal_mdoc()
272 n = nn; in terminal_mdoc()
274 if (n != NULL && (n = n->child->next->child) != NULL) in terminal_mdoc()
275 print_mdoc_nodelist(p, NULL, mdoc, n); in terminal_mdoc()
282 while (n != NULL && in terminal_mdoc()
283 (n->type == ROFFT_COMMENT || in terminal_mdoc()
284 n->flags & NODE_NOPRT)) in terminal_mdoc()
285 n = n->next; in terminal_mdoc()
286 if (n != NULL) { in terminal_mdoc()
287 if (n->tok != MDOC_Sh) in terminal_mdoc()
289 print_mdoc_nodelist(p, NULL, mdoc, n); in terminal_mdoc()
299 while (n != NULL) { in print_mdoc_nodelist()
300 print_mdoc_node(p, pair, meta, n); in print_mdoc_nodelist()
301 n = n->next; in print_mdoc_nodelist()
318 if (n->flags & NODE_NOFILL) { in print_mdoc_node()
319 if (n->flags & NODE_LINE && in print_mdoc_node()
326 if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) in print_mdoc_node()
332 n->flags &= ~NODE_ENDED; in print_mdoc_node()
333 n->prev_font = p->fonti; in print_mdoc_node()
338 if (n->flags & NODE_ID && n->tok != MDOC_Pp && in print_mdoc_node()
339 (n->tok != MDOC_It || n->type != ROFFT_BLOCK)) in print_mdoc_node()
340 term_tag_write(n, p->line); in print_mdoc_node()
347 if (p->flags & TERMP_KEEP && n->flags & NODE_LINE) { in print_mdoc_node()
358 switch (n->type) { in print_mdoc_node()
360 if (n->flags & NODE_LINE) { in print_mdoc_node()
361 switch (*n->string) { in print_mdoc_node()
376 if (NODE_DELIMC & n->flags) in print_mdoc_node()
378 term_word(p, n->string); in print_mdoc_node()
379 if (NODE_DELIMO & n->flags) in print_mdoc_node()
383 if ( ! (n->flags & NODE_LINE)) in print_mdoc_node()
385 term_eqn(p, n->eqn); in print_mdoc_node()
386 if (n->next != NULL && ! (n->next->flags & NODE_LINE)) in print_mdoc_node()
392 term_tbl(p, n->span); in print_mdoc_node()
395 if (n->tok < ROFF_MAX) { in print_mdoc_node()
396 roff_term_pre(p, n); in print_mdoc_node()
399 assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX); in print_mdoc_node()
400 act = mdoc_term_acts + (n->tok - MDOC_Dd); in print_mdoc_node()
402 (n->end == ENDBODY_NOT || n->child != NULL)) in print_mdoc_node()
403 chld = (*act->pre)(p, &npair, meta, n); in print_mdoc_node()
407 if (chld && n->child) in print_mdoc_node()
408 print_mdoc_nodelist(p, &npair, meta, n->child); in print_mdoc_node()
411 (ENDBODY_NOT == n->end ? n : n->body)->prev_font); in print_mdoc_node()
413 switch (n->type) { in print_mdoc_node()
421 if (act->post == NULL || n->flags & NODE_ENDED) in print_mdoc_node()
423 (void)(*act->post)(p, &npair, meta, n); in print_mdoc_node()
430 if (ENDBODY_NOT != n->end) in print_mdoc_node()
431 n->body->flags |= NODE_ENDED; in print_mdoc_node()
435 if (NODE_EOS & n->flags) in print_mdoc_node()
438 if (n->type != ROFFT_TEXT) in print_mdoc_node()
581 print_bvspace(struct termp *p, struct roff_node *bl, struct roff_node *n) in print_bvspace() argument
593 nn = n; in print_bvspace()
614 n->prev == NULL || n->prev->tok != MDOC_It || in print_bvspace()
617 n->prev->body->child != NULL))) in print_bvspace()
632 if (n->type == ROFFT_BLOCK) { in termp_it_pre()
633 print_bvspace(p, n->parent->parent, n); in termp_it_pre()
634 if (n->flags & NODE_ID) in termp_it_pre()
635 term_tag_write(n, p->line); in termp_it_pre()
639 bl = n->parent->parent->parent; in termp_it_pre()
682 if (n->type == ROFFT_HEAD) in termp_it_pre()
703 for (i = 0, nn = n->prev; in termp_it_pre()
755 if (n->type == ROFFT_BODY) in termp_it_pre()
759 if (n->type == ROFFT_BODY && n->parent->head->child != NULL) in termp_it_pre()
770 if (n->type == ROFFT_HEAD) in termp_it_pre()
789 if (n->type == ROFFT_HEAD) { in termp_it_pre()
796 if (n->type != ROFFT_HEAD) in termp_it_pre()
802 if (n->type != ROFFT_HEAD) in termp_it_pre()
808 if (NULL == n->next || NULL == n->next->child) in termp_it_pre()
812 if (n->type == ROFFT_HEAD) in termp_it_pre()
815 if (NULL == n->next) { in termp_it_pre()
825 if (n->type != ROFFT_HEAD) in termp_it_pre()
849 if (n->type == ROFFT_HEAD) in termp_it_pre()
861 if (n->type == ROFFT_HEAD) in termp_it_pre()
863 if (n->next == NULL && p->tcol->rmargin < p->maxrmargin) in termp_it_pre()
875 if (n->type == ROFFT_HEAD) in termp_it_pre()
908 if (n->type == ROFFT_HEAD) in termp_it_pre()
912 if (n->type == ROFFT_HEAD) in termp_it_pre()
928 if (n->type == ROFFT_BLOCK) in termp_it_post()
931 type = n->parent->parent->parent->norm->Bl.type; in termp_it_post()
937 if (n->type == ROFFT_BODY) in termp_it_post()
941 if (n->type == ROFFT_BODY) in termp_it_post()
964 if (n->type == ROFFT_BLOCK) { in termp_nm_pre()
969 if (n->type == ROFFT_BODY) { in termp_nm_pre()
970 if (n->child == NULL) in termp_nm_pre()
974 if (n->prev->child != NULL) in termp_nm_pre()
975 cp = n->prev->child->string; in termp_nm_pre()
986 if (n->child == NULL) in termp_nm_pre()
989 if (n->type == ROFFT_HEAD) in termp_nm_pre()
990 synopsis_pre(p, n->parent); in termp_nm_pre()
992 if (n->type == ROFFT_HEAD && in termp_nm_pre()
993 n->next != NULL && n->next->child != NULL) { in termp_nm_pre()
997 if (n->child == NULL) in termp_nm_pre()
999 else if (n->child->type == ROFFT_TEXT) { in termp_nm_pre()
1000 p->tcol->rmargin += term_strlen(p, n->child->string); in termp_nm_pre()
1001 if (n->child->next != NULL) in termp_nm_pre()
1008 return termp_bold_pre(p, pair, meta, n); in termp_nm_pre()
1014 switch (n->type) { in termp_nm_post()
1019 if (n->next == NULL || n->next->child == NULL) in termp_nm_post()
1026 if (n->child != NULL) in termp_nm_post()
1042 if (n->child != NULL || in termp_fl_pre()
1043 ((nn = roff_node_next(n)) != NULL && in termp_fl_pre()
1056 if ((nn = roff_node_prev(n)) != NULL && nn->tok == MDOC__A && in termp__a_pre()
1057 ((nn = roff_node_next(n)) == NULL || nn->tok != MDOC__A)) in termp__a_pre()
1067 if (n->norm->An.auth == AUTH_split) { in termp_an_pre()
1072 if (n->norm->An.auth == AUTH_nosplit) { in termp_an_pre()
1081 if (n->sec == SEC_AUTHORS && ! (p->flags & TERMP_NOSPLIT)) in termp_an_pre()
1091 if ( ! (NODE_LINE & n->flags)) in termp_ns_pre()
1099 if (SEC_SEE_ALSO != n->sec) in termp_rs_pre()
1101 if (n->type == ROFFT_BLOCK && roff_node_prev(n) != NULL) in termp_rs_pre()
1116 if (n->type == ROFFT_BODY) in termp_nd_pre()
1124 switch (n->type) { in termp_bl_pre()
1138 if (n->type != ROFFT_BLOCK) in termp_bl_post()
1141 if (n->tok != MDOC_Bl || n->norm->Bl.type != LIST_column) in termp_bl_post()
1151 if (NULL == (n = n->child)) in termp_xr_pre()
1154 assert(n->type == ROFFT_TEXT); in termp_xr_pre()
1155 term_word(p, n->string); in termp_xr_pre()
1157 if (NULL == (n = n->next)) in termp_xr_pre()
1164 assert(n->type == ROFFT_TEXT); in termp_xr_pre()
1165 term_word(p, n->string); in termp_xr_pre()
1179 synopsis_pre(struct termp *p, struct roff_node *n) in synopsis_pre() argument
1183 if ((n->flags & NODE_SYNPRETTY) == 0 || in synopsis_pre()
1184 (np = roff_node_prev(n)) == NULL) in synopsis_pre()
1192 if (np->tok == n->tok && in synopsis_pre()
1193 MDOC_Ft != n->tok && in synopsis_pre()
1194 MDOC_Fo != n->tok && in synopsis_pre()
1195 MDOC_Fn != n->tok) { in synopsis_pre()
1214 if (n->tok != MDOC_Fn && n->tok != MDOC_Fo) { in synopsis_pre()
1228 switch (n->type) { in termp_vt_pre()
1230 return termp_ft_pre(p, pair, meta, n); in termp_vt_pre()
1232 synopsis_pre(p, n); in termp_vt_pre()
1237 return termp_under_pre(p, pair, meta, n); in termp_vt_pre()
1251 synopsis_pre(p, n); in termp_fd_pre()
1252 return termp_bold_pre(p, pair, meta, n); in termp_fd_pre()
1266 switch (n->type) { in termp_sh_pre()
1272 if ((np = roff_node_prev(n)) == NULL || in termp_sh_pre()
1278 return termp_bold_pre(p, pair, meta, n); in termp_sh_pre()
1284 if (n->sec == SEC_AUTHORS) in termp_sh_pre()
1296 switch (n->type) { in termp_sh_post()
1312 if (n->sec == SEC_LIBRARY && n->flags & NODE_LINE) in termp_lb_post()
1319 if (n->type != ROFFT_BLOCK) in termp_d1_pre()
1332 synopsis_pre(p, n); in termp_ft_pre()
1333 return termp_under_pre(p, pair, meta, n); in termp_ft_pre()
1342 synopsis_pre(p, n); in termp_fn_pre()
1343 pretty = n->flags & NODE_SYNPRETTY; in termp_fn_pre()
1344 if ((n = n->child) == NULL) in termp_fn_pre()
1353 assert(n->type == ROFFT_TEXT); in termp_fn_pre()
1355 term_word(p, n->string); in termp_fn_pre()
1370 for (n = n->next; n; n = n->next) { in termp_fn_pre()
1371 assert(n->type == ROFFT_TEXT); in termp_fn_pre()
1375 term_word(p, n->string); in termp_fn_pre()
1378 if (n->next) { in termp_fn_pre()
1400 if (n->parent->tok != MDOC_Fo) in termp_fa_pre()
1401 return termp_under_pre(p, pair, meta, n); in termp_fa_pre()
1403 for (nn = n->child; nn != NULL; nn = nn->next) { in termp_fa_pre()
1413 if (n->child != NULL && in termp_fa_pre()
1414 (nn = roff_node_next(n)) != NULL && in termp_fa_pre()
1427 if (n->type == ROFFT_BLOCK) { in termp_bd_pre()
1428 print_bvspace(p, n, n); in termp_bd_pre()
1430 } else if (n->type == ROFFT_HEAD) in termp_bd_pre()
1435 if (n->norm->Bd.offs == NULL || in termp_bd_pre()
1436 ! strcmp(n->norm->Bd.offs, "left")) in termp_bd_pre()
1438 else if ( ! strcmp(n->norm->Bd.offs, "indent")) in termp_bd_pre()
1440 else if ( ! strcmp(n->norm->Bd.offs, "indent-two")) in termp_bd_pre()
1443 offset = a2width(p, n->norm->Bd.offs); in termp_bd_pre()
1450 switch (n->norm->Bd.type) { in termp_bd_pre()
1468 if (n->type != ROFFT_BODY) in termp_bd_post()
1470 if (n->norm->Bd.type == DISP_unfilled || in termp_bd_post()
1471 n->norm->Bd.type == DISP_literal) in termp_bd_post()
1476 if (n->norm->Bd.type == DISP_centered) in termp_bd_post()
1483 if ((n->aux = p->flags & TERMP_PREKEEP) == 0) in termp_xx_pre()
1491 if (n->aux == 0) in termp_xx_post()
1498 if (n->next != NULL && (n->next->flags & NODE_LINE) == 0) in termp_pf_post()
1505 switch (n->type) { in termp_ss_pre()
1507 if (roff_node_prev(n) == NULL) in termp_ss_pre()
1514 return termp_bold_pre(p, pair, meta, n); in termp_ss_pre()
1530 if (n->type == ROFFT_HEAD || n->type == ROFFT_BODY) in termp_ss_post()
1537 synopsis_pre(p, n); in termp_in_pre()
1538 if (n->flags & NODE_SYNPRETTY && n->flags & NODE_LINE) { in termp_in_pre()
1553 if (n->flags & NODE_SYNPRETTY) in termp_in_post()
1557 if (n->flags & NODE_SYNPRETTY) in termp_in_post()
1565 if (n->flags & NODE_ID) in termp_pp_pre()
1566 term_tag_write(n, p->line); in termp_pp_pre()
1579 if (n->type != ROFFT_BODY && n->type != ROFFT_ELEM) in termp_quote_pre()
1582 switch (n->tok) { in termp_quote_pre()
1585 term_word(p, n->child != NULL && n->child->next == NULL && in termp_quote_pre()
1586 n->child->tok == MDOC_Mt ? "<" : "\\(la"); in termp_quote_pre()
1605 if (NULL == n->norm->Es || in termp_quote_pre()
1606 NULL == n->norm->Es->child) in termp_quote_pre()
1608 term_word(p, n->norm->Es->child->string); in termp_quote_pre()
1635 if (n->type != ROFFT_BODY && n->type != ROFFT_ELEM) in termp_quote_post()
1640 switch (n->tok) { in termp_quote_post()
1643 term_word(p, n->child != NULL && n->child->next == NULL && in termp_quote_post()
1644 n->child->tok == MDOC_Mt ? ">" : "\\(ra"); in termp_quote_post()
1663 if (n->norm->Es == NULL || in termp_quote_post()
1664 n->norm->Es->child == NULL || in termp_quote_post()
1665 n->norm->Es->child->next == NULL) in termp_quote_post()
1668 term_word(p, n->norm->Es->child->next->string); in termp_quote_post()
1692 if (n->type != ROFFT_BODY) in termp_eo_pre()
1695 if (n->end == ENDBODY_NOT && in termp_eo_pre()
1696 n->parent->head->child == NULL && in termp_eo_pre()
1697 n->child != NULL && in termp_eo_pre()
1698 n->child->end != ENDBODY_NOT) in termp_eo_pre()
1700 else if (n->end != ENDBODY_NOT ? n->child != NULL : in termp_eo_pre()
1701 n->parent->head->child != NULL && (n->child != NULL || in termp_eo_pre()
1702 (n->parent->tail != NULL && n->parent->tail->child != NULL))) in termp_eo_pre()
1713 if (n->type != ROFFT_BODY) in termp_eo_post()
1716 if (n->end != ENDBODY_NOT) { in termp_eo_post()
1721 body = n->child != NULL || n->parent->head->child != NULL; in termp_eo_post()
1722 tail = n->parent->tail != NULL && n->parent->tail->child != NULL; in termp_eo_post()
1737 switch (n->type) { in termp_fo_pre()
1739 synopsis_pre(p, n); in termp_fo_pre()
1743 if (n->flags & NODE_SYNPRETTY) { in termp_fo_pre()
1751 if (n->flags & NODE_SYNPRETTY) { in termp_fo_pre()
1761 return termp_bold_pre(p, pair, meta, n); in termp_fo_pre()
1768 if (n->type != ROFFT_BODY) in termp_fo_post()
1774 if (n->flags & NODE_SYNPRETTY) { in termp_fo_post()
1784 switch (n->type) { in termp_bf_pre()
1792 switch (n->norm->Bf.font) { in termp_bf_pre()
1794 return termp_under_pre(p, pair, meta, n); in termp_bf_pre()
1796 return termp_bold_pre(p, pair, meta, n); in termp_bf_pre()
1798 return termp_li_pre(p, pair, meta, n); in termp_bf_pre()
1805 if (n->child == NULL) in termp_sm_pre()
1807 else if (strcmp(n->child->string, "on") == 0) in termp_sm_pre()
1837 if (n->tok == MDOC__A && in termp____post()
1838 (nn = roff_node_next(n)) != NULL && nn->tok == MDOC__A && in termp____post()
1840 ((nn = roff_node_prev(n)) == NULL || nn->tok != MDOC__A)) in termp____post()
1845 if (n->parent == NULL || n->parent->tok != MDOC_Rs) in termp____post()
1849 if (roff_node_next(n) == NULL) { in termp____post()
1868 if ((link = n->child) == NULL) in termp_lk_pre()
1872 punct = n->last; in termp_lk_pre()
1908 switch (n->type) { in termp_bk_pre()
1914 if (n->parent->args != NULL || n->prev->child == NULL) in termp_bk_pre()
1926 if (n->type == ROFFT_BODY) in termp_bk_post()
1937 if (n->parent != NULL && n->parent->tok == MDOC_Rs && in termp__t_post()
1938 n->parent->norm->Rs.quote_T) in termp__t_post()
1939 termp_quote_post(p, pair, meta, n); in termp__t_post()
1940 termp____post(p, pair, meta, n); in termp__t_post()
1946 if (n->parent != NULL && n->parent->tok == MDOC_Rs && in termp__t_pre()
1947 n->parent->norm->Rs.quote_T) in termp__t_pre()
1948 return termp_quote_pre(p, pair, meta, n); in termp__t_pre()
1950 return termp_under_pre(p, pair, meta, n); in termp__t_pre()