aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.3
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-10-28 17:36:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-10-28 17:36:19 +0000
commitd0ac87d04f62f2c8e644686b707cb2602c2ddba6 (patch)
tree69a250d8b0b0b75bc58e1c8af72b3c3269561aed /mandoc.3
parent5fa1bace54f386a9b3ce23690f136232e1e5bb2e (diff)
downloadmandoc-d0ac87d04f62f2c8e644686b707cb2602c2ddba6.tar.gz
mandoc-d0ac87d04f62f2c8e644686b707cb2602c2ddba6.tar.zst
mandoc-d0ac87d04f62f2c8e644686b707cb2602c2ddba6.zip
Make the character table available to libroff so it can check the
validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
Diffstat (limited to 'mandoc.3')
-rw-r--r--mandoc.320
1 files changed, 17 insertions, 3 deletions
diff --git a/mandoc.3 b/mandoc.3
index 2ee6eae1..f03b0307 100644
--- a/mandoc.3
+++ b/mandoc.3
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.3,v 1.26 2014/09/03 23:21:47 schwarze Exp $
+.\" $Id: mandoc.3,v 1.27 2014/10/28 17:36:19 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 3 2014 $
+.Dd $Mdocdate: October 28 2014 $
.Dt MANDOC 3
.Os
.Sh NAME
@@ -52,6 +52,7 @@
.Fa "int options"
.Fa "enum mandoclevel wlevel"
.Fa "mandocmsg mmsg"
+.Fa "const struct mchars *mchars"
.Fa "char *defos"
.Fc
.Ft void
@@ -173,6 +174,8 @@ The following describes a general parse sequence:
.Bl -enum
.It
initiate a parsing sequence with
+.Xr mchars_alloc 3
+and
.Fn mparse_alloc ;
.It
parse files or file descriptors with
@@ -187,7 +190,9 @@ or
.Fn man_node ;
.It
free all allocated memory with
-.Fn mparse_free ,
+.Fn mparse_free
+and
+.Xr mchars_free 3 ,
or invoke
.Fn mparse_reset
and parse new files.
@@ -208,6 +213,12 @@ A fatal error, error, or warning message during parsing.
A classification of an
.Vt "enum mandocerr"
as regards system operation.
+.It Vt "struct mchars"
+An opaque pointer to a a character table.
+Created with
+.Xr mchars_alloc 3
+and freed with
+.Xr mchars_free 3 .
.It Vt "struct mparse"
An opaque pointer to a running parse sequence.
Created with
@@ -332,6 +343,9 @@ A callback function to handle errors and warnings.
See
.Pa main.c
for an example.
+.It Ar mchars
+An opaque pointer to a a character table obtained from
+.Xr mchars_alloc 3 .
.It Ar defos
A default string for the
.Xr mdoc 7