=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_term.c,v retrieving revision 1.217 retrieving revision 1.218 diff -c -r1.217 -r1.218 *** src/usr.bin/mandoc/mdoc_term.c 2015/04/18 16:04:40 1.217 --- src/usr.bin/mandoc/mdoc_term.c 2015/04/18 17:50:02 1.218 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_term.c,v 1.217 2015/04/18 16:04:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze --- 1,4 ---- ! /* $OpenBSD: mdoc_term.c,v 1.218 2015/04/18 17:50:02 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze *************** *** 251,275 **** void terminal_mdoc(void *arg, const struct roff_man *mdoc) { - const struct roff_meta *meta; struct roff_node *n; struct termp *p; p = (struct termp *)arg; - p->overstep = 0; p->rmargin = p->maxrmargin = p->defrmargin; p->tabwidth = term_len(p, 5); ! n = mdoc_node(mdoc)->child; ! meta = mdoc_meta(mdoc); ! if (p->synopsisonly) { while (n != NULL) { if (n->tok == MDOC_Sh && n->sec == SEC_SYNOPSIS) { if (n->child->next->child != NULL) print_mdoc_nodelist(p, NULL, ! meta, n->child->next->child); term_newln(p); break; } --- 251,272 ---- void terminal_mdoc(void *arg, const struct roff_man *mdoc) { struct roff_node *n; struct termp *p; p = (struct termp *)arg; p->overstep = 0; p->rmargin = p->maxrmargin = p->defrmargin; p->tabwidth = term_len(p, 5); ! n = mdoc->first->child; if (p->synopsisonly) { while (n != NULL) { if (n->tok == MDOC_Sh && n->sec == SEC_SYNOPSIS) { if (n->child->next->child != NULL) print_mdoc_nodelist(p, NULL, ! &mdoc->meta, ! n->child->next->child); term_newln(p); break; } *************** *** 278,288 **** } else { if (p->defindent == 0) p->defindent = 5; ! term_begin(p, print_mdoc_head, print_mdoc_foot, meta); if (n != NULL) { if (n->tok != MDOC_Sh) term_vspace(p); ! print_mdoc_nodelist(p, NULL, meta, n); } term_end(p); } --- 275,286 ---- } else { if (p->defindent == 0) p->defindent = 5; ! term_begin(p, print_mdoc_head, print_mdoc_foot, ! &mdoc->meta); if (n != NULL) { if (n->tok != MDOC_Sh) term_vspace(p); ! print_mdoc_nodelist(p, NULL, &mdoc->meta, n); } term_end(p); }