summaryrefslogtreecommitdiff
path: root/usr/src/man/man1
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-07-21 17:21:13 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2014-07-21 21:34:55 +0000
commitd1e9a943f54c1cb91f507cc05b2d9cac695b3f4f (patch)
treebfcb906ab5024d2dde1f652908aed08f1251cedf /usr/src/man/man1
parenta95d065b67ca639905027ce885cb12446ee13bb2 (diff)
parent7ab4e62e3b5c454f248a38bec0d489e8f5543324 (diff)
downloadillumos-joyent-d1e9a943f54c1cb91f507cc05b2d9cac695b3f4f.tar.gz
[illumos-gate merge]
commit 7ab4e62e3b5c454f248a38bec0d489e8f5543324 3346 svc-hostid uses perl stupidly commit 95c635efb7c3b86efc493e0447eaec7aecca3f0f 5025 import and use mandoc commit 81d43577d1b5e76e6016ba642ecc1a76fde43021 5004 load average should be virtualized for zones commit 944b13ecd074fe0d43ed6f80c816ca862c3cd6eb 4956 zonecfg won't use a valid pager commit e03914f9208eb53e6c8a6d5a436953ad983642b0 4696 allowed-ips should let you specify prefixes commit 31c6d826a7f7a4ee7d83c8e99f25d82a4a248076 4922 all calloc() implementations should check for overflow commit d9c5840bd764434fd93f85a52eb4cbc24bff03da 4959 completely discarded merged string sections will corrupt output objects commit 2e4c998613148111f2fc5371085331ffb39122ff 4976 zfs should only avoid writing to a failing non-redundant top-level vdev 4977 mdb error in ::spa_space from space_cb() if a metaslab's ms_sm is NULL 4978 ztest fails in get_metaslab_refcount() 4979 extend free space histogram to device and pool 4980 metaslabs should have a fragmentation metric 4981 remove fragmented ops vector from block allocator 4982 space_map object should proactively upgrade when feature is enabled 4983 need to collect metaslab information via mdb 4984 device selection should use fragmentation metric commit 1a41ca239310955ae95b2569b707432432a58580 5013 add support for multiple mac addresses per client commit 680047a5d0ef56480110f0de516145ba0efd5caa 474 tcp_strong_iss should be 2 instead of 1 (missing file) commit 6400a6be1817a40f3dbefdd3df7b7d87bcebef30 474 tcp_strong_iss should be 2 instead of 1 commit dcb12fb726d8dd4ff80ea255dc3f53b5692c75e5 5014 etherstubs confuse min mtu with min sdu commit c9030f6c93613fe30ee0c16f92b96da7816ac052 5008 lock contention (rrw_exit) while running a read only load Conflicts: usr/src/uts/common/sys/zone.h usr/src/uts/common/sys/vnic_impl.h usr/src/uts/common/sys/mac.h usr/src/uts/common/os/zone.c usr/src/uts/common/io/vnic/vnic_dev.c usr/src/uts/common/io/mac/mac_protect.c usr/src/uts/common/io/mac/mac_client.c usr/src/tools/scripts/git-pbchk.py usr/src/tools/onbld/hgext/cdm.py usr/src/test/util-tests/tests/Makefile usr/src/pkg/manifests/developer-build-onbld.mf usr/src/man/man5/Makefile usr/src/lib/libdladm/common/linkprop.c usr/src/cmd/zonecfg/zonecfg.c usr/src/cmd/Makefile usr/src/man/man1/column.1 usr/src/man/man1/crontab.1 usr/src/man/man1m/dladm.1m usr/src/man/man1m/flowadm.1m usr/src/man/man1m/snoop.1m usr/src/man/man1m/vfsstat.1m usr/src/man/man1m/vndadm.1m usr/src/man/man1m/zfs.1m usr/src/man/man1m/zonecfg.1m usr/src/man/man1m/zpool.1m usr/src/man/man3c/epoll_create.3c usr/src/man/man3c/epoll_ctl.3c usr/src/man/man3c/epoll_wait.3c usr/src/man/man3lib/libvnd.3lib usr/src/man/man3vnd/vnd_frameio_read.3vnd usr/src/man/man3vnd/vnd_prop_get.3vnd usr/src/man/man3vnd/vnd_prop_iter.3vnd usr/src/man/man3vnd/vnd_walk.3vnd usr/src/man/man5/epoll.5 usr/src/man/man7d/vnd.7d usr/src/man/man7fs/bootfs.7fs usr/src/man/man7fs/lxproc.7fs Manifests: usr/src/pkg/manifests/text-doctools.mf usr/src/pkg/manifests/system-man.mf
Diffstat (limited to 'usr/src/man/man1')
-rw-r--r--usr/src/man/man1/Makefile6
-rw-r--r--usr/src/man/man1/apropos.1254
-rw-r--r--usr/src/man/man1/column.12
-rw-r--r--usr/src/man/man1/crontab.12
-rw-r--r--usr/src/man/man1/head.12
-rw-r--r--usr/src/man/man1/ld.14
-rw-r--r--usr/src/man/man1/man.11003
-rw-r--r--usr/src/man/man1/mandoc.1678
-rw-r--r--usr/src/man/man1/printf.12
-rw-r--r--usr/src/man/man1/tar.12
-rw-r--r--usr/src/man/man1/whatis.161
11 files changed, 1180 insertions, 836 deletions
diff --git a/usr/src/man/man1/Makefile b/usr/src/man/man1/Makefile
index 21b0b0aa69..62d2baa11e 100644
--- a/usr/src/man/man1/Makefile
+++ b/usr/src/man/man1/Makefile
@@ -12,6 +12,7 @@
#
# Copyright 2011, Richard Lowe
# Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+# Copyright 2014 Garrett D'Amore <garrett@damore.org>
#
include $(SRC)/Makefile.master
@@ -229,6 +230,7 @@ MANFILES= acctcom.1 \
mailx.1 \
makekey.1 \
man.1 \
+ mandoc.1 \
mconnect.1 \
mcs.1 \
mdb.1 \
@@ -411,7 +413,6 @@ MANFILES= acctcom.1 \
w.1 \
wait.1 \
wc.1 \
- whatis.1 \
which.1 \
who.1 \
whocalls.1 \
@@ -556,12 +557,15 @@ MANLINKS= batch.1 \
valyorn.1 \
vax.1 \
vedit.1 \
+ whatis.1 \
whence.1 \
while.1 \
zcat.1
intro.1 := LINKSRC = Intro.1
+whatis.1 := LINKSRC = apropos.1
+
unalias.1 := LINKSRC = alias.1
batch.1 := LINKSRC = at.1
diff --git a/usr/src/man/man1/apropos.1 b/usr/src/man/man1/apropos.1
index 5a998a86d2..2ef316cbe5 100644
--- a/usr/src/man/man1/apropos.1
+++ b/usr/src/man/man1/apropos.1
@@ -1,142 +1,130 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH APROPOS 1 "Dec 20, 1996"
-.SH NAME
-apropos \- locate commands by keyword lookup
-.SH SYNOPSIS
-.LP
-.nf
-\fBapropos\fR \fIkeyword\fR...
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBapropos\fR utility displays the man page name, section number, and a
-short description for each man page whose \fBNAME\fR line contains
-\fIkeyword\fR. This information is contained in the \fB/usr/share/man/windex\fR
-database created by \fBcatman\fR(1M). If \fBcatman\fR(1M) was not run, or was
-run with the \fB-n\fR option, \fBapropos\fR fails. Each word is considered
+.Dd "Jul 20, 2014"
+.Dt APROPOS 1
+.Os
+.Sh NAME
+.Nm apropos, whatis
+.Nd locate commands by keyword lookup
+.Sh SYNOPSIS
+.Nm apropos
+.Op Fl M Ar path
+.Op Fl s Ar section
+.Ar keyword ...
+.Nm whatis
+.Op Fl M Ar path
+.Op Fl s Ar section
+.Ar keyword ...
+.Sh DESCRIPTION
+The
+.Nm apropos
+utility displays the man page name, section number, and a
+short description for each man page whose
+.Em NAME
+line contains
+.Ar keyword .
+This information is contained in the
+.Nm whatis
+database created by the
+.Fl w
+option used with
+.Xr man 1 .
+If this database is not present,
+.Nm apropos
+and
+.Nm whatis
+fail.
+.Lp
+Each word is considered
separately and the case of letters is ignored. Words which are part of other
-words are considered; for example, when looking for `compile', \fBapropos\fR
-finds all instances of `compiler' also.
-.sp
-.LP
-\fBapropos\fR is actually just the \fB-k\fR option to the \fBman\fR(1) command.
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRTo find a man page whose NAME line contains a keyword
-.sp
-.LP
+words are considered; for example, when looking for
+.Sq compile ,
+.Nm apropos
+finds all instances of
+.Sq compiler
+also.
+.Lp
+The
+.Nm whatis
+command performs the same search, but only matches whole words. In the above
+example,
+.Nm whatis
+would not match the instances of
+.Sq compiler
+when
+.Ar keyword
+is
+.Sq compile .
+.Lp
+The
+.Nm apropos
+command is actually just the
+.Fl k
+option to the
+.Xr man 1
+command.
+.Sh OPTIONS
+.Bl -tag -width "-s section"
+.It Fl M Ar path
+Force a specific colon separated manual path instead of the
+default search path. Overrides the MANPATH environment variable.
+.It Fl s Ar section
+Restrict search to specified section.
+.El
+.Sh ENVIRONMENT
+.Bl -tag -width "MANPATH, PATH"
+.It Ev MANPATH , PATH
+Used to find the location of the
+.Nm whatis
+database.
+.El
+.Sh FILES
+.Bl -tag -width "/usr/share/man/whatis"
+.It Pa /usr/share/man/whatis
+table of contents and keyword database
+.El
+.Sh EXAMPLES
+.Ss Example 1 To find a man page whose NAME line contains a keyword
Try
-
-.sp
-.in +2
-.nf
-example% \fBapropos password\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-and
-
-.sp
-.in +2
-.nf
-example% \fBapropos editor\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-If the line starts `\fIfilename\fR(\fIsection\fR) .\|.\|.' you can run
-
-.sp
-.in +2
-.nf
-man -s \fIsection filename\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Lp
+.Dl example% apropos password
+.Lp
+If the line starts
+.So Ar filename Ns Po Ar section Pc .\|.\|. Sc
+you can run
+.Lp
+.Dl % Nm man Fl s Ar section Ar filename
+.Lp
to display the man page for \fIfilename\fR.
-
-.LP
-\fBExample 2 \fRTo find the man page for the subroutine \fBprintf()\fR
-.sp
-.LP
+.Ss Example 2 To find the man page for the subroutine \fBprintf()
Try
-
-.sp
-.in +2
-.nf
-example% \fBapropos format\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Lp
+.Dl example% Nm apropos Li format
+.Lp
and then
-
-.sp
-.in +2
-.nf
-example% \fBman -s 3s printf\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-to get the manual page on the subroutine \fBprintf()\fR.
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/windex\fR \fR
-.ad
-.RS 26n
-table of contents and keyword database
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-CSI Enabled
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBman\fR(1), \fBwhatis\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5)
-.SH DIAGNOSTICS
-.sp
-.ne 2
-.na
-\fB\f(CW/usr/share/man/windex: No such file or directory\fR\fR
-.ad
-.sp .6
-.RS 4n
-This database does not exist. \fBcatman\fR(1M) must be run to create it.
-.RE
-
+.Lp
+.Dl example% Nm man Fl s Ar 3C Li printf
+.Lp
+to get the manual page on the subroutine
+.Xr printf 3C .
+.Sh DIAGNOSTICS
+.Bl -tag -width Ds
+.It "/usr/share/man/whatis: No such file or directory"
+The
+.Nm whatis
+database does not exist.
+The command
+.Nm man
+.Fl w
+must be run to create it.
+.El
+.Sh CODE SET INDEPENDENCE
+Enabled.
+.Sh INTERFACE STABILITY
+.Nm Committed .
+.Sh SEE ALSO
+.Xr man 1 ,
+.Xr catman 1M
diff --git a/usr/src/man/man1/column.1 b/usr/src/man/man1/column.1
index 38d9af86c5..a8c23310ba 100644
--- a/usr/src/man/man1/column.1
+++ b/usr/src/man/man1/column.1
@@ -39,7 +39,7 @@ column \- columnate lists
\fBcolumn\fR [\fB-tx\fR] [\fB-c\fR \fIcolumns\fR] [\fB-s\fR \fIsep\fR] [\fIfile\fR ... ]
.fi
-.Sh DESCRIPTION
+.SH DESCRIPTION
.sp
.LP
The \fBcolumn\fR
diff --git a/usr/src/man/man1/crontab.1 b/usr/src/man/man1/crontab.1
index 927b5345c4..1008b63a21 100644
--- a/usr/src/man/man1/crontab.1
+++ b/usr/src/man/man1/crontab.1
@@ -617,13 +617,11 @@ list of denied users
\fB\fB/etc/cron.d/crontabs\fR\fR
.ad
.RS 28n
-.rt
system spool area for \fBcrontab\fR
.RE
.sp
.ne 2
-.mk
.na
\fB\fB/var/cron/log\fR\fR
.ad
diff --git a/usr/src/man/man1/head.1 b/usr/src/man/man1/head.1
index ff818f891f..bf423612c3 100644
--- a/usr/src/man/man1/head.1
+++ b/usr/src/man/man1/head.1
@@ -11,7 +11,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH HEAD 1 "Mar 4, 2013"
+.TH HEAD 1 "Mar 4, 2013"
.SH NAME
head \- display first few lines of files
.SH SYNOPSIS
diff --git a/usr/src/man/man1/ld.1 b/usr/src/man/man1/ld.1
index afc6a8d1ce..4ebe033dce 100644
--- a/usr/src/man/man1/ld.1
+++ b/usr/src/man/man1/ld.1
@@ -1036,7 +1036,7 @@ Enable use of direct binding
Suggests that \fB-z direct\fR or \fB-B direct\fR be present prior to any
specified dependency. This allows predictable symbol binding at runtime.
-Can be disabled with \fB-z guidance=nodirect\fR
+Can be disabled with \fB-z guidance=nodirect\fR
.RE
.sp
@@ -1105,7 +1105,7 @@ removed from the link-editor command line.
Can be disabled with \fB-z guidance=nounused\fR.
.RE
-.RE
+.RE
.sp
.ne 2
diff --git a/usr/src/man/man1/man.1 b/usr/src/man/man1/man.1
index ca20dd7b3b..4bba713397 100644
--- a/usr/src/man/man1/man.1
+++ b/usr/src/man/man1/man.1
@@ -1,664 +1,401 @@
-'\" te
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
-.\" Copyright (c) 1980 Regents of the University of California. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
-.TH MAN 1 "May 8, 2008"
-.SH NAME
-man \- find and display reference manual pages
-.SH SYNOPSIS
-.LP
-.nf
-\fBman\fR [\fB-\fR] [\fB-adFlrt\fR] [\fB-M\fR \fIpath\fR] [\fB-T\fR \fImacro-package\fR] [\fB-s\fR \fIsection\fR] \fIname\fR...
-.fi
-
-.LP
-.nf
-\fBman\fR [\fB-M\fR \fIpath\fR] \fB-k\fR \fIkeyword\fR...
-.fi
-
-.LP
-.nf
-\fBman\fR [\fB-M\fR \fIpath\fR] \fB-f\fR \fIfile\fR...
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-The \fBman\fR command displays information from the reference manuals. It
-displays complete manual pages that you select by \fIname\fR, or one-line
-summaries selected either by \fIkeyword\fR (\fB-k\fR), or by the name of an
-associated file (\fB-f\fR). If no manual page is located, \fBman\fR prints an
-error message.
-.SS "Source Format"
-.sp
-.LP
-Reference Manual pages are marked up with either \fBnroff\fR (see
-\fBnroff\fR(1)) or \fBSGML\fR (Standard Generalized Markup Language) tags (see
-\fBsgml\fR(5)). The \fBman\fR command recognizes the type of markup and
-processes the file accordingly. The various source files are kept in separate
-directories depending on the type of markup.
-.SS "Location of Manual Pages"
-.sp
-.LP
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" The Berkeley software License Agreement specifies the terms and conditions
+.\" for redistribution.
+.Dd Jul 18, 2014
+.Dt MAN 1
+.Os
+.Sh NAME
+.Nm man
+.Nd find and display reference manual pages
+.Sh SYNOPSIS
+.Nm
+.Op Fl
+.Op Fl adFlrt
+.Op Fl T Ar macro-package
+.Op Fl M Ar path
+.Op Fl s Ar section
+.Ar name ...
+.Nm
+.Op Fl M Ar path
+.Op Fl s Ar section
+.Fl k
+.Ar keyword
+.Ar ...
+.Nm
+.Op Fl M Ar path
+.Op Fl s Ar section
+.Fl f
+.Ar
+.Nm
+.Op Fl M Ar path
+.Fl w
+.Sh DESCRIPTION
+The
+.Nm
+command displays information from the reference manuals. It
+displays complete manual pages that you select by
+.Ar name ,
+or one-line summaries selected either by
+.Ar keyword
+.Pq Fl k ,
+or by the name of an associated file
+.Pq Fl f .
+If no manual page is located,
+.Nm
+prints an error message.
+.Ss "Source Format"
+Reference Manual pages are marked up with either
+.Xr man 5 ,
+or
+.Xr mdoc 5
+language tags. The
+.Nm
+command recognizes the type of markup and
+processes the file accordingly.
+.
+.Ss "Location of Manual Pages"
+.
The online Reference Manual page directories are conventionally located in
-\fB/usr/share/man\fR. The nroff sources are located in the
-\fB/usr/share/man/man\fR* directories. The \fBSGML\fR sources are located in
-the \fB/usr/share/man/sman\fR* directories. Each directory corresponds to a
+.Pa /usr/share/man .
+Each directory corresponds to a
section of the manual. Since these directories are optionally installed, they
-might not reside on your host. You might have to mount \fB/usr/share/man\fR
+might not reside on your host. You might have to mount
+.Pa /usr/share/man
from a host on which they do reside.
-.sp
-.LP
-If there are preformatted, up-to-date versions in the corresponding \fBcat\fR*
-or \fBfmt\fR* directories, \fBman\fR simply displays or prints those versions.
-If the preformatted version of interest is out of date or missing, \fBman\fR
-reformats it prior to display and stores the preformatted version if \fBcat\fR*
-or \fBfmt\fR* is writable. The \fBwindex\fR database is not updated. See
-\fBcatman\fR(1M). If directories for the preformatted versions are not
-provided, \fBman\fR reformats a page whenever it is requested. \fBman\fR uses a
-temporary file to store the formatted text during display.
-.sp
-.LP
-If the standard output is not a terminal, or if the `\fB-\fR' flag is given,
-\fBman\fR pipes its output through \fBcat\fR(1). Otherwise, \fBman\fR pipes its
-output through \fBmore\fR(1) to handle paging and underlining on the screen.
-.SH OPTIONS
-.sp
-.LP
+The
+.Nm
+command reformats a page whenever it is requested.
+.Pp
+If the standard output is not a terminal, or if the
+.Fl
+flag is given,
+.Nm
+pipes its output through
+.Xr cat 1 .
+Otherwise,
+.Nm
+pipes its output through a pager such as
+.Xr more 1
+to handle paging and underlining on the screen.
+.Sh OPTIONS
The following options are supported:
-.sp
-.ne 2
-.na
-\fB\fB-a\fR\fR
-.ad
-.RS 20n
-Shows all manual pages matching \fIname\fR within the \fBMANPATH\fR search
-path. Manual pages are displayed in the order found.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-d\fR\fR
-.ad
-.RS 20n
+.Bl -tag -width indent
+.It Fl a
+Shows all manual pages matching
+.Ar name
+within the
+.Ev MANPATH
+search path. Manual pages are displayed in the order found.
+.It Fl d
Debugs. Displays what a section-specifier evaluates to, method used for
-searching, and paths searched by \fBman\fR.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-f\fR \fIfile ...\fR\fR
-.ad
-.RS 20n
-\fBman\fR attempts to locate manual pages related to any of the given
-\fIfile\fRs. It strips the leading path name components from each \fIfile\fR,
+searching, and paths searched by
+.Nm .
+.It Fl f Ar file ...
+Attempts to locate manual pages related to any of the given
+.Ar file
+names. It strips the leading path name components from each
+.Ar file ,
and then prints one-line summaries containing the resulting basename or names.
-This option also uses the \fBwindex\fR database.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-F\fR\fR
-.ad
-.RS 20n
-Forces \fBman\fR to search all directories specified by \fBMANPATH\fR or the
-\fBman.cf\fR file, rather than using the \fBwindex\fR lookup database. This
-option is useful if the database is not up to date and it has been made the
-default behavior of the \fBman\fR command. The option therefore does not have
-to be invoked and is documented here for reference only.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-k\fR \fIkeyword ...\fR\fR
-.ad
-.RS 20n
-Prints out one-line summaries from the \fBwindex\fR database (table of
-contents) that contain any of the given \fIkeyword\fRs. The \fBwindex\fR
-database is created using \fBcatman\fR(1M).
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-l\fR\fR
-.ad
-.RS 20n
-Lists all manual pages found matching \fIname\fR within the search path.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-M\fR \fIpath\fR\fR
-.ad
-.RS 20n
-Specifies an alternate search path for manual pages. \fIpath\fR is a
-colon-separated list of directories that contain manual page directory
-subtrees. For example, if \fIpath\fR is \fB/usr/share/man:/usr/local/man\fR,
-\fBman\fR searches for \fIname\fR in the standard location, and then
-\fB/usr/local/man\fR. When used with the \fB-k\fR or \fB-f\fR options, the
-\fB-M\fR option must appear first. Each directory in the \fIpath\fR is assumed
-to contain subdirectories of the form \fBman\fR* or \fBsman\fR* , one for each
-section. This option overrides the \fBMANPATH\fR environment variable.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-r\fR\fR
-.ad
-.RS 20n
-Reformats the manual page, but does not display it. This replaces the \fBman\fR
-\fB-\fR \fB-t\fR \fIname\fR combination.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-s\fR \fIsection ...\fR\fR
-.ad
-.RS 20n
-Specifies sections of the manual for \fBman\fR to search. The directories
-searched for \fIname\fR are limited to those specified by \fIsection\fR.
-\fIsection\fR can be a numerical digit, perhaps followed by one or more letters
-to match the desired section of the manual, for example, "\fB3libucb\fR". Also,
-\fIsection\fR can be a word, for example, \fBlocal\fR, \fBnew\fR, \fBold\fR,
-\fBpublic\fR. \fIsection\fR can also be a letter. To specify multiple sections,
-separate each section with a comma. This option overrides the \fBMANPATH\fR
-environment variable and the \fBman.cf\fR file. See \fBSearch\fR \fBPath\fR
-below for an explanation of how \fBman\fR conducts its search.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-t\fR\fR
-.ad
-.RS 20n
-\fBman\fR arranges for the specified manual pages to be \fBtroff\fRed to a
-suitable raster output device (see \fBtroff\fR(1)). If both the \fB-\fR and
-\fB-t\fR flags are given, \fBman\fR updates the \fBtroff\fRed versions of each
-named \fIname\fR (if necessary), but does not display them.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB-T\fR \fImacro-package\fR\fR
-.ad
-.RS 20n
-Formats manual pages using \fImacro-package\fR rather than the standard
-\fB-man\fR macros defined in \fB/usr/share/lib/tmac/an\fR. See \fBSearch
-Path\fR under USAGE for a complete explanation of the default search path
-order.
-.RE
-
-.SH OPERANDS
-.sp
-.LP
+This option also uses the
+.Pa whatis
+database.
+.It Fl F
+This option is present for backwards compatibility and is documented
+here for reference only. It performs no function.
+.It Fl k Ar keyword ...
+Prints out one-line summaries from the
+.Pa whatis
+database (table of contents) that contain any of the given
+.Ar keyword .
+The
+.Pa whatis
+database is created using the
+.Fl w
+option.
+.It Fl l
+Lists all manual pages found matching
+.Ar name
+within the search path.
+.It Fl M Ar path
+Specifies an alternate search path for manual pages. The
+.Ar path
+is a colon-separated list of directories that contain manual page directory
+subtrees. For example, if
+.Ar path
+is
+.Pa /usr/share/man:/usr/local/man ,
+.Nm
+searches for
+.Ar name
+in the standard location, and then
+.Pa /usr/local/man .
+When used with the
+.Fl k ,
+.Fl f ,
+or
+.Fl w
+options, the
+.Fl M
+option must appear first. Each directory in the
+.Ar path
+is assumed to contain subdirectories of the form
+.Pa man* ,
+one for each section. This option overrides the
+.Ev MANPATH
+environment variable.
+.It Fl r
+Reformats the manual page, checking for formatting errors, but does not
+display it.
+.It Fl s Ar section
+Specifies sections of the manual for
+.Nm
+to search. The directories searched for
+.Ar name
+are limited to those specified by
+.Ar section .
+.Ar section
+can be a numerical digit, perhaps followed by one or more letters
+to match the desired section of the manual, for example,
+.Li "3libucb".
+Also,
+.Ar section
+can be a word, for example,
+.Li local ,
+.Li new ,
+.Li old ,
+.Li public .
+.Ar section
+can also be a letter. To specify multiple sections,
+separate each section with a comma. This option overrides the
+.Ev MANPATH
+environment variable and the
+.Pa man.cf
+file. See
+.Sx Search Path
+below for an explanation of how
+.Nm
+conducts its search.
+.It Fl t
+Arranges for the specified manual pages to be sent to the default
+printer as PostScript.
+.It Fl T Ar macro-package
+This option is present for backwards compatibility and is documented
+here for reference only. It performs no function.
+.It Fl w
+Updates the
+.Nm whatis
+database.
+.El
+.Sh OPERANDS
The following operand is supported:
-.sp
-.ne 2
-.na
-\fB\fIname\fR\fR
-.ad
-.RS 8n
+.Bl -tag -width indent
+.It Ar name
The name of a standard utility or a keyword.
-.RE
-
-.SH USAGE
-.sp
-.LP
-The usage of \fBman\fR is described below:
-.SS "Manual Page Sections"
-.sp
-.LP
-Entries in the reference manuals are organized into \fIsection\fRs. A section
+.El
+.Sh USAGE
+The usage of
+.Nm
+is described below:
+.
+.Ss "Manual Page Sections"
+.
+Entries in the reference manuals are organized into
+.Em sections .
+A section
name consists of a major section name, typically a single digit, optionally
followed by a subsection name, typically one or more letters. An unadorned
-major section name, for example, "\fB9\fR", does not act as an abbreviation for
-the subsections of that name, such as "\fB9e\fR", "\fB9f\fR", or "\fB9s\fR".
-That is, each subsection must be searched separately by \fBman\fR \fB-s\fR.
+major section name, for example,
+.Qq 9 ,
+does not act as an abbreviation for
+the subsections of that name, such as
+.Qq 9e ,
+.Qq 9f ,
+or
+.Qq 9s .
+That is, each subsection must be searched separately by
+.Nm
+.Fl s .
Each section contains descriptions apropos to a particular reference category,
-with subsections refining these distinctions. See the \fBintro\fR manual pages
-for an explanation of the classification used in this release.
-.SS "Search Path"
-.sp
-.LP
-Before searching for a given \fIname\fR, \fBman\fR constructs a list of
-candidate directories and sections. \fBman\fR searches for \fIname\fR in the
-directories specified by the \fBMANPATH\fR environment variable.
-.sp
-.LP
-In the absence of \fBMANPATH\fR, \fBman\fR constructs its search path based
-upon the \fBPATH\fR environment variable, primarily by substituting \fBman\fR
-for the last component of the \fBPATH\fR element. Special provisions are added
-to account for unique characteristics of directories such as \fB/sbin\fR,
-\fB/usr/ucb\fR, \fB/usr/xpg4/bin\fR, and others. If the file argument contains
-a \fB/\fR character, the \fIdirname\fR portion of the argument is used in place
-of \fBPATH\fR elements to construct the search path.
-.sp
-.LP
-Within the manual page directories, \fBman\fR confines its search to the
+with subsections refining these distinctions. See the
+.Em intro
+manual pages for an explanation of the classification used in this release.
+.
+.Ss "Search Path"
+.
+Before searching for a given
+.Ar name ,
+.Nm
+constructs a list of candidate directories and sections.
+It searches for
+.Ar name
+in the directories specified by the
+.Ev MANPATH
+environment variable.
+.Lp
+In the absence of
+.Ev MANPATH ,
+.Nm
+constructs its search path based upon the
+.Ev PATH
+environment variable, primarily by substituting
+.Li man
+for the last component of the
+.Ev PATH
+element. Special provisions are added
+to account for unique characteristics of directories such as
+.Pa /sbin ,
+.Pa /usr/ucb ,
+.Pa /usr/xpg4/bin ,
+and others. If the file argument contains
+a
+.Qq /
+character, the
+.Em dirname
+portion of the argument is used in place of
+.Ev PATH
+elements to construct the search path.
+.Lp
+Within the manual page directories,
+.Nm
+confines its search to the
sections specified in the following order:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIsection\fRs specified on the command line with the \fB-s\fR option
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIsection\fRs embedded in the \fBMANPATH\fR environment variable
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIsection\fRs specified in the \fBman.cf\fR file for each directory specified
-in the \fBMANPATH\fR environment variable
-.RE
-.sp
-.LP
-If none of the above exist, \fBman\fR searches each directory in the manual
+.Bl -bullet
+.It
+.Ar sections
+specified on the command line with the
+.Fl s
+option
+.It
+.Ar sections
+embedded in the
+.Ev MANPATH
+environment variable
+.It
+.Ar sections
+specified in the
+.Pa man.cf
+file for each directory specified in the
+.Ev MANPATH
+environment variable
+.El
+If none of the above exist,
+.Nm
+searches each directory in the manual
page path, and displays the first matching manual page found.
-.sp
-.LP
-The \fBman.cf\fR file has the following format:
-.sp
-.in +2
-.nf
-MANSECTS=\fIsection\fR[,\fIsection\fR]...
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-Lines beginning with `\fB#\fR' and blank lines are considered comments, and are
-ignored. Each directory specified in \fBMANPATH\fR can contain a manual page
+.Lp
+The
+.Pa man.cf
+file has the following format:
+.Lp
+.Dl Pf MANSECTS= Ar section , Ns Op Ar section...
+.Lp
+Lines beginning with
+.Sq Li #
+and blank lines are considered comments, and are
+ignored. Each directory specified in
+.Ev MANPATH
+can contain a manual page
configuration file, specifying the default search order for that directory.
-.SH FORMATTING MANUAL PAGES
-.sp
-.LP
-Manual pages are marked up in \fBnroff\fR(1) or \fBsgml\fR(5). Nroff manual
-pages are processed by \fBnroff\fR(1) or \fBtroff\fR(1) with the \fB-man\fR
-macro package. Please refer to \fBman\fR(5) for information on macro usage.
-\fBSGML\fR\(emtagged manual pages are processed by an \fBSGML\fR parser and
-passed to the formatter.
-.SS "Preprocessing Nroff Manual Pages"
-.sp
-.LP
-When formatting an nroff manual page, \fBman\fR examines the first line to
-determine whether it requires special processing. If the first line is a string
-of the form:
-.sp
-.in +2
-.nf
-\&'\e" \fIX\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-where \fIX\fR is separated from the `\fB"\fR' by a single SPACE and consists of
-any combination of characters in the following list, \fBman\fR pipes its input
-to \fBtroff\fR(1) or \fBnroff\fR(1) through the corresponding preprocessors.
-.sp
-.ne 2
-.na
-\fB\fBe\fR\fR
-.ad
-.RS 5n
-\fBeqn\fR(1), or \fBneqn\fR for \fBnroff\fR
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBr\fR\fR
-.ad
-.RS 5n
-\fBrefer\fR(1)
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBt\fR\fR
-.ad
-.RS 5n
-\fBtbl\fR(1)
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBv\fR\fR
-.ad
-.RS 5n
-\fBvgrind\fR(1)
-.RE
-
-.sp
-.LP
-If \fBeqn\fR or \fBneqn\fR is invoked, it automatically reads the file
-\fB/usr/pub/eqnchar\fR (see \fBeqnchar\fR(5)). If \fBnroff\fR(1) is invoked,
-\fBcol\fR(1) is automatically used.
-.SS "Referring to Other nroff Manual Pages"
-.sp
-.LP
-If the first line of the nroff manual page is a reference to another manual
+.Sh "Referring to Other Manual Pages"
+If the first line of the manual page is a reference to another manual
page entry fitting the pattern:
-.sp
-.in +2
-.nf
-\&.so man*/\fIsourcefile\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-\fBman\fR processes the indicated file in place of the current one. The
+.Lp
+.Dl \&.so man*/\fIsourcefile\fR
+.Lp
+.Nm
+processes the indicated file in place of the current one. The
reference must be expressed as a path name relative to the root of the manual
page directory subtree.
-.sp
-.LP
+.Lp
When the second or any subsequent line starts with \fB\&.so\fR, \fBman\fR
ignores it; \fBtroff\fR(1) or \fBnroff\fR(1) processes the request in the usual
manner.
-.SS "Processing SGML Manual Pages"
-.sp
-.LP
-Manual pages are identified as being marked up in SGML by the presence of the
-string \fB<!DOCTYPE\fR\&. If the file also contains the string
-\fBSHADOW_PAGE\fR, the file refers to another manual page for the content. The
-reference is made with a file entity reference to the manual page that contains
-the text. This is similar to the \fB\&.so\fR mechanism used in the nroff
-formatted man pages.
-.SH ENVIRONMENT VARIABLES
-.sp
-.LP
-See \fBenviron\fR(5) for descriptions of the following environment variables
-that affect the execution of \fBman\fR: \fBLANG\fR, \fBLC_ALL\fR,
-\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
-.sp
-.ne 2
-.na
-\fB\fBMANPATH\fR\fR
-.ad
-.RS 11n
+.Sh ENVIRONMENT VARIABLES
+See
+.Xr environ 5
+for descriptions of the following environment variables
+that affect the execution of
+.Nm man :
+.Ev LANG ,
+.Ev LC_ALL ,
+.Ev LC_CTYPE ,
+.Ev LC_MESSAGES ,
+and
+.Ev NLSPATH .
+.Bl -tag -width indent
+.It Ev MANPATH
A colon-separated list of directories; each directory can be followed by a
comma-separated list of sections. If set, its value overrides
\fB/usr/share/man\fR as the default directory search path, and the \fBman.cf\fR
file as the default section search path. The \fB-M\fR and \fB-s\fR flags, in
turn, override these values.)
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBPAGER\fR\fR
-.ad
-.RS 11n
-A program to use for interactively delivering \fBman\fR's output to the screen.
-If not set, `\fBmore\fR \fB-s\fR' is used. See \fBmore\fR(1).
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBTCAT\fR\fR
-.ad
-.RS 11n
-The name of the program to use to display \fBtroff\fRed manual pages.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBTROFF\fR\fR
-.ad
-.RS 11n
-The name of the formatter to use when the \fB-t\fR flag is given. If not set,
-\fBtroff\fR(1) is used.
-.RE
-
-.SH EXAMPLES
-.LP
-\fBExample 1 \fRCreating a PostScript Version of a man page
-.sp
-.LP
-The following example creates the \fBpipe\fR(2) man page in postscript for csh,
-tcsh, ksh and sh users:
-
-.sp
-.in +2
-.nf
- % env TCAT=/usr/lib/lp/postscript/dpost man -t -s 2 pipe > pipe.ps
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-This is an alternative to using \fBman\fR \fB-t\fR, which sends the man page to
-the default printer, if the user wants a postscript file version of the man
-page.
-
-.LP
-\fBExample 2 \fRCreating a Text Version of a man page
-.sp
-.LP
-The following example creates the \fBpipe\fR(2) man page in ascii text:
-
-.sp
-.in +2
-.nf
-man pipe.2 | col -x -b > pipe.text
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-This is an alternative to using \fBman\fR \fB-t\fR, which sends the man page to
-the default printer, if the user wants a text file version of the man page.
-
-.SH EXIT STATUS
-.sp
-.LP
-The following exit values are returned:
-.sp
-.ne 2
-.na
-\fB\fB0\fR\fR
-.ad
-.RS 6n
-Successful completion.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB>0\fR\fR
-.ad
-.RS 6n
-An error occurred.
-.RE
-
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Ev PAGER
+A program to use for interactively delivering
+output to the screen. If not set,
+.Sq Nm more Fl s
+is used. See
+.Xr more 1 .
+.El
+.Sh FILES
+.Bl -tag -width indent
+.It Pa /usr/share/man
Root of the standard manual page directory subtree
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/man?/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unformatted nroff manual entries
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/sman?/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-Unformatted \fBSGML\fR manual entries
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/cat?/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-\fBnroff\fRed manual entries
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/fmt?/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-\fBtroff\fRed manual entries
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/windex\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Pa /usr/share/man/man?/*
+Unformatted manual entries
+.It Pa /usr/share/man/whatis
Table of contents and keyword database
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/lib/tmac/an\fR\fR
-.ad
-.sp .6
-.RS 4n
-Standard \fB-man\fR macro package
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/lib/sgml/locale/C/dtd/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-\fBSGML\fR document type definition files
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/lib/sgml/locale/C/solbook/*\fR\fR
-.ad
-.sp .6
-.RS 4n
-\fBSGML\fR style sheet and entity definitions directories
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/lib/pub/eqnchar\fR\fR
-.ad
-.sp .6
-.RS 4n
-Standard definitions for \fBeqn\fR and \fBneqn\fR
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBman.cf\fR\fR
-.ad
-.sp .6
-.RS 4n
+.It Pa man.cf
Default search order by section
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-CSI Enabled, see \fBNOTES\fR.
-_
-Interface Stability Committed
-_
-Standard See \fBstandards\fR(5).
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBapropos\fR(1), \fBcat\fR(1), \fBcol\fR(1), \fBdpost\fR(1), \fBeqn\fR(1),
-\fBmore\fR(1), \fBnroff\fR(1), \fBrefer\fR(1), \fBtbl\fR(1), \fBtroff\fR(1),
-\fBvgrind\fR(1), \fBwhatis\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5),
-\fBenviron\fR(5), \fBeqnchar\fR(5), \fBman\fR(5), \fBsgml\fR(5),
-\fBstandards\fR(5)
-.SH NOTES
-.sp
-.LP
-The \fB-f\fR and \fB-k\fR options use the \fBwindex\fR database, which is
-created by \fBcatman\fR(1M).
-.sp
-.LP
-The \fBman\fR command is CSI-capable. However, some utilities invoked by the
-\fBman\fR command, namely, \fBtroff\fR, \fBeqn\fR, \fBneqn\fR, \fBrefer\fR,
-\fBtbl\fR, and \fBvgrind\fR, are not verified to be CSI-capable. Because of
-this, the man command with the \fB-t\fR option can not handle non-EUC data.
-Also, using the \fBman\fR command to display man pages that require special
-processing through \fBeqn\fR, \fBneqn\fR, \fBrefer\fR, \fBtbl\fR, or
-\fBvgrind\fR can not be CSI-capable.
-.SH BUGS
-.sp
-.LP
+.El
+.Sh EXIT STATUS
+.Ex -std man
+.Sh EXAMPLES
+.
+.Ss Example 1: Creating a PostScript Version of a man page
+.
+The following example spools the
+.Xr pipe 2
+man page in PostScript to the default printer:
+.Pp
+.Dl % man -t -s 2 pipe
+.Pp
+Note that
+.Xr mandoc 1
+can be used to obtain the PostScript content directly.
+.Ss Example 2: Creating a Text Version of a man page
+The following example creates the
+.Xr pipe 2
+man page in ASCII text:
+.Pp
+.Dl % man pipe.2 | col -x -b > pipe.text
+.Sh CODE SET INDEPENDENCE
+Enabled.
+.Sh INTERFACE STABILITY
+.Nm Committed .
+.Sh SEE ALSO
+.Xr apropos 1 ,
+.Xr cat 1 ,
+.Xr col 1 ,
+.Xr mandoc 1 ,
+.Xr more 1 ,
+.Xr whatis 1 ,
+.Xr environ 5 ,
+.Xr man 5 ,
+.Xr mdoc 5
+.Sh NOTES
+The
+.Fl f
+and
+.Fl k
+options use the
+.Nm whatis
+database, which is
+created with the
+.Fl w
+option.
+.Sh BUGS
The manual is supposed to be reproducible either on a phototypesetter or on an
-\fBASCII\fR terminal. However, on a terminal some information (indicated by
+ASCII terminal. However, on a terminal some information (indicated by
font changes, for instance) is lost.
-.sp
-.LP
-Some dumb terminals cannot process the vertical motions produced by the \fBe\fR
-(see \fBeqn\fR(1)) preprocessing flag. To prevent garbled output on these
-terminals, when you use \fBe\fR, also use \fBt\fR, to invoke \fBcol\fR(1)
-implicitly. This workaround has the disadvantage of eliminating superscripts
-and subscripts, even on those terminals that can display them. Control-q clears
-a terminal that gets confused by \fBeqn\fR(1) output.
diff --git a/usr/src/man/man1/mandoc.1 b/usr/src/man/man1/mandoc.1
new file mode 100644
index 0000000000..e1d7638d86
--- /dev/null
+++ b/usr/src/man/man1/mandoc.1
@@ -0,0 +1,678 @@
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" 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.
+.\"
+.\"
+.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
+.\"
+.Dd Jul 16, 2014
+.Dt MANDOC 1
+.Os
+.Sh NAME
+.Nm mandoc
+.Nd format and display UNIX manuals
+.Sh SYNOPSIS
+.Nm mandoc
+.Op Fl V
+.Op Fl m Ns Ar format
+.Op Fl O Ns Ar option
+.Op Fl T Ns Ar output
+.Op Fl W Ns Ar level
+.Op Ar
+.Sh DESCRIPTION
+The
+.Nm
+utility formats
+.Ux
+manual pages for display.
+.Pp
+By default,
+.Nm
+reads
+.Xr mdoc 5
+or
+.Xr man 5
+text from stdin, implying
+.Fl m Ns Cm andoc ,
+and produces
+.Fl T Ns Cm ascii
+output.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl m Ns Ar format
+Input format.
+See
+.Sx Input Formats
+for available formats.
+Defaults to
+.Fl m Ns Cm andoc .
+.It Fl O Ns Ar option
+Comma-separated output options.
+.It Fl T Ns Ar output
+Output format.
+See
+.Sx Output Formats
+for available formats.
+Defaults to
+.Fl T Ns Cm ascii .
+.It Fl V
+Print version and exit.
+.It Fl W Ns Ar level
+Specify the minimum message
+.Ar level
+to be reported on the standard error output and to affect the exit status.
+The
+.Ar level
+can be
+.Cm warning ,
+.Cm error ,
+or
+.Cm fatal .
+The default is
+.Fl W Ns Cm fatal ;
+.Fl W Ns Cm all
+is an alias for
+.Fl W Ns Cm warning .
+See
+.Sx EXIT STATUS
+and
+.Sx DIAGNOSTICS
+for details.
+.Pp
+The special option
+.Fl W Ns Cm stop
+tells
+.Nm
+to exit after parsing a file that causes warnings or errors of at least
+the requested level.
+No formatted output will be produced from that file.
+If both a
+.Ar level
+and
+.Cm stop
+are requested, they can be joined with a comma, for example
+.Fl W Ns Cm error , Ns Cm stop .
+.It Ar file
+Read input from zero or more files.
+If unspecified, reads from stdin.
+If multiple files are specified,
+.Nm
+will halt with the first failed parse.
+.El
+.Ss Input Formats
+The
+.Nm
+utility accepts
+.Xr mdoc 5
+and
+.Xr man 5
+input with
+.Fl m Ns Cm doc
+and
+.Fl m Ns Cm an ,
+respectively.
+The
+.Xr mdoc 5
+format is
+.Em strongly
+recommended;
+.Xr man 5
+should only be used for legacy manuals.
+.Pp
+A third option,
+.Fl m Ns Cm andoc ,
+which is also the default, determines encoding on-the-fly: if the first
+non-comment macro is
+.Sq \&Dd
+or
+.Sq \&Dt ,
+the
+.Xr mdoc 5
+parser is used; otherwise, the
+.Xr man 5
+parser is used.
+.Pp
+If multiple
+files are specified with
+.Fl m Ns Cm andoc ,
+each has its file-type determined this way.
+If multiple files are
+specified and
+.Fl m Ns Cm doc
+or
+.Fl m Ns Cm an
+is specified, then this format is used exclusively.
+.Ss Output Formats
+The
+.Nm
+utility accepts the following
+.Fl T
+arguments, which correspond to output modes:
+.Bl -tag -width "-Tlocale"
+.It Fl T Ns Cm ascii
+Produce 7-bit ASCII output.
+This is the default.
+See
+.Sx ASCII Output .
+.It Fl T Ns Cm html
+Produce strict CSS1/HTML-4.01 output.
+See
+.Sx HTML Output .
+.It Fl T Ns Cm lint
+Parse only: produce no output.
+Implies
+.Fl W Ns Cm warning .
+.It Fl T Ns Cm locale
+Encode output using the current locale.
+See
+.Sx Locale Output .
+.It Fl T Ns Cm man
+Produce
+.Xr man 5
+format output.
+See
+.Sx Man Output .
+.It Fl T Ns Cm pdf
+Produce PDF output.
+See
+.Sx PDF Output .
+.It Fl T Ns Cm ps
+Produce PostScript output.
+See
+.Sx PostScript Output .
+.It Fl T Ns Cm tree
+Produce an indented parse tree.
+.It Fl T Ns Cm utf8
+Encode output in the UTF\-8 multi-byte format.
+See
+.Sx UTF\-8 Output .
+.It Fl T Ns Cm xhtml
+Produce strict CSS1/XHTML-1.0 output.
+See
+.Sx XHTML Output .
+.El
+.Pp
+If multiple input files are specified, these will be processed by the
+corresponding filter in-order.
+.Ss ASCII Output
+Output produced by
+.Fl T Ns Cm ascii ,
+which is the default, is rendered in standard 7-bit ASCII documented in
+.Xr ascii 5 .
+.Pp
+Font styles are applied by using back-spaced encoding such that an
+underlined character
+.Sq c
+is rendered as
+.Sq _ Ns \e[bs] Ns c ,
+where
+.Sq \e[bs]
+is the back-space character number 8.
+Emboldened characters are rendered as
+.Sq c Ns \e[bs] Ns c .
+.Pp
+The special characters documented in
+.Xr mandoc_char 5
+are rendered best-effort in an ASCII equivalent.
+If no equivalent is found,
+.Sq \&?
+is used instead.
+.Pp
+Output width is limited to 78 visible columns unless literal input lines
+exceed this limit.
+.Pp
+The following
+.Fl O
+arguments are accepted:
+.Bl -tag -width Ds
+.It Cm indent Ns = Ns Ar indent
+The left margin for normal text is set to
+.Ar indent
+blank characters instead of the default of five for
+.Xr mdoc 5
+and seven for
+.Xr man 5 .
+Increasing this is not recommended; it may result in degraded formatting,
+for example overfull lines or ugly line breaks.
+.It Cm width Ns = Ns Ar width
+The output width is set to
+.Ar width ,
+which will normalise to \(>=60.
+.El
+.Ss HTML Output
+Output produced by
+.Fl T Ns Cm html
+conforms to HTML-4.01 strict.
+.Pp
+The
+.Pa example.style.css
+file documents style-sheet classes available for customising output.
+If a style-sheet is not specified with
+.Fl O Ns Ar style ,
+.Fl T Ns Cm html
+defaults to simple output readable in any graphical or text-based web
+browser.
+.Pp
+Special characters are rendered in decimal-encoded UTF\-8.
+.Pp
+The following
+.Fl O
+arguments are accepted:
+.Bl -tag -width Ds
+.It Cm fragment
+Omit the
+.Aq !DOCTYPE
+declaration and the
+.Aq html ,
+.Aq head ,
+and
+.Aq body
+elements and only emit the subtree below the
+.Aq body
+element.
+The
+.Cm style
+argument will be ignored.
+This is useful when embedding manual content within existing documents.
+.It Cm includes Ns = Ns Ar fmt
+The string
+.Ar fmt ,
+for example,
+.Ar ../src/%I.html ,
+is used as a template for linked header files (usually via the
+.Sq \&In
+macro).
+Instances of
+.Sq \&%I
+are replaced with the include filename.
+The default is not to present a
+hyperlink.
+.It Cm man Ns = Ns Ar fmt
+The string
+.Ar fmt ,
+for example,
+.Ar ../html%S/%N.%S.html ,
+is used as a template for linked manuals (usually via the
+.Sq \&Xr
+macro).
+Instances of
+.Sq \&%N
+and
+.Sq %S
+are replaced with the linked manual's name and section, respectively.
+If no section is included, section 1 is assumed.
+The default is not to
+present a hyperlink.
+.It Cm style Ns = Ns Ar style.css
+The file
+.Ar style.css
+is used for an external style-sheet.
+This must be a valid absolute or
+relative URI.
+.El
+.Ss Locale Output
+Locale-depending output encoding is triggered with
+.Fl T Ns Cm locale .
+This option is not available on all systems: systems without locale
+support, or those whose internal representation is not natively UCS-4,
+will fall back to
+.Fl T Ns Cm ascii .
+See
+.Sx ASCII Output
+for font style specification and available command-line arguments.
+.Ss Man Output
+Translate input format into
+.Xr man 5
+output format.
+This is useful for distributing manual sources to legacy systems
+lacking
+.Xr mdoc 5
+formatters.
+.Pp
+If
+.Xr mdoc 5
+is passed as input, it is translated into
+.Xr man 5 .
+If the input format is
+.Xr man 5 ,
+the input is copied to the output, expanding any
+.Xr mandoc_roff 5
+.Sq so
+requests.
+The parser is also run, and as usual, the
+.Fl W
+level controls which
+.Sx DIAGNOSTICS
+are displayed before copying the input to the output.
+.Ss PDF Output
+PDF-1.1 output may be generated by
+.Fl T Ns Cm pdf .
+See
+.Sx PostScript Output
+for
+.Fl O
+arguments and defaults.
+.Ss PostScript Output
+PostScript
+.Qq Adobe-3.0
+Level-2 pages may be generated by
+.Fl T Ns Cm ps .
+Output pages default to letter sized and are rendered in the Times font
+family, 11-point.
+Margins are calculated as 1/9 the page length and width.
+Line-height is 1.4m.
+.Pp
+Special characters are rendered as in
+.Sx ASCII Output .
+.Pp
+The following
+.Fl O
+arguments are accepted:
+.Bl -tag -width Ds
+.It Cm paper Ns = Ns Ar name
+The paper size
+.Ar name
+may be one of
+.Ar a3 ,
+.Ar a4 ,
+.Ar a5 ,
+.Ar legal ,
+or
+.Ar letter .
+You may also manually specify dimensions as
+.Ar NNxNN ,
+width by height in millimetres.
+If an unknown value is encountered,
+.Ar letter
+is used.
+.El
+.Ss UTF\-8 Output
+Use
+.Fl T Ns Cm utf8
+to force a UTF\-8 locale.
+See
+.Sx Locale Output
+for details and options.
+.Ss XHTML Output
+Output produced by
+.Fl T Ns Cm xhtml
+conforms to XHTML-1.0 strict.
+.Pp
+See
+.Sx HTML Output
+for details; beyond generating XHTML tags instead of HTML tags, these
+output modes are identical.
+.Sh EXIT STATUS
+The
+.Nm
+utility exits with one of the following values, controlled by the message
+.Ar level
+associated with the
+.Fl W
+option:
+.Pp
+.Bl -tag -width Ds -compact
+.It 0
+No warnings or errors occurred, or those that did were ignored because
+they were lower than the requested
+.Ar level .
+.It 2
+At least one warning occurred, but no error, and
+.Fl W Ns Cm warning
+was specified.
+.It 3
+At least one parsing error occurred, but no fatal error, and
+.Fl W Ns Cm error
+or
+.Fl W Ns Cm warning
+was specified.
+.It 4
+A fatal parsing error occurred.
+.It 5
+Invalid command line arguments were specified.
+No input files have been read.
+.It 6
+An operating system error occurred, for example memory exhaustion or an
+error accessing input files.
+Such errors cause
+.Nm
+to exit at once, possibly in the middle of parsing or formatting a file.
+.El
+.Pp
+Note that selecting
+.Fl T Ns Cm lint
+output mode implies
+.Fl W Ns Cm warning .
+.Sh EXAMPLES
+To page manuals to the terminal:
+.Pp
+.Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
+.Dl $ mandoc mandoc.1 mdoc.5 | less
+.Pp
+To produce HTML manuals with
+.Ar style.css
+as the style-sheet:
+.Pp
+.Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.5 \*(Gt mdoc.5.html
+.Pp
+To check over a large set of manuals:
+.Pp
+.Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
+.Pp
+To produce a series of PostScript manuals for A4 paper:
+.Pp
+.Dl $ mandoc \-Tps \-Opaper=a4 mdoc.5 man.5 \*(Gt manuals.ps
+.Pp
+Convert a modern
+.Xr mdoc 5
+manual to the older
+.Xr man 5
+format, for use on systems lacking an
+.Xr mdoc 5
+parser:
+.Pp
+.Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
+.Sh DIAGNOSTICS
+Standard error messages reporting parsing errors are prefixed by
+.Pp
+.Sm off
+.D1 Ar file : line : column : \ level :
+.Sm on
+.Pp
+where the fields have the following meanings:
+.Bl -tag -width "column"
+.It Ar file
+The name of the input file causing the message.
+.It Ar line
+The line number in that input file.
+Line numbering starts at 1.
+.It Ar column
+The column number in that input file.
+Column numbering starts at 1.
+If the issue is caused by a word, the column number usually
+points to the first character of the word.
+.It Ar level
+The message level, printed in capital letters.
+.El
+.Pp
+Message levels have the following meanings:
+.Bl -tag -width "warning"
+.It Cm fatal
+The parser is unable to parse a given input file at all.
+No formatted output is produced from that input file.
+.It Cm error
+An input file contains syntax that cannot be safely interpreted,
+either because it is invalid or because
+.Nm
+does not implement it yet.
+By discarding part of the input or inserting missing tokens,
+the parser is able to continue, and the error does not prevent
+generation of formatted output, but typically, preparing that
+output involves information loss, broken document structure
+or unintended formatting.
+.It Cm warning
+An input file uses obsolete, discouraged or non-portable syntax.
+All the same, the meaning of the input is unambiguous and a correct
+rendering can be produced.
+Documents causing warnings may render poorly when using other
+formatting tools instead of
+.Nm .
+.El
+.Pp
+Messages of the
+.Cm warning
+and
+.Cm error
+levels are hidden unless their level, or a lower level, is requested using a
+.Fl W
+option or
+.Fl T Ns Cm lint
+output mode.
+.Pp
+The
+.Nm
+utility may also print messages related to invalid command line arguments
+or operating system errors, for example when memory is exhausted or
+input files cannot be read.
+Such messages do not carry the prefix described above.
+.Sh COMPATIBILITY
+This section summarises
+.Nm
+compatibility with GNU troff.
+Each input and output format is separately noted.
+.Ss ASCII Compatibility
+.Bl -bullet -compact
+.It
+Unrenderable unicode codepoints specified with
+.Sq \e[uNNNN]
+escapes are printed as
+.Sq \&?
+in mandoc.
+In GNU troff, these raise an error.
+.It
+The
+.Sq \&Bd \-literal
+and
+.Sq \&Bd \-unfilled
+macros of
+.Xr mdoc 5
+in
+.Fl T Ns Cm ascii
+are synonyms, as are \-filled and \-ragged.
+.It
+In historic GNU troff, the
+.Sq \&Pa
+.Xr mdoc 5
+macro does not underline when scoped under an
+.Sq \&It
+in the FILES section.
+This behaves correctly in
+.Nm .
+.It
+A list or display following the
+.Sq \&Ss
+.Xr mdoc 5
+macro in
+.Fl T Ns Cm ascii
+does not assert a prior vertical break, just as it doesn't with
+.Sq \&Sh .
+.It
+The
+.Sq \&na
+.Xr man 5
+macro in
+.Fl T Ns Cm ascii
+has no effect.
+.It
+Words aren't hyphenated.
+.El
+.Ss HTML/XHTML Compatibility
+.Bl -bullet -compact
+.It
+The
+.Sq \efP
+escape will revert the font to the previous
+.Sq \ef
+escape, not to the last rendered decoration, which is now dictated by
+CSS instead of hard-coded.
+It also will not span past the current scope,
+for the same reason.
+Note that in
+.Sx ASCII Output
+mode, this will work fine.
+.It
+The
+.Xr mdoc 5
+.Sq \&Bl \-hang
+and
+.Sq \&Bl \-tag
+list types render similarly (no break following overreached left-hand
+side) due to the expressive constraints of HTML.
+.It
+The
+.Xr man 5
+.Sq IP
+and
+.Sq TP
+lists render similarly.
+.El
+.Sh INTERFACE STABILITY
+The
+.Nm
+utility is
+.Nm Committed ,
+but the details of specific output formats other than ASCII are
+.Nm Uncommitted .
+.Sh SEE ALSO
+.Xr eqn 5 ,
+.Xr man 5 ,
+.Xr mandoc_char 5 ,
+.Xr mdoc 5 ,
+.Xr mandoc_roff 5 ,
+.Xr tbl 5
+.Sh AUTHORS
+The
+.Nm
+utility was written by
+.An Kristaps Dzonsons ,
+.Mt kristaps@bsd.lv .
+.Sh CAVEATS
+In
+.Fl T Ns Cm html
+and
+.Fl T Ns Cm xhtml ,
+the maximum size of an element attribute is determined by
+.Dv BUFSIZ ,
+which is usually 1024 bytes.
+Be aware of this when setting long link
+formats such as
+.Fl O Ns Cm style Ns = Ns Ar really/long/link .
+.Pp
+Nesting elements within next-line element scopes of
+.Fl m Ns Cm an ,
+such as
+.Sq br
+within an empty
+.Sq B ,
+will confuse
+.Fl T Ns Cm html
+and
+.Fl T Ns Cm xhtml
+and cause them to forget the formatting of the prior next-line scope.
+.Pp
+The
+.Sq \(aq
+control character is an alias for the standard macro control character
+and does not emit a line-break as stipulated in GNU troff.
diff --git a/usr/src/man/man1/printf.1 b/usr/src/man/man1/printf.1
index 549628ab2e..24ba63bf91 100644
--- a/usr/src/man/man1/printf.1
+++ b/usr/src/man/man1/printf.1
@@ -128,7 +128,7 @@ precision specifiers.
The special character \fB*\fR may be used instead of a string of decimal digits
to indicate a minimum field width or a precision. In this case the next
available argument is used (or the \fIn\fRth if the form \fIn\fR\fB$\fR is
-used), treating its value as a decimal string.
+used), treating its value as a decimal string.
.RE
.RS +4
.TP
diff --git a/usr/src/man/man1/tar.1 b/usr/src/man/man1/tar.1
index 0829a9c1c3..ccc5ba4ace 100644
--- a/usr/src/man/man1/tar.1
+++ b/usr/src/man/man1/tar.1
@@ -1182,7 +1182,7 @@ Interface Stability Committed
.sp
.LP
\fBar\fR(1), \fBbasename\fR(1), \fBbzip2\fR(1), \fBcd\fR(1), \fBchown\fR(1),
-\fBcompress\fR)(1), \fBcpio\fR(1), \fBcsh\fR(1), \fBdirname\fR(1),
+\fBcompress\fR)(1), \fBcpio\fR(1), \fBcsh\fR(1), \fBdirname\fR(1),
\fBfind\fR(1), \fBgzip\fR(1), \fBls\fR(1), \fBmt\fR(1), \fBpax\fR(1),
\fBsetfacl\fR(1), \fBumask\fR(1), \fBxz\fR(1), \fBmknod\fR(1M),
\fBarchives.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
diff --git a/usr/src/man/man1/whatis.1 b/usr/src/man/man1/whatis.1
deleted file mode 100644
index 73435fb5cb..0000000000
--- a/usr/src/man/man1/whatis.1
+++ /dev/null
@@ -1,61 +0,0 @@
-'\" te
-.\" Copyright (c) 1992, Sun Microsystems, Inc.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH WHATIS 1 "Sep 14, 1992"
-.SH NAME
-whatis \- display a one-line summary about a keyword
-.SH SYNOPSIS
-.LP
-.nf
-\fBwhatis\fR \fIcommand\fR...
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-\fBwhatis\fR looks up a given \fIcommand\fR and displays the header line from
-the manual section. You can then run the \fBman\fR(1) command to get more
-information. If the line starts \fBname(\fIsection\fR)\fR.\|.\|. you can do
-\fBman\fR \fB-s\fR\fB\fIsection\fR name\fR to get the documentation for it.
-Try \fBwhatis ed\fR and then you should do \fBman\fR \fB-s\fR \fB1 ed\fR to get
-the manual page for \fBed\fR(1).
-.sp
-.LP
-\fBwhatis\fR is actually just the \fB-f\fR option to the \fBman\fR(1) command.
-.sp
-.LP
-\fBwhatis\fR uses the \fB/usr/share/man/windex\fR database. This database is
-created by \fBcatman\fR(1M). If this database does not exist, \fBwhatis\fR will
-fail.
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/usr/share/man/windex\fR\fR
-.ad
-.RS 25n
-Table of contents and keyword database
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-CSI Enabled
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBapropos\fR(1), \fBman\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5)