'\" t .\" Title: vbin_printf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Basic C Library Functions .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "VBIN_PRINTF" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Basic C Library Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" vbin_printf \- Parse a format string and place args\*(Aq binary value in a buffer .SH "SYNOPSIS" .HP \w'int\ vbin_printf('u .BI "int vbin_printf(u32\ *\ " "bin_buf" ", size_t\ " "size" ", const\ char\ *\ " "fmt" ", va_list\ " "args" ");" .SH "ARGUMENTS" .PP \fIu32 * bin_buf\fR .RS 4 The buffer to place args\*(Aq binary value .RE .PP \fIsize_t size\fR .RS 4 The size of the buffer(by words(32bits), not characters) .RE .PP \fIconst char * fmt\fR .RS 4 The format string to use .RE .PP \fIva_list args\fR .RS 4 Arguments for the format string .RE .SH "DESCRIPTION" .PP The format follows C99 vsnprintf, except \fBn\fR is ignored, and its argument is skipped\&. .PP The return value is the number of words(32bits) which would be generated for the given input\&. .SH "NOTE" .PP If the return value is greater than \fIsize\fR, the resulting bin_buf is NOT valid for \fBbstr_printf\fR\&. .SH "COPYRIGHT" .br