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 for storing the name. 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.
- 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 buffer, not counting the null terminator, had count been large enough.
If the return value is equal to or greater than count, the string has been truncated. If an error occurred, qvm_block_string() returns a negative value and sets errno.
Page updated:
