GENDERS_ISNODE(3)
π GENDERS_ISNODE(3) π
okay bestie, welcome to the libgenders corner of the universe β¨ this is the LIBGENDERS manual, and we're doing the node / attribute / value check routines today. yes it's three functions in one page, we're being efficient, we love that for us π
β¨ NAME β¨
genders_isnode, genders_isattr, genders_isattrval β the node, attribute, and value check routines π
π¦ 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 πΈ
so here's the vibe. three little yes/no besties, all here to answer your questions about the genders file π
genders_isnode()β tests if the node pointed to bynodeis listed in the genders file. and bestie, ifnodeisNULL? it tests the current node instead. no cap β¨genders_isattr()β tests if the attribute pointed to byattris listed for some node in the genders file πgenders_isattrval()β tests if the attribute pointed to byattris equal to the value pointed to byvalfor some node in the genders file. so like, theattr=valsituation, you know the one π«Ά
π₯ RETURN VALUES π₯
here's the tea on what you get back β
- For
genders_isnode(): ifnodeis listed in the genders file,1is returned. if it is not listed,0is returned. - For
genders_isattr(): ifattris listed in the genders file,1is returned. if it is not listed,0is returned. - For
genders_isattrval(): ifattr=valis listed in the genders file,1is returned. if it is not listed,0is returned.
and on error? all three of them return-1π and an error code gets returned inhandle. you can grab that error code withgenders_errnum(3), and a lil description of it withgenders_strerror(3). the error codes live ingenders.h.
π ERRORS π
the ways things can go wrong, a tragic anthology π
GENDERS_ERR_NULLHANDLEβ thehandleparameter isNULL. the genders handle has to be created withgenders_handle_create(3)first, bestie, that's the rule πGENDERS_ERR_NOTLOADEDβgenders_load_data(3)has not been called to load genders data. no data, no answers, periodt πGENDERS_ERR_PARAMETERSβ an incorrect parameter has been passed in. we don't know her, she's not on the list π«GENDERS_ERR_MAGICβhandlehas an incorrect magic number β¨πͺhandledoes not point to a genders handle, orhandlehas been destroyed bygenders_handle_destroy(3). rip, she's gone π
π FILES π
/usr/include/genders.h
that's the one, that's the file π
π SEE ALSO π
go read these too, they're iconic, i'm obsessed:
and that's the whole page, bestie!! π«Ά this lil masterpiece came from LLNL, dated August 2003 (yes she's vintage, she's a classic, we respect our elders π), and you'll find her filed under GENDERS_ISNODE(3) in the LIBGENDERS manual. mwah, go forth and check your nodes π
β¨πΈ
π¦ where this page comes from
- epel 10: libgenders-devel 1.28.1~^20231119git27b915d-5.el10_2 Β· GPL-2.0-only
- fedora 43: libgenders-devel 1.28.1~^20231119git27b915d-5.fc43 Β· GPL-2.0-only
- fedora 43: libgenders-devel 1.28.1~^20231119git27b915d-5.fc43 Β· GPL-2.0-only
- fedora 44: libgenders-devel 1.28.1~^20231119git27b915d-6.fc44 Β· GPL-2.0-only
- fedora 44: libgenders-devel 1.28.1~^20231119git27b915d-6.fc44 Β· GPL-2.0-only
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- opensuse-leap 16.0: genders-devel 1.32-bp160.1.11 Β· GPL-2.0-or-later
- Copyright (C) 2007-2019 Lawrence Livermore National Security, LLC
- Copyright (C) 2001-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms