Added missing punctuation and utilized more mdoc macros where possible.
This commit is contained in:
parent
d04d27d492
commit
268853e1ea
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: kprintf.9,v 1.1 1998/09/02 04:39:23 jeremy Exp $
|
.\" $NetBSD: kprintf.9,v 1.2 1998/09/02 05:05:22 jeremy Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
@ -112,36 +112,45 @@ the kernel functions accept the following format specifiers.
|
|||||||
.It Li %b
|
.It Li %b
|
||||||
Bit field expansion.
|
Bit field expansion.
|
||||||
This format specifier is useful for decoding bit fields in device registers.
|
This format specifier is useful for decoding bit fields in device registers.
|
||||||
It displays an integer using a specified radix (base) and an interpretation of
|
It displays an integer using a specified radix
|
||||||
|
.Pq base
|
||||||
|
and an interpretation of
|
||||||
the bits within that integer as though they were flags.
|
the bits within that integer as though they were flags.
|
||||||
It requires two arguments from the argument vector; the first argument being
|
It requires two arguments from the argument vector, the first argument being
|
||||||
the bit field to be decoded (as an integer) and the second being a decoding
|
the bit field to be decoded
|
||||||
directive string.
|
.Pq "as an integer"
|
||||||
|
and the second being a decoding directive string.
|
||||||
.Pp
|
.Pp
|
||||||
The decoding directive string describes how the bitfield is to be interpreted
|
The decoding directive string describes how the bitfield is to be interpreted
|
||||||
and displayed.
|
and displayed.
|
||||||
The first character of the string is a binary character representation of the
|
The first character of the string is a binary character representation of the
|
||||||
output numeral base in which the bitfield will be printed before it is decoded.
|
output numeral base in which the bitfield will be printed before it is decoded.
|
||||||
To print the value in octal, use the C character escape sequence
|
Recognized radix values
|
||||||
.Li \e10 .
|
.Pq "in C escape\(encharacter format"
|
||||||
To print the value in decimal, use
|
are
|
||||||
.Li \e12 .
|
.Li \e10
|
||||||
And finally, to print in hexadecimal, use
|
.Pq octal ,
|
||||||
.Li \e20 .
|
.Li \e12
|
||||||
|
.Pq decimal ,
|
||||||
|
and
|
||||||
|
.Li \e20
|
||||||
|
.Pq hexadecimal .
|
||||||
.Pp
|
.Pp
|
||||||
The remaining characters in the decoding directive string are interpreted as a
|
The remaining characters in the decoding directive string are interpreted as a
|
||||||
list of bit\(enposition\(emdescription pairs.
|
list of bit\(enposition\(emdescription pairs.
|
||||||
A bit\(enposition\(emdescription pair begins with a binary character value
|
A bit\(enposition\(emdescription pair begins with a binary character value
|
||||||
that represents the position of the bit being described
|
that represents the position of the bit being described.
|
||||||
A Bit position value of one describes the least significant bit.
|
A bit position value of one describes the least significant bit.
|
||||||
Whereas a position value of 32 (\e40 octal, \ex20 hexadecimal)
|
Whereas a position value of 32
|
||||||
|
.Pq "octal 40, hexadecimal 20, the ASCII space character"
|
||||||
describes the most significant bit.
|
describes the most significant bit.
|
||||||
.Pp
|
.Pp
|
||||||
The remaining characters in a bit\(enposition\(emdescription pair are the
|
The remaining characters in a bit\(enposition\(emdescription pair are the
|
||||||
characters to print should the bit being described be set.
|
characters to print should the bit being described be set.
|
||||||
Description strings are delimited by the next bit position value character
|
Description strings are delimited by the next bit position value character
|
||||||
encountered (distinguishable by its <= 32 value), or the end of the decoding
|
encountered
|
||||||
directive string itself.
|
.Pq "distinguishable by its value being \(<= 32" ,
|
||||||
|
or the end of the decoding directive string itself.
|
||||||
.It Li %:
|
.It Li %:
|
||||||
Inline format continuation.
|
Inline format continuation.
|
||||||
This format specifier allows for recursive formatted output.
|
This format specifier allows for recursive formatted output.
|
||||||
@ -150,7 +159,7 @@ follows it is a
|
|||||||
.Va va_list
|
.Va va_list
|
||||||
argument vector from which to obtain the data to be formatted.
|
argument vector from which to obtain the data to be formatted.
|
||||||
.It Li %r
|
.It Li %r
|
||||||
Integer value using the current
|
Integer value using current
|
||||||
.Tn DDB
|
.Tn DDB
|
||||||
radix.
|
radix.
|
||||||
.Bf -emphasis
|
.Bf -emphasis
|
||||||
|
Loading…
Reference in New Issue
Block a user