list_config_sections(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– list_config_sections(3) β€” the Allegro manual, but make it cute πŸ’–

okay bestie, so this one lives in the Allegro manual (yes, the Allegro game programming library, we're in our game-dev era ✨) and it's literally the girl whose whole job is telling you what sections exist in your current config. no cap.


✨ NAME ✨

list_config_sections β€” lists the names of all sections available in the current configuration. Allegro game programming library. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

int list_config_sections(const char ***names);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so let's talk about names. it's a pointer to an array of strings, right? and here's the vibe check:

  • if it points to a NULL pointer, then the list gets allocated for you πŸ’…
  • otherwise, it gets re-allocated πŸ”

after the function returns, that array is gonna contain the names of all the sections in the current configuration. like, every single one. periodt.

bestie, listen β€” when you're done with that memory, you have to free it again with free_config_entries. don't just leave it lying around, that's not main character energy, that's a leak 😭

also if you want more deets (and honestly, an actual example of how to use this), go check out list_config_entries. it's giving tutorial. 🫢


πŸ’€ RETURN VALUE πŸ’€

it returns the number of valid strings sitting in the names array. that's it. that's the number. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie!! this lil icon came from Allegro, version 4.4.3 🌈 β€” go forth and list those sections, you absolute legend πŸ’…βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from