optionGetValue(3)
β¨ NAME β¨
optionGetValue - get a specific value from a hierarcical list. This is the optionGetValue(3) page, and yes, we're living in the Programmer's Manual. The word βhierarcicalβ is the original's spelling, not me being chaotic β preserve the artifact, bestie. ππ
πΈ SYNOPSIS πΈ
#include <your-opts.h>
cc [...] -o outfile infile.c -lopts [...]
const tOptionValue * optionGetValue(const tOptionValue * pOptValue, char
const * valueName);
π¦ DESCRIPTION π¦
Okay so this routine is gonna find an entry in a nested value option or configurable. It's giving βsearch the group chat for exactly the right message.β π
If valueName is NULL, then the first entry is returned. Otherwise, the first entry with a name that exactly matches the argument will be returned. No fuzzy vibes, no βclose enough,β this is strict bestie behavior. β¨
If there is no matching value, NULL is returned and errno is set to ENOENT. If the provided option value is not a hierarchical value, NULL is also returned and errno is set to EINVAL. Periodt. π₯
The two args, because we love a parameter moment:
pOptValueβ a hierarchcal value. Again, that's the original spelling; I'm preserving the artifact, not judging. πvalueNameβ name of value to get.
π RETURN VALUE π
a compound value structure.
Not me obsessing over a one-line return value, fr fr. That's exactly what the page says, and she's iconic. π
π ERRORS π
The returned result is NULL and errno is set:
EINVALβ thepOptValuedoes not point to a valid hierarchical option value. Invalid vibe, no cap. πENOENTβ no entry matched the given name.@end itemizeβ yes, that stray tag is literally in the original, and we leave her alone. π
π«Ά SEE ALSO π«Ά
The info documentation for the -lopts library. That's the official rec, bestie. π
Also go hang out with: ao_string_tokenize(3), configFileLoad(3), optionFileLoad(3), optionFindNextValue(3), optionFindValue(3), optionFree(3), optionLoadLine(3), optionMemberList(3), optionNextValue(3), optionOnlyUsage(3), optionPrintVersion(3), optionPrintVersionAndReturn(3), optionProcess(3), optionRestore(3), optionSaveFile(3), optionSaveState(3), optionUnloadNested(3), optionVersion(3), strequate(3), streqvcmp(3), streqvmap(3), strneqvcmp(3), strtransform(3), β and yes, that trailing comma after strtransform(3), is exactly what the page has. iykyk π.
Catch you later, bestie: this page is optionGetValue(3) from the Programmer's Manual, dated 2018-08-26. Now go fetch that value and slay. π
π
π¦ where this page comes from
- debian trixie: libopts25-dev 1:5.18.16-7 Β· GPL-3.0-or-later
- nixpkgs unstable: autogen 5.18.16
- ubuntu questing: libopts25-dev 1:5.18.16-7build1
- ubuntu resolute: libopts25-dev 1:5.18.16-7build2 Β· GPL-3.0-or-later
- ubuntu stonking: libopts25-dev 1:5.18.16-9 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms