summaryrefslogtreecommitdiffstats
path: root/mdoc.3
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-16 14:04:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-16 14:04:26 +0000
commit62f5a205ef4f4e41edb0f430f581d7faddddd583 (patch)
tree5434fe660ebca235f2fd4090c123a96542c8600b /mdoc.3
parentd460b17b87e787b48938270b20eb4088e5c343ab (diff)
downloadmandoc-62f5a205ef4f4e41edb0f430f581d7faddddd583.tar.gz
Added more validation (parents/msecs).
Initial function documentation for mdoc.3.
Diffstat (limited to 'mdoc.3')
-rw-r--r--mdoc.356
1 files changed, 56 insertions, 0 deletions
diff --git a/mdoc.3 b/mdoc.3
new file mode 100644
index 00000000..1cc4eaca
--- /dev/null
+++ b/mdoc.3
@@ -0,0 +1,56 @@
+.\"
+.Dd $Mdocdate$
+.Dt mdoc 3
+.Os
+.\"
+.Sh NAME
+.Nm mdoc_alloc ,
+.Nm mdoc_parseln ,
+.Nm mdoc_endparse ,
+.Nm mdoc_result ,
+.Nm mdoc_free
+.Nd mdoc macro compiler
+.\"
+.Sh SYNOPSIS
+.In mdoc.h
+.Ft "struct mdoc *"
+.Fn mdoc_alloc "void *data" "const struct mdoc_cb *cb"
+.Ft void
+.Fn mdoc_free "struct mdoc *"
+.Ft int
+.Fn mdoc_parseln "struct mdoc *" "int" "char *buf"
+.Ft "const struct mdoc_node *"
+.Fn mdoc_result "struct mdoc *"
+.Ft int
+.Fn mdoc_endparse "struct mdoc *"
+.\"
+.Sh DESCRIPTION
+The
+.Nm mdoc
+library parses lines of mdoc-macro text into an abstract syntax tree.
+In general, applications initiate a parsing sequence with
+.Fn mdoc_alloc ,
+parse each line in a document with
+.Fn mdoc_parseln ,
+close the parsing session with
+.Fn mdoc_endparse ,
+operate over the syntax tree returned by
+.Fn mdoc_result ,
+then free all allocated memory with
+.Fn mdoc_free .
+See the
+.Sx EXAMPLES
+section for a full example.
+.\" The following requests should be uncommented and used where appropriate.
+.\" This next request is for sections 2, 3, and 9 function return values only.
+.\" .Sh RETURN VALUES
+.\" .Sh EXAMPLES
+.\" The next request is for sections 2, 3, and 9 error and signal handling only.
+.\" .Sh ERRORS
+.\" .Sh SEE ALSO
+.\" .Xr foobar 1
+.\" .Sh STANDARDS
+.\" .Sh HISTORY
+.\" .Sh AUTHORS
+.\" .Sh CAVEATS
+.\" .Sh BUGS