GENDERS_GETNUMNODES(3)
π GENDERS_GETNUMNODES π
ok so bestie, this is a page from LIBGENDERS β the genders_getnumnodes(3) family of stats routines. yes we're doing math today but it's the cute kind i promise π
β¨ NAME β¨
genders_getnumnodes, genders_getnumattrs, genders_getmaxattrs, genders_getmaxnodelen, genders_getmaxattrlen, genders_getmaxvallen β the genders statistics routines π (basically the girls who count things for you)
πΈ SYNOPSIS πΈ
#include <genders.h>
int genders_getnumnodes(genders_t handle);
int genders_getnumattrs(genders_t handle);
int genders_getmaxattrs(genders_t handle);
int genders_getmaxnodelen(genders_t handle);
int genders_getmaxattrlen(genders_t handle);
int genders_getmaxvallen(genders_t handle);
π¦ DESCRIPTION π¦
ok so like, all six of these girls β genders_getnumnodes(), genders_getnumattrs(), genders_getmaxattrs(), genders_getmaxnodelen(), genders_getmaxattrlen(), and genders_getmaxvallen() β pull up statistics about the genders file that's associated with handle. that's the whole job. they're gossipy like that π
genders_getnumnodes()β returns the number of nodes stored in the genders file.genders_getnumattrs()β returns the number of attributes listed in the genders file.genders_getmaxattrs()β returns the maximum number of attributes listed with a node in the genders file.genders_getmaxnodelen()β returns the maximum length of any node listed in the genders file.genders_getmaxattrlen()β returns the maximum length of any attribute listed in the genders file.genders_getmaxvallen()β returns the maximum length of any attribute value listed in the genders file.
and why do we care, bestie? because in general, these six are used so a programmer can dynamically allocate a proper amount of memory to store genders file information in. no cap, that's the entire plot. you count first so you don't over- or under-allocate. it's giving β¨responsible memory managementβ¨ π
π RETURN VALUES π
- on success,
0is returned. slay. - on error,
-1is returned, and an error code is returned inhandle.
the error code can be retrieved via genders_errnum(3), and a description of the error code can be retrieved via genders_strerror(3). error codes are defined in genders.h.
π ERRORS π
not me listing every possible way this can go wrong π but like, fr fr, know your enemies.
GENDERS_ERR_NULLHANDLEβ thehandleparameter isNULL. the genders handle must be created withgenders_handle_create(3). like bestie you gotta make the handle first, it doesn't just appear π«ΆGENDERS_ERR_NOTLOADEDβgenders_load_data(3)has not been called to load genders data. no data loaded, no stats, sorry babe.GENDERS_ERR_MAGICβhandlehas an incorrect magic number.handledoes not point to a genders handle, orhandlehas been destroyed bygenders_handle_destroy(3). the vibe check failed, the magic is gone, it's over π
π FILES π
/usr/include/genders.h
π SEE ALSO π
ok that's the whole page bestie, you ate it up π β¨
this icon of a manpage was brought to you by LLNL, dated August 2003 β yes she's vintage, yes she still serves ππ
π¦ 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
- 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