From f29433e9c2b328722c7ea4089c1cc53d3f7e9cfe Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 30 Dec 2013 00:52:18 +0000 Subject: [PATCH] Simplify: Remove an unused argument from the mandoc_eos() function. No functional change. --- usr.bin/mandoc/libmandoc.h | 4 ++-- usr.bin/mandoc/man.c | 4 ++-- usr.bin/mandoc/man_macro.c | 4 ++-- usr.bin/mandoc/mandoc.c | 10 +++++----- usr.bin/mandoc/mdoc.c | 4 ++-- usr.bin/mandoc/mdoc_macro.c | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/usr.bin/mandoc/libmandoc.h b/usr.bin/mandoc/libmandoc.h index 9f24af6b95c..cb6162a985f 100644 --- a/usr.bin/mandoc/libmandoc.h +++ b/usr.bin/mandoc/libmandoc.h @@ -1,4 +1,4 @@ -/* $Id: libmandoc.h,v 1.22 2013/12/15 21:18:00 schwarze Exp $ */ +/* $Id: libmandoc.h,v 1.23 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2013 Ingo Schwarze @@ -42,7 +42,7 @@ void mandoc_vmsg(enum mandocerr, struct mparse *, int, int, const char *, ...); char *mandoc_getarg(struct mparse *, char **, int, int *); char *mandoc_normdate(struct mparse *, char *, int, int); -int mandoc_eos(const char *, size_t, int); +int mandoc_eos(const char *, size_t); int mandoc_strntoi(const char *, size_t, int); const char *mandoc_a2msec(const char*); diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index f23577d6082..932590223b9 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.71 2013/11/10 22:53:58 schwarze Exp $ */ +/* $Id: man.c,v 1.72 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -475,7 +475,7 @@ man_ptext(struct man *man, int line, char *buf, int offs) */ assert(i); - if (mandoc_eos(buf, (size_t)i, 0)) + if (mandoc_eos(buf, (size_t)i)) man->last->flags |= MAN_EOS; return(man_descope(man, line, offs)); diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c index cd60c9571cb..4864f6550a6 100644 --- a/usr.bin/mandoc/man_macro.c +++ b/usr.bin/mandoc/man_macro.c @@ -1,4 +1,4 @@ -/* $Id: man_macro.c,v 1.42 2013/12/25 00:50:03 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.43 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2013 Ingo Schwarze @@ -434,7 +434,7 @@ in_line_eoln(MACRO_PROT_ARGS) */ if (n != man->last && - mandoc_eos(man->last->string, strlen(man->last->string), 0)) + mandoc_eos(man->last->string, strlen(man->last->string))) man->last->flags |= MAN_EOS; /* diff --git a/usr.bin/mandoc/mandoc.c b/usr.bin/mandoc/mandoc.c index b48a0917527..82c03f522df 100644 --- a/usr.bin/mandoc/mandoc.c +++ b/usr.bin/mandoc/mandoc.c @@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.42 2013/12/26 02:55:35 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.43 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -587,10 +587,10 @@ mandoc_normdate(struct mparse *parse, char *in, int ln, int pos) } int -mandoc_eos(const char *p, size_t sz, int enclosed) +mandoc_eos(const char *p, size_t sz) { - const char *q; - int found; + const char *q; + int enclosed, found; if (0 == sz) return(0); @@ -601,7 +601,7 @@ mandoc_eos(const char *p, size_t sz, int enclosed) * propagate outward. */ - found = 0; + enclosed = found = 0; for (q = p + (int)sz - 1; q >= p; q--) { switch (*q) { case ('\"'): diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c index 6c8ad34b404..40595d95729 100644 --- a/usr.bin/mandoc/mdoc.c +++ b/usr.bin/mandoc/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.96 2013/12/24 19:10:34 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.97 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013 Ingo Schwarze @@ -842,7 +842,7 @@ mdoc_ptext(struct mdoc *mdoc, int line, char *buf, int offs) assert(buf < end); - if (mandoc_eos(buf+offs, (size_t)(end-buf-offs), 0)) + if (mandoc_eos(buf+offs, (size_t)(end-buf-offs))) mdoc->last->flags |= MDOC_EOS; return(1); diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 191b8bfc783..3bec998fc8b 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.83 2013/12/30 00:20:18 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.84 2013/12/30 00:52:18 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013 Ingo Schwarze @@ -679,7 +679,7 @@ append_delims(struct mdoc *mdoc, int line, int *pos, char *buf) * knowing which symbols break this behaviour, for * example, `. ;' shouldn't propagate the double-space. */ - if (mandoc_eos(p, strlen(p), 0)) + if (mandoc_eos(p, strlen(p))) mdoc->last->flags |= MDOC_EOS; } -- 2.20.1