summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-09 17:20:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-08-09 17:20:18 +0000
commit1ba99829adf90d9018bbb89c2ef621dffcf06da1 (patch)
tree773ea49e6d3d9360f8ff656c934e8760c4ab6151 /usr.bin/mandoc
parent87048fd6b09d015939a4406bda591118a91dc017 (diff)
sync to 1.8.2: remove trailing whitespace
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/man.352
-rw-r--r--usr.bin/mandoc/man.748
-rw-r--r--usr.bin/mandoc/mandoc.176
-rw-r--r--usr.bin/mandoc/mdoc.376
4 files changed, 122 insertions, 130 deletions
diff --git a/usr.bin/mandoc/man.3 b/usr.bin/mandoc/man.3
index 9d800079e0d..f9b20f69f5d 100644
--- a/usr.bin/mandoc/man.3
+++ b/usr.bin/mandoc/man.3
@@ -1,4 +1,4 @@
-.\" $Id: man.3,v 1.3 2009/07/08 00:20:13 schwarze Exp $
+.\" $Id: man.3,v 1.4 2009/08/09 17:20:17 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -14,7 +14,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: July 8 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt MAN 3
.Os
.\" SECTION
@@ -49,7 +49,7 @@
.Sh DESCRIPTION
The
.Nm man
-library parses lines of
+library parses lines of
.Xr man 7
input (and
.Em only
@@ -58,12 +58,12 @@ man) into an abstract syntax tree (AST).
.Pp
In general, applications initiate a parsing sequence with
.Fn man_alloc ,
-parse each line in a document with
+parse each line in a document with
.Fn man_parseln ,
close the parsing session with
.Fn man_endparse ,
operate over the syntax tree returned by
-.Fn man_node
+.Fn man_node
and
.Fn man_meta ,
then free all allocated memory with
@@ -76,13 +76,13 @@ sequence. See the
section for a full example.
.\" PARAGRAPH
.Pp
-This section further defines the
+This section further defines the
.Sx Types ,
-.Sx Functions
+.Sx Functions
and
.Sx Variables
available to programmers. Following that, the
-.Sx Abstract Syntax Tree
+.Sx Abstract Syntax Tree
section documents the output tree.
.\" SUBSECTION
.Ss Types
@@ -105,7 +105,7 @@ A set of message callbacks defined in
.It Vt struct man_node
A parsed node. Defined in
.Pa man.h .
-See
+See
.Sx Abstract Syntax Tree
for details.
.El
@@ -118,8 +118,8 @@ Function descriptions follow:
Allocates a parsing structure. The
.Fa data
pointer is passed to callbacks in
-.Fa cb ,
-which are documented further in the header file.
+.Fa cb ,
+which are documented further in the header file.
The
.Fa pflags
arguments are defined in
@@ -128,7 +128,7 @@ Returns NULL on failure. If non-NULL, the pointer must be freed with
.Fn man_free .
.\" LIST-ITEM
.It Fn man_reset
-Reset the parser for another parse routine. After its use,
+Reset the parser for another parse routine. After its use,
.Fn man_parseln
behaves as if invoked for the first time.
.\" LIST-ITEM
@@ -138,26 +138,26 @@ invocation.
.\" LIST-ITEM
.It Fn man_parseln
Parse a nil-terminated line of input. This line should not contain the
-trailing newline. Returns 0 on failure, 1 on success. The input buffer
+trailing newline. Returns 0 on failure, 1 on success. The input buffer
.Fa buf
is modified by this function.
.\" LIST-ITEM
.It Fn man_endparse
-Signals that the parse is complete. Note that if
+Signals that the parse is complete. Note that if
.Fn man_endparse
is called subsequent to
.Fn man_node ,
the resulting tree is incomplete. Returns 0 on failure, 1 on success.
.\" LIST-ITEM
.It Fn man_node
-Returns the first node of the parse. Note that if
+Returns the first node of the parse. Note that if
.Fn man_parseln
or
.Fn man_endparse
return 0, the tree will be incomplete.
.It Fn man_meta
Returns the document's parsed meta-data. If this information has not
-yet been supplied or
+yet been supplied or
.Fn man_parseln
or
.Fn man_endparse
@@ -173,7 +173,7 @@ An array of string-ified token names.
.El
.\" SUBSECTION
.Ss Abstract Syntax Tree
-The
+The
.Nm
functions produce an abstract syntax tree (AST) describing input in a
regular form. It may be reviewed at any time with
@@ -181,19 +181,19 @@ regular form. It may be reviewed at any time with
however, if called before
.Fn man_endparse ,
or after
-.Fn man_endparse
+.Fn man_endparse
or
.Fn man_parseln
-fail, it may be incomplete.
+fail, it may be incomplete.
.\" PARAGRAPH
.Pp
This AST is governed by the ontological
rules dictated in
.Xr man 7
-and derives its terminology accordingly.
+and derives its terminology accordingly.
.\" PARAGRAPH
.Pp
-The AST is composed of
+The AST is composed of
.Vt struct man_node
nodes with element, root and text types as declared
by the
@@ -206,9 +206,9 @@ and
fields), its position in the tree (the
.Va parent ,
.Va child ,
-.Va next
+.Va next
and
-.Va prev
+.Va prev
fields) and some type-specific data.
.\" PARAGRAPH
.Pp
@@ -234,10 +234,10 @@ next-lint scope as documented in
.\" SECTION
.Sh EXAMPLES
The following example reads lines from stdin and parses them, operating
-on the finished parse tree with
+on the finished parse tree with
.Fn parsed .
Note that, if the last line of the file isn't newline-terminated, this
-will truncate the file's last character (see
+will truncate the file's last character (see
.Xr fgetln 3 ) .
Further, this example does not error-check nor free memory upon failure.
.Bd -literal -offset "XXXX"
@@ -273,5 +273,5 @@ man_free(man);
.Sh AUTHORS
The
.Nm
-utility was written by
+utility was written by
.An Kristaps Dzonsons Aq kristaps@kth.se .
diff --git a/usr.bin/mandoc/man.7 b/usr.bin/mandoc/man.7
index 637ae01be03..7715884b355 100644
--- a/usr.bin/mandoc/man.7
+++ b/usr.bin/mandoc/man.7
@@ -1,4 +1,4 @@
-.\" $Id: man.7,v 1.6 2009/07/18 21:03:18 schwarze Exp $
+.\" $Id: man.7,v 1.7 2009/08/09 17:20:17 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -14,7 +14,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: July 18 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt MAN 7
.Os
.\" SECTION
@@ -25,15 +25,15 @@
.Sh DESCRIPTION
The
.Nm man
-language was historically used to format
+language was historically used to format
.Ux
manuals. This reference document describes its syntax, structure, and
usage.
.Pp
-.Bf Em
-Do not use
+.Bf -emphasis
+Do not use
.Nm
-to write your manuals.
+to write your manuals.
.Ef
Use the
.Xr mdoc 7
@@ -43,7 +43,7 @@ language, instead.
An
.Nm
document follows simple rules: lines beginning with the control
-character
+character
.Sq \&.
are parsed for macros. Other lines are interpreted within the scope of
prior macros:
@@ -57,7 +57,7 @@ Other lines are interpreted within the current state.
documents may contain only graphable 7-bit ASCII characters, the
space character, and the tabs character. All manuals must have
.Ux
-line termination.
+line termination.
.Pp
Blank lines are acceptable; where found, the output will assert a
vertical space.
@@ -71,8 +71,8 @@ subsequent word isn't off-set by whitespace.
.\" SUB-SECTION
.Ss Comments
Anything following a
-.Sq \e"
-delimiter is considered a comment (unless the
+.Sq \e"
+delimiter is considered a comment (unless the
.Sq \e
itself has been escaped) and is ignored to the end of line.
Furthermore, a macro line with only a control character
@@ -82,7 +82,7 @@ optionally followed by whitespace, is ignored.
.Ss Special Characters
Special character sequences begin with the escape character
.Sq \e
-followed by either an open-parenthesis
+followed by either an open-parenthesis
.Sq \&(
for two-character sequences; an open-bracket
.Sq \&[
@@ -114,7 +114,7 @@ macro describing the document's section and title. It may occur
anywhere in the document, although conventionally, it appears as the
first macro.
.Pp
-Beyond the
+Beyond the
.Sq \&.TH ,
at least one macro or text node must appear in the document.
.\" SECTION
@@ -129,11 +129,11 @@ and
.Sq \&.\ \ \ \&PP
are equivalent.
.Pp
-All
+All
.Nm
macros follow the same structural rules:
.Bd -literal -offset indent
-\&.YO \(lBbody...\(rB
+\&.YO \(lBbody...\(rB
.Ed
.Pp
The
@@ -141,7 +141,7 @@ The
consists of zero or more arguments to the macro.
.Pp
.Nm
-has a primitive notion of multi-line scope for the following macros:
+has a primitive notion of multi-line scope for the following macros:
.Sq \&.TM ,
.Sq \&.SM ,
.Sq \&.SB ,
@@ -152,23 +152,23 @@ has a primitive notion of multi-line scope for the following macros:
.Sq \&.R ,
.Sq \&.B ,
.Sq \&.I ,
-.Sq \&.IR
+.Sq \&.IR
and
.Sq \&.RI .
When these macros are invoked without arguments, the subsequent line is
considered a continuation of the macro. Thus:
-.Bd -literal -offset indent
-\&.RI
+.Bd -literal -offset indent
+\&.RI
foo
.Ed
.Pp
-is equivalent to
+is equivalent to
.Sq \&.RI foo .
If two consecutive lines exhibit the latter behaviour,
an error is raised. Thus, the following is not acceptable:
-.Bd -literal -offset indent
-\&.RI
-\&.I
+.Bd -literal -offset indent
+\&.RI
+\&.I
Hello, world.
.Ed
.Pp
@@ -178,7 +178,7 @@ macro is similar, but does not need an empty argument line to trigger
the behaviour.
.\" SECTION
.Sh MACROS
-This section contains a complete list of all
+This section contains a complete list of all
.Nm
macros and corresponding number of arguments.
.Pp
@@ -232,7 +232,7 @@ for groff compatibility notes.
.Sh AUTHORS
The
.Nm
-utility was written by
+utility was written by
.An Kristaps Dzonsons Aq kristaps@kth.se .
.\" SECTION
.Sh CAVEATS
diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1
index 32f669336f2..2548d3545a3 100644
--- a/usr.bin/mandoc/mandoc.1
+++ b/usr.bin/mandoc/mandoc.1
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.1,v 1.9 2009/07/18 20:50:37 schwarze Exp $
+.\" $Id: mandoc.1,v 1.10 2009/08/09 17:20:17 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -14,7 +14,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: July 18 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt MANDOC 1
.Os
.\" SECTION
@@ -34,13 +34,13 @@
.Sh DESCRIPTION
The
.Nm
-utility formats
+utility formats
.Ux
manual pages for display. The arguments are as follows:
.Bl -tag -width Ds
.\" ITEM
.It Fl f Ns Ar option...
-Override default compiler behaviour. See
+Override default compiler behaviour. See
.Sx Compiler Options
for details.
.\" ITEM
@@ -63,9 +63,9 @@ Print version and exit.
Configure warning messages. Use
.Fl W Ns Ar all
to print warnings,
-.Fl W Ns Ar error
+.Fl W Ns Ar error
for warnings to be considered errors and cause utility
-termination. Multiple
+termination. Multiple
.Fl W
arguments may be comma-separated, such as
.Fl W Ns Ar error,all .
@@ -79,9 +79,9 @@ will halt with the first failed parse.
.El
.\" PARAGRAPH
.Pp
-By default,
-.Nm
-reads
+By default,
+.Nm
+reads
.Xr mdoc 7
or
.Xr man 7
@@ -101,24 +101,24 @@ it's processed by
.Nm
according to the following rules: opening punctuation
.Po
-.Sq \&( ,
-.Sq \&[ ,
+.Sq \&( ,
+.Sq \&[ ,
and
.Sq \&{
-.Pc
+.Pc
is not followed by a space; closing punctuation
.Po
-.Sq \&. ,
-.Sq \&, ,
-.Sq \&; ,
-.Sq \&: ,
-.Sq \&? ,
-.Sq \&! ,
-.Sq \&) ,
-.Sq \&]
+.Sq \&. ,
+.Sq \&, ,
+.Sq \&; ,
+.Sq \&: ,
+.Sq \&? ,
+.Sq \&! ,
+.Sq \&) ,
+.Sq \&]
and
.Sq \&}
-.Pc
+.Pc
is not preceded by whitespace.
.Pp
If the input is
@@ -128,10 +128,10 @@ these rules are also applied to macro arguments when appropriate.
White-space, in non-literal (normal) mode, is stripped from input and
replaced on output by a single space. Thus, if you wish to preserve
multiple spaces, they must be space-escaped
-.Sq \e\
-or used in a literal display mode, e.g.,
-.Sq \&.Bd \-literal
-in
+.Sq \e\
+or used in a literal display mode, e.g.,
+.Sq \&.Bd \-literal
+in
.Xr mdoc 7 .
.\" SUB-SECTION
.Ss Input Formats
@@ -149,26 +149,26 @@ respectively. The
.Xr mdoc 7
format is
.Em strongly
-recommended;
+recommended;
.Xr man 7
should only be used for legacy manuals.
.Pp
A third option,
.Fl m Ns Ar andoc ,
which is also the default, determines encoding on-the-fly: if the first
-non-comment macro is
+non-comment macro is
.Sq \&.Dd
or
.Sq \&.Dt ,
-the
+the
.Xr mdoc 7
parser is used; otherwise, the
.Xr man 7
parser is used.
.Pp
If multiple
-files are specified with
-.Fl m Ns Ar andoc ,
+files are specified with
+.Fl m Ns Ar andoc ,
each has its file-type determined this way. If multiple files are
specified and
.Fl m Ns Ar doc
@@ -222,11 +222,11 @@ Do not ignore unknown macros at the start of input lines.
.It Fl f Ns Ar no-ign-chars
Do not ignore disallowed characters.
.It Fl f Ns Ar strict
-Implies
+Implies
.Fl f Ns Ar no-ign-escape ,
-.Fl f Ns Ar no-ign-macro
+.Fl f Ns Ar no-ign-macro
and
-.Fl f Ns Ar no-ign-chars .
+.Fl f Ns Ar no-ign-chars .
.El
.\" PARAGRAPH
.Pp
@@ -247,19 +247,19 @@ To page manuals to the terminal:
.D1 % mandoc mandoc.1 mdoc.3 mdoc.7 | less
.\" SECTION
.Sh COMPATIBILITY
-This section summarises
+This section summarises
.Nm
-compatibility with
+compatibility with
.Xr groff 1 .
.Pp
.Bl -bullet -compact
-.It
+.It
A list or display following
.Sq \&.Ss
does not assert a prior vertical break, just as it doesn't with
.Sq \&.Sh .
.It
-The \-literal and \-unfilled
+The \-literal and \-unfilled
.Sq \&.Bd
displays types are synonyms, as are \-filled and \-ragged.
.It
@@ -278,5 +278,5 @@ so double spaces following sentence closure are reduced to a single space
.Sh AUTHORS
The
.Nm
-utility was written by
+utility was written by
.An Kristaps Dzonsons Aq kristaps@kth.se .
diff --git a/usr.bin/mandoc/mdoc.3 b/usr.bin/mandoc/mdoc.3
index 364cc15c616..79c21aa043e 100644
--- a/usr.bin/mandoc/mdoc.3
+++ b/usr.bin/mandoc/mdoc.3
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.3,v 1.3 2009/07/08 00:20:13 schwarze Exp $
+.\" $Id: mdoc.3,v 1.4 2009/08/09 17:20:17 schwarze Exp $
.\"
.\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
.\"
@@ -13,8 +13,8 @@
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: July 8 2009 $
+.\"
+.Dd $Mdocdate: August 9 2009 $
.Dt MDOC 3
.Os
.\" SECTION
@@ -50,7 +50,7 @@
.Sh DESCRIPTION
The
.Nm mdoc
-library parses lines of
+library parses lines of
.Xr mdoc 7
input (and
.Em only
@@ -59,12 +59,12 @@ mdoc) into an abstract syntax tree (AST).
.Pp
In general, applications initiate a parsing sequence with
.Fn mdoc_alloc ,
-parse each line in a document with
+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_node
+.Fn mdoc_node
and
.Fn mdoc_meta ,
then free all allocated memory with
@@ -77,13 +77,13 @@ sequence. See the
section for a full example.
.\" PARAGRAPH
.Pp
-This section further defines the
+This section further defines the
.Sx Types ,
-.Sx Functions
+.Sx Functions
and
.Sx Variables
available to programmers. Following that, the
-.Sx Abstract Syntax Tree
+.Sx Abstract Syntax Tree
section documents the output tree.
.\" SUBSECTION
.Ss Types
@@ -106,7 +106,7 @@ A set of message callbacks defined in
.It Vt struct mdoc_node
A parsed node. Defined in
.Pa mdoc.h .
-See
+See
.Sx Abstract Syntax Tree
for details.
.El
@@ -119,8 +119,8 @@ Function descriptions follow:
Allocates a parsing structure. The
.Fa data
pointer is passed to callbacks in
-.Fa cb ,
-which are documented further in the header file.
+.Fa cb ,
+which are documented further in the header file.
The
.Fa pflags
arguments are defined in
@@ -129,7 +129,7 @@ Returns NULL on failure. If non-NULL, the pointer must be freed with
.Fn mdoc_free .
.\" LIST-ITEM
.It Fn mdoc_reset
-Reset the parser for another parse routine. After its use,
+Reset the parser for another parse routine. After its use,
.Fn mdoc_parseln
behaves as if invoked for the first time. If it returns 0, memory could
not be allocated.
@@ -140,26 +140,26 @@ invocation.
.\" LIST-ITEM
.It Fn mdoc_parseln
Parse a nil-terminated line of input. This line should not contain the
-trailing newline. Returns 0 on failure, 1 on success. The input buffer
+trailing newline. Returns 0 on failure, 1 on success. The input buffer
.Fa buf
is modified by this function.
.\" LIST-ITEM
.It Fn mdoc_endparse
-Signals that the parse is complete. Note that if
+Signals that the parse is complete. Note that if
.Fn mdoc_endparse
is called subsequent to
.Fn mdoc_node ,
the resulting tree is incomplete. Returns 0 on failure, 1 on success.
.\" LIST-ITEM
.It Fn mdoc_node
-Returns the first node of the parse. Note that if
+Returns the first node of the parse. Note that if
.Fn mdoc_parseln
or
.Fn mdoc_endparse
return 0, the tree will be incomplete.
.It Fn mdoc_meta
Returns the document's parsed meta-data. If this information has not
-yet been supplied or
+yet been supplied or
.Fn mdoc_parseln
or
.Fn mdoc_endparse
@@ -178,7 +178,7 @@ An array of string-ified token argument names.
.El
.\" SUBSECTION
.Ss Abstract Syntax Tree
-The
+The
.Nm
functions produce an abstract syntax tree (AST) describing input in a
regular form. It may be reviewed at any time with
@@ -186,24 +186,24 @@ regular form. It may be reviewed at any time with
however, if called before
.Fn mdoc_endparse ,
or after
-.Fn mdoc_endparse
+.Fn mdoc_endparse
or
.Fn mdoc_parseln
-fail, it may be incomplete.
+fail, it may be incomplete.
.\" PARAGRAPH
.Pp
This AST is governed by the ontological
rules dictated in
.Xr mdoc 7
-and derives its terminology accordingly.
+and derives its terminology accordingly.
.Qq In-line
elements described in
.Xr mdoc 7
-are described simply as
+are described simply as
.Qq elements .
.\" PARAGRAPH
.Pp
-The AST is composed of
+The AST is composed of
.Vt struct mdoc_node
nodes with block, head, body, element, root and text types as declared
by the
@@ -216,9 +216,9 @@ and
fields), its position in the tree (the
.Va parent ,
.Va child ,
-.Va next
+.Va next
and
-.Va prev
+.Va prev
fields) and some type-specific data.
.\" PARAGRAPH
.Pp
@@ -251,16 +251,16 @@ where capitalised non-terminals represent nodes.
Of note are the TEXT nodes following the HEAD, BODY and TAIL nodes of
the BLOCK production. These refer to punctuation marks. Furthermore,
although a TEXT node will generally have a non-zero-length string, in
-the specific case of
+the specific case of
.Sq \&.Bd \-literal ,
an empty line will produce a zero-length string.
.\" SECTION
.Sh EXAMPLES
The following example reads lines from stdin and parses them, operating
-on the finished parse tree with
+on the finished parse tree with
.Fn parsed .
Note that, if the last line of the file isn't newline-terminated, this
-will truncate the file's last character (see
+will truncate the file's last character (see
.Xr fgetln 3 ) .
Further, this example does not error-check nor free memory upon failure.
.Bd -literal -offset "XXXX"
@@ -296,23 +296,23 @@ mdoc_free(mdoc);
.Sh AUTHORS
The
.Nm
-utility was written by
+utility was written by
.An Kristaps Dzonsons Aq kristaps@kth.se .
.\" SECTION
.Sh CAVEATS
.Bl -dash -compact
.\" LIST-ITEM
.It
-The
+The
.Sq \&.Xc
and
.Sq \&.Xo
macros aren't handled when used to span lines for the
.Sq \&.It
-macro.
+macro.
.\" LIST-ITEM
.It
-The
+The
.Sq \&.Bsx
macro family doesn't yet understand version arguments.
.\" LIST-ITEM
@@ -321,9 +321,9 @@ If not given a value, the \-offset argument to
.Sq \&.Bd
and
.Sq \&.Bl
-should be the width of
+should be the width of
.Qq <string> ;
-instead, a value of
+instead, a value of
.Li 10n
is provided.
.\" LIST-ITEM
@@ -333,12 +333,4 @@ Columns widths in
should default to width
.Qq <stringx>
if not included.
-.\" LIST-ITEM
-.It
-List-width suffix
-.Qq m
-isn't handled.
-.\" LIST-ITEM
-.It
-Contents of the SYNOPSIS section aren't checked.
.El