git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

scenefx/include/util/env.h (504B)

 1 #ifndef UTIL_ENV_H
 2 #define UTIL_ENV_H
 3 
 4 #include <stdbool.h>
 5 #include <unistd.h>
 6 
 7 /**
 8  * Parse a bool from an environment variable.
 9  *
10  * On success, the parsed value is returned. On error, false is returned.
11  */
12 bool env_parse_bool(const char *option);
13 
14 /**
15  * Pick a choice from an environment variable.
16  *
17  * On success, the choice index is returned. On error, zero is returned.
18  *
19  * switches is a NULL-terminated array.
20  */
21 size_t env_parse_switch(const char *option, const char **switches);
22 
23 #endif