Lines Matching refs:n

298 md_nodelist(struct roff_node *n)  in md_nodelist()  argument
300 while (n != NULL) { in md_nodelist()
301 md_node(n); in md_nodelist()
302 n = n->next; in md_nodelist()
307 md_node(struct roff_node *n) in md_node() argument
312 if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) in md_node()
318 n->flags & NODE_LINE && in md_node()
319 !roff_node_transparent(n)) in md_node()
325 n->flags &= ~NODE_ENDED; in md_node()
327 if (n->type == ROFFT_TEXT) { in md_node()
328 if (n->flags & NODE_DELIMC) in md_node()
332 md_word(n->string); in md_node()
333 if (n->flags & NODE_DELIMO) in md_node()
337 } else if (n->tok < ROFF_MAX) { in md_node()
338 switch (n->tok) { in md_node()
340 process_children = md_pre_br(n); in md_node()
343 process_children = md_pre_Pp(n); in md_node()
350 act = md_act(n->tok); in md_node()
351 cond = act->cond == NULL || (*act->cond)(n); in md_node()
353 (n->end == ENDBODY_NOT || n->child != NULL)) in md_node()
354 process_children = (*act->pre)(n); in md_node()
357 if (process_children && n->child != NULL) in md_node()
358 md_nodelist(n->child); in md_node()
360 if (n->flags & NODE_ENDED) in md_node()
364 (*act->post)(n); in md_node()
366 if (n->end != ENDBODY_NOT) in md_node()
367 n->body->flags |= NODE_ENDED; in md_node()
728 md_cond_head(struct roff_node *n) in md_cond_head() argument
730 return n->type == ROFFT_HEAD; in md_cond_head()
734 md_cond_body(struct roff_node *n) in md_cond_body() argument
736 return n->type == ROFFT_BODY; in md_cond_body()
740 md_pre_abort(struct roff_node *n) in md_pre_abort() argument
746 md_pre_raw(struct roff_node *n) in md_pre_raw() argument
750 if ((prefix = md_act(n->tok)->prefix) != NULL) { in md_pre_raw()
760 md_post_raw(struct roff_node *n) in md_post_raw() argument
764 if ((suffix = md_act(n->tok)->suffix) != NULL) { in md_post_raw()
773 md_pre_word(struct roff_node *n) in md_pre_word() argument
777 if ((prefix = md_act(n->tok)->prefix) != NULL) { in md_pre_word()
785 md_post_word(struct roff_node *n) in md_post_word() argument
789 if ((suffix = md_act(n->tok)->suffix) != NULL) { in md_post_word()
796 md_post_pc(struct roff_node *n) in md_post_pc() argument
800 md_post_raw(n); in md_post_pc()
801 if (n->parent->tok != MDOC_Rs) in md_post_pc()
804 if ((nn = roff_node_next(n)) != NULL) { in md_post_pc()
806 if (nn->tok == n->tok && in md_post_pc()
807 (nn = roff_node_prev(n)) != NULL && in md_post_pc()
808 nn->tok == n->tok) in md_post_pc()
817 md_pre_skip(struct roff_node *n) in md_pre_skip() argument
823 md_pre_syn(struct roff_node *n) in md_pre_syn() argument
827 if ((n->flags & NODE_SYNPRETTY) == 0 || in md_pre_syn()
828 (np = roff_node_prev(n)) == NULL) in md_pre_syn()
831 if (np->tok == n->tok && in md_pre_syn()
832 n->tok != MDOC_Ft && in md_pre_syn()
833 n->tok != MDOC_Fo && in md_pre_syn()
834 n->tok != MDOC_Fn) { in md_pre_syn()
848 if (n->tok != MDOC_Fn && n->tok != MDOC_Fo) { in md_pre_syn()
860 md_pre_An(struct roff_node *n) in md_pre_An() argument
862 switch (n->norm->An.auth) { in md_pre_An()
874 else if (n->sec == SEC_AUTHORS && in md_pre_An()
882 md_pre_Ap(struct roff_node *n) in md_pre_Ap() argument
891 md_pre_Bd(struct roff_node *n) in md_pre_Bd() argument
893 switch (n->norm->Bd.type) { in md_pre_Bd()
896 return md_pre_Dl(n); in md_pre_Bd()
898 return md_pre_D1(n); in md_pre_Bd()
903 md_pre_Bk(struct roff_node *n) in md_pre_Bk() argument
905 switch (n->type) { in md_pre_Bk()
917 md_post_Bk(struct roff_node *n) in md_post_Bk() argument
919 if (n->type == ROFFT_BODY) in md_post_Bk()
924 md_pre_Bl(struct roff_node *n) in md_pre_Bl() argument
926 n->norm->Bl.count = 0; in md_pre_Bl()
927 if (n->norm->Bl.type == LIST_column) in md_pre_Bl()
928 md_pre_Dl(n); in md_pre_Bl()
934 md_post_Bl(struct roff_node *n) in md_post_Bl() argument
936 n->norm->Bl.count = 0; in md_post_Bl()
937 if (n->norm->Bl.type == LIST_column) in md_post_Bl()
938 md_post_D1(n); in md_post_Bl()
943 md_pre_D1(struct roff_node *n) in md_pre_D1() argument
961 md_post_D1(struct roff_node *n) in md_post_D1() argument
972 md_pre_Dl(struct roff_node *n) in md_pre_Dl() argument
990 md_pre_En(struct roff_node *n) in md_pre_En() argument
992 if (n->norm->Es == NULL || in md_pre_En()
993 n->norm->Es->child == NULL) in md_pre_En()
996 md_word(n->norm->Es->child->string); in md_pre_En()
1002 md_post_En(struct roff_node *n) in md_post_En() argument
1004 if (n->norm->Es == NULL || in md_post_En()
1005 n->norm->Es->child == NULL || in md_post_En()
1006 n->norm->Es->child->next == NULL) in md_post_En()
1010 md_word(n->norm->Es->child->next->string); in md_post_En()
1014 md_pre_Eo(struct roff_node *n) in md_pre_Eo() argument
1016 if (n->end == ENDBODY_NOT && in md_pre_Eo()
1017 n->parent->head->child == NULL && in md_pre_Eo()
1018 n->child != NULL && in md_pre_Eo()
1019 n->child->end != ENDBODY_NOT) in md_pre_Eo()
1021 else if (n->end != ENDBODY_NOT ? n->child != NULL : in md_pre_Eo()
1022 n->parent->head->child != NULL && (n->child != NULL || in md_pre_Eo()
1023 (n->parent->tail != NULL && n->parent->tail->child != NULL))) in md_pre_Eo()
1029 md_post_Eo(struct roff_node *n) in md_post_Eo() argument
1031 if (n->end != ENDBODY_NOT) { in md_post_Eo()
1036 if (n->child == NULL && n->parent->head->child == NULL) in md_post_Eo()
1039 if (n->parent->tail != NULL && n->parent->tail->child != NULL) in md_post_Eo()
1046 md_pre_Fa(struct roff_node *n) in md_pre_Fa() argument
1050 am_Fa = n->tok == MDOC_Fa; in md_pre_Fa()
1053 n = n->child; in md_pre_Fa()
1055 while (n != NULL) { in md_pre_Fa()
1058 md_node(n); in md_pre_Fa()
1061 if ((n = n->next) != NULL) in md_pre_Fa()
1068 md_post_Fa(struct roff_node *n) in md_post_Fa() argument
1072 if ((nn = roff_node_next(n)) != NULL && nn->tok == MDOC_Fa) in md_post_Fa()
1077 md_pre_Fd(struct roff_node *n) in md_pre_Fd() argument
1079 md_pre_syn(n); in md_pre_Fd()
1080 md_pre_raw(n); in md_pre_Fd()
1085 md_post_Fd(struct roff_node *n) in md_post_Fd() argument
1087 md_post_raw(n); in md_post_Fd()
1092 md_post_Fl(struct roff_node *n) in md_post_Fl() argument
1096 md_post_raw(n); in md_post_Fl()
1097 if (n->child == NULL && (nn = roff_node_next(n)) != NULL && in md_post_Fl()
1103 md_pre_Fn(struct roff_node *n) in md_pre_Fn() argument
1105 md_pre_syn(n); in md_pre_Fn()
1107 if ((n = n->child) == NULL) in md_pre_Fn()
1112 md_node(n); in md_pre_Fn()
1118 if ((n = n->next) != NULL) in md_pre_Fn()
1119 md_pre_Fa(n); in md_pre_Fn()
1124 md_post_Fn(struct roff_node *n) in md_post_Fn() argument
1127 if (n->flags & NODE_SYNPRETTY) { in md_post_Fn()
1134 md_pre_Fo(struct roff_node *n) in md_pre_Fo() argument
1136 switch (n->type) { in md_pre_Fo()
1138 md_pre_syn(n); in md_pre_Fo()
1141 if (n->child == NULL) in md_pre_Fo()
1143 md_pre_raw(n); in md_pre_Fo()
1156 md_post_Fo(struct roff_node *n) in md_post_Fo() argument
1158 switch (n->type) { in md_post_Fo()
1160 if (n->child != NULL) in md_post_Fo()
1161 md_post_raw(n); in md_post_Fo()
1164 md_post_Fn(n); in md_post_Fo()
1172 md_pre_In(struct roff_node *n) in md_pre_In() argument
1174 if (n->flags & NODE_SYNPRETTY) { in md_pre_In()
1175 md_pre_syn(n); in md_pre_In()
1189 md_post_In(struct roff_node *n) in md_post_In() argument
1191 if (n->flags & NODE_SYNPRETTY) { in md_post_In()
1202 md_pre_It(struct roff_node *n) in md_pre_It() argument
1206 switch (n->type) { in md_pre_It()
1211 bln = n->parent->parent; in md_pre_It()
1259 bln = n->parent->parent; in md_pre_It()
1266 md_pre_D1(n); in md_pre_It()
1279 md_post_It(struct roff_node *n) in md_post_It() argument
1284 if (n->type != ROFFT_BODY) in md_post_It()
1287 bln = n->parent->parent; in md_post_It()
1299 md_post_D1(n); in md_post_It()
1303 if (n->next == NULL) in md_post_It()
1309 while ((n = n->prev) != NULL && n->type != ROFFT_HEAD) in md_post_It()
1337 md_post_Lb(struct roff_node *n) in md_post_Lb() argument
1339 if (n->sec == SEC_LIBRARY) in md_post_Lb()
1359 md_pre_Lk(struct roff_node *n) in md_pre_Lk() argument
1363 if ((link = n->child) == NULL) in md_pre_Lk()
1367 punct = n->last; in md_pre_Lk()
1399 md_pre_Mt(struct roff_node *n) in md_pre_Mt() argument
1405 for (nch = n->child; nch != NULL; nch = nch->next) in md_pre_Mt()
1409 for (nch = n->child; nch != NULL; nch = nch->next) { in md_pre_Mt()
1422 md_pre_Nd(struct roff_node *n) in md_pre_Nd() argument
1431 md_pre_Nm(struct roff_node *n) in md_pre_Nm() argument
1433 switch (n->type) { in md_pre_Nm()
1436 md_pre_syn(n); in md_pre_Nm()
1440 md_pre_raw(n); in md_pre_Nm()
1449 md_post_Nm(struct roff_node *n) in md_post_Nm() argument
1451 switch (n->type) { in md_post_Nm()
1457 md_post_raw(n); in md_post_Nm()
1465 md_pre_No(struct roff_node *n) in md_pre_No() argument
1472 md_pre_Ns(struct roff_node *n) in md_pre_Ns() argument
1479 md_post_Pf(struct roff_node *n) in md_post_Pf() argument
1481 if (n->next != NULL && (n->next->flags & NODE_LINE) == 0) in md_post_Pf()
1486 md_pre_Pp(struct roff_node *n) in md_pre_Pp() argument
1493 md_pre_Rs(struct roff_node *n) in md_pre_Rs() argument
1495 if (n->sec == SEC_SEE_ALSO) in md_pre_Rs()
1501 md_pre_Sh(struct roff_node *n) in md_pre_Sh() argument
1503 switch (n->type) { in md_pre_Sh()
1505 if (n->sec == SEC_AUTHORS) in md_pre_Sh()
1510 md_rawword(n->tok == MDOC_Sh ? "#" : "##"); in md_pre_Sh()
1522 md_pre_Sm(struct roff_node *n) in md_pre_Sm() argument
1524 if (n->child == NULL) in md_pre_Sm()
1526 else if (strcmp("on", n->child->string) == 0) in md_pre_Sm()
1538 md_pre_Vt(struct roff_node *n) in md_pre_Vt() argument
1540 switch (n->type) { in md_pre_Vt()
1542 md_pre_syn(n); in md_pre_Vt()
1546 md_pre_raw(n); in md_pre_Vt()
1554 md_post_Vt(struct roff_node *n) in md_post_Vt() argument
1556 switch (n->type) { in md_post_Vt()
1559 md_post_raw(n); in md_post_Vt()
1567 md_pre_Xr(struct roff_node *n) in md_pre_Xr() argument
1569 n = n->child; in md_pre_Xr()
1570 if (n == NULL) in md_pre_Xr()
1572 md_node(n); in md_pre_Xr()
1573 n = n->next; in md_pre_Xr()
1574 if (n == NULL) in md_pre_Xr()
1578 md_node(n); in md_pre_Xr()
1584 md_pre__T(struct roff_node *n) in md_pre__T() argument
1586 if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) in md_pre__T()
1595 md_post__T(struct roff_node *n) in md_post__T() argument
1598 if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) in md_post__T()
1602 md_post_pc(n); in md_post__T()
1606 md_pre_br(struct roff_node *n) in md_pre_br() argument