vbin_printf — Parse a format string and place args' binary value in a buffer


int vbin_printf (u32 * bin_buf,
 size_t size,
 const char * fmt,
 va_list args);


u32 * bin_buf

The buffer to place args' binary value

size_t size

The size of the buffer(by words(32bits), not characters)

const char * fmt

The format string to use

va_list args

Arguments for the format string


The format follows C99 vsnprintf, except n is ignored, and its argument is skipped.

The return value is the number of words(32bits) which would be generated for the given input.


If the return value is greater than size, the resulting bin_buf is NOT valid for bstr_printf.