Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/printf.9
Show All 20 Lines | |||||
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||||
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||||
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd November 18, 2015 | .Dd May 9, 2020 | ||||
.Dt PRINTF 9 | .Dt PRINTF 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm printf , | .Nm printf , | ||||
.Nm uprintf , | .Nm uprintf , | ||||
.Nm tprintf , | .Nm tprintf , | ||||
.Nm log | .Nm log | ||||
.Nd formatted output conversion | .Nd formatted output conversion | ||||
Show All 40 Lines | |||||
and to the console if no process is yet reading the log. | and to the console if no process is yet reading the log. | ||||
.Pp | .Pp | ||||
Each of these related functions use the | Each of these related functions use the | ||||
.Fa fmt | .Fa fmt | ||||
parameter in the same manner as | parameter in the same manner as | ||||
.Xr printf 3 . | .Xr printf 3 . | ||||
However, | However, | ||||
.Xr printf 9 | .Xr printf 9 | ||||
adds two other conversion specifiers. | adds two other conversion specifiers and omits one. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Cm \&%b | .Cm \&%b | ||||
identifier expects two arguments: an | identifier expects two arguments: an | ||||
.Vt int | .Vt int | ||||
and a | and a | ||||
.Vt "char *" . | .Vt "char *" . | ||||
These are used as a register value and a print mask for decoding bitmasks. | These are used as a register value and a print mask for decoding bitmasks. | ||||
Show All 19 Lines | |||||
pointer and a | pointer and a | ||||
.Vt "char *" | .Vt "char *" | ||||
string. | string. | ||||
The memory pointed to by the pointer is output in hexadecimal one byte at | The memory pointed to by the pointer is output in hexadecimal one byte at | ||||
a time. | a time. | ||||
The string is used as a delimiter between individual bytes. | The string is used as a delimiter between individual bytes. | ||||
If present, a width directive will specify the number of bytes to display. | If present, a width directive will specify the number of bytes to display. | ||||
By default, 16 bytes of data are output. | By default, 16 bytes of data are output. | ||||
.Pp | |||||
The | |||||
.Cm \&%n | |||||
conversion specifier is not supported. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn log | .Fn log | ||||
function uses | function uses | ||||
.Xr syslog 3 | .Xr syslog 3 | ||||
level values | level values | ||||
.Dv LOG_DEBUG | .Dv LOG_DEBUG | ||||
through | through | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |