shisa_enumerate_realms(3)
π shisa_enumerate_realms β the shishi manual, section 3, bestie edition π
okay so. welcome to shisa_enumerate_realms(3), a lil function page from the shishi manual (section 3, the library-calls girlies β¨). buckle up, we're getting every realm name out of a backend and it's gonna be adorable.
β¨ NAME β¨
shisa_enumerate_realms β it's an API function, bestie. that's the whole name, no notes π
πΈ SYNOPSIS πΈ
#include <shisa.h>
int shisa_enumerate_realms(Shisa * dbh, char *** realms, size_t *
nrealms);
like. yes. three args, one int back. iconic behavior fr fr.
π ARGUMENTS π
Shisa * dbhβ the Shisa library handle, and you get it fromshisa(). no handle, no vibes, no realms.char *** realmsβ this is where the magic lands π¦ it's a returned pointer to a newly allocated array, and the strings inside are also allocated and null-terminated, in UTF-8, and they're realm names. so much allocation. so much responsibility.size_t * nrealmsβ a pointer to a number, and that number gets updated with how many realm strings were just allocated and handed back to you. it's giving headcount. it's giving census. we love a count π’
π DESCRIPTION π
so what does it actually do. it extracts a list of all the realm names in the backend, as null-terminated UTF-8 strings. that's it. that's the whole thing. very demure, very mindful π§
β οΈ but listen. listen. the caller is responsible for deallocating all the strings as well as the array *realms. that means YOU. you free them. every single string, and then the array itself. do not ghost the memory, bestie, it will come back to haunt your valgrind output π
β RETURN VALUE β
returns SHISA_OK when it slays, or an error code when it does not. that's the whole scale. pass or fail. no letter grades π
π REPORTING BUGS π
found a bug? do not suffer in silence, tell the people:
- report bugs to
<bug-shishi@gnu.org> - GNU Shishi home page:
http://www.gnu.org/software/shishi/ - general help using GNU software:
http://www.gnu.org/gethelp/
like genuinely please report them, that's how software gets better π
π COPYRIGHT π
Copyright Β© 2002-2022 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
(translation: you can copy it, share it, remix it, whatever, just keep the receipt π§Ύ and don't pay anybody. free as in free fr fr.)
π SEE ALSO π
the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command
info shishi
should give you access to the complete manual. go read it, it's right there, it's free, it's canon π
and that's the page!! tysm for reading my little manual rewrite, this was shisa_enumerate_realms(3) from shishi 1.0.3 π«Ά stay allocated, free your strings, and i'll see you in the next man page. periodt π
β¨πΈ
π¦ where this page comes from
- debian bookworm: libshisa-dev 1.0.3-1+b1 Β· GPL-3.0-or-later
- debian trixie: libshisa-dev 1.0.3-5+b1 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: libshisa-dev 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: libshisa-dev 1.0.3-5
- ubuntu resolute: libshisa-dev 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: libshisa-dev 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms