04/03/2019 at 03:34 •
I needed to revisit this over the past couple days and so I've made a number of changes and improvements to the code. The interface remains mostly the same, with the addition of some new functions:
- cfg_set_array() - set multiple key/value pairs in one call
- cfg_delete_array() - delete multiple keys in one call
- cfg_prune() - "trim" the cfg_struct to only the whitelisted keys the user wants
- cfg_get_keys() - return a list of all keys currently stored in the struct
Other minor improvements include better handling of NULL values on input, and the file is no longer loaded in reverse order (so the load / save should not change the file any more).
I've updated the downloads, webpage, and Doxygen manual with the changes. Remember, the current home of cfg_parse is still the Sourceforge page here:
If anyone wants to do a code review I'd love another set of eyes.
04/21/2015 at 17:02 •
The only difference between this and r5 is the addition of extern "C" in the header file. This enables usage within C++ projects.
08/28/2014 at 23:21 •
Just a little source cleanup for the latest release. This is very stable and I use it in lots of my hobby projects now.
You can either download the zip file with code, or add it as a svn:externals property to automatically stay up-to-date. A sample line would be:
svn propset svn:externals "cfg_parse svn://svn.code.sf.net/p/cfg-parse/code/trunk" .