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()
1133 roff_node_delete(mdoc, n); in post_tg()
1146 roff_node_delete(mdoc, nch->next); in post_tg()
1151 roff_node_delete(mdoc, n); in post_tg()
1228 n = mdoc->last; in post_obsolete()
1239 n = mdoc->last; in post_useless()
1258 np = mdoc->last; in post_bf()
1319 n = mdoc->last; in post_fname()
1341 post_fname(mdoc); in post_fn()
1342 post_fa(mdoc); in post_fn()
1350 n = mdoc->last; in post_fo()
1364 roff_node_delete(mdoc, n->last); in post_fo()
1366 post_delim(mdoc); in post_fo()
1368 post_fname(mdoc); in post_fo()
1377 for (n = mdoc->last->child; n != NULL; n = n->next) { in post_fa()
1389 post_delim_nb(mdoc); in post_fa()
1397 n = mdoc->last; in post_nm()
1400 n->child->type == ROFFT_TEXT && mdoc->meta.msec != NULL) in post_nm()
1401 mandoc_xr_add(mdoc->meta.msec, n->child->string, -1, -1); in post_nm()
1404 roff_node_relink(mdoc, n->last); in post_nm()
1406 if (mdoc->meta.name == NULL) in post_nm()
1407 deroff(&mdoc->meta.name, n); in post_nm()
1409 if (mdoc->meta.name == NULL || in post_nm()
1410 (mdoc->lastsec == SEC_NAME && n->child == NULL)) in post_nm()
1415 post_delim_nb(mdoc); in post_nm()
1418 post_delim(mdoc); in post_nm()
1425 mdoc->meta.name == NULL) in post_nm()
1428 mdoc->next = ROFF_NEXT_CHILD; in post_nm()
1429 roff_word_alloc(mdoc, n->line, n->pos, mdoc->meta.name); in post_nm()
1430 mdoc->last->flags |= NODE_NOSRC; in post_nm()
1431 mdoc->last = n; in post_nm()
1439 n = mdoc->last; in post_nd()
1450 post_delim(mdoc); in post_nd()
1452 post_hyph(mdoc); in post_nd()
1460 n = mdoc->last; in post_display()
1466 roff_node_delete(mdoc, n); in post_display()
1471 post_hyph(mdoc); in post_display()
1478 mdoc->next = ROFF_NEXT_SIBLING; in post_display()
1480 roff_node_relink(mdoc, in post_display()
1482 roff_node_delete(mdoc, n); in post_display()
1485 post_bd(mdoc); in post_display()
1486 post_prevpar(mdoc); in post_display()
1506 n = mdoc->last; in post_defaults()
1508 post_delim_nb(mdoc); in post_defaults()
1511 mdoc->next = ROFF_NEXT_CHILD; in post_defaults()
1514 roff_word_alloc(mdoc, n->line, n->pos, "file"); in post_defaults()
1515 mdoc->last->flags |= NODE_NOSRC; in post_defaults()
1516 roff_word_alloc(mdoc, n->line, n->pos, "..."); in post_defaults()
1520 roff_word_alloc(mdoc, n->line, n->pos, "~"); in post_defaults()
1525 mdoc->last->flags |= NODE_NOSRC; in post_defaults()
1526 mdoc->last = n; in post_defaults()
1535 n = mdoc->last; in post_at()
1549 mdoc->next = ROFF_NEXT_CHILD; in post_at()
1551 roff_word_alloc(mdoc, nch->line, nch->pos, att); in post_at()
1554 roff_word_alloc(mdoc, n->line, n->pos, "AT&T UNIX"); in post_at()
1555 mdoc->last->flags |= NODE_NOSRC; in post_at()
1556 mdoc->last = n; in post_at()
1564 post_an_norm(mdoc); in post_an()
1566 np = mdoc->last; in post_an()
1573 post_delim_nb(mdoc); in post_an()
1582 post_tag(mdoc); in post_em()
1583 tag_put(NULL, TAG_FALLBACK, mdoc->last); in post_em()
1589 post_obsolete(mdoc); in post_en()
1590 if (mdoc->last->type == ROFFT_BLOCK) in post_en()
1591 mdoc->last->norm->Es = mdoc->last_es; in post_en()
1599 n = mdoc->last; in post_er()
1605 post_delim_nb(mdoc); in post_er()
1613 n = mdoc->last; in post_tag()
1622 post_delim_nb(mdoc); in post_tag()
1628 post_obsolete(mdoc); in post_es()
1629 mdoc->last_es = mdoc->last; in post_es()
1643 n = mdoc->last; in post_fl()
1650 roff_node_delete(mdoc, n->prev); in post_fl()
1652 post_tag(mdoc); in post_fl()
1662 post_delim_nb(mdoc); in post_xx()
1664 n = mdoc->last; in post_xx()
1685 mdoc->next = ROFF_NEXT_CHILD; in post_xx()
1686 roff_word_alloc(mdoc, n->child->line, n->child->pos, v); in post_xx()
1687 v = mdoc->last->string; in post_xx()
1689 mdoc->last->flags |= NODE_NOSRC; in post_xx()
1690 mdoc->last = n; in post_xx()
1701 mdoc->next = ROFF_NEXT_CHILD; in post_xx()
1702 roff_word_alloc(mdoc, n->line, n->pos, os); in post_xx()
1703 mdoc->last->flags |= NODE_NOSRC; in post_xx()
1704 mdoc->last = n; in post_xx()
1714 post_prevpar(mdoc); in post_it()
1716 nit = mdoc->last; in post_it()
1759 roff_node_delete(mdoc, nit); in post_it()
1789 post_prevpar(mdoc); in post_bl_block()
1791 n = mdoc->last; in post_bl_block()
1808 roff_node_relink(mdoc, nc); in post_bl_block()
1814 roff_node_delete(mdoc, nc); in post_bl_block()
1866 rewrite_macro2len(struct roff_man *mdoc, char **arg) in rewrite_macro2len() argument
1877 else if ((tok = roffhash_find(mdoc->mdocmac, *arg, 0)) != TOKEN_NONE) in rewrite_macro2len()
1896 post_bl_norm(mdoc); in post_bl_head()
1898 nh = mdoc->last; in post_bl_head()
1905 roff_node_delete(mdoc, nch); in post_bl_head()
1960 nbody = mdoc->last; in post_bl()
1963 post_bl_block(mdoc); in post_bl()
1966 post_bl_head(mdoc); in post_bl()
1986 nchild = mdoc->last; in post_bl()
1988 if (nchild == mdoc->last) in post_bl()
1991 mdoc->last = nbody; in post_bl()
1997 mdoc->last = nbody; in post_bl()
2003 mdoc->last = nbody->parent->parent; in post_bl()
2004 mdoc->next = ROFF_NEXT_CHILD; in post_bl()
2006 mdoc->last = nbody->parent->prev; in post_bl()
2007 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
2009 roff_node_relink(mdoc, nbody->child); in post_bl()
2028 mdoc->last = nchild->prev; in post_bl()
2029 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
2030 roff_block_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
2031 roff_head_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
2032 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
2033 roff_body_alloc(mdoc, nchild->line, nchild->pos, MDOC_It); in post_bl()
2035 roff_node_relink(mdoc, nchild); in post_bl()
2040 mdoc->next = ROFF_NEXT_SIBLING; in post_bl()
2042 mdoc->last = nbody; in post_bl()
2045 if (mdoc->meta.os_e != MANDOC_OS_NETBSD) in post_bl()
2080 n = mdoc->last; in post_bk()
2084 roff_node_delete(mdoc, n); in post_bk()
2093 nch = mdoc->last->child; in post_sm()
2096 mdoc->flags ^= MDOC_SMOFF; in post_sm()
2103 mdoc->flags &= ~MDOC_SMOFF; in post_sm()
2107 mdoc->flags |= MDOC_SMOFF; in post_sm()
2112 "%s %s", roff_name[mdoc->last->tok], nch->string); in post_sm()
2113 roff_node_relink(mdoc, nch); in post_sm()
2124 if (mdoc->meta.date == NULL) in post_root()
2125 mdoc->meta.date = mandoc_normdate(NULL, NULL); in post_root()
2127 if (mdoc->meta.title == NULL) { in post_root()
2129 mdoc->meta.title = mandoc_strdup("UNTITLED"); in post_root()
2132 if (mdoc->meta.vol == NULL) in post_root()
2133 mdoc->meta.vol = mandoc_strdup("LOCAL"); in post_root()
2135 if (mdoc->meta.os == NULL) { in post_root()
2137 mdoc->meta.os = mandoc_strdup(""); in post_root()
2138 } else if (mdoc->meta.os_e && in post_root()
2139 (mdoc->meta.rcsids & (1 << mdoc->meta.os_e)) == 0) in post_root()
2141 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_root()
2144 if (mdoc->meta.arch != NULL && in post_root()
2145 arch_valid(mdoc->meta.arch, mdoc->meta.os_e) == 0) { in post_root()
2146 n = mdoc->meta.first->child; in post_root()
2154 "Dt ... %s %s", mdoc->meta.arch, in post_root()
2155 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_root()
2161 n = mdoc->meta.first->child; in post_root()
2181 np = mdoc->last; in post_rs()
2273 n = mdoc->last; in post_hyph()
2296 n = mdoc->last; in post_ns()
2305 post_delim(mdoc); in post_sx()
2306 post_hyph(mdoc); in post_sx()
2312 post_section(mdoc); in post_sh()
2314 switch (mdoc->last->type) { in post_sh()
2316 post_sh_head(mdoc); in post_sh()
2319 switch (mdoc->lastsec) { in post_sh()
2321 post_sh_name(mdoc); in post_sh()
2324 post_sh_see_also(mdoc); in post_sh()
2327 post_sh_authors(mdoc); in post_sh()
2346 for (n = mdoc->last->child; n != NULL; n = n->next) { in post_sh_name()
2379 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_name()
2382 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_name()
2393 n = mdoc->last->child; in post_sh_see_also()
2460 if ( ! child_an(mdoc->last)) in post_sh_authors()
2462 mdoc->last->line, mdoc->last->pos, NULL); in post_sh_authors()
2522 sec = mdoc->last->sec; in post_sh_head()
2526 if (sec != SEC_NAME && mdoc->lastnamed == SEC_NONE) in post_sh_head()
2528 mdoc->last->line, mdoc->last->pos, "Sh %s", in post_sh_head()
2530 (nch = mdoc->last->child) == NULL ? "" : in post_sh_head()
2537 roff_setreg(mdoc->roff, "nS", 1, '='); in post_sh_head()
2538 mdoc->flags |= MDOC_SYNOPSIS; in post_sh_head()
2540 roff_setreg(mdoc->roff, "nS", 0, '='); in post_sh_head()
2541 mdoc->flags &= ~MDOC_SYNOPSIS; in post_sh_head()
2548 mdoc->lastsec = sec; in post_sh_head()
2553 if ((nch = mdoc->last->child) == NULL || in post_sh_head()
2576 if (sec == mdoc->lastnamed) in post_sh_head()
2577 mandoc_msg(MANDOCERR_SEC_REP, mdoc->last->line, in post_sh_head()
2578 mdoc->last->pos, "Sh %s", secnames[sec]); in post_sh_head()
2580 if (sec < mdoc->lastnamed) in post_sh_head()
2581 mandoc_msg(MANDOCERR_SEC_ORDER, mdoc->last->line, in post_sh_head()
2582 mdoc->last->pos, "Sh %s", secnames[sec]); in post_sh_head()
2586 mdoc->lastnamed = sec; in post_sh_head()
2590 if (mdoc->meta.msec == NULL) in post_sh_head()
2596 if (*mdoc->meta.msec == '4') in post_sh_head()
2602 if (*mdoc->meta.msec == '2') in post_sh_head()
2604 if (*mdoc->meta.msec == '3') in post_sh_head()
2610 if (*mdoc->meta.msec == '9') in post_sh_head()
2615 mdoc->last->line, mdoc->last->pos, in post_sh_head()
2628 n = mdoc->last; in post_xr()
2641 post_delim_nb(mdoc); in post_xr()
2650 n = mdoc->last; in post_section()
2653 post_prevpar(mdoc); in post_section()
2670 post_delim(mdoc); in post_section()
2671 post_hyph(mdoc); in post_section()
2684 roff_node_delete(mdoc, nch); in post_section()
2691 roff_node_delete(mdoc, nch); in post_section()
2700 n = mdoc->last; in post_prevpar()
2722 roff_node_delete(mdoc, np); in post_prevpar()
2731 post_prevpar(mdoc); in post_par()
2733 np = mdoc->last; in post_par()
2744 n = mdoc->last; in post_dd()
2747 if (mdoc->meta.date != NULL) { in post_dd()
2749 free(mdoc->meta.date); in post_dd()
2750 } else if (mdoc->flags & MDOC_PBODY) in post_dd()
2752 else if (mdoc->meta.title != NULL) in post_dd()
2755 else if (mdoc->meta.os != NULL) in post_dd()
2759 if (mdoc->quick && n != NULL) in post_dd()
2760 mdoc->meta.date = mandoc_strdup(""); in post_dd()
2762 mdoc->meta.date = mandoc_normdate(n->child, n); in post_dd()
2772 n = mdoc->last; in post_dt()
2775 if (mdoc->flags & MDOC_PBODY) { in post_dt()
2780 if (mdoc->meta.title != NULL) in post_dt()
2782 else if (mdoc->meta.os != NULL) in post_dt()
2786 free(mdoc->meta.title); in post_dt()
2787 free(mdoc->meta.msec); in post_dt()
2788 free(mdoc->meta.vol); in post_dt()
2789 free(mdoc->meta.arch); in post_dt()
2791 mdoc->meta.title = NULL; in post_dt()
2792 mdoc->meta.msec = NULL; in post_dt()
2793 mdoc->meta.vol = NULL; in post_dt()
2794 mdoc->meta.arch = NULL; in post_dt()
2801 mdoc->meta.title = mandoc_strdup("UNTITLED"); in post_dt()
2803 mdoc->meta.title = mandoc_strdup(nn->string); in post_dt()
2823 "Dt %s", mdoc->meta.title); in post_dt()
2824 mdoc->meta.vol = mandoc_strdup("LOCAL"); in post_dt()
2828 mdoc->meta.msec = mandoc_strdup(nn->string); in post_dt()
2836 mdoc->meta.vol = mandoc_strdup(nn->string); in post_dt()
2838 mdoc->meta.vol = mandoc_strdup(cp); in post_dt()
2839 if (mdoc->filesec != '\0' && in post_dt()
2840 mdoc->filesec != *nn->string && in post_dt()
2843 "*.%c vs Dt ... %c", mdoc->filesec, *nn->string); in post_dt()
2853 mdoc->meta.arch = mandoc_strdup(nn->string); in post_dt()
2868 post_delim_nb(mdoc); in post_bx()
2870 n = mdoc->last; in post_bx()
2881 mdoc->last = nch; in post_bx()
2883 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2884 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2885 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2886 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2888 mdoc->next = ROFF_NEXT_CHILD; in post_bx()
2889 roff_word_alloc(mdoc, n->line, n->pos, "BSD"); in post_bx()
2890 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2893 mdoc->last = n; in post_bx()
2897 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2898 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2899 mdoc->next = ROFF_NEXT_SIBLING; in post_bx()
2900 roff_word_alloc(mdoc, n->line, n->pos, "-"); in post_bx()
2901 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2902 roff_elem_alloc(mdoc, n->line, n->pos, MDOC_Ns); in post_bx()
2903 mdoc->last->flags |= NODE_NOSRC; in post_bx()
2904 mdoc->last = n; in post_bx()
2923 n = mdoc->last; in post_os()
2926 if (mdoc->meta.os != NULL) in post_os()
2928 else if (mdoc->flags & MDOC_PBODY) in post_os()
2931 post_delim(mdoc); in post_os()
2942 free(mdoc->meta.os); in post_os()
2943 mdoc->meta.os = NULL; in post_os()
2944 deroff(&mdoc->meta.os, n); in post_os()
2945 if (mdoc->meta.os) in post_os()
2948 if (mdoc->os_s != NULL) { in post_os()
2949 mdoc->meta.os = mandoc_strdup(mdoc->os_s); in post_os()
2954 mdoc->meta.os = mandoc_strdup(OSNAME); in post_os()
2956 if (mdoc->os_r == NULL) { in post_os()
2959 mdoc->os_r = mandoc_strdup("UNKNOWN"); in post_os()
2961 mandoc_asprintf(&mdoc->os_r, "%s %s", in post_os()
2964 mdoc->meta.os = mandoc_strdup(mdoc->os_r); in post_os()
2968 if (mdoc->meta.os_e == MANDOC_OS_OTHER) { in post_os()
2969 if (strstr(mdoc->meta.os, "OpenBSD") != NULL) in post_os()
2970 mdoc->meta.os_e = MANDOC_OS_OPENBSD; in post_os()
2971 else if (strstr(mdoc->meta.os, "NetBSD") != NULL) in post_os()
2972 mdoc->meta.os_e = MANDOC_OS_NETBSD; in post_os()
2984 mdoc->meta.os_e == MANDOC_OS_OPENBSD ? in post_os()
2993 if (mdoc->meta.os_e == MANDOC_OS_OPENBSD) in post_os()
2997 if (mdoc->meta.os_e == MANDOC_OS_NETBSD) in post_os()