PatchworkOS
Loading...
Searching...
No Matches
config.h File Reference
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  config_array_t
 Configuration array structure. More...
 

Typedefs

typedef struct config config_t
 

Functions

config_tconfig_open (const char *prefix, const char *name)
 Open a configuration file.
 
void config_close (config_t *config)
 Close a configuration file.
 
const char * config_get_string (config_t *config, const char *section, const char *key, const char *fallback)
 Get a string value from a configuration file.
 
int64_t config_get_int (config_t *config, const char *section, const char *key, int64_t fallback)
 Get an integer value from a configuration file.
 
bool config_get_bool (config_t *config, const char *section, const char *key, bool fallback)
 Get a boolean value from a configuration file.
 
config_array_tconfig_get_array (config_t *config, const char *section, const char *key)
 Get an array of strings from a configuration file.
 
void config_array_free (config_array_t *array)
 Free a configuration array.