From b92a189eb9b32f7e9db74343d46434b554a67d04 Mon Sep 17 00:00:00 2001
From: Ruslan Ermilov <ru@FreeBSD.org>
Date: Wed, 22 Nov 2000 16:11:48 +0000
Subject: [PATCH] mdoc(7) police: Er macro usage cleanup.

---
 share/examples/mdoc/example.3          |  4 +--
 share/man/man4/intro.4                 |  2 +-
 share/man/man4/ip6.4                   |  2 +-
 share/man/man4/kld.4                   |  2 +-
 share/man/man4/man4.i386/gsc.4         | 14 +++++++----
 share/man/man4/man4.i386/mcd.4         |  2 +-
 share/man/man4/man4.i386/meteor.4      | 35 +++++++++++++-------------
 share/man/man4/mem.4                   | 16 ++++++------
 share/man/man4/pcvt.4                  |  4 +--
 share/man/man4/route.4                 |  6 ++---
 share/man/man4/termios.4               |  4 +--
 share/man/man9/DEVICE_PROBE.9          |  5 ++--
 share/man/man9/VFS_VGET.9              |  2 +-
 share/man/man9/VOP_LOOKUP.9            |  8 +++---
 share/man/man9/VOP_PATHCONF.9          |  2 +-
 share/man/man9/bus_generic_read_ivar.9 |  2 +-
 share/man/man9/copy.9                  |  8 ++++--
 share/man/man9/sleep.9                 |  8 +++---
 share/man/man9/suser.9                 |  2 +-
 share/man/man9/taskqueue.9             |  2 +-
 usr.sbin/arp/arp.4                     |  4 +--
 21 files changed, 71 insertions(+), 63 deletions(-)

diff --git a/share/examples/mdoc/example.3 b/share/examples/mdoc/example.3
index a2028a846167..4ec386553c0d 100644
--- a/share/examples/mdoc/example.3
+++ b/share/examples/mdoc/example.3
@@ -197,13 +197,13 @@ Protocol wrong type for socket.
 Protocol not available.
 .It Bq Er EPROTONOSUPPORT
 Protocol not supported.
-.It Bq Er ESOCKNOTSUPORT
+.It Bq Er ESOCKTNOSUPPORT
 Socket type not supported.
 .It Bq Er EOPNOTSUPP
 Operation not supported.
 .It Bq Er EPFNOSUPPORT
 Protocol family not supported.
-.It Bq Er EAFNNOSUPPORT
+.It Bq Er EAFNOSUPPORT
 Address family not supported by protocol family.
 .It Bq Er EADDRINUSE
 Address already in use.
diff --git a/share/man/man4/intro.4 b/share/man/man4/intro.4
index 5a545344f7d4..15071196c8a3 100644
--- a/share/man/man4/intro.4
+++ b/share/man/man4/intro.4
@@ -86,7 +86,7 @@ devices, but cannot be accessed since the corresponding device node is
 still missing.  In the first case, any attempt to reference the device
 through the device node will result in an error, returned by the upper
 layers of the kernel, usually
-.Ql ENXIO .
+.Er ENXIO .
 In the second case, the device node needs to be created before the
 driver and its device will be usable.
 .Pp
diff --git a/share/man/man4/ip6.4 b/share/man/man4/ip6.4
index db5b360ef983..9605b7d32e11 100644
--- a/share/man/man4/ip6.4
+++ b/share/man/man4/ip6.4
@@ -115,7 +115,7 @@ If -1 is specified, the kernel will use a default value.
 If a value of 0 to 255 is specified, the packet will have the specified
 value as hoplimit.
 Other values are considered invalid, and
-.Dv EINVAL
+.Er EINVAL
 will be returned.
 For example:
 .Bd -literal -offset indent
diff --git a/share/man/man4/kld.4 b/share/man/man4/kld.4
index 41c1acec3330..6a38cae4b39b 100644
--- a/share/man/man4/kld.4
+++ b/share/man/man4/kld.4
@@ -148,7 +148,7 @@ fails to execute the entry point.
 .Pp
 .Xr kldload 8
 returns the cryptic message
-.Sq ENOEXEC Po Exec format error Pc
+.Sq Li "ENOEXEC (Exec format error)"
 for any error encountered while loading a module.
 .Pp
 When system internal interfaces change, old modules often cannot
diff --git a/share/man/man4/man4.i386/gsc.4 b/share/man/man4/man4.i386/gsc.4
index ab453cd4e9e7..d4a25c6ef432 100644
--- a/share/man/man4/man4.i386/gsc.4
+++ b/share/man/man4/man4.i386/gsc.4
@@ -147,7 +147,8 @@ Set resolution value from selector switch.
 The driver must be in an
 open though untouched state otherwise the request will fail and
 .Xr errno 2
-is set to EBUSY.
+is set to
+.Er EBUSY .
 .It GSC_SWIDTH int
 Set the 
 .Em width
@@ -213,12 +214,14 @@ Since the buffer
 size limit is (currently) 0x3000 bytes the maximum number of lines
 allowed will vary with the width of each line.
 This upper limit is
-checked before it overwrites the current value and pases an ENOMEM in
-the
+checked before it overwrites the current value and pases an
+.Er ENOMEM
+in the
 .Xr errno 2 
 variable.
 However, since the bitmap width can change
-after a buffer length was selected a read request may fail with ENOMEM
+after a buffer length was selected a read request may fail with
+.Er ENOMEM
 if the buffer length turns out too high.
 It is generally wise to
 choose long buffers rather than go save in order to obtain better
@@ -232,7 +235,8 @@ handy scanner is a human/computer interface timeout values are usually
 higher than those of a flat scanner.
 Default is 15 seconds.
 After
-timeout is reached the read operation will fail with EBUSY.
+timeout is reached the read operation will fail with
+.Er EBUSY .
 Note that
 the timeout timer starts anew for each buffer to be read and thus does
 not cause you to scan faster for longer images.
diff --git a/share/man/man4/man4.i386/mcd.4 b/share/man/man4/man4.i386/mcd.4
index fa848aff16f0..4c7bbc6ee3f1 100644
--- a/share/man/man4/man4.i386/mcd.4
+++ b/share/man/man4/man4.i386/mcd.4
@@ -80,7 +80,7 @@ gets all of the table of contents
 begins audio playing at location specified
 .It CDIOCPLAYBLOCKS
 fails with error
-.Dv EINVAL
+.Er EINVAL
 .It CDIOCPLAYMSF
 begins audio playing at location specified
 .It CDIOCRESUME
diff --git a/share/man/man4/man4.i386/meteor.4 b/share/man/man4/man4.i386/meteor.4
index 7af8285f7b19..a17a23aae925 100644
--- a/share/man/man4/man4.i386/meteor.4
+++ b/share/man/man4/man4.i386/meteor.4
@@ -531,11 +531,11 @@ the existing buffer is used.
 If METEORSETGEO fails the ioctl() will return a value of -1 and the
 external variable errno will be set to:
 .Pp
-.Bl -tag -width EINVAL
-.It Dv EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid meteor_geomet structure pointer, rows, columns,
 frames were invalid.
-.It Dv ENOMEM
+.It Bq Er ENOMEM
 could not allocate the contiguous block.
 .El
 .in -0.5i
@@ -658,13 +658,13 @@ capture
 If METEORCAPTUR fails the ioctl() will return a value of -1 and the
 external variable errno will be set to:
 .Pp
-.Bl -tag -width EINVAL
-.It Dv EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid capture command value
-.It Dv ENXIO
+.It Bq Er ENXIO
 there is not internal buffer to hold the frame.
 this indicates the previous set geometry ioctl failed.
-.It Dv EIO
+.It Bq Er EIO
 card is already capturing.
 .El
 .in -0.5i
@@ -707,13 +707,13 @@ is lower than lowat.
 If METEORCAPFRM fails the ioctl() will return a value of -1 and the
 external variable errno will be set to:
 .Pp
-.Bl -tag -width EINVAL
-.It Dv EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid meteor_geomet structure pointer or bad command.
-.It Dv ENXIO
+.It Bq Er ENXIO
 there is not internal buffer to hold the frame.
 this indicates the previous set geometry ioctl failed.
-.It Dv EIO
+.It Bq Er EIO
 card is already capturing.
 .El
 .in -0.5i
@@ -727,9 +727,8 @@ gain control and effects the UV output amplitude.
 If METEORSCHCV or METEORGCHCV fails the ioctl() will return a value
 of -1 and the external variable errno will be set to:
 .Pp
-.Bl -tag -width EINVAL
-.It Dv EINVAL
-EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid unsigned char pointer.
 .El
 .in -0.5i
@@ -745,8 +744,8 @@ signed character has legal values are from +127 which represent
 If METEORGHUE or METEORSHUE fails the ioctl() will return a value of
 -1 and the external variable errno will be set to:
 .Pp
-.Bl -tag -width EINVAL
-.It Dv EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid signed char pointer.
 .El
 .in -0.5i
@@ -773,8 +772,8 @@ number of FIFO errors since device was opened.
 .Pp
 If METEORSCOUNT or METEORGCOUNT fails the ioctl() will return a value
 of -1 and the external variable errno will be set to:
-.Bl -tag -width EINVAL
-.It Dv EINVAL
+.Bl -tag -width Er
+.It Bq Er EINVAL
 invalid meteor_counts structure pointer.
 .El
 .in -0.5i
diff --git a/share/man/man4/mem.4 b/share/man/man4/mem.4
index be3419953e82..064cc693459e 100644
--- a/share/man/man4/mem.4
+++ b/share/man/man4/mem.4
@@ -154,24 +154,24 @@ should be set to MEMRANGE_SET_UPDATE to update an existing
 or establish a new range, or to MEMRANGE_SET_REMOVE to remove a range.
 .Pp
 .Sh RETURN VALUES
-.Bl -tag -width 10
-.It EOPNOTSUPP
+.Bl -tag -width Er
+.It Bq Er EOPNOTSUPP
 Memory range operations are not supported on this architecture.
-.It ENXIO
+.It Bq Er ENXIO
 No memory range descriptors are available (eg. firmware has not enabled
 any).
-.It EINVAL
+.It Bq Er EINVAL
 The memory range supplied as an argument is invalid or overlaps another
 range in a fashion not supported by this architecture.
-.It EBUSY
+.It Bq Er EBUSY
 An attempt to remove or update a range failed because the range is busy.
-.It ENOSPC
+.It Bq Er ENOSPC
 An attempt to create a new range failed due to a shortage of hardware
 resources (eg. descriptor slots).
-.It ENOENT
+.It Bq Er ENOENT
 An attempt to remove a range failed because no range matches the descriptor
 base/length supplued.
-.It EPERM
+.It Bq Er EPERM
 An attempt to remove a range failed because the range is permanently
 enabled.
 .El
diff --git a/share/man/man4/pcvt.4 b/share/man/man4/pcvt.4
index ef4d4e7f3b0d..faa966b7453d 100644
--- a/share/man/man4/pcvt.4
+++ b/share/man/man4/pcvt.4
@@ -567,10 +567,10 @@ or a value of 132.
 Note that setting the number of columns to 132 is only supported on 
 some VGA adaptors.
 Any unsupported numbers cause the ioctl to fail with
-.Em errno
+.Va errno
 .Pq see Xr intro 2
 being set to
-.Em EINVAL .
+.Er EINVAL .
 .Pp
 .Em VGA color palette interface
 .Pp
diff --git a/share/man/man4/route.4 b/share/man/man4/route.4
index 9135be28b270..5d5beecd1720 100644
--- a/share/man/man4/route.4
+++ b/share/man/man4/route.4
@@ -141,14 +141,14 @@ by filling in the
 .Ar rtm_errno
 field.
 The routing code returns
-.Dv EEXIST
+.Er EEXIST
 if
 requested to duplicate an existing entry,
