summaryrefslogtreecommitdiff
path: root/lib/libutil
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2008-12-23 20:53:31 +0000
committerchristos <christos@NetBSD.org>2008-12-23 20:53:31 +0000
commit9cd6b6e7661d01716bbd5a06dc01abcfe42291cb (patch)
tree941e4a1320fbc31ba6b1b1768ad865c04348c5bf /lib/libutil
parent7c095a5af765940a229cc1944d31297f025859b6 (diff)
fix argument order in example.
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/snprintb.318
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/libutil/snprintb.3 b/lib/libutil/snprintb.3
index b0b14fc135d..55b4aaa5eb4 100644
--- a/lib/libutil/snprintb.3
+++ b/lib/libutil/snprintb.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: snprintb.3,v 1.9 2008/12/17 14:05:23 wiz Exp $
+.\" $NetBSD: snprintb.3,v 1.10 2008/12/23 20:53:31 christos Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,11 +27,11 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd December 16, 2008
+.Dd December 23, 2008
.Dt SNPRINTB 3
.Os
.Sh NAME
-.Nm snprintb
+Nm snprintb
.Nd bitmask output conversion
.Sh LIBRARY
.Lb libutil
@@ -190,24 +190,22 @@ an error occurred.
.Sh EXAMPLES
Two examples of the old formatting style:
.Bd -literal -offset indent
-snprintb(3, "\e10\e2BITTWO\e1BITONE", buf, buflen)
+snprintb(buf, buflen, 3, "\e10\e2BITTWO\e1BITONE")
\(rA "3\*[Lt]BITTWO,BITONE\*[Gt]"
-snprintb(0xe860,
+snprintb(buf, buflen, 0xe860,
"\e20\ex10NOTBOOT\ex0fFPP\ex0eSDVMA\ex0cVIDEO"
"\ex0bLORES\ex0aFPA\ex09DIAG\ex07CACHE"
- "\ex06IOCACHE\ex05LOOPBACK\ex04DBGCACHE",
- buf, buflen)
+ "\ex06IOCACHE\ex05LOOPBACK\ex04DBGCACHE")
\(rA "e860\*[Lt]NOTBOOT,FPP,SDVMA,VIDEO,CACHE,IOCACHE\*[Gt]"
.Ed
.Pp
An example of the new formatting style:
.Bd -literal -offset indent
-snprintb(0x800f0701,
+snprintb(buf, buflen, 0x800f0701,
"\e177\e020b\e0LSB\e0b\e1_BITONE\e0f\e4\e4NIBBLE2\e0"
"f\ex10\e4BURST\e0=\e4FOUR\e0=\exfSIXTEEN\e0"
- "b\ex1fMSB\e0\e0",
- buf, buflen)
+ "b\ex1fMSB\e0\e0")
\(rA "800f0701\*[Lt]LSB,NIBBLE2=0,BURST=f=SIXTEEN,MSB\*[Gt]"
.Ed
.Sh ERRORS