optionFindValue(3)

πŸ’– optionFindValue(3) β€” Programmer's Manual πŸ’–

okay bestie, welcome to the optionFindValue(3) page from the Programmer's Manual β€” we're finding a hierarcicaly valued option instance today, and yes that spelling is staying exactly as it is, no cap. ✨

🌸 NAME 🌸

optionFindValue β€” find a hierarcicaly valued option instance 🫢

✨ SYNOPSIS ✨

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

const tOptionValue * optionFindValue(const tOptDesc * odesc, char const
* name, char const * val);

πŸ¦‹ DESCRIPTION πŸ¦‹

This routine will find an entry in a nested value option or configurable. It searches through the list and returns a matching entry. Literally its whole job, and it ate. πŸ’…

  • odesc β€” an option with a nested arg type.
  • name β€” name of value to find.
  • val β€” the matching value.

πŸ‘‘ RETURN VALUE πŸ‘‘

a compound value structure ✨

πŸ’€ ERRORS πŸ’€

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. And yes, the original really trails off with @end itemize right there, so we're preserving that lil formatting moment too: @end itemize

🌈 SEE ALSO 🌈

The info documentation for the -lopts library. πŸ“š

And the whole bestie roster:


Sign-off from the footer, bestie: this is optionFindValue(3) from the Programmer's Manual, dated 2018-08-26. Stay iconic, keep your nested values close, and may your errno always make sense. πŸŽ€πŸ’–πŸ¦‹