hdf_set_valuef(3)
π hdf_set_valuef β bestie edition π
ok so we're in hdf_set_valuef(3), and the manual we're living in is util/neo_hdf.h. pull up a chair, grab a strawberry π, this one's short and sweet.
β¨ NAME β¨
hdf_set_valuef β set the value of a named node. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
#include <util/neo_hdf.h>
NEOERR* hdf_set_valuef (HDF *hdf, const char *fmt, ...)
ATTRIBUTE_PRINTF(2,3);
π ARGUMENTS π
hdfβ the pointer to the hdf dataset. the whole vibe lives here.fmtβ thename=valueprintf(3)format string. yes bestie, it's a format string, and the compiler is watching you (see thatATTRIBUTE_PRINTF(2,3)? that's the compiler watching you).
π¦ DESCRIPTION π¦
ok so hdf_set_valuef is literally just a convenience function that wraps hdf_set_value. it's giving "I'm the friendly little sibling who does the annoying part for you" π«Ά
here's the thing though β C has limitations, and because of them the fmt has to be in the format "name=value". so what happens is: we first format the entire string, and then we break it at the first (from the left) equal sign (=), using the left portion as the name and the right portion as the value. the way that one = decides everythingβ¦ main character energy fr.
ngl, this function is somewhat inefficient: it first allocates the full name=value, then the call to hdf_set_value duplicates the value portion, and then we free the name=value. so that's three whole steps for one little set. we do it anyway. slay.
also β currently, we don't strip whitespace from the key or the value. so whatever spaces you put in there? they're staying. no cap.
and 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. π (the manpage itself said "maybe", I'm not making that up, that's the actual energy of this documentation and I respect it deeply)
π RETURN VALUE π
None. that's it. nothing. no return value, no drama. π
heads up: the declared return type isNEOERR*, so you do get a return you should check β but this manpage's RETURN VALUE section says None, and we don't make stuff up around here. so: the documented return value isNone. periodt.
π SEE ALSO π
the whole extended family, every single one, no skipping:
hdf_set_symlink(3)hdf_get_valuef(3)compareFunc)(3)hdf_dump_str(3)hdf_get_int_value(3)hdf_read_string_ignore(3)hdf_copy(3)hdf_get_node(3)hdf_set_value(3)hdf_obj_child(3)hdf_read_string(3)hdf_set_buf(3)hdf_register_fileload(3)hdf_get_obj(3)hdf_get_attr(3)hdf_obj_top(3)hdf_dump_format(3)hdf_destroy(3)hdf_init(3)hdf_obj_value(3)hdf_write_string(3)hdf_set_valuevf(3)hdf_sort_obj(3)hdf_write_file_atomic(3)hdf_obj_attr(3)hdf_set_valuef(3)hdf_get_copy(3)hdf_write_file(3)hdf_get_valuevf(3)hdf_set_int_value(3)hdf_dump(3)hdf_get_value(3)hdf_set_copy(3)hdf_obj_next(3)hdf_search_path(3)hdf_obj_name(3)hdf_set_attr(3)hdf_get_child(3)hdf_remove_tree
ok that's the page!! π this one came from ClearSilver, dated 12 July 2007 β yes bestie, 2007, she's vintage, she's iconic, she's still out here setting values. go forth and name=value responsibly π§β¨
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms