Lines Matching refs:n

46 		  struct mdoc_node *n
256 struct mdoc_node *n;
265 n = mdoc_node(mdoc)->child;
269 while (n != NULL) {
270 if (n->tok == MDOC_Sh && n->sec == SEC_SYNOPSIS) {
271 if (n->child->next->child != NULL)
273 meta, n->child->next->child);
277 n = n->next;
283 if (n != NULL) {
284 if (n->tok != MDOC_Sh)
286 print_mdoc_nodelist(p, NULL, meta, n);
296 while (n != NULL) {
297 print_mdoc_node(p, pair, meta, n);
298 n = n->next;
312 n->flags &= ~MDOC_ENDED;
313 n->prev_font = p->fonti;
323 if (p->flags & TERMP_KEEP && n->flags & MDOC_LINE) {
333 switch (n->type) {
335 if (' ' == *n->string && MDOC_LINE & n->flags)
337 if (MDOC_DELIMC & n->flags)
339 term_word(p, n->string);
340 if (MDOC_DELIMO & n->flags)
344 if ( ! (n->flags & MDOC_LINE))
346 term_eqn(p, n->eqn);
347 if (n->next != NULL && ! (n->next->flags & MDOC_LINE))
353 term_tbl(p, n->span);
356 if (termacts[n->tok].pre &&
357 (n->end == ENDBODY_NOT || n->nchild))
358 chld = (*termacts[n->tok].pre)
359 (p, &npair, meta, n);
363 if (chld && n->child)
364 print_mdoc_nodelist(p, &npair, meta, n->child);
367 (ENDBODY_NOT == n->end ? n : n->body)->prev_font);
369 switch (n->type) {
377 if ( ! termacts[n->tok].post || MDOC_ENDED & n->flags)
379 (void)(*termacts[n->tok].post)(p, &npair, meta, n);
386 if (ENDBODY_NOT != n->end)
387 n->body->flags |= MDOC_ENDED;
394 if (ENDBODY_NOSPACE == n->end)
399 if (MDOC_EOS & n->flags)
402 if (MDOC_ll != n->tok) {
552 const struct mdoc_node *n)
556 assert(n);
567 nn = n;
584 if (n->prev && MDOC_It == n->prev->tok)
590 if (n->prev && MDOC_It == n->prev->tok) {
591 assert(n->prev->body);
592 if (NULL == n->prev->body->child)
604 term_setwidth(p, n->nchild ? n->child->string : NULL);
617 if (MDOC_BLOCK == n->type) {
618 print_bvspace(p, n->parent->parent, n);
622 bl = n->parent->parent->parent;
669 if (MDOC_HEAD == n->type)
690 for (i = 0, nn = n->prev;
737 if (MDOC_BODY == n->type)
741 if (MDOC_BODY == n->type && n->parent->head->nchild)
752 if (MDOC_HEAD == n->type)
780 if (MDOC_HEAD != n->type)
786 if (MDOC_HEAD != n->type)
795 if (NULL != n->next &&
796 NULL != n->next->child &&
797 (MDOC_Bl == n->next->child->tok ||
798 MDOC_Bd == n->next->child->tok))
805 if (MDOC_HEAD != n->type)
811 if (NULL == n->next || NULL == n->next->child)
815 if (MDOC_HEAD == n->type)
818 if (NULL == n->next) {
828 if (MDOC_HEAD != n->type)
852 if (MDOC_HEAD == n->type &&
853 NULL != n->next &&
854 NULL != n->next->child &&
855 (MDOC_Bl == n->next->child->tok ||
856 MDOC_Bd == n->next->child->tok))
868 if (MDOC_HEAD == n->type)
880 if (MDOC_HEAD == n->type)
882 if (NULL == n->next && p->rmargin < p->maxrmargin)
894 if (MDOC_HEAD == n->type)
932 if (MDOC_HEAD == n->type)
936 if (MDOC_HEAD == n->type)
951 if (MDOC_BLOCK == n->type)
954 type = n->parent->parent->parent->norm->Bl.type;
962 if (MDOC_BODY == n->type)
966 if (MDOC_BODY == n->type)
990 if (MDOC_BLOCK == n->type) {
995 if (MDOC_BODY == n->type) {
996 if (NULL == n->child)
1000 if (n->prev->child != NULL)
1001 cp = n->prev->child->string;
1011 if (NULL == n->child && NULL == meta->name)
1014 if (MDOC_HEAD == n->type)
1015 synopsis_pre(p, n->parent);
1017 if (MDOC_HEAD == n->type &&
1018 NULL != n->next && NULL != n->next->child) {
1022 if (NULL == n->child) {
1024 } else if (MDOC_TEXT == n->child->type) {
1025 p->rmargin += term_strlen(p, n->child->string);
1026 if (n->child->next)
1035 if (NULL == n->child)
1044 if (MDOC_BLOCK == n->type) {
1046 } else if (MDOC_HEAD == n->type &&
1047 NULL != n->next && NULL != n->next->child) {
1051 } else if (MDOC_BODY == n->type && n->child)
1062 if ( ! (n->nchild == 0 &&
1063 (n->next == NULL ||
1064 n->next->type == MDOC_TEXT ||
1065 n->next->flags & MDOC_LINE)))
1075 if (n->prev && MDOC__A == n->prev->tok)
1076 if (NULL == n->next || MDOC__A != n->next->tok)
1086 if (n->norm->An.auth == AUTH_split) {
1091 if (n->norm->An.auth == AUTH_nosplit) {
1100 if (n->sec == SEC_AUTHORS && ! (p->flags & TERMP_NOSPLIT))
1110 if ( ! (MDOC_LINE & n->flags))
1119 if (SEC_SEE_ALSO != n->sec)
1121 if (MDOC_BLOCK == n->type && n->prev)
1133 nchild = n->nchild;
1137 for (n = n->child; n; n = n->next) {
1139 term_word(p, n->string);
1145 if (n->next == NULL)
1152 if (n->next->next == NULL)
1187 nchild = n->nchild;
1188 for (n = n->child; n; n = n->next) {
1190 term_word(p, n->string);
1193 if (nchild > 2 && n->next) {
1198 if (n->next && NULL == n->next->next)
1217 if (n->type == MDOC_BODY)
1226 return(MDOC_HEAD != n->type);
1233 if (MDOC_BLOCK == n->type)
1241 if (NULL == (n = n->child))
1244 assert(MDOC_TEXT == n->type);
1245 term_word(p, n->string);
1247 if (NULL == (n = n->next))
1254 assert(MDOC_TEXT == n->type);
1255 term_word(p, n->string);
1269 synopsis_pre(struct termp *p, const struct mdoc_node *n)
1275 if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))
1283 if (n->prev->tok == n->tok &&
1284 MDOC_Ft != n->tok &&
1285 MDOC_Fo != n->tok &&
1286 MDOC_Fn != n->tok) {
1296 switch (n->prev->tok) {
1309 if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) {
1324 if (MDOC_ELEM == n->type) {
1325 synopsis_pre(p, n);
1326 return(termp_under_pre(p, pair, meta, n));
1327 } else if (MDOC_BLOCK == n->type) {
1328 synopsis_pre(p, n);
1330 } else if (MDOC_HEAD == n->type)
1333 return(termp_under_pre(p, pair, meta, n));
1348 synopsis_pre(p, n);
1349 return(termp_bold_pre(p, pair, meta, n));
1363 switch (n->type) {
1369 if (n->prev == NULL ||
1370 MDOC_Sh != n->prev->tok ||
1371 (n->prev->body != NULL &&
1372 n->prev->body->child != NULL))
1380 if (SEC_AUTHORS == n->sec)
1393 switch (n->type) {
1419 if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags)
1436 if (MDOC_BLOCK != n->type)
1448 synopsis_pre(p, n);
1459 pretty = MDOC_SYNPRETTY & n->flags;
1461 synopsis_pre(p, n);
1463 if (NULL == (n = n->child))
1472 assert(MDOC_TEXT == n->type);
1474 term_word(p, n->string);
1488 for (n = n->next; n; n = n->next) {
1489 assert(MDOC_TEXT == n->type);
1493 term_word(p, n->string);
1496 if (n->next) {
1519 if (n->parent->tok != MDOC_Fo) {
1524 for (nn = n->child; nn; nn = nn->next) {
1530 if (nn->next || (n->next && n->next->tok == MDOC_Fa)) {
1546 if (MDOC_BLOCK == n->type) {
1547 print_bvspace(p, n, n);
1549 } else if (MDOC_HEAD == n->type)
1554 if (n->norm->Bd.offs == NULL ||
1555 ! strcmp(n->norm->Bd.offs, "left"))
1557 else if ( ! strcmp(n->norm->Bd.offs, "indent"))
1559 else if ( ! strcmp(n->norm->Bd.offs, "indent-two"))
1562 offset = a2width(p, n->norm->Bd.offs);
1577 if (DISP_literal != n->norm->Bd.type &&
1578 DISP_unfilled != n->norm->Bd.type &&
1579 DISP_centered != n->norm->Bd.type)
1583 if (DISP_literal == n->norm->Bd.type)
1591 for (nn = n->child; nn; nn = nn->next) {
1592 if (DISP_centered == n->norm->Bd.type) {
1646 if (MDOC_BODY != n->type)
1652 if (DISP_literal == n->norm->Bd.type ||
1653 DISP_unfilled == n->norm->Bd.type)
1667 if (NULL != (n = n->child)) {
1668 term_word(p, n->string);
1676 if (NULL != (n = n->next)) {
1680 term_word(p, n->string);
1693 switch (n->tok) {
1718 if (n->child) {
1721 term_word(p, n->child->string);
1731 if ( ! (n->next == NULL || n->next->flags & MDOC_LINE))
1739 switch (n->type) {
1742 if (n->prev)
1763 if (n->type == MDOC_HEAD || n->type == MDOC_BODY)
1771 synopsis_pre(p, n);
1780 synopsis_pre(p, n);
1782 if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags) {
1799 if (MDOC_SYNPRETTY & n->flags)
1805 if (MDOC_SYNPRETTY & n->flags)
1815 switch (n->tok) {
1817 if (n->child) {
1818 if ( ! a2roffsu(n->child->string, &su, SCALE_VS))
1854 if (MDOC_BODY != n->type && MDOC_ELEM != n->type)
1857 switch (n->tok) {
1861 term_word(p, n->nchild == 1 &&
1862 n->child->tok == MDOC_Mt ? "<" : "\\(la");
1884 if (NULL == n->norm->Es ||
1885 NULL == n->norm->Es->child)
1887 term_word(p, n->norm->Es->child->string);
1921 if (n->type != MDOC_BODY && n->type != MDOC_ELEM)
1926 switch (n->tok) {
1930 term_word(p, n->nchild == 1 &&
1931 n->child->tok == MDOC_Mt ? ">" : "\\(ra");
1953 if (n->norm->Es == NULL ||
1954 n->norm->Es->child == NULL ||
1955 n->norm->Es->child->next == NULL)
1958 term_word(p, n->norm->Es->child->next->string);
1989 if (n->type != MDOC_BODY)
1992 if (n->end == ENDBODY_NOT &&
1993 n->parent->head->child == NULL &&
1994 n->child != NULL &&
1995 n->child->end != ENDBODY_NOT)
1997 else if (n->end != ENDBODY_NOT ? n->child != NULL :
1998 n->parent->head->child != NULL && (n->child != NULL ||
1999 (n->parent->tail != NULL && n->parent->tail->child != NULL)))
2010 if (n->type != MDOC_BODY)
2013 if (n->end != ENDBODY_NOT) {
2018 body = n->child != NULL || n->parent->head->child != NULL;
2019 tail = n->parent->tail != NULL && n->parent->tail->child != NULL;
2035 pretty = MDOC_SYNPRETTY & n->flags;
2037 if (MDOC_BLOCK == n->type) {
2038 synopsis_pre(p, n);
2040 } else if (MDOC_BODY == n->type) {
2060 if (NULL == n->child)
2065 assert(n->child->string);
2067 term_word(p, n->child->string);
2075 if (MDOC_BODY != n->type)
2081 if (MDOC_SYNPRETTY & n->flags) {
2092 if (MDOC_HEAD == n->type)
2094 else if (MDOC_BODY != n->type)
2097 if (FONT_Em == n->norm->Bf.font)
2099 else if (FONT_Sy == n->norm->Bf.font)
2111 if (NULL == n->child)
2113 else if (0 == strcmp("on", n->child->string))
2143 if (MDOC__A == n->tok && n->next && MDOC__A == n->next->tok)
2144 if (NULL == n->next->next || MDOC__A != n->next->next->tok)
2145 if (NULL == n->prev || MDOC__A != n->prev->tok)
2150 if (NULL == n->parent || MDOC_Rs != n->parent->tok)
2154 if (NULL == n->next) {
2174 if (NULL == (link = n->child))
2199 switch (n->type) {
2205 if (n->parent->args || 0 == n->prev->nchild)
2220 if (MDOC_BODY == n->type)
2232 if (n->parent && MDOC_Rs == n->parent->tok &&
2233 n->parent->norm->Rs.quote_T)
2234 termp_quote_post(p, pair, meta, n);
2236 termp____post(p, pair, meta, n);
2247 if (n->parent && MDOC_Rs == n->parent->tok &&
2248 n->parent->norm->Rs.quote_T)
2249 return(termp_quote_pre(p, pair, meta, n));