hdf_set_valuef(3) Set the value of a named node


#include <util/neo_hdf.h>

NEOERR* hdf_set_valuef (HDF *hdf, const char *fmt, ...)


hdf -> the pointer to the hdf dataset
fmt -> the name=value printf(3) format string


hdf_set_valuef is a convenience function that wraps hdf_set_value. Due to limitations of C, the fmt is in the format "name=value", where we will first format the entire string, and then break it at the first (from the left) equal sign (=) and use the left portion as the name and the right portion as the value. This function is somewhat inefficient in that it first allocates the full name=value, and then the call to hdf_set_value duplicates the value portion, and then we free the name=value. Currently, we don't strip whitespace from the key or value. In the future, this function might work more like reading a single line of an HDF string or file, allowing for attributes and symlinks to be specified... maybe.