Small configuration file parser library for C.
fmemopen()
in Windows UWP applicationscfg_getopt(cfg, "sub=name|option")
, i.e., get an option from a sub-section, by Peter RosinCFGF_MODIFIED
flag, to detect changes to settings in memory after parsing, by Peter Rosincfg_getopt_secidx()
strdup()
replacementfmemopen()
replacementQSTR: ...
CFG_PTR_CB()
regression, segfaults when, e.g., cfg_free()
is called. Found and fixed by Peter RosinCFGF_RESET
flag if cfg_setmulti()
family failcfg_setopt()
for PTR optionsThis is a security patch release for CVE-2018-14447. The vulnerability affects all releases since v3.1 when the CFGF_COMMENTS
functionality was first introduced.
lexer.l:trim_whitespace()
.1.1.0 -> 2.0.0
CFGF_IGNORE_UNKNOWN
support, libConfuse now properly ignores any type and sub-section without the need for declaring an __unknown
option. When the flag is set all unknown options, including unknown sub-sections with, in turn, unknown options, are now fully ignoredCFGF_COMMENTS
flag in cfg_init()
Build unit tests statically for easier debugging
Issue #21: Major refactor of lexer to fix memory leaks, cfg_free()
now properly releases all memory. By Joachim Nilsson @troglobit
Issue #64: Fixed MSVC build errors, by George Koskeridis @Gikoskos
Issue #65: SIGSEGV when parsed default values are used with include, by Dmitri Zhabinski
Issue #71: Fix syntax in rpm spec file, for CentOS/RHEL7
Issue #73: Adjust gettext version requirement to build on CentOS/RHEL7.
GNU gettext v0.18.2.1 update AM_GNU_GETTEXT()
to use AC_PROG_MKDIR_P
instead of AM_PROG_MKDIR_P
, but v0.18.1.1 is included in Ubuntu 12.04 LTS. Fortunately Ubuntu 14.04 LTS ships v0.18.3.1 and Debian Jessie ships v0.19.3. Unfortunately, CentOS7 and RHEL7 ships v0.18.2.1, so for best compat. level at this point in time we require v0.18.2.
Issue #74: Fix typos in documentation, by Luca Ceresoli
Issue #79: Add fmemopen()
compat for *BSD, including macOS
This release signifies a major change in libConfuse. On out-of-memory conditions at run time, invalid API input, and some other odd use-cases, libConfuse will no longer assert()
. Instead, NULL
or CFG_FAIL
is returned with an error code for you to handle. For some users this will completely change how your application works, so heads up! The library ABI version has also been stepped due to this.
Special thanks in this release goes out to Frank Hunleth, Peter Rosin and David Grayson for their tireless efforts in helping improve this library!
Note: libConfuse no longer calls setlocale()
for LC_MESSAGES
and LC_CTYPE
. See the documentation for cfg_init()
for details.
CFGF_IGNORE_UNKNOWN
flag in the documenation for
more information. Idea and implementation by Frank Hunleth.cfg_opt_getval()
on options that are CFGF_MULTI
sections,
by Peter Rosin.cfg_setmulti()
and cfg_opt_setmulti()
, by Peter Rosin.autoreconf
in autogen.sh
instead of calling tools separately.setlocale()
intended to localize messages, with
LC_MESSAGES
, and region specific types, with LC_CTYPE
. This is
now the responsibility of the user of the library.CFGF_DEPRECATED
and CFGF_DROP
option flags. The
former causes libConfuse to print a deprecated warning message and the
latter drops the read value on input. Idea and implementation by
Sebastian Geiger. Issue #24HACKING.md
document to detail maintenance and release checklistsstrdup()
. Issue #37cfg_setopt()
, by Peter Rosincfg_setopt()
fails parsing, do not lose old value,
by Peter Rosin.cfg_init()
does not report error on multiple options with
the same name. Fixed by Peter Rosin.cfg_parse()
, by J.J. GreenCFG_SIMPLE_STR
for doxygen, by Nathan Phillip Brink-ansi
fixes by Carlo Marcelo Arenas Belonconst
strings, by Craig McQueenmake distcheck
and out-of-source builds, by Nathan Phillip Brink.gitignore
files, by Carlo Marcelo Arenas BelonCFG_SIMPLE_INT
on 64-bit systems, by Carlo Marcelo Arenas Belon