GENDERS_ISNODE(3)

πŸ’– GENDERS_ISNODE(3) πŸ’–

okay bestie, welcome to libgenders β€” this is the manual page for genders_isnode, genders_isattr, and genders_isattrval, aka the node, attribute, and value check routines. they're in the LIBGENDERS crew and honestly? they're little icons. let's get into it πŸ’…


✨ NAME ✨

genders_isnode, genders_isattr, genders_isattrval β€” the node, attribute, and value check routines. yes, all three, one page, they're a package deal 🫢


✨ SYNOPSIS ✨

#include <genders.h>

int genders_isnode(genders_t handle, const char *node);

int genders_isattr(genders_t handle, const char *attr);

int genders_isattrval(genders_t handle, const char *attr, const char
*val);

✨ DESCRIPTION ✨

genders_isnode() β€” it tests whether the node that node points at is listed in the genders file. and if node is NULL? no worries, it just tests the current node instead. lowkey convenient.

genders_isattr() β€” it tests whether the attribute that attr points at is listed for some node in the genders file.

genders_isattrval() β€” it tests whether the attribute attr is equal to the value val for some node in the genders file. it's giving "are these two a thing?" πŸ’ž


✨ RETURN VALUES ✨

for genders_isnode(): if node is listed in the genders file, 1 comes back. if it's not listed, 0 comes back. no in-between, we love a binary queen πŸ‘‘

for genders_isattr(): if attr is listed in the genders file, 1 comes back. if it's not listed, 0 comes back.

for genders_isattrval(): if attr=val is listed in the genders file, 1 comes back. if it's not listed, 0 comes back.

😭 and on error? all three of them return -1, and an error code gets returned in handle. you can grab that error code with genders_errnum(3), and a lil description of it with genders_strerror(3). the error codes live in genders.h.

✨ ERRORS ✨

  • GENDERS_ERR_NULLHANDLE β€” the handle parameter is NULL. bestie, the genders handle has to be created with genders_handle_create(3) first, you can't just rock up empty-handed πŸ’€
  • GENDERS_ERR_NOTLOADED β€” genders_load_data(3) has not been called to load genders data. no data, no vibes.
  • GENDERS_ERR_PARAMETERS β€” an incorrect parameter has been passed in. wrong parameter, blocked 🚫
  • GENDERS_ERR_MAGIC β€” handle has an incorrect magic number. either handle does not point to a genders handle, or handle has been destroyed by genders_handle_destroy(3). it's giving haunted ✨

✨ FILES ✨

  • /usr/include/genders.h

✨ SEE ALSO ✨

libgenders(3), genders_handle_create(3), genders_load_data(3), genders_errnum(3), genders_strerror(3)


and that's the whole page, bestie. you ate that πŸ“

this one came from LLNL, dated August 2003, and it's the GENDERS_ISNODE(3) page from LIBGENDERS β€” periodt πŸ’–βœ¨πŸŽ€