Lines Matching refs:mdoc
48 #define POST_ARGS struct roff_man *mdoc
302 mdoc_validate(struct roff_man *mdoc) in mdoc_validate() argument
313 n = mdoc->last; in mdoc_validate()
319 post_obsolete(mdoc); in mdoc_validate()
331 mdoc->last = mdoc->last->child; in mdoc_validate()
332 while (mdoc->last != NULL) { in mdoc_validate()
333 mdoc_validate(mdoc); in mdoc_validate()
334 if (mdoc->last == n) in mdoc_validate()
335 mdoc->last = mdoc->last->child; in mdoc_validate()
337 mdoc->last = mdoc->last->next; in mdoc_validate()
342 mdoc->last = n; in mdoc_validate()
343 mdoc->next = ROFF_NEXT_SIBLING; in mdoc_validate()
349 check_text(mdoc, n->line, n->pos, n->string); in mdoc_validate()
353 check_text_em(mdoc, n->line, n->pos, n->string); in mdoc_validate()
356 check_toptext(mdoc, n->line, n->pos, n->string); in mdoc_validate()
363 post_root(mdoc); in mdoc_validate()
366 check_args(mdoc, mdoc->last); in mdoc_validate()
382 roff_validate(mdoc); in mdoc_validate()
389 (*p)(mdoc); in mdoc_validate()
390 if (mdoc->last == n) in mdoc_validate()
391 mdoc_state(mdoc, n); in mdoc_validate()
397 check_args(struct roff_man *mdoc, struct roff_node *n) in check_args() argument
406 check_argv(mdoc, n, &n->args->argv[i]); in check_args()
410 check_argv(struct roff_man *mdoc, struct roff_node *n, struct mdoc_argv *v) in check_argv() argument
415 check_text(mdoc, v->line, v->pos, v->value[i]); in check_argv()
419 check_text(struct roff_man *mdoc, int ln, int pos, char *p) in check_text() argument
423 if (mdoc->last->flags & NODE_NOFILL) in check_text()
431 check_text_em(struct roff_man *mdoc, int ln, int pos, char *p) in check_text_em() argument
436 np = mdoc->last->prev; in check_text_em()
437 nn = mdoc->last->next; in check_text_em()
482 check_toptext(struct roff_man *mdoc, int ln, int pos, const char *p) in check_toptext() argument
525 tok = mdoc->last->tok; in post_delim()
526 nch = mdoc->last->last; in post_delim()
541 nch == mdoc->last->child ? "" : " ...", nch->string); in post_delim()
558 tok = mdoc->last->tok; in post_delim_nb()
559 nch = mdoc->last->last; in post_delim_nb()
634 nch == mdoc->last->child ? "" : " ...", nch->string); in post_delim_nb()
646 n = mdoc->last->parent; in post_bl_norm()
714 rewrite_macro2len(mdoc, argv->value); in post_bl_norm()
727 rewrite_macro2len(mdoc, argv->value); in post_bl_norm()
815 n = mdoc->last; in post_bd()
849 rewrite_macro2len(mdoc, argv->value); in post_bd()
888 n = mdoc->last; in post_an_norm()
912 post_useless(mdoc); in post_eoln()
913 n = mdoc->last; in post_eoln()
919 roff_node_delete(mdoc, n->child); in post_eoln()
921 roff_word_alloc(mdoc, n->line, n->pos, n->tok == MDOC_Bt ? in post_eoln()
923 mdoc->last->flags |= NODE_EOS | NODE_NOSRC; in post_eoln()
924 mdoc->last = n; in post_eoln()
928 build_list(struct roff_man *mdoc, int tok) in build_list() argument
933 n = mdoc->last->next; in build_list()
935 roff_elem_alloc(mdoc, n->line, n->pos, tok); in build_list()
936 mdoc->last->flags |= NODE_NOSRC; in build_list()
937 roff_node_relink(mdoc, n); in build_list()
938 n = mdoc->last = mdoc->last->parent; in build_list()
939 mdoc->next = ROFF_NEXT_SIBLING; in build_list()
943 roff_word_alloc(mdoc, n->line, n->pos, ","); in build_list()
944 mdoc->last->flags |= NODE_DELIMC | NODE_NOSRC; in build_list()
946 n = mdoc->last->next; in build_list()
948 roff_word_alloc(mdoc, n->line, n->pos, "and"); in build_list()
949 mdoc->last->flags |= NODE_NOSRC; in build_list()
960 post_std(mdoc); in post_ex()
962 n = mdoc->last; in post_ex()
963 mdoc->next = ROFF_NEXT_CHILD; in post_ex()
964 roff_word_alloc(mdoc, n->line, n->pos, "The"); in post_ex()
965 mdoc->last->flags |= NODE_NOSRC; in post_ex()
967 if (mdoc->last->next != NULL) in post_ex()
968 ic = build_list(mdoc, MDOC_Nm); in post_ex()
969 else if (mdoc->meta.name != NULL) { in post_ex()
970 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Nm); in post_ex()
971 mdoc->last->flags |= NODE_NOSRC; in post_ex()
972 roff_word_alloc(mdoc, n->line, n->pos, mdoc->meta.name); in post_ex()
973 mdoc->last->flags |= NODE_NOSRC; in post_ex()
974 mdoc->last = mdoc->last->parent; in post_ex()
975 mdoc->next = ROFF_NEXT_SIBLING; in post_ex()
982 roff_word_alloc(mdoc, n->line, n->pos, in post_ex()
984 mdoc->last->flags |= NODE_NOSRC; in post_ex()
985 roff_word_alloc(mdoc, n->line, n->pos, in post_ex()
987 mdoc->last->flags |= NODE_EOS | NODE_NOSRC; in post_ex()
988 mdoc->last = n; in post_ex()
997 post_delim_nb(mdoc); in post_lb()
999 n = mdoc->last; in post_lb()
1001 mdoc->next = ROFF_NEXT_CHILD; in post_lb()
1005 roff_word_alloc(mdoc, n->line, n->pos, p); in post_lb()
1006 mdoc->last->flags = NODE_NOSRC; in post_lb()
1007 mdoc->last = n; in post_lb()
1014 roff_word_alloc(mdoc, n->line, n->pos, "library"); in post_lb()
1015 mdoc->last->flags = NODE_NOSRC; in post_lb()
1016 roff_word_alloc(mdoc, n->line, n->pos, "\\(lq"); in post_lb()
1017 mdoc->last->flags = NODE_DELIMO | NODE_NOSRC; in post_lb()
1018 mdoc->last = mdoc->last->next; in post_lb()
1019 roff_word_alloc(mdoc, n->line, n->pos, "\\(rq"); in post_lb()
1020 mdoc->last->flags = NODE_DELIMC | NODE_NOSRC; in post_lb()
1021 mdoc->last = n; in post_lb()
1030 post_std(mdoc); in post_rv()
1032 n = mdoc->last; in post_rv()
1033 mdoc->next = ROFF_NEXT_CHILD; in post_rv()
1035 roff_word_alloc(mdoc, n->line, n->pos, "The"); in post_rv()
1036 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1037 ic = build_list(mdoc, MDOC_Fn); in post_rv()
1038 roff_word_alloc(mdoc, n->line, n->pos, in post_rv()
1040 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1041 roff_word_alloc(mdoc, n->line, n->pos, in post_rv()
1044 roff_word_alloc(mdoc, n->line, n->pos, "Upon successful " in post_rv()
1046 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1048 roff_word_alloc(mdoc, n->line, n->pos, "otherwise " in post_rv()
1050 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1051 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Va); in post_rv()
1052 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1053 roff_word_alloc(mdoc, n->line, n->pos, "errno"); in post_rv()
1054 mdoc->last->flags |= NODE_NOSRC; in post_rv()
1055 mdoc->last = mdoc->last->parent; in post_rv()
1056 mdoc->next = ROFF_NEXT_SIBLING; in post_rv()
1057 roff_word_alloc(mdoc, n->line, n->pos, in post_rv()
1059 mdoc->last->flags |= NODE_EOS | NODE_NOSRC; in post_rv()
1060 mdoc->last = n; in post_rv()
1068 post_delim(mdoc); in post_std()
1070 n = mdoc->last; in post_std()
1085 n = mdoc->last; in post_st()
1092 roff_node_delete(mdoc, n); in post_st()
1097 mdoc->next = ROFF_NEXT_CHILD; in post_st()
1098 roff_word_alloc(mdoc, nch->line, nch->pos, p); in post_st()
1099 mdoc->last->flags |= NODE_NOSRC; in post_st()
1100 mdoc->last= n; in post_st()
1114 n = mdoc->last; in post_tg()
1132 roff_node_delete(mdoc, n); in post_tg()
1145 roff_node_delete(mdoc, nch->next); in post_tg()
1150 roff_node_delete(mdoc, n); in post_tg()
1227 n = mdoc->last; in post_obsolete()
1238 n = mdoc->last; in post_useless()
1257 np = mdoc->last; in post_bf()
1318 n = mdoc->last; in post_fname()
1340 post_fname(mdoc); in post_fn()
1341 post_fa(mdoc); in post_fn()
1349 n = mdoc->last; in post_fo()
1363 roff_node_delete(mdoc, n->last); in post_fo()
1365 post_delim(mdoc); in post_fo()
1367 post_fname(mdoc); in post_fo()
1376 for (n = mdoc->last->child; n != NULL; n = n->next) { in post_fa()
1388 post_delim_nb(mdoc); in post_fa()
1396 n = mdoc->last; in post_nm()
1399 n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL) in post_nm()
1400 mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1); in post_nm()
1403 roff_node_relink(mdoc, n->last); in post_nm()
1405 if (mdoc->meta.name == NULL) in post_nm()
1406 deroff(&mdoc->meta.name, n); in post_nm()
1408 if (mdoc->meta.name == NULL || in post_nm()
1409 (mdoc->lastsec == SEC_NAME && n->child == NULL)) in post_nm()
1414 post_delim_nb(mdoc); in post_nm()
1417 post_delim(mdoc); in post_nm()
1424 mdoc->meta.name == NULL) in post_nm()
1427 mdoc->next = ROFF_NEXT_CHILD; in post_nm()
1428 roff_word_alloc(mdoc, n->line, n->pos, mdoc->meta.name); in post_nm()
1429 mdoc->last->flags |= NODE_NOSRC; in post_nm()
1430 mdoc->last = n; in post_nm()
1438 n = mdoc->last; in post_nd()
1449 post_delim(mdoc); in post_nd()
1451 post_hyph(mdoc); in post_nd()
1459 n = mdoc->last; in post_display()
1465 roff_node_delete(mdoc, n); in post_display()
1470 post_hyph(mdoc); in post_display()
1477 mdoc->next = ROFF_NEXT_SIBLING; in post_display()
1479 roff_node_relink(mdoc, in post_display()
1481 roff_node_delete(mdoc, n); in post_display()
1484 post_bd(mdoc); in post_display()
1485 post_prevpar(mdoc); in post_display()
1505 n = mdoc->last; in post_defaults()
1507 post_delim_nb(mdoc); in post_defaults()
1510 mdoc->next = ROFF_NEXT_CHILD; in post_defaults()
1513 roff_word_alloc(mdoc, n->line, n->pos, "file"); in post_defaults()
1514 mdoc->last->flags |= NODE_NOSRC; in post_defaults()
1515 roff_word_alloc(mdoc, n->line, n->pos, "..."); in post_defaults()
1519 roff_word_alloc(mdoc, n->line, n->pos, "~"); in post_defaults()
1524 mdoc->last->flags |= NODE_NOSRC; in post_defaults()
1525 mdoc->last = n; in post_defaults()
1534 n = mdoc->last; in post_at()
1548 mdoc->next = ROFF_NEXT_CHILD; in post_at()
1550 roff_word_alloc(mdoc, nch->line, nch->pos, att); in post_at()
1553 roff_word_alloc(mdoc, n->line, n->pos, "AT&T UNIX"); in post_at()
1554 mdoc->last->flags |= NODE_NOSRC; in post_at()
1555 mdoc->last = n; in post_at()
1563 post_an_norm(mdoc); in post_an()
1565 np = mdoc->last; in post_an()
1572 post_delim_nb(mdoc); in post_an()
1581 post_tag(mdoc); in post_em()
1582 tag_put(NULL, TAG_FALLBACK, mdoc->last); in post_em()
1588 post_obsolete(mdoc); in post_en()
1589 if (mdoc->last->type == ROFFT_BLOCK) in post_en()
1590 mdoc->last->norm->Es = mdoc->last_es; in post_en()
1598 n = mdoc->last; in post_er()
1604 post_delim_nb(mdoc); in post_er()
1612 n = mdoc->last; in post_tag()
1621 post_delim_nb(mdoc); in post_tag()
1627 post_obsolete(mdoc); in post_es()
1628 mdoc->last_es = mdoc->last; in post_es()
1642 n = mdoc->last; in post_fl()
1649 roff_node_delete(mdoc, n->prev); in post_fl()
1651 post_tag(mdoc); in post_fl()
1661 post_delim_nb(mdoc); in post_xx()
1663 n = mdoc->last; in post_xx()
1684 mdoc->next = ROFF_NEXT_CHILD; in post_xx()
1685 roff_word_alloc(mdoc, n->child->line, n->child->pos, v); in post_xx()
1686 v = mdoc->last->string; in post_xx()
1688 mdoc->last->flags |= NODE_NOSRC; in post_xx()
1689 mdoc->last = n; in post_xx()
1700 mdoc->next = ROFF_NEXT_CHILD; in post_xx()
1701 roff_word_alloc(mdoc, n->line, n->pos, os); in post_xx()
1702 mdoc->last->flags |= NODE_NOSRC; in post_xx()
1703 mdoc->last = n; in post_xx()
1713 post_prevpar(mdoc); in post_it()
1715 nit = mdoc->last; in post_it()
1758 roff_node_delete(mdoc, nit); in post_it()
1788 post_prevpar(mdoc); in post_bl_block()
1790 n = mdoc->last; in post_bl_block()
1807 roff_node_relink(mdoc, nc); in post_bl_block()
1813 roff_node_delete(mdoc, nc); in post_bl_block()
1826 rewrite_macro2len(struct roff_man *mdoc, char **arg) in rewrite_macro2len() argument
1835 else if ((tok = roffhash_find(mdoc->mdocmac, *arg, 0)) == TOKEN_NONE) in rewrite_macro2len()
1851 post_bl_norm(mdoc); in post_bl_head()
1853 nh = mdoc->last; in post_bl_head()
1860 roff_node_delete(mdoc, nch); in post_bl_head()
1915 nbody = mdoc->last; in post_bl()
1918 post_bl_block(mdoc); in post_bl()
1921 post_bl_head(mdoc); in post_bl()
1941 nchild = mdoc->last; in post_bl()
1943 if (nchild == mdoc->last) in post_bl()
1946 mdoc->last = nbody; in post_bl()
1952 mdoc->last = nbody; in post_bl()
1958 mdoc->last = nbody->parent->parent; in post_bl()
1959 mdoc->next = ROFF_NEXT_CHILD; in post_bl()
1961 mdoc->last = nbody->parent->prev; in post_bl()
1962 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
1964 roff_node_relink(mdoc, nbody->child); in post_bl()
1983 mdoc->last = nchild->prev; in post_bl()
1984 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
1985 roff_block_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
1986 roff_head_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
1987 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
1988 roff_body_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
1990 roff_node_relink(mdoc, nchild); in post_bl()
1995 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
1997 mdoc->last = nbody; in post_bl()
2000 if (mdoc->meta.os_e != MANDOC_OS_NETBSD) in post_bl()
2035 n = mdoc->last; in post_bk()
2039 roff_node_delete(mdoc, n); in post_bk()
2048 nch = mdoc->last->child; in post_sm()
2051 mdoc->flags ^= MDOC_SMOFF; in post_sm()
2058 mdoc->flags &= ~MDOC_SMOFF; in post_sm()
2062 mdoc->flags |= MDOC_SMOFF; in post_sm()
2067 "%s %s", roff_name[mdoc->last->tok], nch->string); in post_sm()
2068 roff_node_relink(mdoc, nch); in post_sm()
2079 if (mdoc->meta.date == NULL) in post_root()
2080 mdoc->meta.date = mandoc_normdate(NULL, NULL); in post_root()
2082 if (mdoc->meta.title == NULL) { in post_root()
2084 mdoc->meta.title = mandoc_strdup("UNTITLED"); in post_root()
2087 if (mdoc->meta.vol == NULL) in post_root()
2088 mdoc->meta.vol = mandoc_strdup("LOCAL"); in post_root()
2090 if (mdoc->meta.os == NULL) { in post_root()
2092 mdoc->meta.os = mandoc_strdup(""); in post_root()
2093 } else if (mdoc->meta.os_e && in post_root()
2094 (mdoc->meta.rcsids & (1 << mdoc->meta.os_e)) == 0) in post_root()
2096 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_root()
2099 if (mdoc->meta.arch != NULL && in post_root()
2100 arch_valid(mdoc->meta.arch, mdoc->meta.os_e) == 0) { in post_root()
2101 n = mdoc->meta.first->child; in post_root()
2109 "Dt ... %s %s", mdoc->meta.arch, in post_root()
2110 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_root()
2116 n = mdoc->meta.first->child; in post_root()
2136 np = mdoc->last; in post_rs()
2228 n = mdoc->last; in post_hyph()
2251 n = mdoc->last; in post_ns()
2260 post_delim(mdoc); in post_sx()
2261 post_hyph(mdoc); in post_sx()
2267 post_section(mdoc); in post_sh()
2269 switch (mdoc->last->type) { in post_sh()
2271 post_sh_head(mdoc); in post_sh()
2274 switch (mdoc->lastsec) { in post_sh()
2276 post_sh_name(mdoc); in post_sh()
2279 post_sh_see_also(mdoc); in post_sh()
2282 post_sh_authors(mdoc); in post_sh()
2301 for (n = mdoc->last->child; n != NULL; n = n->next) { in post_sh_name()
2334 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_name()
2337 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_name()
2348 n = mdoc->last->child; in post_sh_see_also()
2415 if ( ! child_an(mdoc->last)) in post_sh_authors()
2417 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_authors()
2477 sec = mdoc->last->sec; in post_sh_head()
2481 if (sec != SEC_NAME && mdoc->lastnamed == SEC_NONE) in post_sh_head()
2483 mdoc->last->line, mdoc->last->pos, "Sh %s", in post_sh_head()
2485 (nch = mdoc->last->child) == NULL ? "" : in post_sh_head()
2492 roff_setreg(mdoc->roff, "nS", 1, '='); in post_sh_head()
2493 mdoc->flags |= MDOC_SYNOPSIS; in post_sh_head()
2495 roff_setreg(mdoc->roff, "nS", 0, '='); in post_sh_head()
2496 mdoc->flags &= ~MDOC_SYNOPSIS; in post_sh_head()
2503 mdoc->lastsec = sec; in post_sh_head()
2508 if ((nch = mdoc->last->child) == NULL || in post_sh_head()
2531 if (sec == mdoc->lastnamed) in post_sh_head()
2532 mandoc_msg(MANDOCERR_SEC_REP, mdoc->last->line, in post_sh_head()
2533 mdoc->last->pos, "Sh %s", secnames[sec]); in post_sh_head()
2535 if (sec < mdoc->lastnamed) in post_sh_head()
2536 mandoc_msg(MANDOCERR_SEC_ORDER, mdoc->last->line, in post_sh_head()
2537 mdoc->last->pos, "Sh %s", secnames[sec]); in post_sh_head()
2541 mdoc->lastnamed = sec; in post_sh_head()
2545 if (mdoc->meta.msec == NULL) in post_sh_head()
2552 if (*mdoc->meta.msec == '4') in post_sh_head()
2554 if (*mdoc->meta.msec == '7') in post_sh_head()
2559 if (*mdoc->meta.msec == '2') in post_sh_head()
2561 if (*mdoc->meta.msec == '3') in post_sh_head()
2567 if (*mdoc->meta.msec == '9') in post_sh_head()
2572 mdoc->last->line, mdoc->last->pos, in post_sh_head()
2585 n = mdoc->last; in post_xr()
2598 post_delim_nb(mdoc); in post_xr()
2607 n = mdoc->last; in post_section()
2610 post_prevpar(mdoc); in post_section()
2627 post_delim(mdoc); in post_section()
2628 post_hyph(mdoc); in post_section()
2641 roff_node_delete(mdoc, nch); in post_section()
2648 roff_node_delete(mdoc, nch); in post_section()
2657 n = mdoc->last; in post_prevpar()
2679 roff_node_delete(mdoc, np); in post_prevpar()
2688 post_prevpar(mdoc); in post_par()
2690 np = mdoc->last; in post_par()
2701 n = mdoc->last; in post_dd()
2704 if (mdoc->meta.date != NULL) { in post_dd()
2706 free(mdoc->meta.date); in post_dd()
2707 } else if (mdoc->flags & MDOC_PBODY) in post_dd()
2709 else if (mdoc->meta.title != NULL) in post_dd()
2712 else if (mdoc->meta.os != NULL) in post_dd()
2716 if (mdoc->quick && n != NULL) in post_dd()
2717 mdoc->meta.date = mandoc_strdup(""); in post_dd()
2719 mdoc->meta.date = mandoc_normdate(n->child, n); in post_dd()
2729 n = mdoc->last; in post_dt()
2732 if (mdoc->flags & MDOC_PBODY) { in post_dt()
2737 if (mdoc->meta.title != NULL) in post_dt()
2739 else if (mdoc->meta.os != NULL) in post_dt()
2743 free(mdoc->meta.title); in post_dt()
2744 free(mdoc->meta.msec); in post_dt()
2745 free(mdoc->meta.vol); in post_dt()
2746 free(mdoc->meta.arch); in post_dt()
2748 mdoc->meta.title = NULL; in post_dt()
2749 mdoc->meta.msec = NULL; in post_dt()
2750 mdoc->meta.vol = NULL; in post_dt()
2751 mdoc->meta.arch = NULL; in post_dt()
2758 mdoc->meta.title = mandoc_strdup("UNTITLED"); in post_dt()
2760 mdoc->meta.title = mandoc_strdup(nn->string); in post_dt()
2780 "Dt %s", mdoc->meta.title); in post_dt()
2781 mdoc->meta.vol = mandoc_strdup("LOCAL"); in post_dt()
2785 mdoc->meta.msec = mandoc_strdup(nn->string); in post_dt()
2793 mdoc->meta.vol = mandoc_strdup(nn->string); in post_dt()
2795 mdoc->meta.vol = mandoc_strdup(cp); in post_dt()
2796 if (mdoc->filesec != '\0' && in post_dt()
2797 mdoc->filesec != *nn->string && in post_dt()
2800 "*.%c vs Dt ... %c", mdoc->filesec, *nn->string); in post_dt()
2810 mdoc->meta.arch = mandoc_strdup(nn->string); in post_dt()
2825 post_delim_nb(mdoc); in post_bx()
2827 n = mdoc->last; in post_bx()
2838 mdoc->last = nch; in post_bx()
2840 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2841 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2842 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2843 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2845 mdoc->next = ROFF_NEXT_CHILD; in post_bx()
2846 roff_word_alloc(mdoc, n->line, n->pos, "BSD"); in post_bx()
2847 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2850 mdoc->last = n; in post_bx()
2854 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2855 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2856 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2857 roff_word_alloc(mdoc, n->line, n->pos, "-"); in post_bx()
2858 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2859 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2860 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2861 mdoc->last = n; in post_bx()
2881 n = mdoc->last; in post_os()
2884 if (mdoc->meta.os != NULL) in post_os()
2886 else if (mdoc->flags & MDOC_PBODY) in post_os()
2889 post_delim(mdoc); in post_os()
2900 free(mdoc->meta.os); in post_os()
2901 mdoc->meta.os = NULL; in post_os()
2902 deroff(&mdoc->meta.os, n); in post_os()
2903 if (mdoc->meta.os) in post_os()
2906 if (mdoc->os_s != NULL) { in post_os()
2907 mdoc->meta.os = mandoc_strdup(mdoc->os_s); in post_os()
2912 mdoc->meta.os = mandoc_strdup(OSNAME); in post_os()
2922 mdoc->meta.os = mandoc_strdup(defbuf); in post_os()
2926 if (mdoc->meta.os_e == MANDOC_OS_OTHER) { in post_os()
2927 if (strstr(mdoc->meta.os, "OpenBSD") != NULL) in post_os()
2928 mdoc->meta.os_e = MANDOC_OS_OPENBSD; in post_os()
2929 else if (strstr(mdoc->meta.os, "NetBSD") != NULL) in post_os()
2930 mdoc->meta.os_e = MANDOC_OS_NETBSD; in post_os()
2942 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_os()
2951 if (mdoc->meta.os_e == MANDOC_OS_OPENBSD) in post_os()
2955 if (mdoc->meta.os_e == MANDOC_OS_NETBSD) in post_os()