-.Dv ESRCH
+.Er ESRCH
 if
 requested to delete a non-existent entry,
 or
-.Dv ENOBUFS
+.Er ENOBUFS
 if insufficient resources were available
 to install a new route.
 In the current implementation, all routing processes run locally,
diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4
index fb54436e1867..2cf0c4bd7e02 100644
--- a/share/man/man4/termios.4
+++ b/share/man/man4/termios.4
@@ -174,7 +174,7 @@ process is orphaned, the
 .Xr read 2
 returns -1 with
 .Va errno set to
-.Er Dv EIO
+.Er EIO
 and no
 signal is sent.  The default action of the
 .Dv SIGTTIN
@@ -205,7 +205,7 @@ the
 .Xr write 2
 returns -1 with
 errno set to
-.Er Dv EIO
+.Er EIO
 and no signal is sent.
 .Pp
 Certain calls that set terminal parameters are treated in the same
diff --git a/share/man/man9/DEVICE_PROBE.9 b/share/man/man9/DEVICE_PROBE.9
index f643d397b594..dfb982e5aafe 100644
--- a/share/man/man9/DEVICE_PROBE.9
+++ b/share/man/man9/DEVICE_PROBE.9
@@ -43,8 +43,9 @@
 .Sh DESCRIPTION
 .Pp
 This device method should probe to see if the device is present.
-It should return 0 if the device exists, ENXIO if it cannot be
-found.
+It should return 0 if the device exists,
+.Er ENXIO
+if it cannot be found.
 If some other error happens during the probe (such as a memory
 allocation failure), an appropriate error code should be returned.
 For
diff --git a/share/man/man9/VFS_VGET.9 b/share/man/man9/VFS_VGET.9
index 98767c9c4b7d..12e5e3cf6a80 100644
--- a/share/man/man9/VFS_VGET.9
+++ b/share/man/man9/VFS_VGET.9
@@ -61,7 +61,7 @@ implement the
 nfs call.
 .Pp
 If the filesystem does not support this call, then it should return
-.Dv EOPNOTSUPP .
+.Er EOPNOTSUPP .
 .Sh SEE ALSO
 .Xr VFS 9 ,
 .Xr vnode 9
diff --git a/share/man/man9/VOP_LOOKUP.9 b/share/man/man9/VOP_LOOKUP.9
index b2f7b24aeb96..12d17e4285ee 100644
--- a/share/man/man9/VOP_LOOKUP.9
+++ b/share/man/man9/VOP_LOOKUP.9
@@ -108,9 +108,9 @@ notfound:
 .Bd -filled -offset indent
 If creating or renaming and at end of pathname,
 return
-.Dv EJUSTRETURN ,
+.Er EJUSTRETURN ,
 leaving info on available slots else return
-.Dv ENOENT .
+.Er ENOENT .
 .Ed
 .Pp
 found:
@@ -126,7 +126,7 @@ The directory,
 .Fa dvp
 should be locked on entry.
 If an error (note: the return value
-.Dv EJUSTRETURN
+.Er EJUSTRETURN
 is not considered an error)
 is detected, it will be returned locked.
 Otherwise, it will be unlocked unless both
@@ -153,7 +153,7 @@ or
 the flag
 .Dv ISLASTCN
 is specified and the operation would succeed, the special return value
-.Dv EJUSTRETURN
+.Er EJUSTRETURN
 is returned.
 Otherwise, an appropriate error code is returned.
 .Sh PSEUDOCODE
diff --git a/share/man/man9/VOP_PATHCONF.9 b/share/man/man9/VOP_PATHCONF.9
index cfb392db48a8..bc4a8d4e3e87 100644
--- a/share/man/man9/VOP_PATHCONF.9
+++ b/share/man/man9/VOP_PATHCONF.9
@@ -79,7 +79,7 @@ If
 is recognized,
 .Fa *retval
 is set to the specified value and zero is returned, otherwise
-.Dv EINVAL
+.Er EINVAL
 is returned.
 .Sh SEE ALSO
 .Xr pathconf 2 ,
diff --git a/share/man/man9/bus_generic_read_ivar.9 b/share/man/man9/bus_generic_read_ivar.9
index a7fdec4949e1..a4f8f8aad844 100644
--- a/share/man/man9/bus_generic_read_ivar.9
+++ b/share/man/man9/bus_generic_read_ivar.9
@@ -49,7 +49,7 @@ for busses
 .Sh DESCRIPTION
 .Pp
 These functions simply return
-.Dv ENOENT .
+.Er ENOENT .
 .Sh SEE ALSO
 .Xr device 9 ,
 .Xr driver 9
diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9
index a01d03c078bf..c1513e293e52 100644
--- a/share/man/man9/copy.9
+++ b/share/man/man9/copy.9
@@ -116,7 +116,9 @@ NUL, is returned in
 .Sh RETURN VALUES
 The
 .Nm
-functions return 0 on success or EFAULT if a bad address is encountered.
+functions return 0 on success or
+.Er EFAULT
+if a bad address is encountered.
 In addition, the
 .Fn copystr ,
 and
@@ -124,7 +126,9 @@ and
 .\" .Fn copyinstr ,
 .\" and
 .\" .Fn copyoutstr
-functions return ENAMETOOLONG if the string is longer than
+functions return
+.Er ENAMETOOLONG
+if the string is longer than
 .Pa len
 bytes.
 .Sh SEE ALSO
diff --git a/share/man/man9/sleep.9 b/share/man/man9/sleep.9
index 770a07049488..c4519d8123e5 100644
--- a/share/man/man9/sleep.9
+++ b/share/man/man9/sleep.9
@@ -100,16 +100,16 @@ includes the
 .Dv PCATCH
 flag, signals are checked before and after sleeping, else signals are
 not checked.  Returns 0 if awakened,
-.Dv EWOULDBLOCK
+.Er EWOULDBLOCK
 if the timeout expires.  If
 .Dv PCATCH
 is set and a signal needs to be delivered,
-.Dv ERESTART
+.Er ERESTART
 is returned if the current system call should be restarted if
 possible, and
-.Dv EINTR
+.Er EINTR
 is returned if the system call should be interrupted by the signal
-.Pq return Dv EINTR .
+.Pq return Er EINTR .
 .Pp
 .Nm Msleep
 is a variation on tsleep.  The parameter
diff --git a/share/man/man9/suser.9 b/share/man/man9/suser.9
index 067707389542..d8aed25d4552 100644
--- a/share/man/man9/suser.9
+++ b/share/man/man9/suser.9
@@ -98,7 +98,7 @@ The
 and
 .Nm suser_xxx
 functions return 0 if the user has superuser powers and
-.Dv EPERM
+.Er EPERM
 otherwise.
 This is the
 .Em reverse logic
diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9
index a1ece9f15f3c..6356594aab05 100644
--- a/share/man/man9/taskqueue.9
+++ b/share/man/man9/taskqueue.9
@@ -116,7 +116,7 @@ value or at the end of the list if no tasks have a lower priority.
 Enqueueing a task does not perform any memory allocation which makes
 it suitable for calling from an interrupt handler.
 This function will return
-.Dv EPIPE
+.Er EPIPE
 if the queue is being freed.
 .Pp
 To execute all the tasks on a queue,
diff --git a/usr.sbin/arp/arp.4 b/usr.sbin/arp/arp.4
index 2af840177cff..cc233d5be4d4 100644
--- a/usr.sbin/arp/arp.4
+++ b/usr.sbin/arp/arp.4
@@ -61,9 +61,9 @@ the host is considered to be down for a short period (normally 20 seconds),
 allowing an error to be returned to transmission attempts during this
 interval.
 The error is
-.Li EHOSTDOWN
+.Er EHOSTDOWN
 for a non-responding destination host, and
-.Li EHOSTUNREACH
+.Er EHOSTUNREACH
 for a non-responding router.
 .Pp
 The ARP cache is stored in the system routing table as