|
ArvernOS
|
Data Structures | |
| struct | inish_kv_pair_t |
| struct | inish_array_t |
| struct | inish_section_t |
| struct | inish_config_t |
Functions | |
| inish_config_t * | inish_load (const char *filename) |
| void | inish_free (inish_config_t *conf) |
| inish_section_t * | inish_get_section (inish_config_t *conf, const char *name) |
| inish_kv_pair_t * | inish_get_kv_pair (inish_section_t *section, const char *key) |
| inish_array_t * | inish_get_array (inish_section_t *section, const char *key) |
| char * | inish_get_string (inish_section_t *section, const char *key) |
| opt_uint64_t | inish_get_int (inish_section_t *section, const char *key) |
| opt_bool_t | inish_get_bool (inish_section_t *section, const char *key) |
| uint8_t | inish_get_ipv4 (inish_section_t *section, const char *key, uint8_t ip[4]) |
inish configuration parser. inish supports more features than the INI format and less than TOML... This module implements a recursive descent parser, see http://www.rioki.org/2016/04/18/recusive-descent-parser.html for some more information.
| void inish_free | ( | inish_config_t * | conf | ) |
Releases the memory allocated after inish_read() has run. This function should be call once the inish configuration isn't used anymore.
| conf | the inish configuration to free |
| inish_array_t * inish_get_array | ( | inish_section_t * | section, |
| const char * | key ) |
Returns a inish array structure. This is the "raw" array.
| section | a inish section |
| key | the key of the array to return |
| opt_bool_t inish_get_bool | ( | inish_section_t * | section, |
| const char * | key ) |
Returns the boolean value for the given key.
| section | a inish section |
| key | the key of the value to return |
| opt_uint64_t inish_get_int | ( | inish_section_t * | section, |
| const char * | key ) |
Returns the integer value for the given key.
| section | a inish section |
| key | the key of the value to return |
| uint8_t inish_get_ipv4 | ( | inish_section_t * | section, |
| const char * | key, | ||
| uint8_t | ip[4] ) |
Loads an IPv4 address based on a value for the given key.
| section | a inish section |
| key | the key of the value to return |
| ip | the array that should hold the IPv4 address |
| inish_kv_pair_t * inish_get_kv_pair | ( | inish_section_t * | section, |
| const char * | key ) |
Returns a inish key/value structure. This is the "raw" key/value but inish also offers specialized functions to directly get the value for a given key.
| section | a inish section |
| key | the key of pair to return |
| inish_section_t * inish_get_section | ( | inish_config_t * | conf, |
| const char * | name ) |
Returns a inish section.
| conf | a inish configuration |
| name | the name of the section to return |
| char * inish_get_string | ( | inish_section_t * | section, |
| const char * | key ) |
Returns the string value for the given key.
| section | a inish section |
| key | the key of the value to return |
| inish_config_t * inish_load | ( | const char * | filename | ) |
Parses and loads a inish configuration file in memory.
| filename | the configuration filename to load |