aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-21 14:14:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-21 14:14:35 +0000
commitbb55d4fd965b9c585c8757d36f150f45794917d5 (patch)
treee1dc252ffe6cd0aa48d36c524971f4a2c3290551
parent131536e9db97d6e17c7ad140f235ff329878faed (diff)
downloadmandoc-bb55d4fd965b9c585c8757d36f150f45794917d5.tar.gz
mandoc-bb55d4fd965b9c585c8757d36f150f45794917d5.tar.zst
mandoc-bb55d4fd965b9c585c8757d36f150f45794917d5.zip
ISO C99 explicitly forbids forward references to enum types (6.7.2.3.3.);
patch from daniel@
-rw-r--r--libmandoc.h3
-rw-r--r--mandoc_headers.311
-rw-r--r--msec.c3
3 files changed, 10 insertions, 7 deletions
diff --git a/libmandoc.h b/libmandoc.h
index 6aa8b8dc..d9cc72f6 100644
--- a/libmandoc.h
+++ b/libmandoc.h
@@ -1,4 +1,4 @@
-/* $Id: libmandoc.h,v 1.51 2014/12/01 08:05:52 schwarze Exp $ */
+/* $Id: libmandoc.h,v 1.52 2014/12/21 14:14:35 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -37,7 +37,6 @@ __BEGIN_DECLS
struct mparse;
struct mchars;
-enum mandocerr;
struct tbl_span;
struct eqn;
struct roff;
diff --git a/mandoc_headers.3 b/mandoc_headers.3
index aa8754e4..79d90fff 100644
--- a/mandoc_headers.3
+++ b/mandoc_headers.3
@@ -47,7 +47,7 @@ HTML formatters
search tools
.El
.Pp
-Note that mere usage of an opaque type does
+Note that mere usage of an opaque struct type does
.Em not
require inclusion of the header where that type is defined.
.Ss Parser interface
@@ -204,7 +204,11 @@ are included, the same file should not include any formatter headers.
Requires
.In sys/types.h
for
-.Vt size_t .
+.Vt size_t
+and
+.Qq Pa mandoc.h
+for
+.Vt enum mandocerr .
.Pp
Provides
.Vt enum rofferr ,
@@ -222,8 +226,7 @@ from
.Pa roff.c
for function prototypes.
Uses the types
-.Vt enum mandocerr ,
-.Vt struct tbl_span ,
+.Vt struct tbl_span
and
.Vt struct eqn
from
diff --git a/msec.c b/msec.c
index ffe5024f..d49d2975 100644
--- a/msec.c
+++ b/msec.c
@@ -1,4 +1,4 @@
-/* $Id: msec.c,v 1.13 2014/12/01 08:05:52 schwarze Exp $ */
+/* $Id: msec.c,v 1.14 2014/12/21 14:14:35 schwarze Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -20,6 +20,7 @@
#include <string.h>
+#include "mandoc.h"
#include "libmandoc.h"
#define LINE(x, y) \