|
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
|
Functions | |
| int | app_subsystems_init (struct App *app, const SubsystemDescriptor *table) |
Walk table forward calling init() until the sentinel {0}. | |
| void | app_subsystems_cleanup (struct App *app, const SubsystemDescriptor *table) |
Walk table in reverse, calling cleanup() for each entry. | |
Variables | |
| static const char *const | LOG_TAG = "suckless-ogl.subsystem" |
| void app_subsystems_cleanup | ( | struct App * | app, |
| const SubsystemDescriptor * | table | ||
| ) |
Walk table in reverse, calling cleanup() for each entry.
Skips entries whose cleanup function pointer is NULL. The table must be terminated by a {0} sentinel entry. Intended for the normal shutdown path after a successful init.
| int app_subsystems_init | ( | struct App * | app, |
| const SubsystemDescriptor * | table | ||
| ) |
Walk table forward calling init() until the sentinel {0}.
On the first failure at index N, cleanup() is called in reverse for entries [N-1 .. 0], then 0 is returned. The table must be terminated by a {0} sentinel entry.
|
static |