qvm_block_string()

Build a human-readable name for a state block

Synopsis:

#include <qvm/utils.h>
int qvm_block_string(char *buf,
                     size_t count,
                     const struct qvm_state_block *blk)

Arguments:

buf
A pointer to the location where the name is to be stored. You can set this argument to NULL if you want to obtain the required size of the buffer.
count
The size of the buffer referenced by buf, in bytes. You can set this argument to zero to obtain the required size of this buffer.
blk
A pointer to the state block to be named.

Description:

This function is useful for showing block information (e.g., for debugging).

Returns:

The number of characters that would have been written into the location referenced by buf, not counting the terminating null character, if count was large enough. The function returns this value even if the count is zero.