optionFindNextValue(3)

πŸ’– NAME πŸ’–

optionFindNextValue β€” find a hierarcicaly valued option instance. Yes bestie, that spelling is straight from the page, no cap. This is optionFindNextValue(3) from the Programmer’s Manual, and it’s here to help you find your way through nested option values like a total main character. 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <your-opts.h>
cc [...] -o outfile infile.c -lopts [...]

const tOptionValue * optionFindNextValue(const tOptDesc * odesc, const
tOptionValue * pPrevVal, char const * name, char const * value);

✨ DESCRIPTION ✨

Okay so this routine will find the next entry in a nested value option or configurable. It will search through the list and return the next entry that matches the criteria. Literally iconic behavior. πŸ’…

The arguments are giving:

  • odesc β€” an option with a nested arg type. That’s the starting energy.
  • pPrevVal β€” the last entry. The previous one, bestie.
  • name β€” name of value to find. Like the name tag at the function party.
  • value β€” the matching value. The actual fit check.

πŸŽ€ RETURN VALUE πŸŽ€

It returns a compound value structure. Slay. ✨

πŸ’… ERRORS πŸ’…

If things go sideways, the returned result is NULL and errno is set:

  • EINVAL β€” the pOptValue does not point to a valid hierarchical option value.
  • ENOENT β€” no entry matched the given name. @end itemize (yes, that little artifact is in the original too β€” keeping every crumb πŸ“).

🌈 SEE ALSO 🌈

The info documentation for the -lopts library. Then the whole reference squad, no skips:


That’s the whole page, bestie. This was optionFindNextValue(3) from the Programmer’s Manual, dated 2018-08-26. Byeee, go find that next value πŸ’œβœ¨