Lines Matching refs:n
38 struct mdoc_node *n, \
272 putchar('\n');
295 synopsis_pre(struct html *h, const struct mdoc_node *n)
298 if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))
301 if (n->prev->tok == n->tok &&
302 MDOC_Fo != n->tok &&
303 MDOC_Ft != n->tok &&
304 MDOC_Fn != n->tok) {
309 switch (n->prev->tok) {
322 if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) {
345 print_mdoc_head(meta, n, h);
352 print_mdoc_nodelist(meta, n, h);
376 while (n != NULL) {
377 print_mdoc_node(meta, n, h);
378 n = n->next;
390 n->flags &= ~MDOC_ENDED;
392 switch (n->type) {
394 child = mdoc_root_pre(meta, n, h);
404 if (' ' == *n->string && MDOC_LINE & n->flags)
407 if (MDOC_DELIMC & n->flags)
409 print_text(h, n->string);
410 if (MDOC_DELIMO & n->flags)
414 if (n->flags & MDOC_LINE)
415 putchar('\n');
416 print_eqn(h, n->eqn);
424 print_tbl(h, n->span);
437 if (mdocs[n->tok].pre && (n->end == ENDBODY_NOT || n->child))
438 child = (*mdocs[n->tok].pre)(meta, n, h);
442 if (h->flags & HTML_KEEP && n->flags & MDOC_LINE) {
447 if (child && n->child)
448 print_mdoc_nodelist(meta, n->child, h);
452 switch (n->type) {
454 mdoc_root_post(meta, n, h);
459 if ( ! mdocs[n->tok].post || n->flags & MDOC_ENDED)
461 (*mdocs[n->tok].post)(meta, n, h);
462 if (n->end != ENDBODY_NOT)
463 n->body->flags |= MDOC_ENDED;
464 if (n->end == ENDBODY_NOSPACE)
545 switch (n->type) {
551 if (n->sec == SEC_AUTHORS)
561 for (n = n->child; n && MDOC_TEXT == n->type; ) {
562 bufcat_id(h, n->string);
563 if (NULL != (n = n->next))
567 if (NULL == n) {
581 if (MDOC_BLOCK == n->type) {
585 } else if (MDOC_BODY == n->type)
591 for (n = n->child; n && MDOC_TEXT == n->type; ) {
592 bufcat_id(h, n->string);
593 if (NULL != (n = n->next))
597 if (NULL == n) {
616 if (MDOC_Cm == n->tok)
621 if ( ! (n->nchild == 0 &&
622 (n->next == NULL ||
623 n->next->type == MDOC_TEXT ||
624 n->next->flags & MDOC_LINE)))
635 if (MDOC_BODY != n->type)
653 switch (n->type) {
655 synopsis_pre(h, n);
658 if (NULL == n->child && meta->name)
663 if (NULL == n->child && meta->name)
673 synopsis_pre(h, n);
677 for (len = 0, n = n->child; n; n = n->next)
678 if (MDOC_TEXT == n->type)
679 len += html_strlen(n->string);
700 if (NULL == n->child)
706 buffmt_man(h, n->child->string,
707 n->child->next ?
708 n->child->next->string : NULL);
714 n = n->child;
715 print_text(h, n->string);
717 if (NULL == (n = n->next))
723 print_text(h, n->string);
733 if ( ! (MDOC_LINE & n->flags))
755 switch (n->tok) {
782 if (n->child) {
785 print_text(h, n->child->string);
799 if (NULL != (n = n->child)) {
800 print_text(h, n->string);
808 if (NULL != (n = n->next)) {
812 print_text(h, n->string);
826 bl = n->parent;
839 if (MDOC_HEAD == n->type) {
874 } else if (MDOC_BODY == n->type) {
938 if (MDOC_BODY == n->type) {
939 if (LIST_column == n->norm->Bl.type)
944 if (MDOC_HEAD == n->type) {
945 if (LIST_column != n->norm->Bl.type)
955 for (i = 0; i < (int)n->norm->Bl.ncols; i++) {
957 a2width(n->norm->Bl.cols[i], &su);
958 if (i < (int)n->norm->Bl.ncols - 1)
975 assert(lists[n->norm->Bl.type]);
977 (void)strlcat(buf, lists[n->norm->Bl.type], BUFSIZ);
982 if (n->norm->Bl.offs) {
983 a2width(n->norm->Bl.offs, &su);
987 switch (n->norm->Bl.type) {
1029 if (n->prev)
1036 nchild = n->nchild;
1037 for (n = n->child; n; n = n->next) {
1038 assert(MDOC_TEXT == n->type);
1041 print_text(h, n->string);
1044 if (nchild > 2 && n->next) {
1049 if (n->next && NULL == n->next->next)
1078 if (MDOC_BLOCK != n->type)
1093 if (MDOC_Dl == n->tok) {
1109 for (n = n->child; n; ) {
1110 bufcat_id(h, n->string);
1111 if (NULL != (n = n->next))
1131 if (MDOC_HEAD == n->type)
1134 if (MDOC_BLOCK == n->type) {
1135 comp = n->norm->Bd.comp;
1136 for (nn = n; nn && ! comp; nn = nn->parent) {
1151 if (n->norm->Bd.offs == NULL ||
1152 ! strcmp(n->norm->Bd.offs, "left"))
1154 else if ( ! strcmp(n->norm->Bd.offs, "indent"))
1156 else if ( ! strcmp(n->norm->Bd.offs, "indent-two"))
1159 a2width(n->norm->Bd.offs, &su);
1165 if (DISP_unfilled != n->norm->Bd.type &&
1166 DISP_literal != n->norm->Bd.type) {
1180 for (nn = n->child; nn; nn = nn->next) {
1212 print_text(h, "\n");
1248 if (n->norm->An.auth == AUTH_split) {
1253 if (n->norm->An.auth == AUTH_nosplit) {
1262 if (n->sec == SEC_AUTHORS && ! (h->flags & HTML_NOSPLIT))
1275 synopsis_pre(h, n);
1319 if (n->parent->tok != MDOC_Fo) {
1324 for (nn = n->child; nn; nn = nn->next) {
1334 if (n->child && n->next && n->next->tok == MDOC_Fa) {
1351 synopsis_pre(h, n);
1353 if (NULL == (n = n->child))
1356 assert(MDOC_TEXT == n->type);
1358 if (strcmp(n->string, "#include")) {
1366 print_text(h, n->string);
1368 if (NULL != (n = n->next)) {
1369 assert(MDOC_TEXT == n->type);
1379 strlcpy(buf, '<' == *n->string || '"' == *n->string ?
1380 n->string + 1 : n->string, BUFSIZ);
1396 print_text(h, n->string);
1399 n = n->next;
1402 for ( ; n; n = n->next) {
1403 assert(MDOC_TEXT == n->type);
1404 print_text(h, n->string);
1415 if (MDOC_BLOCK == n->type) {
1416 synopsis_pre(h, n);
1418 } else if (MDOC_ELEM == n->type) {
1419 synopsis_pre(h, n);
1420 } else if (MDOC_HEAD == n->type)
1433 synopsis_pre(h, n);
1448 pretty = MDOC_SYNPRETTY & n->flags;
1449 synopsis_pre(h, n);
1452 assert(n->child->string);
1453 sp = n->child->string;
1478 if (MDOC_SYNPRETTY & n->flags) {
1505 for (n = n->child->next; n; n = n->next) {
1507 if (MDOC_SYNPRETTY & n->flags)
1510 print_text(h, n->string);
1512 if (n->next) {
1533 if (NULL == n->child)
1535 else if (0 == strcmp("on", n->child->string))
1569 if (MDOC_sp == n->tok) {
1570 if (NULL != (n = n->child)) {
1571 if ( ! a2roffsu(n->string, &su, SCALE_VS))
1596 if (NULL == (n = n->child))
1599 assert(MDOC_TEXT == n->type);
1602 PAIR_HREF_INIT(&tag[1], n->string);
1606 if (NULL == n->next)
1607 print_text(h, n->string);
1609 for (n = n->next; n; n = n->next)
1610 print_text(h, n->string);
1623 for (n = n->child; n; n = n->next) {
1624 assert(MDOC_TEXT == n->type);
1628 bufcat(h, n->string);
1632 print_text(h, n->string);
1645 if (MDOC_BODY == n->type) {
1650 } else if (MDOC_BLOCK == n->type) {
1651 synopsis_pre(h, n);
1657 assert(n->child);
1658 assert(n->child->string);
1662 print_text(h, n->child->string);
1671 if (MDOC_BODY != n->type)
1686 synopsis_pre(h, n);
1698 if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags)
1704 if (NULL != (n = n->child)) {
1705 assert(MDOC_TEXT == n->type);
1711 buffmt_includes(h, n->string);
1717 print_text(h, n->string);
1720 n = n->next;
1726 for ( ; n; n = n->next) {
1727 assert(MDOC_TEXT == n->type);
1728 print_text(h, n->string);
1751 if (n->prev)
1756 nchild = n->nchild;
1760 for (n = n->child; n; n = n->next) {
1762 print_text(h, n->string);
1768 if (n->next == NULL)
1775 if (n->next->next == NULL)
1826 if (MDOC_HEAD == n->type)
1828 else if (MDOC_BODY != n->type)
1831 if (FONT_Em == n->norm->Bf.font)
1833 else if (FONT_Sy == n->norm->Bf.font)
1835 else if (FONT_Li == n->norm->Bf.font)
1876 if ( ! (n->next == NULL || n->next->flags & MDOC_LINE))
1885 if (MDOC_BLOCK != n->type)
1888 if (n->prev && SEC_SEE_ALSO == n->sec)
1947 if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags && n->prev)
1963 switch (n->tok) {
1966 if (n->prev && MDOC__A == n->prev->tok)
1967 if (NULL == n->next || MDOC__A != n->next->tok)
2017 if (MDOC__U != n->tok) {
2022 PAIR_HREF_INIT(&tag[1], n->child->string);
2032 if (MDOC__A == n->tok && n->next && MDOC__A == n->next->tok)
2033 if (NULL == n->next->next || MDOC__A != n->next->next->tok)
2034 if (NULL == n->prev || MDOC__A != n->prev->tok)
2039 if (NULL == n->parent || MDOC_Rs != n->parent->tok)
2043 print_text(h, n->next ? "," : ".");
2050 switch (n->type) {
2056 if (n->parent->args || 0 == n->prev->nchild)
2071 if (MDOC_BODY == n->type)
2080 if (MDOC_BODY != n->type)
2083 switch (n->tok) {
2087 print_text(h, n->nchild == 1 &&
2088 n->child->tok == MDOC_Mt ? "<" : "\\(la");
2109 if (NULL == n->norm->Es ||
2110 NULL == n->norm->Es->child)
2112 print_text(h, n->norm->Es->child->string);
2152 if (n->type != MDOC_BODY && n->type != MDOC_ELEM)
2157 switch (n->tok) {
2161 print_text(h, n->nchild == 1 &&
2162 n->child->tok == MDOC_Mt ? ">" : "\\(ra");
2179 if (n->norm->Es == NULL ||
2180 n->norm->Es->child == NULL ||
2181 n->norm->Es->child->next == NULL)
2184 print_text(h, n->norm->Es->child->next->string);
2217 if (n->type != MDOC_BODY)
2220 if (n->end == ENDBODY_NOT &&
2221 n->parent->head->child == NULL &&
2222 n->child != NULL &&
2223 n->child->end != ENDBODY_NOT)
2225 else if (n->end != ENDBODY_NOT ? n->child != NULL :
2226 n->parent->head->child != NULL && (n->child != NULL ||
2227 (n->parent->tail != NULL && n->parent->tail->child != NULL)))
2237 if (n->type != MDOC_BODY)
2240 if (n->end != ENDBODY_NOT) {
2245 body = n->child != NULL || n->parent->head->child != NULL;
2246 tail = n->parent->tail != NULL && n->parent->tail->child != NULL;