aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-15 18:03:45 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-15 18:03:45 +0000
commit0eef50ec6a1184b0c3634caac272f969a3f36c88 (patch)
tree85f1c5f0cbb8c86af720a03fdc12222364a3eb4c
parenta142b09ae91ee2ad981c24c9a48689e623d6a952 (diff)
downloadmandoc-0eef50ec6a1184b0c3634caac272f969a3f36c88.tar.gz
mandoc-0eef50ec6a1184b0c3634caac272f969a3f36c88.tar.zst
mandoc-0eef50ec6a1184b0c3634caac272f969a3f36c88.zip
add missing prototypes, no code change;
noticed by Christos Zoulas with -Wmissing-prototypes
-rw-r--r--Makefile.depend6
-rwxr-xr-xconfigure3
-rw-r--r--main.c5
-rw-r--r--man_hash.c4
-rw-r--r--mandocdb.c5
-rw-r--r--mdoc_argv.c3
-rw-r--r--mdoc_hash.c4
7 files changed, 21 insertions, 9 deletions
diff --git a/Makefile.depend b/Makefile.depend
index 98a1928b..d2d2e001 100644
--- a/Makefile.depend
+++ b/Makefile.depend
@@ -26,7 +26,7 @@ html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h
lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in
main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h
man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h
-man_hash.o: man_hash.c config.h roff.h man.h libman.h
+man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h
man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h
man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h
man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h
@@ -40,8 +40,8 @@ manpath.o: manpath.c config.h mandoc_aux.h manconf.h
mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h
mansearch_const.o: mansearch_const.c config.h mansearch.h
mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
-mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h
-mdoc_hash.o: mdoc_hash.c config.h roff.h mdoc.h libmdoc.h
+mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
+mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h
mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h
mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h
mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h
diff --git a/configure b/configure
index 04768be4..9d670b43 100755
--- a/configure
+++ b/configure
@@ -35,7 +35,8 @@ MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
OSNAME=
CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -f -`
-CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings"
+CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
+CFLAGS="${CFLAGS} -Wno-unused-parameter"
LDADD=
LDFLAGS=
LD_OHASH=
diff --git a/main.c b/main.c
index 527db244..62e76c29 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.269 2016/07/12 05:18:38 kristaps Exp $ */
+/* $Id: main.c,v 1.270 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -87,6 +87,9 @@ struct curparse {
struct manoutput *outopts; /* output options */
};
+
+int mandocdb(int, char *[]);
+
static int fs_lookup(const struct manpaths *,
size_t ipath, const char *,
const char *, const char *,
diff --git a/man_hash.c b/man_hash.c
index 8573994e..bb7b4665 100644
--- a/man_hash.c
+++ b/man_hash.c
@@ -1,4 +1,4 @@
-/* $Id: man_hash.c,v 1.34 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: man_hash.c,v 1.35 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -24,8 +24,10 @@
#include <limits.h>
#include <string.h>
+#include "mandoc.h"
#include "roff.h"
#include "man.h"
+#include "libmandoc.h"
#include "libman.h"
#define HASH_DEPTH 6
diff --git a/mandocdb.c b/mandocdb.c
index 6c04cb05..d5052db9 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.218 2016/07/12 05:18:38 kristaps Exp $ */
+/* $Id: mandocdb.c,v 1.219 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -139,6 +139,9 @@ struct mdoc_handler {
uint64_t mask; /* set unless handler returns 0 */
};
+
+int mandocdb(int, char *[]);
+
static void dbclose(int);
static void dbadd(struct mpage *);
static void dbadd_mlink(const struct mlink *mlink);
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 8675bdb2..41889934 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_argv.c,v 1.107 2015/10/17 00:21:07 schwarze Exp $ */
+/* $Id: mdoc_argv.c,v 1.108 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -29,6 +29,7 @@
#include "roff.h"
#include "mdoc.h"
#include "libmandoc.h"
+#include "roff_int.h"
#include "libmdoc.h"
#define MULTI_STEP 5 /* pre-allocate argument values */
diff --git a/mdoc_hash.c b/mdoc_hash.c
index 476116d7..cad3c2db 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_hash.c,v 1.26 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: mdoc_hash.c,v 1.27 2016/07/15 18:03:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -26,8 +26,10 @@
#include <stdio.h>
#include <string.h>
+#include "mandoc.h"
#include "roff.h"
#include "mdoc.h"
+#include "libmandoc.h"
#include "libmdoc.h"
static unsigned char table[27 * 12];