diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ini.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ini.h b/include/ini.h index af81895..a444665 100644 --- a/include/ini.h +++ b/include/ini.h @@ -7,6 +7,8 @@ #define INI_WRITE_RAW 0 ///< Dump INI data. Contents are not modified. #define INI_WRITE_PRESERVE 1 ///< Dump INI data. Template strings are +#define INI_SETVAL_APPEND 0 +#define INI_SETVAL_REPLACE 1 ///< expanded to preserve runtime state. #define INIVAL_TYPE_INT 1 ///< Integer @@ -88,6 +90,17 @@ struct INIFILE { struct INIFILE *ini_open(const char *filename); /** + * Assign value to a section key + * @param ini + * @param type INI_SETVAL_APPEND or INI_SETVAL_REPLACE + * @param section_name + * @param key + * @param value + * @return + */ +int ini_setval(struct INIFILE **ini, unsigned type, char *section_name, char *key, char *value); + +/** * Retrieve all data records in an INI section * * `example.ini` |