Lines Matching defs:n
293 putchar('\n');
297 md_nodelist(struct roff_node *n)
299 while (n != NULL) {
300 md_node(n);
301 n = n->next;
306 md_node(struct roff_node *n)
311 if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
317 n->flags & NODE_LINE &&
318 !roff_node_transparent(n))
324 n->flags &= ~NODE_ENDED;
326 if (n->type == ROFFT_TEXT) {
327 if (n->flags & NODE_DELIMC)
331 md_word(n->string);
332 if (n->flags & NODE_DELIMO)
336 } else if (n->tok < ROFF_MAX) {
337 switch (n->tok) {
339 process_children = md_pre_br(n);
342 process_children = md_pre_Pp(n);
349 act = md_act(n->tok);
350 cond = act->cond == NULL || (*act->cond)(n);
352 (n->end == ENDBODY_NOT || n->child != NULL))
353 process_children = (*act->pre)(n);
356 if (process_children && n->child != NULL)
357 md_nodelist(n->child);
359 if (n->flags & NODE_ENDED)
363 (*act->post)(n);
365 if (n->end != ENDBODY_NOT)
366 n->body->flags |= NODE_ENDED;
422 putchar('\n');
432 putchar('\n');
675 printf(" \n");
727 md_cond_head(struct roff_node *n)
729 return n->type == ROFFT_HEAD;
733 md_cond_body(struct roff_node *n)
735 return n->type == ROFFT_BODY;
739 md_pre_abort(struct roff_node *n)
745 md_pre_raw(struct roff_node *n)
749 if ((prefix = md_act(n->tok)->prefix) != NULL) {
759 md_post_raw(struct roff_node *n)
763 if ((suffix = md_act(n->tok)->suffix) != NULL) {
772 md_pre_word(struct roff_node *n)
776 if ((prefix = md_act(n->tok)->prefix) != NULL) {
784 md_post_word(struct roff_node *n)
788 if ((suffix = md_act(n->tok)->suffix) != NULL) {
795 md_post_pc(struct roff_node *n)
799 md_post_raw(n);
800 if (n->parent->tok != MDOC_Rs)
803 if ((nn = roff_node_next(n)) != NULL) {
805 if (nn->tok == n->tok &&
806 (nn = roff_node_prev(n)) != NULL &&
807 nn->tok == n->tok)
816 md_pre_skip(struct roff_node *n)
822 md_pre_syn(struct roff_node *n)
826 if ((n->flags & NODE_SYNPRETTY) == 0 ||
827 (np = roff_node_prev(n)) == NULL)
830 if (np->tok == n->tok &&
831 n->tok != MDOC_Ft &&
832 n->tok != MDOC_Fo &&
833 n->tok != MDOC_Fn) {
847 if (n->tok != MDOC_Fn && n->tok != MDOC_Fo) {
859 md_pre_An(struct roff_node *n)
861 switch (n->norm->An.auth) {
873 else if (n->sec == SEC_AUTHORS &&
881 md_pre_Ap(struct roff_node *n)
890 md_pre_Bd(struct roff_node *n)
892 switch (n->norm->Bd.type) {
895 return md_pre_Dl(n);
897 return md_pre_D1(n);
902 md_pre_Bk(struct roff_node *n)
904 switch (n->type) {
916 md_post_Bk(struct roff_node *n)
918 if (n->type == ROFFT_BODY)
923 md_pre_Bl(struct roff_node *n)
925 n->norm->Bl.count = 0;
926 if (n->norm->Bl.type == LIST_column)
927 md_pre_Dl(n);
933 md_post_Bl(struct roff_node *n)
935 n->norm->Bl.count = 0;
936 if (n->norm->Bl.type == LIST_column)
937 md_post_D1(n);
942 md_pre_D1(struct roff_node *n)
960 md_post_D1(struct roff_node *n)
971 md_pre_Dl(struct roff_node *n)
989 md_pre_En(struct roff_node *n)
991 if (n->norm->Es == NULL ||
992 n->norm->Es->child == NULL)
995 md_word(n->norm->Es->child->string);
1001 md_post_En(struct roff_node *n)
1003 if (n->norm->Es == NULL ||
1004 n->norm->Es->child == NULL ||
1005 n->norm->Es->child->next == NULL)
1009 md_word(n->norm->Es->child->next->string);
1013 md_pre_Eo(struct roff_node *n)
1015 if (n->end == ENDBODY_NOT &&
1016 n->parent->head->child == NULL &&
1017 n->child != NULL &&
1018 n->child->end != ENDBODY_NOT)
1020 else if (n->end != ENDBODY_NOT ? n->child != NULL :
1021 n->parent->head->child != NULL && (n->child != NULL ||
1022 (n->parent->tail != NULL && n->parent->tail->child != NULL)))
1028 md_post_Eo(struct roff_node *n)
1030 if (n->end != ENDBODY_NOT) {
1035 if (n->child == NULL && n->parent->head->child == NULL)
1038 if (n->parent->tail != NULL && n->parent->tail->child != NULL)
1045 md_pre_Fa(struct roff_node *n)
1049 am_Fa = n->tok == MDOC_Fa;
1052 n = n->child;
1054 while (n != NULL) {
1057 md_node(n);
1060 if ((n = n->next) != NULL)
1067 md_post_Fa(struct roff_node *n)
1071 if ((nn = roff_node_next(n)) != NULL && nn->tok == MDOC_Fa)
1076 md_pre_Fd(struct roff_node *n)
1078 md_pre_syn(n);
1079 md_pre_raw(n);
1084 md_post_Fd(struct roff_node *n)
1086 md_post_raw(n);
1091 md_post_Fl(struct roff_node *n)
1095 md_post_raw(n);
1096 if (n->child == NULL && (nn = roff_node_next(n)) != NULL &&
1102 md_pre_Fn(struct roff_node *n)
1104 md_pre_syn(n);
1106 if ((n = n->child) == NULL)
1111 md_node(n);
1117 if ((n = n->next) != NULL)
1118 md_pre_Fa(n);
1123 md_post_Fn(struct roff_node *n)
1126 if (n->flags & NODE_SYNPRETTY) {
1133 md_pre_Fo(struct roff_node *n)
1135 switch (n->type) {
1137 md_pre_syn(n);
1140 if (n->child == NULL)
1142 md_pre_raw(n);
1155 md_post_Fo(struct roff_node *n)
1157 switch (n->type) {
1159 if (n->child != NULL)
1160 md_post_raw(n);
1163 md_post_Fn(n);
1171 md_pre_In(struct roff_node *n)
1173 if (n->flags & NODE_SYNPRETTY) {
1174 md_pre_syn(n);
1188 md_post_In(struct roff_node *n)
1190 if (n->flags & NODE_SYNPRETTY) {
1201 md_pre_It(struct roff_node *n)
1205 switch (n->type) {
1210 bln = n->parent->parent;
1258 bln = n->parent->parent;
1265 md_pre_D1(n);
1278 md_post_It(struct roff_node *n)
1283 if (n->type != ROFFT_BODY)
1286 bln = n->parent->parent;
1298 md_post_D1(n);
1302 if (n->next == NULL)
1308 while ((n = n->prev) != NULL && n->type != ROFFT_HEAD)
1336 md_post_Lb(struct roff_node *n)
1338 if (n->sec == SEC_LIBRARY)
1358 md_pre_Lk(struct roff_node *n)
1362 if ((link = n->child) == NULL)
1366 punct = n->last;
1398 md_pre_Mt(struct roff_node *n)
1404 for (nch = n->child; nch != NULL; nch = nch->next)
1408 for (nch = n->child; nch != NULL; nch = nch->next) {
1421 md_pre_Nd(struct roff_node *n)
1430 md_pre_Nm(struct roff_node *n)
1432 switch (n->type) {
1435 md_pre_syn(n);
1439 md_pre_raw(n);
1448 md_post_Nm(struct roff_node *n)
1450 switch (n->type) {
1456 md_post_raw(n);
1464 md_pre_No(struct roff_node *n)
1471 md_pre_Ns(struct roff_node *n)
1478 md_post_Pf(struct roff_node *n)
1480 if (n->next != NULL && (n->next->flags & NODE_LINE) == 0)
1485 md_pre_Pp(struct roff_node *n)
1492 md_pre_Rs(struct roff_node *n)
1494 if (n->sec == SEC_SEE_ALSO)
1500 md_pre_Sh(struct roff_node *n)
1502 switch (n->type) {
1504 if (n->sec == SEC_AUTHORS)
1509 md_rawword(n->tok == MDOC_Sh ? "#" : "##");
1521 md_pre_Sm(struct roff_node *n)
1523 if (n->child == NULL)
1525 else if (strcmp("on", n->child->string) == 0)
1537 md_pre_Vt(struct roff_node *n)
1539 switch (n->type) {
1541 md_pre_syn(n);
1545 md_pre_raw(n);
1553 md_post_Vt(struct roff_node *n)
1555 switch (n->type) {
1558 md_post_raw(n);
1566 md_pre_Xr(struct roff_node *n)
1568 n = n->child;
1569 if (n == NULL)
1571 md_node(n);
1572 n = n->next;
1573 if (n == NULL)
1577 md_node(n);
1583 md_pre__R(struct roff_node *n)
1588 arg = n->child->string;
1611 md_pre__T(struct roff_node *n)
1613 if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T)
1622 md_post__T(struct roff_node *n)
1625 if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T)
1629 md_post_pc(n);
1633 md_pre_br(struct roff_node *n)