Lines Matching refs:h

18 #include "config.h"
20 #include <sys/types.h>
22 #include <assert.h>
23 #include <ctype.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <unistd.h>
29 #include "mandoc_aux.h"
30 #include "mdoc.h"
31 #include "out.h"
32 #include "html.h"
33 #include "main.h"
39 struct html *h
295 synopsis_pre(struct html *h, const struct mdoc_node *n)
305 print_otag(h, TAG_BR, 0, NULL);
319 print_paragraph(h);
323 print_paragraph(h);
328 print_otag(h, TAG_BR, 0, NULL);
341 if ( ! (HTML_FRAGMENT & h->oflags)) {
342 print_gen_decls(h);
343 t = print_otag(h, TAG_HTML, 0, NULL);
344 tt = print_otag(h, TAG_HEAD, 0, NULL);
345 print_mdoc_head(meta, n, h);
346 print_tagq(h, tt);
347 print_otag(h, TAG_BODY, 0, NULL);
348 print_otag(h, TAG_DIV, 1, &tag);
350 t = print_otag(h, TAG_DIV, 1, &tag);
352 print_mdoc_nodelist(meta, n, h);
353 print_tagq(h, t);
360 print_gen_head(h);
361 bufinit(h);
362 bufcat(h, meta->title);
364 bufcat_fmt(h, "(%s)", meta->msec);
366 bufcat_fmt(h, " (%s)", meta->arch);
368 print_otag(h, TAG_TITLE, 0, NULL);
369 print_text(h, h->buf);
377 print_mdoc_node(meta, n, h);
389 t = h->tags.head;
394 child = mdoc_root_pre(meta, n, h);
398 assert(NULL == h->tblt);
405 if ( ! (HTML_LITERAL & h->flags))
406 print_otag(h, TAG_BR, 0, NULL);
408 h->flags |= HTML_NOSPACE;
409 print_text(h, n->string);
411 h->flags |= HTML_NOSPACE;
416 print_eqn(h, n->eqn);
424 print_tbl(h, n->span);
432 if (h->tblt != NULL) {
433 print_tblclose(h);
434 t = h->tags.head;
436 assert(h->tblt == NULL);
438 child = (*mdocs[n->tok].pre)(meta, n, h);
442 if (h->flags & HTML_KEEP && n->flags & MDOC_LINE) {
443 h->flags &= ~HTML_KEEP;
444 h->flags |= HTML_PREKEEP;
448 print_mdoc_nodelist(meta, n->child, h);
450 print_stagq(h, t);
454 mdoc_root_post(meta, n, h);
461 (*mdocs[n->tok].post)(meta, n, h);
465 h->flags |= HTML_NOSPACE;
477 t = print_otag(h, TAG_TABLE, 1, &tag);
479 print_otag(h, TAG_TBODY, 0, NULL);
481 tt = print_otag(h, TAG_TR, 0, NULL);
484 print_otag(h, TAG_TD, 1, &tag);
485 print_text(h, meta->date);
486 print_stagq(h, tt);
489 print_otag(h, TAG_TD, 1, &tag);
490 print_text(h, meta->os);
491 print_tagq(h, t);
514 t = print_otag(h, TAG_TABLE, 1, &tag);
516 print_otag(h, TAG_TBODY, 0, NULL);
518 tt = print_otag(h, TAG_TR, 0, NULL);
521 print_otag(h, TAG_TD, 1, &tag);
522 print_text(h, title);
523 print_stagq(h, tt);
526 print_otag(h, TAG_TD, 1, &tag);
527 print_text(h, volume);
528 print_stagq(h, tt);
531 print_otag(h, TAG_TD, 1, &tag);
532 print_text(h, title);
533 print_tagq(h, t);
548 print_otag(h, TAG_DIV, 1, &tag);
552 h->flags &= ~(HTML_SPLIT|HTML_NOSPLIT);
558 bufinit(h);
559 bufcat(h, "x");
562 bufcat_id(h, n->string);
564 bufcat_id(h, " ");
568 PAIR_ID_INIT(&tag, h->buf);
569 print_otag(h, TAG_H1, 1, &tag);
571 print_otag(h, TAG_H1, 0, NULL);
583 print_otag(h, TAG_DIV, 1, &tag);
588 bufinit(h);
589 bufcat(h, "x");
592 bufcat_id(h, n->string);
594 bufcat_id(h, " ");
598 PAIR_ID_INIT(&tag, h->buf);
599 print_otag(h, TAG_H2, 1, &tag);
601 print_otag(h, TAG_H2, 0, NULL);
612 print_otag(h, TAG_B, 1, &tag);
619 print_text(h, "\\-");
625 h->flags |= HTML_NOSPACE;
640 print_text(h, "\\(em");
642 print_otag(h, TAG_SPAN, 1, &tag);
655 synopsis_pre(h, n);
657 print_otag(h, TAG_B, 1, &tag);
659 print_text(h, meta->name);
662 print_otag(h, TAG_TD, 0, NULL);
664 print_text(h, meta->name);
667 print_otag(h, TAG_TD, 0, NULL);
673 synopsis_pre(h, n);
675 print_otag(h, TAG_TABLE, 1, &tag);
685 bufinit(h);
686 bufcat_su(h, "width", &su);
687 PAIR_STYLE_INIT(&tag, h);
688 print_otag(h, TAG_COL, 1, &tag);
689 print_otag(h, TAG_COL, 0, NULL);
690 print_otag(h, TAG_TBODY, 0, NULL);
691 print_otag(h, TAG_TR, 0, NULL);
705 if (h->base_man) {
706 buffmt_man(h, n->child->string,
709 PAIR_HREF_INIT(&tag[1], h->buf);
710 print_otag(h, TAG_A, 2, tag);
712 print_otag(h, TAG_A, 1, tag);
715 print_text(h, n->string);
720 h->flags |= HTML_NOSPACE;
721 print_text(h, "(");
722 h->flags |= HTML_NOSPACE;
723 print_text(h, n->string);
724 h->flags |= HTML_NOSPACE;
725 print_text(h, ")");
734 h->flags |= HTML_NOSPACE;
744 print_otag(h, TAG_I, 1, &tag);
779 print_otag(h, TAG_SPAN, 1, &tag);
781 print_text(h, pp);
783 flags = h->flags;
784 h->flags |= HTML_KEEP;
785 print_text(h, n->child->string);
786 h->flags = flags;
797 print_otag(h, TAG_SPAN, 1, &tag);
800 print_text(h, n->string);
801 h->flags |= HTML_NOSPACE;
802 print_text(h, "BSD");
804 print_text(h, "BSD");
809 h->flags |= HTML_NOSPACE;
810 print_text(h, "-");
811 h->flags |= HTML_NOSPACE;
812 print_text(h, n->string);
837 bufinit(h);
861 bufcat_su(h, "margin-top", &su);
862 PAIR_STYLE_INIT(&tag[1], h);
863 print_otag(h, TAG_DT, 2, tag);
867 print_otag(h, TAG_B, 1, tag);
886 bufcat_su(h, "margin-top", &su);
887 PAIR_STYLE_INIT(&tag[1], h);
888 print_otag(h, TAG_LI, 2, tag);
900 print_otag(h, TAG_DD, 1, tag);
904 bufcat_su(h, "margin-left", &su);
905 PAIR_STYLE_INIT(&tag[1], h);
906 print_otag(h, TAG_DD, 2, tag);
910 bufcat_su(h, "margin-top", &su);
911 PAIR_STYLE_INIT(&tag[1], h);
912 print_otag(h, TAG_TD, 2, tag);
920 print_otag(h, TAG_TR, 1, tag);
940 print_otag(h, TAG_TBODY, 0, NULL);
956 bufinit(h);
959 bufcat_su(h, "width", &su);
961 bufcat_su(h, "min-width", &su);
962 PAIR_STYLE_INIT(&tag[0], h);
963 print_otag(h, TAG_COL, 1, tag);
970 bufinit(h);
971 bufcat_su(h, "margin-top", &su);
972 bufcat_su(h, "margin-bottom", &su);
973 PAIR_STYLE_INIT(&tag[0], h);
984 bufcat_su(h, "margin-left", &su);
995 print_otag(h, TAG_UL, 2, tag);
998 print_otag(h, TAG_OL, 2, tag);
1009 print_otag(h, TAG_DL, 2, tag);
1012 print_otag(h, TAG_TABLE, 2, tag);
1030 print_otag(h, TAG_BR, 0, NULL);
1034 print_text(h, "The");
1040 t = print_otag(h, TAG_B, 1, &tag);
1041 print_text(h, n->string);
1042 print_tagq(h, t);
1045 h->flags |= HTML_NOSPACE;
1046 print_text(h, ",");
1050 print_text(h, "and");
1054 print_text(h, "utilities exit\\~0");
1056 print_text(h, "utility exits\\~0");
1058 print_text(h, "on success, and\\~>0 if an error occurs.");
1068 print_otag(h, TAG_SPAN, 1, &tag);
1082 bufinit(h);
1083 bufcat_su(h, "margin-top", &su);
1084 bufcat_su(h, "margin-bottom", &su);
1085 PAIR_STYLE_INIT(&tag[0], h);
1086 print_otag(h, TAG_BLOCKQUOTE, 1, tag);
1091 print_otag(h, TAG_DIV, 1, tag);
1095 print_otag(h, TAG_CODE, 1, tag);
1106 bufinit(h);
1107 bufcat(h, "#x");
1110 bufcat_id(h, n->string);
1112 bufcat_id(h, " ");
1116 PAIR_HREF_INIT(&tag[1], h->buf);
1118 print_otag(h, TAG_I, 1, tag);
1119 print_otag(h, TAG_A, 2, tag);
1145 print_paragraph(h);
1161 bufinit(h);
1162 bufcat_su(h, "margin-left", &su);
1163 PAIR_STYLE_INIT(&tag[0], h);
1168 print_otag(h, TAG_DIV, 2, tag);
1173 print_otag(h, TAG_PRE, 2, tag);
1177 sv = h->flags & HTML_LITERAL;
1178 h->flags |= HTML_LITERAL;
1181 print_mdoc_node(meta, nn, h);
1208 if (h->flags & HTML_NONEWLINE ||
1212 print_text(h, "\n");
1214 h->flags |= HTML_NOSPACE;
1218 h->flags &= ~HTML_LITERAL;
1229 print_otag(h, TAG_I, 1, &tag);
1239 print_otag(h, TAG_I, 1, &tag);
1249 h->flags &= ~HTML_NOSPLIT;
1250 h->flags |= HTML_SPLIT;
1254 h->flags &= ~HTML_SPLIT;
1255 h->flags |= HTML_NOSPLIT;
1259 if (h->flags & HTML_SPLIT)
1260 print_otag(h, TAG_BR, 0, NULL);
1262 if (n->sec == SEC_AUTHORS && ! (h->flags & HTML_NOSPLIT))
1263 h->flags |= HTML_SPLIT;
1266 print_otag(h, TAG_SPAN, 1, &tag);
1275 synopsis_pre(h, n);
1277 print_otag(h, TAG_B, 1, &tag);
1287 print_otag(h, TAG_SPAN, 1, &tag);
1297 print_otag(h, TAG_SPAN, 1, &tag);
1307 print_otag(h, TAG_SPAN, 1, &tag);
1320 print_otag(h, TAG_I, 1, &tag);
1325 t = print_otag(h, TAG_I, 1, &tag);
1326 print_text(h, nn->string);
1327 print_tagq(h, t);
1329 h->flags |= HTML_NOSPACE;
1330 print_text(h, ",");
1335 h->flags |= HTML_NOSPACE;
1336 print_text(h, ",");
1351 synopsis_pre(h, n);
1360 print_otag(h, TAG_B, 1, tag);
1365 print_otag(h, TAG_B, 1, tag);
1366 print_text(h, n->string);
1389 if (h->base_includes) {
1390 buffmt_includes(h, buf);
1391 PAIR_HREF_INIT(&tag[i], h->buf);
1395 t = print_otag(h, TAG_A, i, tag);
1396 print_text(h, n->string);
1397 print_tagq(h, t);
1404 print_text(h, n->string);
1416 synopsis_pre(h, n);
1419 synopsis_pre(h, n);
1424 print_otag(h, TAG_SPAN, 1, &tag);
1433 synopsis_pre(h, n);
1435 print_otag(h, TAG_I, 1, &tag);
1449 synopsis_pre(h, n);
1458 t = print_otag(h, TAG_I, 1, tag);
1464 print_text(h, nbuf);
1468 print_tagq(h, t);
1489 t = print_otag(h, TAG_B, 1, tag);
1492 print_text(h, sp);
1494 print_tagq(h, t);
1496 h->flags |= HTML_NOSPACE;
1497 print_text(h, "(");
1498 h->flags |= HTML_NOSPACE;
1501 bufinit(h);
1502 bufcat_style(h, "white-space", "nowrap");
1503 PAIR_STYLE_INIT(&tag[1], h);
1509 t = print_otag(h, TAG_I, i, tag);
1510 print_text(h, n->string);
1511 print_tagq(h, t);
1513 h->flags |= HTML_NOSPACE;
1514 print_text(h, ",");
1518 h->flags |= HTML_NOSPACE;
1519 print_text(h, ")");
1522 h->flags |= HTML_NOSPACE;
1523 print_text(h, ";");
1534 h->flags ^= HTML_NONOSPACE;
1536 h->flags &= ~HTML_NONOSPACE;
1538 h->flags |= HTML_NONOSPACE;
1540 if ( ! (HTML_NONOSPACE & h->flags))
1541 h->flags &= ~HTML_NOSPACE;
1557 print_paragraph(h);
1579 bufinit(h);
1580 bufcat_su(h, "height", &su);
1581 PAIR_STYLE_INIT(&tag, h);
1582 print_otag(h, TAG_DIV, 1, &tag);
1585 print_text(h, "\\~");
1604 print_otag(h, TAG_A, 2, tag);
1607 print_text(h, n->string);
1610 print_text(h, n->string);
1626 bufinit(h);
1627 bufcat(h, "mailto:");
1628 bufcat(h, n->string);
1630 PAIR_HREF_INIT(&tag[1], h->buf);
1631 t = print_otag(h, TAG_A, 2, tag);
1632 print_text(h, n->string);
1633 print_tagq(h, t);
1646 h->flags |= HTML_NOSPACE;
1647 print_text(h, "(");
1648 h->flags |= HTML_NOSPACE;
1651 synopsis_pre(h, n);
1661 t = print_otag(h, TAG_B, 1, &tag);
1662 print_text(h, n->child->string);
1663 print_tagq(h, t);
1673 h->flags |= HTML_NOSPACE;
1674 print_text(h, ")");
1675 h->flags |= HTML_NOSPACE;
1676 print_text(h, ";");
1686 synopsis_pre(h, n);
1689 print_otag(h, TAG_B, 1, tag);
1699 print_text(h, "#include");
1701 print_text(h, "<");
1702 h->flags |= HTML_NOSPACE;
1710 if (h->base_includes) {
1711 buffmt_includes(h, n->string);
1712 PAIR_HREF_INIT(&tag[i], h->buf);
1716 t = print_otag(h, TAG_A, i, tag);
1717 print_text(h, n->string);
1718 print_tagq(h, t);
1723 h->flags |= HTML_NOSPACE;
1724 print_text(h, ">");
1728 print_text(h, n->string);
1740 print_otag(h, TAG_B, 1, &tag);
1752 print_otag(h, TAG_BR, 0, NULL);
1758 print_text(h, "The");
1761 t = print_otag(h, TAG_B, 1, &tag);
1762 print_text(h, n->string);
1763 print_tagq(h, t);
1765 h->flags |= HTML_NOSPACE;
1766 print_text(h, "()");
1772 h->flags |= HTML_NOSPACE;
1773 print_text(h, ",");
1776 print_text(h, "and");
1780 print_text(h, "functions return");
1782 print_text(h, "function returns");
1784 print_text(h, "the value\\~0 if successful;");
1786 print_text(h, "Upon successful completion,"
1789 print_text(h, "otherwise the value\\~\\-1 is returned"
1793 t = print_otag(h, TAG_B, 1, &tag);
1794 print_text(h, "errno");
1795 print_tagq(h, t);
1796 print_text(h, "is set to indicate the error.");
1806 print_otag(h, TAG_B, 1, &tag);
1814 h->flags |= HTML_NOSPACE;
1815 print_text(h, "\\(aq");
1816 h->flags |= HTML_NOSPACE;
1844 bufinit(h);
1845 bufcat_style(h, "display", "inline");
1848 bufcat_su(h, "margin-left", &su);
1849 PAIR_STYLE_INIT(&tag[1], h);
1850 print_otag(h, TAG_DIV, 2, tag);
1860 print_otag(h, TAG_SPAN, 1, &tag);
1868 h->flags |= HTML_IGNDELIM;
1877 h->flags |= HTML_NOSPACE;
1889 print_paragraph(h);
1892 print_otag(h, TAG_SPAN, 1, &tag);
1902 print_otag(h, TAG_CODE, 1, &tag);
1912 print_otag(h, TAG_CODE, 1, &tag);
1922 print_otag(h, TAG_SPAN, 1, &tag);
1930 print_text(h, "is currently in beta test.");
1938 print_text(h, "currently under development.");
1948 print_otag(h, TAG_BR, 0, NULL);
1951 print_otag(h, TAG_SPAN, 1, &tag);
1968 print_text(h, "and");
2018 print_otag(h, t, 1, tag);
2023 print_otag(h, TAG_A, 2, tag);
2042 h->flags |= HTML_NOSPACE;
2043 print_text(h, n->next ? "," : ".");
2057 h->flags |= HTML_PREKEEP;
2072 h->flags &= ~(HTML_KEEP | HTML_PREKEEP);
2087 print_text(h, n->nchild == 1 &&
2093 print_text(h, "\\(lC");
2098 print_text(h, "\\(lB");
2103 print_text(h, "\\(lB");
2104 h->flags |= HTML_NOSPACE;
2106 print_otag(h, TAG_SPAN, 1, &tag);
2112 print_text(h, n->norm->Es->child->string);
2121 print_text(h, "\\(lq");
2126 print_text(h, "(");
2129 print_text(h, "\\(oq");
2130 h->flags |= HTML_NOSPACE;
2132 print_otag(h, TAG_CODE, 1, &tag);
2137 print_text(h, "\\(oq");
2144 h->flags |= HTML_NOSPACE;
2155 h->flags |= HTML_NOSPACE;
2161 print_text(h, n->nchild == 1 &&
2167 print_text(h, "\\(rC");
2176 print_text(h, "\\(rB");
2182 h->flags &= ~HTML_NOSPACE;
2184 print_text(h, n->norm->Es->child->next->string);
2193 print_text(h, "\\(rq");
2198 print_text(h, ")");
2205 print_text(h, "\\(cq");
2224 print_text(h, "\\&");
2228 h->flags |= HTML_NOSPACE;
2241 h->flags &= ~HTML_NOSPACE;
2249 h->flags |= HTML_NOSPACE;
2251 h->flags &= ~HTML_NOSPACE;