summaryrefslogtreecommitdiffstats
path: root/share/examples/mdoc/example.1
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-01-09 06:32:22 +0000
committermpp <mpp@FreeBSD.org>1997-01-09 06:32:22 +0000
commitfe9d880f174df62245e2b204bedad0916fdf58e5 (patch)
tree7f717e5b8e295d67e832e273889f9500cbaad900 /share/examples/mdoc/example.1
parent0524c0d6d90a2be6fff5ae1493d87df845b0b301 (diff)
downloadFreeBSD-src-fe9d880f174df62245e2b204bedad0916fdf58e5.zip
FreeBSD-src-fe9d880f174df62245e2b204bedad0916fdf58e5.tar.gz
Add some real example diagnostics to example.[14]
Add all of the possible errno's to example.3. Show examples of the .Bx (BSD) and .At (AT&T UNIX) macros in the various HISTORY sections. Add some .Rs/.Re (used for referencing things other than man pages) in the SEE ALSO sections. Suggested by: wollman
Diffstat (limited to 'share/examples/mdoc/example.1')
-rw-r--r--share/examples/mdoc/example.150
1 files changed, 48 insertions, 2 deletions
diff --git a/share/examples/mdoc/example.1 b/share/examples/mdoc/example.1
index 1314220..a71a688 100644
--- a/share/examples/mdoc/example.1
+++ b/share/examples/mdoc/example.1
@@ -30,7 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd "January 2, 1997"
+.\" Note: The date here should be updated whenever a non-trivial
+.\" change is made to the manual page.
+.Dd January 8, 1997
.Dt EXAMPLE 1
.\" Note: Only specify the operating system when the command
.\" is FreeBSD specific, otherwise use the .Os macro with no
@@ -89,11 +91,34 @@ Example of a file in the
.Sx FILES
section.
.El
+.Sh EXAMPLES
+The following is an example of a typical usage
+of the
+.Nm
+command:
+.Pp
+.Dl % example -abc -d xyzzy /dev/null
.Sh SEE ALSO
.Xr example 3 ,
.Xr example 4 ,
.Xr mdoc 7 ,
.Xr mdoc.samples 7
+.Rs
+.%A A. B. Author
+.%T Example RFC Title
+.%O RFC0000
+.Re
+.Rs
+.%A A. B. Author
+.%B Example Book Title
+.%O ISBN-0-000-00000-0
+.Re
+.Rs
+.%A A. B. Author
+.%D January 1997
+.%J Example Journal Name
+.%T Example Article Title
+.Re
.Sh STANDARDS
If the command conforms to some standard, such as
.St -p1003.2
@@ -101,12 +126,33 @@ or
.St -ansiC ,
it should be noted here.
.Sh DIAGNOSTICS
-None.
+Exist status is 0 on success, and 1 if the command
+fails for one of the following reasons
+.Bl -diag
+.It example error message
+An example of an error message.
+.It another example error message.
+Self explanatory.
+.El
.Sh HISTORY
The
.Nm
manual page example first appeared in
.Fx 3.0 .
+.Pp
+Some other common
+.Sx HISTORY
+section examples are:
+.Pp
+The
+.Nm
+manual page example first appeared in
+.Bx 4.4 .
+.Pp
+The
+.Nm
+manual page example first appeared in
+.At v6 .
.Sh AUTHOR
This
manual page was written by Mike Pritchard
OpenPOWER on IntegriCloud