![]() | ![]() | ![]() | [Insert name here] Reference Manual | ![]() |
---|
int config_get_section (config_t *cfg, const char *section, int *line); const char* config_get (config_t *cfg, const char *section, const char *entry, int *line); int config_set (config_t *cfg, const char *section, const char *entry, const char *val); config_t* config_open (const char *filename); int config_close (config_t *cfg);
int config_get_section (config_t *cfg, const char *section, int *line);
If section is found, line is updated to reflect the line where the section was found.
cfg : | |
section : | Section we are searching for. |
line : | Pointer to a line number we should start the search at. |
Returns : | 0 if the section was found, -1 otherwise. |
const char* config_get (config_t *cfg, const char *section, const char *entry, int *line);
cfg : | |
section : | |
entry : | |
line : | |
Returns : |
|
int config_set (config_t *cfg, const char *section, const char *entry, const char *val);
Set an entry 'entry' to the specified value, and, in case it is not NULL, in the specified section in the config file identified by 'cfg'.
cfg : | Configuration file identifier. |
section : | Section where the entry should be set. |
entry : | Entry to set. |
val : | Value for the entry. |
Returns : | 0 on success, -1 otherwise. |
config_t* config_open (const char *filename);
Open the configuration file pointed to by 'filename' and load it into memory, the returned config_t object will have to be used for any operation on this configuration file.
filename : | The configuration file. |
Returns : | a config_t object on success, NULL otherwise. |
int config_close (config_t *cfg);
Close the 'cfg' object, used to access the configuration file. Any change made with the config_set() function call will be written.
cfg : | Configuration file identifier. |
Returns : | 0 on success, -1 otherwise. |
<<< ssl-registration-msg | prelude-path >>> |