aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 17:14:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 17:14:26 +0000
commit73aca81b50073109b137bba659d38af11d7194ac (patch)
treedb3b28024b3493b57e793eb072a69c9da331b8da /mdoc_html.c
parent9702d475f59435139db2b0794a26dd69937fab7c (diff)
downloadmandoc-73aca81b50073109b137bba659d38af11d7194ac.tar.gz
mandoc-73aca81b50073109b137bba659d38af11d7194ac.tar.zst
mandoc-73aca81b50073109b137bba659d38af11d7194ac.zip
Big check-in of compatibility layer. This should work on most major architectures. Thanks to Joerg Sonnenberger.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index e6d3dace..88e9b2f5 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.51 2010/01/01 13:35:30 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.52 2010/01/01 17:14:29 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -14,8 +14,11 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
-#include <sys/param.h>
#include <assert.h>
#include <ctype.h>
@@ -36,6 +39,10 @@
const struct mdoc_node *n, \
struct html *h
+#ifndef MIN
+#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#endif
+
struct htmlmdoc {
int (*pre)(MDOC_ARGS);
void (*post)(MDOC_ARGS);
@@ -126,11 +133,6 @@ static int mdoc_vt_pre(MDOC_ARGS);
static int mdoc_xr_pre(MDOC_ARGS);
static int mdoc_xx_pre(MDOC_ARGS);
-#ifdef __linux__
-extern size_t strlcpy(char *, const char *, size_t);
-extern size_t strlcat(char *, const char *, size_t);
-#endif
-
static const struct htmlmdoc mdocs[MDOC_MAX] = {
{mdoc_ap_pre, NULL}, /* Ap */
{NULL, NULL}, /* Dd */