diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-08-22 15:36:59 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-08-22 15:36:59 +0000 |
commit | b4d7d29bacc793f5ae91bb17c3469fa0e86d19c8 (patch) | |
tree | c8fede226ba1d5ee127403e306752dbec13e9dd8 /usr.bin/mandoc | |
parent | 65d8da6e39c489ae3bb567f273901478fc61ddae (diff) |
sync to 1.8.4: LLVM findings from <uqs at spoerlein dot net>
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/mdoc_action.c | 11 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 11 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/usr.bin/mandoc/mdoc_action.c b/usr.bin/mandoc/mdoc_action.c index a95ebe0c259..4f4a40822ce 100644 --- a/usr.bin/mandoc/mdoc_action.c +++ b/usr.bin/mandoc/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.18 2009/08/22 15:29:23 schwarze Exp $ */ +/* $Id: mdoc_action.c,v 1.19 2009/08/22 15:36:58 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -483,7 +483,6 @@ post_dt(POST_ARGS) free(m->meta.vol); if (NULL == (m->meta.vol = strdup(cp))) return(mdoc_nerr(m, m->last, EMALLOC)); - n = n->next; } else { cp = mdoc_a2arch(n->string); if (NULL == cp) { @@ -831,6 +830,7 @@ pre_dl(PRE_ARGS) if (MDOC_BODY == n->type) m->flags |= MDOC_LITERAL; + return(1); } @@ -843,7 +843,12 @@ pre_bd(PRE_ARGS) if (MDOC_BODY != n->type) return(1); - /* Enter literal context if `Bd -literal' or * -unfilled'. */ + /* Enter literal context if `Bd -literal' or `-unfilled'. */ + + /* + * TODO: `-offset' without an argument should be the width of + * the literal "<string>". + */ for (n = n->parent, i = 0; i < (int)n->args->argc; i++) if (MDOC_Literal == n->args->argv[i].arg) diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 1c7609b4f3e..e170bdb33b7 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.19 2009/08/09 21:59:41 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.20 2009/08/22 15:36:58 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -681,7 +681,7 @@ blk_exp_close(MACRO_PROT_ARGS) mdoc->next = MDOC_NEXT_CHILD; } - for (lastarg = ppos, flushed = j = 0; ; j++) { + for (flushed = j = 0; ; j++) { lastarg = *pos; if (j == maxargs && ! flushed) { @@ -760,7 +760,7 @@ in_line(MACRO_PROT_ARGS) break; } - for (la = ppos, arg = NULL;; ) { + for (arg = NULL;; ) { la = *pos; c = mdoc_argv(mdoc, line, tok, &arg, pos, buf); @@ -1046,7 +1046,7 @@ blk_part_imp(MACRO_PROT_ARGS) /* XXX - no known argument macros. */ - for (lastarg = ppos;; ) { + for (;;) { lastarg = *pos; c = mdoc_args(mdoc, line, pos, buf, tok, &p); assert(ARGS_PHRASE != c); @@ -1107,7 +1107,6 @@ blk_part_exp(MACRO_PROT_ARGS) int lastarg, flushed, j, c, maxargs; char *p; - lastarg = ppos; flushed = 0; /* @@ -1243,7 +1242,7 @@ in_line_argn(MACRO_PROT_ARGS) break; } - for (lastarg = ppos, arg = NULL;; ) { + for (arg = NULL;; ) { lastarg = *pos; c = mdoc_argv(mdoc, line, tok, &arg, pos, buf); diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index 5c66d393870..9958ce8bdbf 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.49 2009/08/09 21:59:41 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.50 2009/08/22 15:36:58 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1639,7 +1639,7 @@ termp_va_pre(DECL_ARGS) static int termp_bd_pre(DECL_ARGS) { - int i, type, ln; + int i, type; /* * This is fairly tricky due primarily to crappy documentation. |