diff options
author | 2015-11-07 13:57:55 +0000 | |
---|---|---|
committer | 2015-11-07 13:57:55 +0000 | |
commit | dcd684cdbc4885011c1b846cb6d6a6de8d0fdabf (patch) | |
tree | ccce1f2ee44a7d4816fff8d8a81cdd6fdb5adaad | |
parent | Use input handlers for bridge(4). (diff) | |
download | wireguard-openbsd-dcd684cdbc4885011c1b846cb6d6a6de8d0fdabf.tar.xz wireguard-openbsd-dcd684cdbc4885011c1b846cb6d6a6de8d0fdabf.zip |
In private header files, __BEGIN_DECLS and __END_DECLS are pointless.
Because these work slightly differently on different systems,
they are becoming a maintenance burden in the portable version,
so delete them.
Besides, one of the chief design goals of the mandoc toolbox is to
make sure that nothing related to documentation requires C++.
Consequently, linking mandoc against any kind of C++ program would
defeat the purpose and is not supported.
I don't understand why kristaps@ added them in the first place.
-rw-r--r-- | usr.bin/mandoc/html.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/libman.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/libmandoc.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/libmdoc.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/libroff.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/main.h | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/man.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/manconf.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/mandoc.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/mandoc_aux.h | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/mandoc_ohash.h | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/mansearch.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/out.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/roff.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/roff_int.h | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/tag.h | 5 | ||||
-rw-r--r-- | usr.bin/mandoc/term.h | 5 |
18 files changed, 18 insertions, 76 deletions
diff --git a/usr.bin/mandoc/html.h b/usr.bin/mandoc/html.h index d8b22aaec92..577643d1bbe 100644 --- a/usr.bin/mandoc/html.h +++ b/usr.bin/mandoc/html.h @@ -1,4 +1,4 @@ -/* $OpenBSD: html.h,v 1.33 2015/10/13 22:57:49 schwarze Exp $ */ +/* $OpenBSD: html.h,v 1.34 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -142,7 +142,6 @@ struct html { #define HTML_FRAGMENT (1 << 0) /* don't emit HTML/HEAD/BODY */ }; -__BEGIN_DECLS struct tbl_span; struct eqn; @@ -172,5 +171,3 @@ void buffmt_man(struct html *, void buffmt_includes(struct html *, const char *); int html_strlen(const char *); - -__END_DECLS diff --git a/usr.bin/mandoc/libman.h b/usr.bin/mandoc/libman.h index da407d98bf8..b330f1d854e 100644 --- a/usr.bin/mandoc/libman.h +++ b/usr.bin/mandoc/libman.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libman.h,v 1.53 2015/10/22 21:53:49 schwarze Exp $ */ +/* $OpenBSD: libman.h,v 1.54 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -34,11 +34,8 @@ struct man_macro { extern const struct man_macro *const man_macros; -__BEGIN_DECLS int man_hash_find(const char *); void man_node_validate(struct roff_man *); void man_state(struct roff_man *, struct roff_node *); void man_unscope(struct roff_man *, const struct roff_node *); - -__END_DECLS diff --git a/usr.bin/mandoc/libmandoc.h b/usr.bin/mandoc/libmandoc.h index 104d0753334..9bfebd03a50 100644 --- a/usr.bin/mandoc/libmandoc.h +++ b/usr.bin/mandoc/libmandoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libmandoc.h,v 1.47 2015/10/13 22:57:49 schwarze Exp $ */ +/* $OpenBSD: libmandoc.h,v 1.48 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -32,7 +32,6 @@ struct buf { size_t sz; }; -__BEGIN_DECLS struct mparse; struct tbl_span; @@ -81,5 +80,3 @@ int roff_getformat(const struct roff *); const struct tbl_span *roff_span(const struct roff *); const struct eqn *roff_eqn(const struct roff *); - -__END_DECLS diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 99b3360b000..1d75242b59f 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libmdoc.h,v 1.78 2015/10/20 02:00:49 schwarze Exp $ */ +/* $OpenBSD: libmdoc.h,v 1.79 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -62,7 +62,6 @@ enum mdelim { extern const struct mdoc_macro *const mdoc_macros; -__BEGIN_DECLS void mdoc_macro(MACRO_PROT_ARGS); void mdoc_elem_alloc(struct roff_man *, int, int, @@ -86,5 +85,3 @@ void mdoc_argv(struct roff_man *, int, int, enum margserr mdoc_args(struct roff_man *, int, int *, char *, int, char **); enum mdelim mdoc_isdelim(const char *); - -__END_DECLS diff --git a/usr.bin/mandoc/libroff.h b/usr.bin/mandoc/libroff.h index 942d1f630fe..8af4801a52b 100644 --- a/usr.bin/mandoc/libroff.h +++ b/usr.bin/mandoc/libroff.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libroff.h,v 1.16 2015/01/30 04:08:37 schwarze Exp $ */ +/* $OpenBSD: libroff.h,v 1.17 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -60,7 +60,6 @@ struct eqn_def { size_t valsz; }; -__BEGIN_DECLS struct tbl_node *tbl_alloc(int, int, struct mparse *); void tbl_restart(int, int, struct tbl_node *); @@ -78,5 +77,3 @@ enum rofferr eqn_end(struct eqn_node **); void eqn_free(struct eqn_node *); enum rofferr eqn_read(struct eqn_node **, int, const char *, int, int *); - -__END_DECLS diff --git a/usr.bin/mandoc/main.h b/usr.bin/mandoc/main.h index 8685ef3f31a..a295d41e135 100644 --- a/usr.bin/mandoc/main.h +++ b/usr.bin/mandoc/main.h @@ -1,4 +1,4 @@ -/* $OpenBSD: main.h,v 1.18 2015/10/13 22:57:49 schwarze Exp $ */ +/* $OpenBSD: main.h,v 1.19 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -18,8 +18,6 @@ #define UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) -__BEGIN_DECLS - struct roff_man; struct manoutput; @@ -53,5 +51,3 @@ void pspdf_free(void *); void terminal_mdoc(void *, const struct roff_man *); void terminal_man(void *, const struct roff_man *); - -__END_DECLS diff --git a/usr.bin/mandoc/man.h b/usr.bin/mandoc/man.h index f3c8d3b7744..b243bd845dc 100644 --- a/usr.bin/mandoc/man.h +++ b/usr.bin/mandoc/man.h @@ -1,4 +1,4 @@ -/* $OpenBSD: man.h,v 1.56 2015/10/22 21:53:49 schwarze Exp $ */ +/* $OpenBSD: man.h,v 1.57 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -59,11 +59,8 @@ /* Names of macros. */ extern const char *const *man_macronames; -__BEGIN_DECLS struct roff_man; const struct mparse *man_mparse(const struct roff_man *); void man_validate(struct roff_man *); - -__END_DECLS diff --git a/usr.bin/mandoc/manconf.h b/usr.bin/mandoc/manconf.h index be60892eebc..8cdb071a691 100644 --- a/usr.bin/mandoc/manconf.h +++ b/usr.bin/mandoc/manconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: manconf.h,v 1.1 2015/03/27 17:36:56 schwarze Exp $ */ +/* $OpenBSD: manconf.h,v 1.2 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2011, 2015 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -42,10 +42,7 @@ struct manconf { struct manpaths manpath; }; -__BEGIN_DECLS void manconf_parse(struct manconf *, const char *, char *, char *); void manconf_output(struct manoutput *, const char *); void manconf_free(struct manconf *); - -__END_DECLS diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h index 0aecdb0ce4d..fec47f2e24e 100644 --- a/usr.bin/mandoc/mandoc.h +++ b/usr.bin/mandoc/mandoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc.h,v 1.149 2015/10/30 19:03:36 schwarze Exp $ */ +/* $OpenBSD: mandoc.h,v 1.150 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -408,7 +408,6 @@ enum mandoc_esc { typedef void (*mandocmsg)(enum mandocerr, enum mandoclevel, const char *, int, int, const char *); -__BEGIN_DECLS struct mparse; struct roff_man; @@ -432,5 +431,3 @@ void mparse_result(struct mparse *, const char *mparse_getkeep(const struct mparse *); const char *mparse_strerror(enum mandocerr); const char *mparse_strlevel(enum mandoclevel); - -__END_DECLS diff --git a/usr.bin/mandoc/mandoc_aux.h b/usr.bin/mandoc/mandoc_aux.h index 5ef7080c36c..7ad0c495bd1 100644 --- a/usr.bin/mandoc/mandoc_aux.h +++ b/usr.bin/mandoc/mandoc_aux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc_aux.h,v 1.5 2014/11/28 19:25:03 schwarze Exp $ */ +/* $OpenBSD: mandoc_aux.h,v 1.6 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -16,8 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -__BEGIN_DECLS - int mandoc_asprintf(char **, const char *, ...); void *mandoc_calloc(size_t, size_t); void *mandoc_malloc(size_t); @@ -25,5 +23,3 @@ void *mandoc_realloc(void *, size_t); void *mandoc_reallocarray(void *, size_t, size_t); char *mandoc_strdup(const char *); char *mandoc_strndup(const char *, size_t); - -__END_DECLS diff --git a/usr.bin/mandoc/mandoc_ohash.h b/usr.bin/mandoc/mandoc_ohash.h index 6879f0d83ea..0ea2d7aaa46 100644 --- a/usr.bin/mandoc/mandoc_ohash.h +++ b/usr.bin/mandoc/mandoc_ohash.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc_ohash.h,v 1.1 2015/10/13 15:50:15 schwarze Exp $ */ +/* $OpenBSD: mandoc_ohash.h,v 1.2 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org> * @@ -16,8 +16,4 @@ */ #include <ohash.h> -__BEGIN_DECLS - void mandoc_ohash_init(struct ohash *, unsigned int, ptrdiff_t); - -__END_DECLS diff --git a/usr.bin/mandoc/mansearch.h b/usr.bin/mandoc/mansearch.h index c68ed76acc2..43d0fe6c058 100644 --- a/usr.bin/mandoc/mansearch.h +++ b/usr.bin/mandoc/mansearch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mansearch.h,v 1.19 2014/12/01 08:05:02 schwarze Exp $ */ +/* $OpenBSD: mansearch.h,v 1.20 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -95,7 +95,6 @@ struct mansearch { int firstmatch; /* first matching database only */ }; -__BEGIN_DECLS struct manpaths; @@ -107,5 +106,3 @@ int mansearch(const struct mansearch *cfg, /* options */ struct manpage **res, /* results */ size_t *ressz); /* results returned */ void mansearch_free(struct manpage *, size_t); - -__END_DECLS diff --git a/usr.bin/mandoc/mdoc.h b/usr.bin/mandoc/mdoc.h index a920314bca8..cfc41e79792 100644 --- a/usr.bin/mandoc/mdoc.h +++ b/usr.bin/mandoc/mdoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc.h,v 1.68 2015/10/20 02:00:49 schwarze Exp $ */ +/* $OpenBSD: mdoc.h,v 1.69 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -280,8 +280,5 @@ extern const char *const *mdoc_macronames; /* Names of macro args. Index is enum mdocargt. */ extern const char *const *mdoc_argnames; -__BEGIN_DECLS void mdoc_validate(struct roff_man *); - -__END_DECLS diff --git a/usr.bin/mandoc/out.h b/usr.bin/mandoc/out.h index 67dd9eb2f36..82645e89282 100644 --- a/usr.bin/mandoc/out.h +++ b/usr.bin/mandoc/out.h @@ -1,4 +1,4 @@ -/* $OpenBSD: out.h,v 1.17 2014/12/01 08:05:02 schwarze Exp $ */ +/* $OpenBSD: out.h,v 1.18 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -60,12 +60,9 @@ struct rofftbl { (p)->scale = (v); } \ while (/* CONSTCOND */ 0) -__BEGIN_DECLS struct tbl_span; int a2roffsu(const char *, struct roffsu *, enum roffscale); void tblcalc(struct rofftbl *tbl, const struct tbl_span *, size_t); - -__END_DECLS diff --git a/usr.bin/mandoc/roff.h b/usr.bin/mandoc/roff.h index 7fd8d71f925..3e7bc033374 100644 --- a/usr.bin/mandoc/roff.h +++ b/usr.bin/mandoc/roff.h @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.h,v 1.17 2015/10/17 00:19:58 schwarze Exp $ */ +/* $OpenBSD: roff.h,v 1.18 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -161,8 +161,5 @@ struct roff_man { enum roff_next next; /* Where to put the next node. */ }; -__BEGIN_DECLS void deroff(char **, const struct roff_node *); - -__END_DECLS diff --git a/usr.bin/mandoc/roff_int.h b/usr.bin/mandoc/roff_int.h index dde22024be0..bae90e44987 100644 --- a/usr.bin/mandoc/roff_int.h +++ b/usr.bin/mandoc/roff_int.h @@ -1,4 +1,4 @@ -/* $OpenBSD: roff_int.h,v 1.6 2015/10/22 21:53:49 schwarze Exp $ */ +/* $OpenBSD: roff_int.h,v 1.7 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -16,8 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -__BEGIN_DECLS - struct roff_node *roff_node_alloc(struct roff_man *, int, int, enum roff_type, int); void roff_node_append(struct roff_man *, struct roff_node *); @@ -41,5 +39,3 @@ void roff_node_delete(struct roff_man *, struct roff_node *); void man_breakscope(struct roff_man *, int); void mdoc_argv_free(struct mdoc_arg *); - -__END_DECLS diff --git a/usr.bin/mandoc/tag.h b/usr.bin/mandoc/tag.h index 0ce9571d904..46d6032b172 100644 --- a/usr.bin/mandoc/tag.h +++ b/usr.bin/mandoc/tag.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tag.h,v 1.5 2015/07/28 18:38:05 schwarze Exp $ */ +/* $OpenBSD: tag.h,v 1.6 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org> * @@ -22,11 +22,8 @@ struct tag_files { int tfd; }; -__BEGIN_DECLS struct tag_files *tag_init(void); void tag_put(const char *, int, size_t); void tag_write(void); void tag_unlink(void); - -__END_DECLS diff --git a/usr.bin/mandoc/term.h b/usr.bin/mandoc/term.h index e2f3add8a94..770d24f3d29 100644 --- a/usr.bin/mandoc/term.h +++ b/usr.bin/mandoc/term.h @@ -1,4 +1,4 @@ -/* $OpenBSD: term.h,v 1.61 2015/10/13 22:57:49 schwarze Exp $ */ +/* $OpenBSD: term.h,v 1.62 2015/11/07 13:57:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -105,7 +105,6 @@ struct termp { struct termp_ps *ps; }; -__BEGIN_DECLS struct tbl_span; struct eqn; @@ -134,5 +133,3 @@ void term_fontpop(struct termp *); void term_fontpopq(struct termp *, int); void term_fontrepl(struct termp *, enum termfont); void term_fontlast(struct termp *); - -__END_DECLS |