summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2020-04-03 11:34:19 +0000
committerschwarze <schwarze@openbsd.org>2020-04-03 11:34:19 +0000
commit6a6803e40585b04d43ec7e2d3a8f37e532b173e6 (patch)
tree734195c6a274a90c732527ee102625d9a83e037c /usr.bin/mandoc
parent#include <stdint.h> because that is needed before #include <ohash.h>; (diff)
downloadwireguard-openbsd-6a6803e40585b04d43ec7e2d3a8f37e532b173e6.tar.xz
wireguard-openbsd-6a6803e40585b04d43ec7e2d3a8f37e532b173e6.zip
Remove some stray argument names from function prototypes,
for consistency with the dominant style used in mandoc. No functional change. Patch from Martin Vahlensieck <academicsolutions dot ch>.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/cgi.c10
-rw-r--r--usr.bin/mandoc/libmandoc.h9
-rw-r--r--usr.bin/mandoc/mandoc.h7
-rw-r--r--usr.bin/mandoc/mandocdb.c8
-rw-r--r--usr.bin/mandoc/mdoc_markdown.c12
-rw-r--r--usr.bin/mandoc/out.h6
-rw-r--r--usr.bin/mandoc/roff.c8
7 files changed, 37 insertions, 23 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c
index cd938b2d466..766ac061d77 100644
--- a/usr.bin/mandoc/cgi.c
+++ b/usr.bin/mandoc/cgi.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: cgi.c,v 1.109 2020/01/10 15:20:49 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.110 2020/04/03 11:34:19 schwarze Exp $ */
/*
- * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014-2019 Ingo Schwarze <schwarze@usta.de>
+ * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,6 +14,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Implementation of the man.cgi(8) program.
*/
#include <sys/types.h>
#include <sys/time.h>
@@ -66,9 +68,9 @@ enum focus {
static void html_print(const char *);
static void html_putchar(char);
static int http_decode(char *);
-static void http_encode(const char *p);
+static void http_encode(const char *);
static void parse_manpath_conf(struct req *);
-static void parse_path_info(struct req *req, const char *path);
+static void parse_path_info(struct req *, const char *);
static void parse_query_string(struct req *, const char *);
static void pg_error_badrequest(const char *);
static void pg_error_internal(void);
diff --git a/usr.bin/mandoc/libmandoc.h b/usr.bin/mandoc/libmandoc.h
index 5e263721fce..b29163159bc 100644
--- a/usr.bin/mandoc/libmandoc.h
+++ b/usr.bin/mandoc/libmandoc.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: libmandoc.h,v 1.63 2020/01/19 16:16:32 schwarze Exp $ */
+/* $OpenBSD: libmandoc.h,v 1.64 2020/04/03 11:34:19 schwarze Exp $ */
/*
- * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013-2015,2017,2018,2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,6 +14,9 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internal interfaces for parser utilities needed by multiple parsers
+ * and the top-level functions to call the mdoc, man, and roff parsers.
*/
/*
@@ -73,7 +76,7 @@ void roff_man_reset(struct roff_man *);
int roff_parseln(struct roff *, int, struct buf *, int *);
void roff_userret(struct roff *);
void roff_endparse(struct roff *);
-void roff_setreg(struct roff *, const char *, int, char sign);
+void roff_setreg(struct roff *, const char *, int, char);
int roff_getreg(struct roff *, const char *);
char *roff_strdup(const struct roff *, const char *);
char *roff_getarg(struct roff *, char **, int, int *);
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h
index 4aac1c1464e..9283617420f 100644
--- a/usr.bin/mandoc/mandoc.h
+++ b/usr.bin/mandoc/mandoc.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: mandoc.h,v 1.208 2020/01/19 17:59:01 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.209 2020/04/03 11:34:19 schwarze Exp $ */
/*
- * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -16,6 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Error handling, escape sequence, and character utilities.
+ * Can be used by all code in the mandoc package.
*/
#define ASCII_NBRSP 31 /* non-breaking space */
@@ -299,7 +300,7 @@ enum mandoc_esc {
};
-enum mandoc_esc mandoc_font(const char *, int sz);
+enum mandoc_esc mandoc_font(const char *, int);
enum mandoc_esc mandoc_escape(const char **, const char **, int *);
void mandoc_msg_setoutfile(FILE *);
const char *mandoc_msg_getinfilename(void);
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 7913a131678..6e7efaec255 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: mandocdb.c,v 1.215 2020/01/26 21:24:58 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.216 2020/04/03 11:34:19 schwarze Exp $ */
/*
- * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2016 Ed Maste <emaste@freebsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,6 +15,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Implementation of the makewhatis(8) program.
*/
#include <sys/types.h>
#include <sys/mman.h>
@@ -107,7 +109,7 @@ struct mdoc_handler {
int mandocdb(int, char *[]);
static void dbadd(struct dba *, struct mpage *);
-static void dbadd_mlink(const struct mlink *mlink);
+static void dbadd_mlink(const struct mlink *);
static void dbprune(struct dba *);
static void dbwrite(struct dba *);
static void filescan(const char *);
diff --git a/usr.bin/mandoc/mdoc_markdown.c b/usr.bin/mandoc/mdoc_markdown.c
index fe87440b5c1..e0572cb89b2 100644
--- a/usr.bin/mandoc/mdoc_markdown.c
+++ b/usr.bin/mandoc/mdoc_markdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_markdown.c,v 1.34 2020/02/27 01:25:57 schwarze Exp $ */
+/* $OpenBSD: mdoc_markdown.c,v 1.35 2020/04/03 11:34:19 schwarze Exp $ */
/*
* Copyright (c) 2017, 2018, 2020 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -13,6 +13,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Markdown formatter for mdoc(7) used by mandoc(1).
*/
#include <sys/types.h>
@@ -29,16 +31,16 @@
#include "main.h"
struct md_act {
- int (*cond)(struct roff_node *n);
- int (*pre)(struct roff_node *n);
- void (*post)(struct roff_node *n);
+ int (*cond)(struct roff_node *);
+ int (*pre)(struct roff_node *);
+ void (*post)(struct roff_node *);
const char *prefix; /* pre-node string constant */
const char *suffix; /* post-node string constant */
};
static void md_nodelist(struct roff_node *);
static void md_node(struct roff_node *);
-static const char *md_stack(char c);
+static const char *md_stack(char);
static void md_preword(void);
static void md_rawword(const char *);
static void md_word(const char *);
diff --git a/usr.bin/mandoc/out.h b/usr.bin/mandoc/out.h
index c4a10ba2e30..fcd691ce1b6 100644
--- a/usr.bin/mandoc/out.h
+++ b/usr.bin/mandoc/out.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: out.h,v 1.24 2018/08/18 20:17:58 schwarze Exp $ */
+/* $OpenBSD: out.h,v 1.25 2020/04/03 11:34:19 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -14,6 +14,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Utilities for use by multiple mandoc(1) formatters.
*/
enum roffscale {
@@ -64,5 +66,5 @@ struct rofftbl {
struct tbl_span;
const char *a2roffsu(const char *, struct roffsu *, enum roffscale);
-void tblcalc(struct rofftbl *tbl,
+void tblcalc(struct rofftbl *,
const struct tbl_span *, size_t, size_t);
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index 31670fc500d..a69f632a6cb 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: roff.c,v 1.243 2020/02/27 21:38:27 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.244 2020/04/03 11:34:19 schwarze Exp $ */
/*
- * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,6 +14,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Implementation of the roff(7) parser for mandoc(1).
*/
#include <sys/types.h>
@@ -194,7 +196,7 @@ static int roff_ds(ROFF_ARGS);
static int roff_ec(ROFF_ARGS);
static int roff_eo(ROFF_ARGS);
static int roff_eqndelim(struct roff *, struct buf *, int);
-static int roff_evalcond(struct roff *r, int, char *, int *);
+static int roff_evalcond(struct roff *, int, char *, int *);
static int roff_evalnum(struct roff *, int,
const char *, int *, int *, int);
static int roff_evalpar(struct roff *, int,