list_config_sections(3alleg4)
β¨ list_config_sections β¨
okay bestie, welcome to the Allegro manual π this is list_config_sections(3alleg4) and it's literally the function that tells you every section name chillin' in your current configuration. it's giving backstage pass to your config file π
πΈ NAME πΈ
list_config_sections β lists the names of all sections available in the current configuration. (also: Allegro game programming library, hiii π)
π¦ SYNOPSIS π¦
#include <allegro.h>
int list_config_sections(const char ***names);
like yes, that's a triple pointer. no, we're not gonna panic about it. it's iconic, it ate, moving on π
π DESCRIPTION π
so the names parameter is a pointer to an array of strings. that's the whole vibe.
here's the tea π: if it points to a NULL pointer, the list gets allocated. if it doesn't, the list gets re-allocated. either way, once the function comes back, that array is gonna contain the names of all the sections in the current configuration. every single one. no crumbs left behind π
and listen, when you're done being obsessed with your shiny new list, use free_config_entries to free the allocated memory again, okay? don't leave it hanging, that's rude π
want more info and an actual example of how to use this thing? go peek at list_config_entries. it's the sister function, they're a duo, iykyk π«Ά
β RETURN VALUE β
returns the number of valid strings in the names array. that's your count, bestie, use it wisely β¨
π SEE ALSO π
list_config_entries(3alleg4)set_config_file(3alleg4)get_config_string(3alleg4)free_config_entries(3alleg4)
and that's the whole page, no notes π
this was Allegro version 4.4.3, page list_config_sections(3alleg4) β go forth and list those sections, main character πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms