--- old/exception_lists/cstyle	Sat Jul 19 14:19:57 2014
+++ new/exception_lists/cstyle	Sat Jul 19 14:19:57 2014
@@ -61,6 +61,59 @@
 usr/src/cmd/krb5/slave/kprop.c
 usr/src/cmd/krb5/slave/kprop.h
 usr/src/cmd/krb5/slave/kpropd.c
+usr/src/cmd/mandoc/arch.c
+usr/src/cmd/mandoc/att.c
+usr/src/cmd/mandoc/chars.c
+usr/src/cmd/mandoc/config.h
+usr/src/cmd/mandoc/eqn.c
+usr/src/cmd/mandoc/eqn_html.c
+usr/src/cmd/mandoc/eqn_term.c
+usr/src/cmd/mandoc/html.c
+usr/src/cmd/mandoc/html.h
+usr/src/cmd/mandoc/lib.c
+usr/src/cmd/mandoc/libman.h
+usr/src/cmd/mandoc/libmandoc.h
+usr/src/cmd/mandoc/libmdoc.h
+usr/src/cmd/mandoc/libroff.h
+usr/src/cmd/mandoc/main.c
+usr/src/cmd/mandoc/main.h
+usr/src/cmd/mandoc/man.c
+usr/src/cmd/mandoc/man.h
+usr/src/cmd/mandoc/man_hash.c
+usr/src/cmd/mandoc/man_html.c
+usr/src/cmd/mandoc/man_macro.c
+usr/src/cmd/mandoc/man_term.c
+usr/src/cmd/mandoc/man_validate.c
+usr/src/cmd/mandoc/mandoc.c
+usr/src/cmd/mandoc/mandoc.h
+usr/src/cmd/mandoc/mdoc.c
+usr/src/cmd/mandoc/mdoc.h
+usr/src/cmd/mandoc/mdoc_argv.c
+usr/src/cmd/mandoc/mdoc_hash.c
+usr/src/cmd/mandoc/mdoc_html.c
+usr/src/cmd/mandoc/mdoc_macro.c
+usr/src/cmd/mandoc/mdoc_man.c
+usr/src/cmd/mandoc/mdoc_term.c
+usr/src/cmd/mandoc/mdoc_validate.c
+usr/src/cmd/mandoc/msec.c
+usr/src/cmd/mandoc/out.c
+usr/src/cmd/mandoc/out.h
+usr/src/cmd/mandoc/preconv.c
+usr/src/cmd/mandoc/read.c
+usr/src/cmd/mandoc/roff.c
+usr/src/cmd/mandoc/st.c
+usr/src/cmd/mandoc/tbl.c
+usr/src/cmd/mandoc/tbl_data.c
+usr/src/cmd/mandoc/tbl_html.c
+usr/src/cmd/mandoc/tbl_layout.c
+usr/src/cmd/mandoc/tbl_opts.c
+usr/src/cmd/mandoc/tbl_term.c
+usr/src/cmd/mandoc/term.c
+usr/src/cmd/mandoc/term.h
+usr/src/cmd/mandoc/term_ascii.c
+usr/src/cmd/mandoc/term_ps.c
+usr/src/cmd/mandoc/tree.c
+usr/src/cmd/mandoc/vol.c
 usr/src/common/bzip2/bzlib.h
 usr/src/common/bzip2/crctable.c
 usr/src/common/bzip2/randtable.c
--- old/exception_lists/hdrchk	Sat Jul 19 14:19:57 2014
+++ new/exception_lists/hdrchk	Sat Jul 19 14:19:57 2014
@@ -17,6 +17,18 @@
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_util.h
 usr/src/cmd/krb5/slave/kprop.h
 usr/src/cmd/localedef/localedef.h
+usr/src/cmd/mandoc/config.h
+usr/src/cmd/mandoc/html.h
+usr/src/cmd/mandoc/libman.h
+usr/src/cmd/mandoc/libmandoc.h
+usr/src/cmd/mandoc/libmdoc.h
+usr/src/cmd/mandoc/libroff.h
+usr/src/cmd/mandoc/main.h
+usr/src/cmd/mandoc/man.h
+usr/src/cmd/mandoc/mandoc.h
+usr/src/cmd/mandoc/mdoc.h
+usr/src/cmd/mandoc/out.h
+usr/src/cmd/mandoc/term.h
 usr/src/common/openssl/crypto/krb5/krb5_asn.h
 usr/src/lib/gss_mechs/mech_krb5/et/error_table.h
 usr/src/lib/gss_mechs/mech_krb5/et/internal.h
--- old/usr/src/cmd/man/makewhatis.c	Sat Jul 19 14:19:57 2014
+++ new/usr/src/cmd/man/makewhatis.c	Sat Jul 19 14:19:57 2014
@@ -28,6 +28,7 @@
 
 /*
  * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  */
 
 #include <sys/types.h>
@@ -176,16 +177,24 @@
 {
 	char *new_content;
 	size_t size, cntsize;
+	size_t grow = 128;
 
-	/* Double the size of the allocation until the buffer is big enough */
-	while (sbuf->end + nchars > sbuf->last) {
+	while (grow < nchars) {
+		grow += 128;	/* we grow in chunks of 128 bytes */
+	}
+
+	/* Grow if the buffer isn't big enough */
+	if (sbuf->end + nchars > sbuf->last) {
 		size = sbuf->last + 1 - sbuf->content;
-		size *= 2;
+		size += grow;
 		cntsize = sbuf->end - sbuf->content;
 
-		new_content = (char *)malloc(size);
-		(void) memcpy(new_content, sbuf->content, cntsize);
-		free(sbuf->content);
+		if ((new_content = realloc(sbuf->content, size)) == NULL) {
+			perror("realloc");
+			if (tempfile[0] != '\0')
+				(void) unlink(tempfile);
+			exit(1);
+		}
 		sbuf->content = new_content;
 		sbuf->end = new_content + cntsize;
 		sbuf->last = new_content + size - 1;
@@ -259,17 +268,18 @@
 no_page_exists(char *dir, stringlist *names, char *suffix)
 {
 	char	path[MAXPATHLEN];
+	char	*suffixes[] = { "", ".gz", ".bz2", NULL };
 	size_t	i;
+	int	j;
 
 	for (i = 0; i < names->sl_cur; i++) {
-		(void) snprintf(path, MAXPATHLEN, "%s/%s.%s.gz",
-		    dir, names->sl_str[i], suffix);
-		if (access(path, F_OK) < 0) {
-			path[strlen(path) - 3] = '\0';
-			if (access(path, F_OK) < 0)
-				continue;
+		for (j = 0; suffixes[j] != NULL; j++) {
+			(void) snprintf(path, MAXPATHLEN, "%s/%s.%s%s",
+			    dir, names->sl_str[i], suffix, suffixes[j]);
+			if (access(path, F_OK) == 0) {
+				return (0);
+			}
 		}
-		return (0);
 	}
 	return (1);
 }
--- old/usr/src/cmd/man/man.c	Sat Jul 19 14:19:57 2014
+++ new/usr/src/cmd/man/man.c	Sat Jul 19 14:19:57 2014
@@ -23,6 +23,7 @@
  * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, Josef 'Jeff' Sipek <jeffpc@31bits.net>. All rights reserved.
  * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  */
 
 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989  AT&T.	*/
@@ -82,7 +83,8 @@
 	{ "3t",		"3thr"		},
 	{ "3x",		"3curses"	},
 	{ "3xc",	"3xcurses"	},
-	{ "3xn",	"3xnet"		}
+	{ "3xn",	"3xnet"		},
+	{ NULL,		NULL		}
 };
 
 struct suffix {
@@ -158,11 +160,12 @@
 static int	printmp = 0;
 static int	sargs = 0;
 static int	psoutput = 0;
+static int	lintout = 0;
 static int	whatis = 0;
 static int	makewhatishere = 0;
 
 static char	*mansec;
-static char	*pager;
+static char	*pager = NULL;
 
 static char	*addlocale(char *);
 static struct man_node *build_manpath(char **, int);
@@ -238,7 +241,7 @@
 	} else if (strcmp(__progname, "catman") == 0) {
 		catman++;
 		makewhatis++;
-		opts = "M:w";
+		opts = "P:M:w";
 	} else if (strcmp(__progname, "makewhatis") == 0) {
 		makewhatis++;
 		makewhatishere++;
@@ -245,7 +248,11 @@
 		manpath = ".";
 		opts = "";
 	} else {
-		opts = "M:adfklps:tw";
+		opts = "FM:P:T:adfklprs:tw";
+		if (argc > 1 && strcmp(argv[1], "-") == 0) {
+			pager = "cat";
+			optind++;
+		}
 	}
 
 	opterr = 0;
@@ -268,7 +275,8 @@
 			break;
 		case 'l':
 			list++;
-			/*FALLTHROUGH*/
+			all++;
+			break;
 		case 'p':
 			printmp++;
 			break;
@@ -276,9 +284,17 @@
 			mansec = optarg;
 			sargs++;
 			break;
+		case 'r':
+			lintout++;
+			break;
 		case 't':
 			psoutput++;
 			break;
+		case 'T':
+		case 'P':
+		case 'F':
+			/* legacy options, compatibility only and ignored */
+			break;
 		case 'w':
 			makewhatis++;
 			break;
@@ -351,8 +367,10 @@
 		DPRINTF("-- Using non-standard page width: %d\n", manwidth);
 	}
 
-	if ((pager = getenv("PAGER")) == NULL || *pager == '\0')
-		pager = PAGER;
+	if (pager == NULL) {
+		if ((pager = getenv("PAGER")) == NULL || *pager == '\0')
+			pager = PAGER;
+	}
 	DPRINTF("-- Using pager: %s\n", pager);
 
 	for (i = 0; i < argc; i++) {
@@ -1146,21 +1164,15 @@
 map_section(char *section, char *path)
 {
 	int	i;
-	int	len;
 	char	fullpath[MAXPATHLEN];
 
 	if (list)  /* -l option fall through */
 		return (NULL);
 
-	for (i = 0; i <= ((sizeof (map)/sizeof (map[0]) - 1)); i++) {
-		if (strlen(section) > strlen(map[i].new_name)) {
-			len = strlen(section);
-		} else {
-			len = strlen(map[i].new_name);
-		}
-		if (strncmp(section, map[i].old_name, len) == 0) {
+	for (i = 0; map[i].new_name != NULL; i++) {
+		if (strcmp(section, map[i].old_name) == 0) {
 			(void) snprintf(fullpath, sizeof (fullpath),
-			    "%s/sman%s", path, map[i].new_name);
+			    "%s/man%s", path, map[i].new_name);
 			if (!access(fullpath, R_OK | X_OK)) {
 				return (map[i].new_name);
 			} else {
@@ -1197,7 +1209,7 @@
 	    dir + 3, pg);
 
 	/* Can't do PS output if manpage doesn't exist */
-	if (stat(manpname, &sbman) != 0 && psoutput)
+	if (stat(manpname, &sbman) != 0 && (psoutput|lintout))
 		return (-1);
 
 	/*
@@ -1213,7 +1225,7 @@
 	else if (fnmatch("*.bz2", manpname, 0) == 0)
 		cattool = "bzcat";
 	else
-		cattool = "gzcat -f";
+		cattool = "cat";
 
 	/* Preprocess UTF-8 input with preconv (could be smarter) */
 	if (strstr(path, "UTF-8") != NULL)
@@ -1226,6 +1238,13 @@
 		    utf8 ? " | " PRECONV " -e UTF-8" : "");
 		DPRINTF("-- Using manpage: %s\n", manpname);
 		goto cmd;
+	} else if (lintout) {
+		(void) snprintf(cmdbuf, BUFSIZ,
+		    "cd %s; %s %s%s | mandoc -Tlint",
+		    path, cattool, manpname,
+		    utf8 ? " | " PRECONV " -e UTF-8" : "");
+		DPRINTF("-- Linting manpage: %s\n", manpname);
+		goto cmd;
 	}
 
 	/*
@@ -1568,8 +1587,8 @@
 
 	(void) fprintf(stderr, gettext(
 "usage: man [-alptw] [-M path] [-s section] name ...\n"
-"       man [-M path] [-s section] -k keyword -- emulate apropos\n"
-"       man [-M path] [-s section] -f keyword -- emulate whatis\n"));
+"       man [-M path] [-s section] -k keyword ...\n"
+"       man [-M path] [-s section] -f keyword ...\n"));
 
 	exit(1);
 }
--- old/usr/src/man/man1/apropos.1	Sat Jul 19 14:19:58 2014
+++ new/usr/src/man/man1/apropos.1	Sat Jul 19 14:19:58 2014
@@ -12,7 +12,7 @@
 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"
-.Dd Jul 13, 2014
+.Dd Jul 18, 2014
 .Dt APROPOS 1
 .Os
 .Sh NAME
@@ -41,9 +41,10 @@
 .Nm whatis
 utility does the same search but only on complete words. The
 .Nm whatis
-database files are created using
+database files are created using the
 .Xr man 1
 command.
+.Sh OPTIONS
 .Bl -tag -width ".Fl d"
 .It Fl M Ar path
 Force a specific colon separated manual path instead of the default search path.
--- old/usr/src/man/man1/man.1	Sat Jul 19 14:19:58 2014
+++ new/usr/src/man/man1/man.1	Sat Jul 19 14:19:58 2014
@@ -1,18 +1,9 @@
-.\"
-.\" This file and its contents are supplied under the terms of the
-.\" Common Development and Distribution License ("CDDL"), version 1.0.
-.\" You may only use this file in accordance with the terms of version
-.\" 1.0 of the CDDL.
-.\"
-.\" A full copy of the text of the CDDL should have accompanied this
-.\" source.  A copy of the CDDL is also available via the Internet at
-.\" http://www.illumos.org/license/CDDL.
-.\"
-.\"
-.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
-.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
-.\"
-.Dd October 18, 2012
+.\" Copyright 2014 Garrett D'Amore <garrett@damore.o
+.\" 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.
+.Dd Jul 18, 2014
 .Dt MAN 1
 .Os
 .Sh NAME
@@ -20,118 +11,391 @@
 .Nd find and display reference manual pages
 .Sh SYNOPSIS
 .Nm
-.Op Fl alptw
-.Op Fl M Ar manpath
-.Op Fl s Ar mansect
-.Ar page ...
+.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 s Ar mansect
+.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 keyword ...
+.Ar
 .Nm
-.Op Fl s Ar mansect
-.Fl k
-.Ar keyword ...
+.Op Fl M Ar path
+.Fl w
 .Sh DESCRIPTION
 The
 .Nm
-utility finds and displays reference manual pages.
+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
+.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
+.Pa /usr/share/man
+from a host on which they do reside.
+The
+.Nm
+command reformats a page whenever it is requested.
 .Pp
-Options that
+If the standard output is not a terminal, or if the
+.Fl
+flag is given,
 .Nm
-understands:
+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:
 .Bl -tag -width indent
-.It Fl M Ar manpath
-Forces a specific colon separated manual path instead of the default
-search path.
-Overrides the
-.Ev MANPATH
-environment variable.
 .It Fl a
-Display all manual pages instead of just the first found for each
-.Ar page
-argument.
-.It Fl f
-Emulate
-.Xr whatis 1 .
-.It Fl k
-Emulate
-.Xr apropos 1 .
+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
+.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
+.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
-Display the location of the manual page instead of the contents of
-the manual page.
-.It Fl p
-Output current path used for searching.
-.It Fl s Ar mansect
-Restrict manual sections searched to the specified colon delimited list.
+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
-Send the content formatted as PostScript to the default printer.
+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
-Create
+Updates the
 .Nm whatis
-databases used by
-.Xr apropos 1
-and
-.Xr whatis 1 .
+database.
 .El
-.Sh ENVIRONMENT
-The following environment variables affect the execution of
-.Nm :
-.Bl -tag -width ".Ev MANPATH"
-.It Ev LC_ALL , LC_CTYPE , LANG
-Used to find locale-specific manual pages.
-.It Ev MANPATH
-Used to find the location of the manual files.
-Corresponds to the
-.Fl M
-option.
-.It Ev MANWIDTH
-Defines the width of output. If set to
-.Dq Li tty ,
-and output is to a terminal, full width of terminal is used.
-.It Ev PAGER
-Program used to display files. If unset,
-.Dq Li "less -ins"
-is used.
-.It Ev PATH
-Used to find location of manual files if
+.Sh OPERANDS
+The following operand is supported:
+.Bl -tag -width indent
+.It Ar name
+The name of a standard utility or a keyword.
+.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,
+.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
+.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:
+.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.
+.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 "Referring to Other Manual Pages"
+If the first line of the manual page is a reference to another manual
+page entry fitting the pattern:
+.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.
+.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.
+.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
-.Fl M
-are not specified.
+.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.)
+.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 -compact
+.Bl -tag -width indent
+.It Pa /usr/share/man
+Root of the standard manual page directory subtree
+.It Pa /usr/share/man/man?/*
+Unformatted manual entries
+.It Pa /usr/share/man/whatis
+Table of contents and keyword database
 .It Pa man.cf
-Per-manpath configuration settings.  The file is formatted as follows:
-.Bd -literal -offset indent
-MANSECT=\fIsection\fR[,\fIsection\fR]...
-.Ed
-.Pp
-Each section consists of a section in the reference manual.  The file
-may also contain comment blank lines or lines consisting of comments, where
-the first character in the line is `#'.  Both blank lines and comment lines are
-ignored.
+Default search order by section
 .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
-The
-.Nm
-utility is
-.Nm Standard ,
-as is the
-.Fl k
-option. The other options are
 .Nm Committed .
 .Sh SEE ALSO
 .Xr apropos 1 ,
-.Xr intro 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 ,
-.Xr standards 5
+.Xr mdoc 5
 .Sh NOTES
-Some pages may contain information which cannot be properly displayed on
-all terminals.  In such cases, some information may be lost.
+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
+ASCII terminal. However, on a terminal some information (indicated by
+font changes, for instance) is lost.
--- old/usr/src/man/man1m/catman.1m	Sat Jul 19 14:19:58 2014
+++ new/usr/src/man/man1m/catman.1m	Sat Jul 19 14:19:58 2014
@@ -11,8 +11,8 @@
 .\"
 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
 .\"
-.Dd Jul 16, 2014
-.Dt CATAMN 1M
+.Dd Jul 19, 2014
+.Dt CATMAN 1M
 .Os
 .Sh NAME
 .Nm catman
@@ -22,6 +22,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl M Ar path
+.Op Fl w
 .Sh DESCRIPTION
 The
 .Nm
@@ -37,6 +38,7 @@
 option with
 .Xr man 1 ,
 and that command should be used instead.
+.Sh OPTIONS
 .Bl -tag -width ".Fl d"
 .It Fl M Ar path
 Generate the
@@ -45,6 +47,8 @@
 Overrides the
 .Ev MANPATH
 environment variable.
+.It Fl w
+This option is present for backwards compatibility, and is ignored.
 .El
 .Sh ENVIRONMENT
 The following environment variables affect the execution of
@@ -56,10 +60,8 @@
 .Nm whatis
 database files.
 .El
-.Sh DIAGNOSTICS
-The
-.Nm
-utility exits 0 on success, and non-zero otherwise.
+.Sh EXIT STATUS
+.Ex -std
 .Sh INTERFACE STABILITY
 .Nm "Obsolete Committed" .
 .Sh CODE SET INDEPENDENCE
--- old/usr/src/man/man5/eqn.5	Sat Jul 19 14:19:58 2014
+++ new/usr/src/man/man5/eqn.5	Sat Jul 19 14:19:58 2014
@@ -15,7 +15,7 @@
 .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
 .\"
-.Dd Sep 25, 2011
+.Dd Jul 19, 2014
 .Dt EQN 5
 .Os
 .Sh NAME
@@ -167,7 +167,9 @@
 .Pp
 .D1 gfont Ar font
 .Pp
-In mandoc, this value is discarded.
+In
+.Xr mandoc 1 ,
+this value is discarded.
 .It Cm gsize
 Set the default size of subsequent output.
 Its syntax is as follows:
@@ -179,7 +181,9 @@
 value should be an integer.
 .It Cm set
 Set an equation mode.
-In mandoc, both arguments are thrown away.
+In
+.Xr mandoc 1 ,
+both arguments are thrown away.
 Its syntax is as follows:
 .Pp
 .D1 set Ar key val
@@ -205,9 +209,11 @@
 This statement is a GNU extension.
 .El
 .Sh COMPATIBILITY
-This section documents the compatibility of mandoc
+This section documents the compatibility of
+.Xr mandoc 1
 .Nm
-and the troff
+and the
+.Xr troff 1
 .Nm
 implementation (including GNU troff).
 .Pp
@@ -215,14 +221,23 @@
 .It
 The text string
 .Sq \e\*q
-is interpreted as a literal quote in troff.
-In mandoc, this is interpreted as a comment.
+is interpreted as a literal quote in
+.Xr troff 1 .
+In
+.Xr mandoc 1 ,
+this is interpreted as a comment.
 .It
-In troff, The circumflex and tilde white-space symbols map to
+In
+.Xr troff 1 ,
+The circumflex and tilde white-space symbols map to
 fixed-width spaces.
-In mandoc, these characters are synonyms for the space character.
+In
+.Xr mandoc 1 ,
+these characters are synonyms for the space character.
 .It
-The troff implementation of
+The
+.Xr troff 1 ,
+implementation of
 .Nm
 allows for equation alignment with the
 .Cm mark
@@ -229,7 +244,8 @@
 and
 .Cm lineup
 tokens.
-mandoc discards these tokens.
+.Xr mandoc 1
+discards these tokens.
 The
 .Cm back Ar n ,
 .Cm fwd Ar n ,
@@ -240,7 +256,7 @@
 .El
 .Sh SEE ALSO
 .Xr mandoc 1 ,
-.Xr man 7 ,
+.Xr man 5 ,
 .Xr mandoc_char 5 ,
 .Xr mdoc 5 ,
 .Xr roff 5
--- old/usr/src/man/man5/man.5	Sat Jul 19 14:19:58 2014
+++ new/usr/src/man/man5/man.5	Sat Jul 19 14:19:58 2014
@@ -1,913 +1,253 @@
-.\"
-.\" 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 (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
-.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
-.\"
-.Dd Jan 3, 2012
+.\" Copyright (c) 1995, 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]
+.Dd "Jul 19, 2014"
 .Dt MAN 5
 .Os
 .Sh NAME
 .Nm man
-.Nd legacy formatting language for manual pages
+.Nd macros to format Reference Manual pages
+.Sh SYNOPSIS
+.Nm mandoc
+.Fl T Ar man
+.Ar
+.Nm nroff
+.Fl man
+.Ar
+.Nm troff
+.Fl man
+.Ar
 .Sh DESCRIPTION
-Traditionally, the
-.Nm man
-language has been used to write
-.Ux
-manuals for the
+These macros are used to lay out the reference pages in this manual. Note: if
+.Ar file
+contains format input for a preprocessor, the commands shown
+above must be piped through the appropriate preprocessor. This is handled
+automatically by the
 .Xr man 1
-utility.
-It supports limited control of presentational details like fonts,
-indentation and spacing.
-This reference document describes the structure of manual pages
-and the syntax and usage of the man language.
+command. See the
+.Sx Conventions
+section.
+.Lp
+Any text argument
+.Ar t
+may be zero to six words. Quotes may be used to
+include SPACE characters in a
+.Qq word .
+If
+.Ar text
+is empty, the special
+treatment is applied to the next input line with text to be printed. In this
+way
+.Nm \&.I
+may be used to italicize a whole line, or
+.Nm \&.SB
+may be used to make small bold letters.
+.Lp
+A prevailing indent distance is remembered between successive indented
+paragraphs, and is reset to default value upon reaching a non-indented
+paragraph.  Default units for indents
+.Nm i
+are ens.
+.Lp
+Type font and size are reset to default values before each paragraph, and after
+processing font and size setting macros.
 .Pp
-.Bf -emphasis
-Do not use
-.Nm
-to write your manuals:
-.Ef
-It lacks support for semantic markup.
-Use the
-.Xr mdoc 5
-language, instead.
-.Pp
-In a
-.Nm
-document, lines beginning with the control character
-.Sq \&.
-are called
-.Dq macro lines .
-The first word is the macro name.
-It usually consists of two capital letters.
-For a list of available macros, see
-.Sx MACRO OVERVIEW .
-The words following the macro name are arguments to the macro.
-.Pp
-Lines not beginning with the control character are called
-.Dq text lines .
-They provide free-form text to be printed; the formatting of the text
-depends on the respective processing context:
-.Bd -literal -offset indent
-\&.SH Macro lines change control state.
-Text lines are interpreted within the current state.
-.Ed
-.Pp
-Many aspects of the basic syntax of the
-.Nm
-language are based on the
-.Xr roff 5
-language; see the
-.Em LANGUAGE SYNTAX
-and
-.Em MACRO SYNTAX
-sections in the
-.Xr roff 5
-manual for details, in particular regarding
-comments, escape sequences, whitespace, and quoting.
-.Sh MANUAL STRUCTURE
-Each
-.Nm
-document must contain the
-.Sx \&TH
-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
-.Sx \&TH ,
-at least one macro or text line must appear in the document.
-.Pp
-The following is a well-formed skeleton
-.Nm
-file for a utility
-.Qq progname :
-.Bd -literal -offset indent
-\&.TH PROGNAME 1 "Oct 10, 2009"
-\&.SH NAME
-\efBprogname\efR \e(en a description goes here
-\&.\e\(dq .SH LIBRARY
-\&.\e\(dq For sections 2 & 3 only.
-\&.SH SYNOPSIS
-\efBprogname\efR [\efB\e-options\efR] arguments...
-\&.SH DESCRIPTION
-The \efBfoo\efR utility processes files...
-\&.\e\(dq .SH IMPLEMENTATION NOTES
-\&.\e\(dq .SH RETURN VALUES
-\&.\e\(dq For sections 2, 3, & 9 only.
-\&.\e\(dq .SH ENVIRONMENT
-\&.\e\(dq For sections 1, 1M, 5, & 6 only.
-\&.\e\(dq .SH FILES
-\&.\e\(dq .SH EXIT STATUS
-\&.\e\(dq For sections 1, 1M, & 6 only.
-\&.\e\(dq .SH EXAMPLES
-\&.\e\(dq .SH DIAGNOSTICS
-\&.\e\(dq For sections 1, 1M, 5, 6, & 7 only.
-\&.\e\(dq .SH ERRORS
-\&.\e\(dq For sections 2, 3, & 9 only.
-\&.\e\(dq .SH SEE ALSO
-\&.\e\(dq .BR foo ( 1 )
-\&.\e\(dq .SH STANDARDS
-\&.\e\(dq .SH HISTORY
-\&.\e\(dq .SH AUTHORS
-\&.\e\(dq .SH CAVEATS
-\&.\e\(dq .SH BUGS
-\&.\e\(dq .SH SECURITY CONSIDERATIONS
-.Ed
-.Pp
-The sections in a
-.Nm
-document are conventionally ordered as they appear above.
-Sections should be composed as follows:
-.Bl -ohang -offset indent
-.It Em NAME
-The name(s) and a short description of the documented material.
-The syntax for this is generally as follows:
-.Pp
-.D1 \efBname\efR \e(en description
-.It Em LIBRARY
-The name of the library containing the documented material, which is
-assumed to be a function in a section 2 or 3 manual.
-For functions in the C library, this may be as follows:
-.Pp
-.D1 Standard C Library (libc, -lc)
-.It Em SYNOPSIS
-Documents the utility invocation syntax, function call syntax, or device
-configuration.
-.Pp
-For the first, utilities (sections 1, 1M, and 6), this is
-generally structured as follows:
-.Pp
-.D1 \efBname\efR [-\efBab\efR] [-\efBc\efR\efIarg\efR] \efBpath\efR...
-.Pp
-For the second, function calls (sections 2, 3, 9):
-.Pp
-.D1 \&.B char *name(char *\efIarg\efR);
-.Pp
-And for the third, configurations (section 7):
-.Pp
-.D1 \&.B name* at cardbus ? function ?
-.Pp
-Manuals not in these sections generally don't need a
-.Em SYNOPSIS .
-.It Em DESCRIPTION
-This expands upon the brief, one-line description in
-.Em NAME .
-It usually contains a break-down of the options (if documenting a
-command).
-.It Em IMPLEMENTATION NOTES
-Implementation-specific notes should be kept here.
-This is useful when implementing standard functions that may have side
-effects or notable algorithmic implications.
-.It Em RETURN VALUES
-This section documents the return values of functions in sections 2, 3, and 9.
-.It Em ENVIRONMENT
-Documents any usages of environment variables, e.g.,
-.Xr environ 5 .
-.It Em FILES
-Documents files used.
-It's helpful to document both the file name and a short description of how
-the file is used (created, modified, etc.).
-.It Em EXIT STATUS
-This section documents the command exit status for
-section 1, 6, and 8 utilities.
-Historically, this information was described in
-.Em DIAGNOSTICS ,
-a practise that is now discouraged.
-.It Em EXAMPLES
-Example usages.
-This often contains snippets of well-formed,
-well-tested invocations.
-Make sure that examples work properly!
-.It Em DIAGNOSTICS
-Documents error conditions.
-This is most useful in section 4 manuals.
-Historically, this section was used in place of
-.Em EXIT STATUS
-for manuals in sections 1, 6, and 8; however, this practise is
-discouraged.
-.It Em ERRORS
-Documents error handling in sections 2, 3, and 9.
-.It Em SEE ALSO
-References other manuals with related topics.
-This section should exist for most manuals.
-.Pp
-.D1 \&.BR bar \&( 1 \&),
-.Pp
-Cross-references should conventionally be ordered
-first by section, then alphabetically.
-.It Em STANDARDS
-References any standards implemented or used, such as
-.Pp
-.D1 IEEE Std 1003.2 (\e(lqPOSIX.2\e(rq)
-.Pp
-If not adhering to any standards, the
-.Em HISTORY
-section should be used.
-.It Em HISTORY
-A brief history of the subject, including where support first appeared.
-.It Em AUTHORS
-Credits to the person or persons who wrote the code and/or documentation.
-Authors should generally be noted by both name and email address.
-.It Em CAVEATS
-Common misuses and misunderstandings should be explained
-in this section.
-.It Em BUGS
-Known bugs, limitations, and work-arounds should be described
-in this section.
-.It Em SECURITY CONSIDERATIONS
-Documents any security precautions that operators should consider.
+These strings are predefined by
+.Nm -man :
+.Bl -tag -width Ds
+.It Nm \e*R
+.Sq \(rg ,
+.Sq (Reg)
+in
+.Nm nroff .
+.It Nm \e*S
+Change to default type size.
 .El
-.Sh MACRO OVERVIEW
-This overview is sorted such that macros of similar purpose are listed
-together, to help find the best macro for any given purpose.
-Deprecated macros are not included in the overview, but can be found
-in the alphabetical reference below.
-.Ss Page header and footer meta-data
-.Bl -column "PP, LP, P" description
-.It Sx TH Ta set the title: Ar title section date Op Ar source Op Ar volume
-.It Sx AT Ta display AT&T UNIX version in the page footer (<= 1 argument)
-.It Sx UC Ta display BSD version in the page footer (<= 1 argument)
+.Sh "Requests"
+* n.t.l. = next text line; p.i. = prevailing indent
+.Bl -column ".TH n s d f m" "Cause " "t=n.t.l.*" "Explanation " -offset Ds
+.It Sy Request	Sy Cause	Sy "If No"	Sy Explanation
+.It ""	Sy Break 	Sy "Argument"	""
+.It Nm \&.B Ar "t"	no 	Ar t Ns =n.t.l.*	Text is in bold font.
+.It Nm \&.BI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and italic.
+.It Nm \&.BR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating bold and roman.
+.It Nm \&.DT	no	Li \&.5i 1i...	Restore default tabs.
+.It Nm \&.HP Ar i	yes	Ar i Ns =p.i.*	"Begin paragraph with hanging indent. Set prevailing indent to" Ar i .
+.It Nm \&.I Ar t	no	Ar t Ns =n.t.l.	Text is italic.
+.It Nm \&.IB Ar t	no	Ar t Ns =n.t.l.	Join words, altenrating italic and bold.
+.It Nm \&.IP Ar x Ar i	yes	Ar x Ns =""	Same as
+.Nm \&.TP
+with tag
+.Ar x .
+.It Nm \&.IR Ar t	no	Ar t Ns =n.t.l.	Join words, alternating italic and roman.
+.It Nm \&.IX Ar t	no	-	Index macro, not used (obsolete).
+.It Nm \&.LP	yes	-	Begin left-aligned paragraph. Set prevailing indent to .5i.
+.It Nm \&.P	yes	-	Same as
+.Nm \&.LP .
+.It Nm \&.PD Ar d	no	Ar d Ns =.4v	Set vertical distance between paragraphs.
+.It Nm \&.PP	yes	-	Same as
+.Nm \&.LP .
+.It Nm \&.RE	yes	-	End of relative indent. Restores prevailing indent.
+.It Nm \&.RB Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and bold.
+.It Nm \&.RI Ar t	no	Ar t Ns =n.t.l.	Join words, alternating roman and italic.
+.It Nm \&.RS Ar i	yes	Ar i Ns =p.i.	Start relative indent, increase indent by Ar i .
+Sets prevailing indent to .5i for nested indents.
+.It Nm \&.SB Ar t	no	-	Reduce size of text by 1 point, make text bold.
+.It Nm \&.SH Ar t	yes	-	Section Heading.
+.It Nm \&.SM Ar t	no	Ar t Ns =n.t.l.	Reduce size of text by 1 point.
+.It Nm \&.SS Ar t	yes	Ar t Ns =n.t.l.	Section Subheading.
+.It Nm \&.TH Ar n s d f m	yes	-	Begin reference page Ar n , No of section Ar s ; Ar d No is the date of the most recent change.  If present, Ar f No is the left page footer; Ar m No is the main page (center) header.  Sets prevailing indent and tabs to .5i.
+.It Nm \&.TP Ar i	yes	Ar i Ns =p.i.	Begin indented paragraph, with the tag given on the next text line. Set prevailing indent to
+.Ar i .
+.It Nm \&.TX Ar t p	no	-	Resolve the title abbreviation Ar t ; No join to punctuation mark (or text) Ar p .
 .El
-.Ss Sections and paragraphs
-.Bl -column "PP, LP, P" description
-.It Sx SH Ta section header (one line)
-.It Sx SS Ta subsection header (one line)
-.It Sx PP , LP , P Ta start an undecorated paragraph (no arguments)
-.It Sx RS , RE Ta reset the left margin: Op Ar width
-.It Sx IP Ta indented paragraph: Op Ar head Op Ar width
-.It Sx TP Ta tagged paragraph: Op Ar width
-.It Sx HP Ta hanged paragraph: Op Ar width
-.It Sx \&br Ta force output line break in text mode (no arguments)
-.It Sx \&sp Ta force vertical space: Op Ar height
-.It Sx fi , nf Ta fill mode and no-fill mode (no arguments)
-.It Sx in Ta additional indent: Op Ar width
-.El
-.Ss Physical markup
-.Bl -column "PP, LP, P" description
-.It Sx B Ta boldface font
-.It Sx I Ta italic font
-.It Sx R Ta roman (default) font
-.It Sx SB Ta small boldface font
-.It Sx SM Ta small roman font
-.It Sx BI Ta alternate between boldface and italic fonts
-.It Sx BR Ta alternate between boldface and roman fonts
-.It Sx IB Ta alternate between italic and boldface fonts
-.It Sx IR Ta alternate between italic and roman fonts
-.It Sx RB Ta alternate between roman and boldface fonts
-.It Sx RI Ta alternate between roman and italic fonts
-.El
-.Ss Semantic markup
-.Bl -column "PP, LP, P" description
-.It Sx OP Ta optional arguments
-.El
-.Sh MACRO REFERENCE
-This section is a canonical reference to all macros, arranged
-alphabetically.
-For the scoping of individual macros, see
-.Sx MACRO SYNTAX .
-.Ss \&AT
-Sets the volume for the footer for compatibility with man pages from
-.Tn AT&T UNIX
-releases.
-The optional arguments specify which release it is from.
-.Ss \&B
-Text is rendered in bold face.
-.Pp
-See also
-.Sx \&I
-and
-.Sx \&R .
-.Ss \&BI
-Text is rendered alternately in bold face and italic.
-Thus,
-.Sq .BI this word and that
-causes
-.Sq this
-and
-.Sq and
-to render in bold face, while
-.Sq word
-and
-.Sq that
-render in italics.
-Whitespace between arguments is omitted in output.
-.Pp
-Examples:
-.Pp
-.Dl \&.BI bold italic bold italic
-.Pp
-The output of this example will be emboldened
-.Dq bold
-and italicised
-.Dq italic ,
-with spaces stripped between arguments.
-.Pp
-See also
-.Sx \&IB ,
-.Sx \&BR ,
-.Sx \&RB ,
-.Sx \&RI ,
-and
-.Sx \&IR .
-.Ss \&BR
-Text is rendered alternately in bold face and roman (the default font).
-Whitespace between arguments is omitted in output.
-.Pp
-See
-.Sx \&BI
-for an equivalent example.
-.Pp
-See also
-.Sx \&BI ,
-.Sx \&IB ,
-.Sx \&RB ,
-.Sx \&RI ,
-and
-.Sx \&IR .
-.Ss \&DT
-Has no effect.
-Included for compatibility.
-.Ss \&HP
-Begin a paragraph whose initial output line is left-justified, but
-subsequent output lines are indented, with the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&HP
-.Op Cm width
-.Ed
-.Pp
-The
-.Cm width
-argument must conform to
-.Sx Scaling Widths .
-If specified, it's saved for later paragraph left-margins; if unspecified, the
-saved or default width is used.
-.Pp
-See also
-.Sx \&IP ,
-.Sx \&LP ,
-.Sx \&P ,
-.Sx \&PP ,
-and
-.Sx \&TP .
-.Ss \&I
-Text is rendered in italics.
-.Pp
-See also
-.Sx \&B
-and
-.Sx \&R .
-.Ss \&IB
-Text is rendered alternately in italics and bold face.
-Whitespace between arguments is omitted in output.
-.Pp
-See
-.Sx \&BI
-for an equivalent example.
-.Pp
-See also
-.Sx \&BI ,
-.Sx \&BR ,
-.Sx \&RB ,
-.Sx \&RI ,
-and
-.Sx \&IR .
-.Ss \&IP
-Begin an indented paragraph with the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&IP
-.Op Cm head Op Cm width
-.Ed
-.Pp
-The
-.Cm width
-argument defines the width of the left margin and is defined by
-.Sx Scaling Widths .
-It's saved for later paragraph left-margins; if unspecified, the saved or
-default width is used.
-.Pp
-The
-.Cm head
-argument is used as a leading term, flushed to the left margin.
-This is useful for bulleted paragraphs and so on.
-.Pp
-See also
-.Sx \&HP ,
-.Sx \&LP ,
-.Sx \&P ,
-.Sx \&PP ,
-and
-.Sx \&TP .
-.Ss \&IR
-Text is rendered alternately in italics and roman (the default font).
-Whitespace between arguments is omitted in output.
-.Pp
-See
-.Sx \&BI
-for an equivalent example.
-.Pp
-See also
-.Sx \&BI ,
-.Sx \&IB ,
-.Sx \&BR ,
-.Sx \&RB ,
-and
-.Sx \&RI .
-.Ss \&LP
-Begin an undecorated paragraph.
-The scope of a paragraph is closed by a subsequent paragraph,
-sub-section, section, or end of file.
-The saved paragraph left-margin width is reset to the default.
-.Pp
-See also
-.Sx \&HP ,
-.Sx \&IP ,
-.Sx \&P ,
-.Sx \&PP ,
-and
-.Sx \&TP .
-.Ss \&OP
-Optional command-line argument.
-This has the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&OP
-.Cm key Op Cm value
-.Ed
-.Pp
-The
-.Cm key
-is usually a command-line flag and
-.Cm value
-its argument.
-.Ss \&P
-Synonym for
-.Sx \&LP .
-.Pp
-See also
-.Sx \&HP ,
-.Sx \&IP ,
-.Sx \&LP ,
-.Sx \&PP ,
-and
-.Sx \&TP .
-.Ss \&PP
-Synonym for
-.Sx \&LP .
-.Pp
-See also
-.Sx \&HP ,
-.Sx \&IP ,
-.Sx \&LP ,
-.Sx \&P ,
-and
-.Sx \&TP .
-.Ss \&R
-Text is rendered in roman (the default font).
-.Pp
-See also
-.Sx \&I
-and
-.Sx \&B .
-.Ss \&RB
-Text is rendered alternately in roman (the default font) and bold face.
-Whitespace between arguments is omitted in output.
-.Pp
-See
-.Sx \&BI
-for an equivalent example.
-.Pp
-See also
-.Sx \&BI ,
-.Sx \&IB ,
-.Sx \&BR ,
-.Sx \&RI ,
-and
-.Sx \&IR .
-.Ss \&RE
-Explicitly close out the scope of a prior
-.Sx \&RS .
-The default left margin is restored to the state of the original
-.Sx \&RS
-invocation.
-.Ss \&RI
-Text is rendered alternately in roman (the default font) and italics.
-Whitespace between arguments is omitted in output.
-.Pp
-See
-.Sx \&BI
-for an equivalent example.
-.Pp
-See also
-.Sx \&BI ,
-.Sx \&IB ,
-.Sx \&BR ,
-.Sx \&RB ,
-and
-.Sx \&IR .
-.Ss \&RS
-Temporarily reset the default left margin.
-This has the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&RS
-.Op Cm width
-.Ed
-.Pp
-The
-.Cm width
-argument must conform to
-.Sx Scaling Widths .
-If not specified, the saved or default width is used.
-.Pp
-See also
-.Sx \&RE .
-.Ss \&SB
-Text is rendered in small size (one point smaller than the default font)
-bold face.
-.Ss \&SH
-Begin a section.
-The scope of a section is only closed by another section or the end of
-file.
-The paragraph left-margin width is reset to the default.
-.Ss \&SM
-Text is rendered in small size (one point smaller than the default
-font).
-.Ss \&SS
-Begin a sub-section.
-The scope of a sub-section is closed by a subsequent sub-section,
-section, or end of file.
-The paragraph left-margin width is reset to the default.
-.Ss \&TH
-Sets the title of the manual page with the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&TH
-.Ar title section date
-.Op Ar source Op Ar volume
-.Ed
-.Pp
-Conventionally, the document
-.Ar title
-is given in all caps.
-The recommended
-.Ar date
-format is
-.Sy YYYY-MM-DD
-as specified in the ISO-8601 standard;
-if the argument does not conform, it is printed verbatim.
-If the
-.Ar date
-is empty or not specified, the current date is used.
-The optional
-.Ar source
-string specifies the organisation providing the utility.
-The
-.Ar volume
-string replaces the default rendered volume, which is dictated by the
-manual section.
-.Pp
-Examples:
-.Pp
-.Dl \&.TH CVS 5 "1992-02-12" GNU
-.Ss \&TP
-Begin a paragraph where the head, if exceeding the indentation width, is
-followed by a newline; if not, the body follows on the same line after a
-buffer to the indentation width.
-Subsequent output lines are indented.
-The syntax is as follows:
-.Bd -filled -offset indent
-.Pf \. Sx \&TP
-.Op Cm width
-.Ed
-.Pp
-The
-.Cm width
-argument must conform to
-.Sx Scaling Widths .
-If specified, it's saved for later paragraph left-margins; if
-unspecified, the saved or default width is used.
-.Pp
-See also
-.Sx \&HP ,
-.Sx \&IP ,
-.Sx \&LP ,
-.Sx \&P ,
-and
-.Sx \&PP .
-.Ss \&UC
-Sets the volume for the footer for compatibility with man pages from
-BSD releases.
-The optional first argument specifies which release it is from.
-.Ss \&br
-Breaks the current line.
-Consecutive invocations have no further effect.
-.Pp
-See also
-.Sx \&sp .
-.Ss \&fi
-End literal mode begun by
-.Sx \&nf .
-.Ss \&ft
-Change the current font mode.
-See
-.Sx Text Decoration
-for a listing of available font modes.
-.Ss \&in
-Indent relative to the current indentation:
-.Pp
-.D1 Pf \. Sx \&in Op Cm width
-.Pp
-If
-.Cm width
-is signed, the new offset is relative.
-Otherwise, it is absolute.
-This value is reset upon the next paragraph, section, or sub-section.
-.Ss \&na
-Don't align to the right margin.
-.Ss \&nf
-Begin literal mode: all subsequent free-form lines have their end of
-line boundaries preserved.
-May be ended by
-.Sx \&fi .
-Literal mode is implicitly ended by
-.Sx \&SH
-or
-.Sx \&SS .
-.Ss \&sp
-Insert vertical spaces into output with the following syntax:
-.Bd -filled -offset indent
-.Pf \. Sx \&sp
-.Op Cm height
-.Ed
-.Pp
-Insert
-.Cm height
-spaces, which must conform to
-.Sx Scaling Widths .
-If 0, this is equivalent to the
-.Sx \&br
-macro.
-Defaults to 1, if unspecified.
-.Pp
-See also
-.Sx \&br .
-.Sh MACRO SYNTAX
-The
+.Ss "Conventions"
+When formatting a manual page,
 .Nm
-macros are classified by scope: line scope or block scope.
-Line macros are only scoped to the current line (and, in some
-situations, the subsequent line).
-Block macros are scoped to the current line and subsequent lines until
-closed by another block macro.
-.Ss Line Macros
-Line macros are generally scoped to the current line, with the body
-consisting of zero or more arguments.
-If a macro is scoped to the next line and the line arguments are empty,
-the next line, which must be text, is used instead.
-Thus:
-.Bd -literal -offset indent
-\&.I
-foo
-.Ed
-.Pp
-is equivalent to
-.Sq \&.I foo .
-If next-line macros are invoked consecutively, only the last is used.
-If a next-line macro is followed by a non-next-line macro, an error is
-raised, except for
-.Sx \&br ,
-.Sx \&sp ,
-and
-.Sx \&na .
-.Pp
-The syntax is as follows:
-.Bd -literal -offset indent
-\&.YO \(lBbody...\(rB
-\(lBbody...\(rB
-.Ed
-.Bl -column "MacroX" "ArgumentsX" "ScopeXXXXX" "CompatX" -offset indent
-.It Em Macro Ta Em Arguments Ta Em Scope     Ta Em Notes
-.It Sx \&AT  Ta    <=1       Ta    current   Ta    \&
-.It Sx \&B   Ta    n         Ta    next-line Ta    \&
-.It Sx \&BI  Ta    n         Ta    current   Ta    \&
-.It Sx \&BR  Ta    n         Ta    current   Ta    \&
-.It Sx \&DT  Ta    0         Ta    current   Ta    \&
-.It Sx \&I   Ta    n         Ta    next-line Ta    \&
-.It Sx \&IB  Ta    n         Ta    current   Ta    \&
-.It Sx \&IR  Ta    n         Ta    current   Ta    \&
-.It Sx \&OP  Ta    0, 1      Ta    current   Ta    compat
-.It Sx \&R   Ta    n         Ta    next-line Ta    \&
-.It Sx \&RB  Ta    n         Ta    current   Ta    \&
-.It Sx \&RI  Ta    n         Ta    current   Ta    \&
-.It Sx \&SB  Ta    n         Ta    next-line Ta    \&
-.It Sx \&SM  Ta    n         Ta    next-line Ta    \&
-.It Sx \&TH  Ta    >1, <6    Ta    current   Ta    \&
-.It Sx \&UC  Ta    <=1       Ta    current   Ta    \&
-.It Sx \&br  Ta    0         Ta    current   Ta    compat
-.It Sx \&fi  Ta    0         Ta    current   Ta    compat
-.It Sx \&ft  Ta    1         Ta    current   Ta    compat
-.It Sx \&in  Ta    1         Ta    current   Ta    compat
-.It Sx \&na  Ta    0         Ta    current   Ta    compat
-.It Sx \&nf  Ta    0         Ta    current   Ta    compat
-.It Sx \&sp  Ta    1         Ta    current   Ta    compat
+examines the first line to determine
+whether it requires special processing. For example a first line consisting of:
+.Lp
+.Dl \&'\e" t
+.Lp
+indicates that the manual page must be run through the
+.Xr tbl 1
+preprocessor.
+.Lp
+A typical manual page for a command or function is laid out as follows:
+.Bl -tag -width ".SH RETURN VALUES"
+.
+.It Nm \&.TH Ar title Op "1-9"
+.
+The name of the command or function, which serves as the title of the manual
+page. This is followed by the number of the section in which it appears.
+.
+.It Nm SH NAME
+.
+The name, or list of names, by which the command is called, followed by a dash
+and then a one-line summary of the action performed. All in roman font, this
+section contains no
+.Xr troff 1
+commands or escapes, and no macro requests.
+It is used to generate the database used by the
+.Xr whatis 1
+command.
+.
+.It Nm SH SYNOPSIS
+.Bl -tag -width "Functions:"
+.It Sy Commands:
+The syntax of the command and its arguments, as typed on the command line.
+When in boldface, a word must be typed exactly as printed.  When in italics, a
+word can be replaced with an argument that you supply. References to bold or
+italicized items are not capitalized in other sections, even when they begin a
+sentence.
+.Lp
+Syntactic symbols appear in roman face:
+.Bl -tag -width "   "
+.It Op " "
+An argument, when surrounded by brackets is optional.
+.It |
+Arguments separated by a vertical bar are exclusive. You can supply only one
+item from such a list.
+.It \&.\|.\|.
+Arguments followed by an ellipsis can be repeated. When an ellipsis follows a
+bracketed set, the expression within the brackets can be repeated.
 .El
-.Pp
-Macros marked as
-.Qq compat
-are included for compatibility with the significant corpus of existing
-manuals that mix dialects of roff.
-These macros should not be used for portable
-.Nm
-manuals.
-.Ss Block Macros
-Block macros comprise a head and body.
-As with in-line macros, the head is scoped to the current line and, in
-one circumstance, the next line (the next-line stipulations as in
-.Sx Line Macros
-apply here as well).
-.Pp
-The syntax is as follows:
-.Bd -literal -offset indent
-\&.YO \(lBhead...\(rB
-\(lBhead...\(rB
-\(lBbody...\(rB
-.Ed
-.Pp
-The closure of body scope may be to the section, where a macro is closed
-by
-.Sx \&SH ;
-sub-section, closed by a section or
-.Sx \&SS ;
-part, closed by a section, sub-section, or
-.Sx \&RE ;
-or paragraph, closed by a section, sub-section, part,
-.Sx \&HP ,
-.Sx \&IP ,
-.Sx \&LP ,
-.Sx \&P ,
-.Sx \&PP ,
-or
-.Sx \&TP .
-No closure refers to an explicit block closing macro.
-.Pp
-As a rule, block macros may not be nested; thus, calling a block macro
-while another block macro scope is open, and the open scope is not
-implicitly closed, is syntactically incorrect.
-.Bl -column "MacroX" "ArgumentsX" "Head ScopeX" "sub-sectionX" "compatX" -offset indent
-.It Em Macro Ta Em Arguments Ta Em Head Scope Ta Em Body Scope  Ta Em Notes
-.It Sx \&HP  Ta    <2        Ta    current    Ta    paragraph   Ta    \&
-.It Sx \&IP  Ta    <3        Ta    current    Ta    paragraph   Ta    \&
-.It Sx \&LP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
-.It Sx \&P   Ta    0         Ta    current    Ta    paragraph   Ta    \&
-.It Sx \&PP  Ta    0         Ta    current    Ta    paragraph   Ta    \&
-.It Sx \&RE  Ta    0         Ta    current    Ta    none        Ta    compat
-.It Sx \&RS  Ta    1         Ta    current    Ta    part        Ta    compat
-.It Sx \&SH  Ta    >0        Ta    next-line  Ta    section     Ta    \&
-.It Sx \&SS  Ta    >0        Ta    next-line  Ta    sub-section Ta    \&
-.It Sx \&TP  Ta    n         Ta    next-line  Ta    paragraph   Ta    \&
+.It Sy Functions:
+If required, the data declaration, or
+.Li #include
+directive, is shown first,
+followed by the  function declaration. Otherwise, the function declaration is
+shown.
 .El
-.Pp
-Macros marked
-.Qq compat
-are as mentioned in
-.Sx Line Macros .
-.Pp
-If a block macro is next-line scoped, it may only be followed by in-line
-macros for decorating text.
-.Ss Font handling
-In
-.Nm
-documents, both
-.Sx Physical markup
-macros and
-.Xr roff 5
-.Ql \ef
-font escape sequences can be used to choose fonts.
-In text lines, the effect of manual font selection by escape sequences
-only lasts until the next macro invocation; in macro lines, it only lasts
-until the end of the macro scope.
-Note that macros like
-.Sx \&BR
-open and close a font scope for each argument.
-.Sh COMPATIBILITY
-This section documents areas of questionable portability between
-implementations of the
-.Nm
-language.
-.Pp
-.Bl -dash -compact
-.It
-Do not depend on
-.Sx \&SH
-or
-.Sx \&SS
-to close out a literal context opened with
-.Sx \&nf .
-This behaviour may not be portable.
-.It
-In quoted literals, GNU troff allowed pair-wise double-quotes to produce
-a standalone double-quote in formatted output.
-It is not known whether this behaviour is exhibited by other formatters.
-.It
-troff suppresses a newline before
-.Sq \(aq
-macro output; in mandoc, it is an alias for the standard
-.Sq \&.
-control character.
-.It
-The
-.Sq \eh
-.Pq horizontal position ,
-.Sq \ev
-.Pq vertical position ,
-.Sq \em
-.Pq text colour ,
-.Sq \eM
-.Pq text filling colour ,
-.Sq \ez
-.Pq zero-length character ,
-.Sq \ew
-.Pq string length ,
-.Sq \ek
-.Pq horizontal position marker ,
-.Sq \eo
-.Pq text overstrike ,
-and
-.Sq \es
-.Pq text size
-escape sequences are all discarded in mandoc.
-.It
-The
-.Sq \ef
-scaling unit is accepted by mandoc, but rendered as the default unit.
-.It
-The
-.Sx \&sp
-macro does not accept negative values in mandoc.
-In GNU troff, this would result in strange behaviour.
-.It
-In page header lines, GNU troff versions up to and including 1.21
-only print
-.Ar volume
-names explicitly specified in the
-.Sx \&TH
-macro; mandoc and newer groff print the default volume name
-corresponding to the
-.Ar section
-number when no
-.Ar volume
-is given, like in
-.Xr mdoc 5 .
+.
+.It Nm \&.SH DESCRIPTION
+.
+A narrative overview of the command or function's external behavior. This
+includes how it interacts with files or data, and how it handles the standard
+input, standard output and standard error. Internals and implementation details
+are normally omitted. This section attempts to provide a succinct overview in
+answer to the question, "what does it do?"
+.Lp
+Literal text from the synopsis appears in constant width, as do literal
+filenames and references to items that appear elsewhere in the  reference
+manuals. Arguments are italicized.
+.Lp
+If a command interprets either subcommands or an input grammar, its command
+interface or input grammar is normally described in a
+.Nm USAGE
+section, which follows the
+.Nm OPTIONS
+section.  The
+.Nm DESCRIPTION
+section only
+describes the behavior of the command itself, not that of subcommands.
+.
+.It Nm \&.SH OPTIONS
+.
+The list of options along with a description of how each affects the command's
+operation.
+.
+.It Nm \&.SH RETURN VALUES
+.
+A list of the values the library routine will return to the calling  program
+and the conditions that cause these values to be returned.
+.
+.It Nm \&.SH EXIT STATUS
+.
+A list of the values the utility will return to the calling  program or shell,
+and the conditions that cause these values to be  returned.
+.
+.It Nm \&.SH FILES
+.
+A list of files associated with the command or function.
+.
+.It Nm \&.SH SEE ALSO
+.
+A comma-separated list of related manual pages, followed by references to other
+published materials.
+.
+.It Nm \&.SH DIAGNOSTICS
+.
+A list of diagnostic messages and an explanation of each.
+.
+.It Nm \&.SH BUGS
+.
+A description of limitations, known defects, and possible problems associated
+with the command or function.
 .El
-.Pp
+.Sh FILES
+.Pa /usr/share/man/whatis
+.Sh NOTES
 The
-.Sx OP
-macro is part of the extended
 .Nm
-macro set, and may not be portable to non-GNU troff implementations.
+package should not be used for new documentation.  The
+.Xr mdoc 5 ,
+package is preferred, as it uses semantic markup rather than physical markup.
+.Sh CODE SET INDEPENDENCE
+When processed with
+.Xr mandoc 1 ,
+this package is Code Set Independent. However, when processed with
+legacy tools such as
+.Xr nroff 1
+and
+.Xr troff 1 ,
+the use of multi-byte characters may not be supported.
 .Sh INTERFACE STABILITY
-.Nm "Obsolete Committed" .
+.Nm Obsolete Committed .
+The
+.Xr mdoc 5
+package should be used instead.
 .Sh SEE ALSO
+.Xr eqn 1 ,
 .Xr man 1 ,
 .Xr mandoc 1 ,
-.Xr eqn 5 ,
-.Xr mandoc_char 5 ,
+.Xr nroff 1 ,
+.Xr troff 1 ,
+.Xr tbl 1 ,
+.Xr whatis 1 ,
 .Xr mdoc 5 ,
-.Xr roff 5 ,
-.Xr tbl 5
-.Sh HISTORY
-The
-.Nm
-language first appeared as a macro package for the roff typesetting
-system in
-.At v7 .
-It was later rewritten by James Clark as a macro package for groff.
-Eric S. Raymond wrote the extended
-.Nm
-macros for groff in 2007.
-The stand-alone implementation that is part of the
-.Xr mandoc 1
-utility written by Kristaps Dzonsons appeared in
-.Ox 4.6 .
-.Sh AUTHORS
-This
-.Nm
-reference was written by
-.An Kristaps Dzonsons ,
-.Mt kristaps@bsd.lv .
-.Sh CAVEATS
-Do not use this language.
-Use
-.Xr mdoc 5 ,
-instead.
+.Rs
+.%A Dale Dougherty and Tim O'Reilly
+.%B Unix Text Processing
+.Re
--- old/usr/src/man/man5/mdoc.5	Sat Jul 19 14:19:59 2014
+++ new/usr/src/man/man5/mdoc.5	Sat Jul 19 14:19:59 2014
@@ -17,7 +17,7 @@
 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
 .\" Copyright 2014 Garrett D'Amore <garrett@dmaore.org>
 .\"
-.Dd Jul 16, 2014
+.Dd Jul 19, 2014
 .Dt MDOC 5
 .Os
 .Sh NAME
@@ -140,13 +140,12 @@
 \&.\e\(dq .Sh RETURN VALUES
 \&.\e\(dq For sections 2, 3, & 9 only.
 \&.\e\(dq .Sh ENVIRONMENT
-\&.\e\(dq For sections 1, 1M, 5, & 6 only.
+\&.\e\(dq For sections 1, 1M, and 5.
 \&.\e\(dq .Sh FILES
 \&.\e\(dq .Sh EXIT STATUS
-\&.\e\(dq For sections 1, 1M, & 6 only.
+\&.\e\(dq For sections 1, 1M, and 5.
 \&.\e\(dq .Sh EXAMPLES
 \&.\e\(dq .Sh DIAGNOSTICS
-\&.\e\(dq For sections 1, 1M, 5, 6, & 7 only.
 \&.\e\(dq .Sh ERRORS
 \&.\e\(dq For sections 2, 3, & 9 only.
 \&.\e\(dq .Sh ARCHITECTURE
@@ -155,6 +154,7 @@
 \&.\e\(dq .Sh INTERFACE STABILITY
 \&.\e\(dq .Sh MT-LEVEL
 \&.\e\(dq For sections 2 & 3 only.
+\&.\e\(dq .Sh SECURITY
 \&.\e\(dq .Sh SEE ALSO
 \&.\e\(dq .Xr foobar 1
 \&.\e\(dq .Sh STANDARDS
@@ -162,8 +162,6 @@
 \&.\e\(dq .Sh AUTHORS
 \&.\e\(dq .Sh CAVEATS
 \&.\e\(dq .Sh BUGS
-\&.\e\(dq .Sh SECURITY CONSIDERATIONS
-\&.\e\(dq Not used in OpenBSD.
 .Ed
 .Pp
 The sections in an
@@ -209,7 +207,7 @@
 Documents the utility invocation syntax, function call syntax, or device
 configuration.
 .Pp
-For the first, utilities (sections 1, 1M, and 6), this is
+For the first, utilities (sections 1 and 1M), this is
 generally structured as follows:
 .Bd -literal -offset indent
 \&.Nm bar
@@ -224,7 +222,7 @@
 .Pp
 Commands should be ordered alphabetically.
 .Pp
-For the second, function calls (sections 2, 3, 9):
+For the second, function calls (sections 2, 3, 7I, 7P, 9):
 .Bd -literal -offset indent
 \&.In header.h
 \&.Vt extern const char *global;
@@ -242,10 +240,9 @@
 .Sx \&Fo
 macros should follow C header-file conventions.
 .Pp
-And for the third, configurations (section 7):
+And for the third, configurations (section 7D):
 .Bd -literal -offset indent
-\&.Cd \(dqit* at isa? port 0x2e\(dq
-\&.Cd \(dqit* at isa? port 0x4e\(dq
+\&.Pa /dev/device_node
 .Ed
 .Pp
 Manuals not in these sections generally don't need a
@@ -352,7 +349,7 @@
 .Sx \&Pa .
 .It Em EXIT STATUS
 This section documents the
-command exit status for section 1, 6, and 8 utilities.
+command exit status for sections 1 and 1M.
 Historically, this information was described in
 .Em DIAGNOSTICS ,
 a practise that is now discouraged.
@@ -364,12 +361,13 @@
 This often contains snippets of well-formed, well-tested invocations.
 Make sure that examples work properly!
 .It Em DIAGNOSTICS
-Documents error conditions.
-This is most useful in section 4 manuals.
-Historically, this section was used in place of
+Documents error and diagnostic messages displayed to the user or
+sent to logs. Note that exit
+status and return values should be documented in the
 .Em EXIT STATUS
-for manuals in sections 1, 6, and 8; however, this practise is
-discouraged.
+and
+.Em RETURN VALUES
+sections.
 .Pp
 See
 .Sx \&Bl
@@ -491,6 +489,8 @@
 .Nm MT-Safe
 but with specific exceptions noted.
 .El
+.It Em SECURITY
+Documents any security precautions that operators should consider.
 .It Em SEE ALSO
 References other manuals with related topics.
 This section should exist for most manuals.
@@ -528,8 +528,6 @@
 .It Em BUGS
 Known bugs, limitations, and work-arounds should be described
 in this section.
-.It Em SECURITY CONSIDERATIONS
-Documents any security precautions that operators should consider.
 .El
 .Sh MACRO OVERVIEW
 This overview is sorted such that macros of similar purpose are listed
@@ -1245,10 +1243,9 @@
 and
 .Sx \&Ux .
 .Ss \&Cd
-Kernel configuration declaration.
-This denotes strings accepted by
-.Xr config 8 .
-It is most often used in section 4 manual pages.
+Kernel configuration declaration.  It is found in pages for
+.Bx
+and not used here.
 .Pp
 Examples:
 .Dl \&.Cd device le0 at scode?
@@ -1549,7 +1546,7 @@
 .Ss \&Ex
 Insert a standard sentence regarding command exit values of 0 on success
 and >0 on failure.
-This is most often used in section 1, 6, and 8 manual pages.
+This is most often used in section 1 and 1M manual pages.
 Its syntax is as follows:
 .Pp
 .D1 Pf \. Sx \&Ex Fl std Op Ar utility ...
@@ -1965,8 +1962,8 @@
 See also
 .Sx \&Nm .
 .Ss \&Nm
-The name of the manual page, or \(em in particular in section 1, 6,
-and 8 pages \(em of an additional command or feature documented in
+The name of the manual page, or \(em in particular in section 1
+and 1M pages \(em of an additional command or feature documented in
 the manual page.
 When first invoked, the
 .Sx \&Nm
@@ -2083,7 +2080,7 @@
 Prints the argument(s) in brackets.
 This is most often used in the
 .Em SYNOPSIS
-section of section 1 and 8 manual pages.
+section of section 1 and 1M manual pages.
 .Pp
 Examples:
 .Dl \&.Op \&Fl a \&Ar b
@@ -3202,7 +3199,6 @@
 .Xr mandoc 1
 utility written by Kristaps Dzonsons appeared in
 .Ox 4.6 .
-in July, 2014.
 .Sh AUTHORS
 The
 .Nm
