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 wherethe name is to be stored.
count
The size of the buffer referenced by buf, in bytes.
blk
A pointer to the state block to be named.

Library:

Provided by qvm; no external library is required.

Description:

This function is useful for showing block information (e.g., for debugging). It behaves the same way even if count is zero, in which case buf can be NULL.

Returns:

The number of characters that would have been written into the array, not counting the terminating null character, if count had been large enough.