GENDERS_GETATTR_ALL(3)
π GENDERS_GETATTR_ALL(3) π
okay so bestie, welcome to genders_getattr_all from the LIBGENDERS manual, section 3, and lemme tell you this one is so useful. she's giving "grab literally every attribute in the genders file at once" energy and honestly? obsessed. π
β¨ NAME β¨
genders_getattr_all β get all the attributes stored in a genders file π¦
β¨ SYNOPSIS β¨
#include <genders.h>
int genders_getattr_all(genders_t handle, char *attrs[], int len);
β¨ DESCRIPTION β¨
so like, genders_getattr_all() pulls all the attributes that exist in the genders file that's associated with handle. π
where do they go? they get stored in the attribute list that attrs is pointing at. and len? len is you telling it how many elements can actually fit in that attribute list, no cap.
now listen, because this is the part where people get got: you do not wanna roll up with a list that's too small to hold every attribute. that's not the vibe. π so before you do this, use genders_getnumattrs(3) to figure out the minimum number of elements that attrs needs to be able to store. OR β and this is the glow-up move β you could use genders_attrlist_create(3) to make a list that's guaranteed to be big enough for all the attributes. iconic behaviour, fr fr. β¨
β¨ RETURN VALUES β¨
- on success π: you get back the number of attributes that got stored in
attrs. - on error π: you get
-1, and an error code gets dropped intohandle.
you can grab that error code with genders_errnum(3), and get a whole description of what it means with genders_strerror(3). the error codes themselves live in genders.h. π
β¨ ERRORS β¨
GENDERS_ERR_NULLHANDLEβ thehandleparameter isNULLbestie π the genders handle has to be created withgenders_handle_create(3)first, no shortcuts.GENDERS_ERR_NOTLOADEDβgenders_load_data(3)was never called to load the genders data. she's empty. nothing to read. πGENDERS_ERR_OVERFLOWβ the list thatattrspoints to is not large enough to store all the attributes. told you this would happen. πGENDERS_ERR_PARAMETERSβ an incorrect parameter got passed in. wrong vibe, wrong input. π«GENDERS_ERR_NULLPTRβ a null pointer was found chillin' in the list that got passed in. πGENDERS_ERR_MAGICβhandlehas an incorrect magic number πͺ which meanshandledoes not point to a genders handle at all, OR it's already been destroyed bygenders_handle_destroy(3). rip to that handle, she's gone. β°οΈ
β¨ FILES β¨
/usr/include/genders.hπ
β¨ SEE ALSO β¨
libgenders(3), genders_handle_create(3), genders_load_data(3), genders_getnumattrs(3), genders_attrlist_create(3), genders_errnum(3), genders_strerror(3) π
and that's the whole page, bestie!! π«Ά this one came straight from LLNL, dated August 2003 β yeah she's an elder but she still ate, periodt. π β¨
π¦ 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