diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 13 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 7 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 11 | ||||
-rw-r--r-- | usr.bin/mandoc/term_ps.c | 7 |
6 files changed, 21 insertions, 25 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index e24fdeb6287..5ce65c72979 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.47 2011/09/18 15:54:48 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.48 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -209,12 +209,12 @@ check_text(CHKARGS) { char *cp, *p; - cp = p = n->string; - for (cp = p; NULL != (p = strchr(p, '\t')); p++) { - if (MAN_LITERAL & m->flags) - continue; + if (MAN_LITERAL & m->flags) + return; + + cp = n->string; + for (p = cp; NULL != (p = strchr(p, '\t')); p++) man_pmsg(m, n->line, (int)(p - cp), MANDOCERR_BADTAB); - } } #define INEQ_DEFINE(x, ineq, name) \ @@ -470,7 +470,6 @@ post_UC(CHKARGS) const char *p, *s; n = n->child; - n = m->last->child; if (NULL == n || MAN_TEXT != n->type) p = bsd_versions[0]; diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index b38e6f6cf24..08c11d3c28d 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.63 2011/10/09 22:10:51 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.64 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -499,7 +499,7 @@ mdoc_root_post(MDOC_ARGS) print_otag(h, TAG_COL, 1, tag); print_otag(h, TAG_COL, 1, tag); - t = print_otag(h, TAG_TBODY, 0, NULL); + print_otag(h, TAG_TBODY, 0, NULL); tt = print_otag(h, TAG_TR, 0, NULL); diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index b3bc766c3d3..7371b8c8b27 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.69 2011/09/18 15:54:48 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.70 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -1428,18 +1428,15 @@ blk_part_exp(MACRO_PROT_ARGS) /* Clean-up to leave in a consistent state. */ - if (NULL == head) { + if (NULL == head) if ( ! mdoc_head_alloc(m, line, ppos, tok)) return(0); - head = m->last; - } if (NULL == body) { if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos)) return(0); if ( ! mdoc_body_alloc(m, line, ppos, tok)) return(0); - body = m->last; } /* Standard appending of delimiters. */ diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index 640847207da..d91398841cb 100644 --- a/usr.bin/mandoc/mdoc_term.c +++ b/usr.bin/mandoc/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.137 2011/09/20 09:02:18 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.138 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -580,6 +580,8 @@ print_bvspace(struct termp *p, { const struct mdoc_node *nn; + assert(n); + term_newln(p); if (MDOC_Bd == bl->tok && bl->norm->Bd.comp) diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 98643446e00..5fa030fa874 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.95 2011/09/18 15:54:48 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.96 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -541,12 +541,11 @@ check_text(struct mdoc *m, int ln, int pos, char *p) { char *cp; - cp = p; - for (cp = p; NULL != (p = strchr(p, '\t')); p++) { - if (MDOC_LITERAL & m->flags) - continue; + if (MDOC_LITERAL & m->flags) + return; + + for (cp = p; NULL != (p = strchr(p, '\t')); p++) mdoc_pmsg(m, ln, pos + (int)(p - cp), MANDOCERR_BADTAB); - } } static int diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c index 9d04a917e97..bba77047276 100644 --- a/usr.bin/mandoc/term_ps.c +++ b/usr.bin/mandoc/term_ps.c @@ -1,4 +1,4 @@ -/* $Id: term_ps.c,v 1.18 2011/09/18 15:54:48 schwarze Exp $ */ +/* $Id: term_ps.c,v 1.19 2011/10/16 12:18:32 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -488,8 +488,7 @@ pspdf_alloc(char *outopts) pagey = 356; } else if (2 != sscanf(pp, "%ux%u", &pagex, &pagey)) fprintf(stderr, "%s: Unknown paper\n", pp); - } else if (NULL == pp) - pp = "letter"; + } /* * This MUST be defined before any PNT2AFM or AFM2PNT @@ -576,7 +575,7 @@ ps_printf(struct termp *p, const char *fmt, ...) ps_growbuf(p, PS_BUFSLOP); pos = (int)p->ps->psmargcur; - len = vsnprintf(&p->ps->psmarg[pos], PS_BUFSLOP, fmt, ap); + vsnprintf(&p->ps->psmarg[pos], PS_BUFSLOP, fmt, ap); va_end(ap); |