Small configuration file parser library for C.

Overview

libConfuse

Travis Status Coverity Status

Introduction

libConfuse is a configuration file parser library written in C. It supports sections and (lists of) values, as well as other features such as single/double quoted strings, environment variable expansion, functions and nested include statements. Values can be strings, integers, floats, booleans, and sections.

The goal is not to be the configuration file parser library with a gazillion of features. Instead, it aims to be easy to use and quick to integrate with your code.

Please ensure you download a versioned archive from: https://github.com/libconfuse/libconfuse/releases/

Documentation

Examples

Build & Install

libConfuse employs the GNU configure and build system. To list available build options, start by unpacking the tarball:

tar xf confuse-3.2.2.tar.xz
cd confuse-3.2.2/
./configure --help

For most users the following commands configures, builds and installs the library to /usr/local/:

./configure && make -j9
sudo make install
sudo ldconfig

See the INSTALL file for the full installation instructions.

When checking out the code from GitHub, use ./autogen.sh to generate a configure script. This means you also need the following tools:

  • autoconf
  • automake
  • libtool
  • gettext
  • autopoint
  • flex

To build the documentation you also need the following tools:

  • doxygen
  • xmlto

This is an optional step, so you must build it explicitly from its directory:

cd doc/
make documentation

Origin & References

libConfuse was created by Martin Hedenfalk and released as open source software under the terms of the ISC license. It was previously called libcfg, but the name was changed to not confuse with other similar libraries. It is currently developed and maintained at GitHub. Please use the issue tracker to report bugs and feature requests.

Comments
  • Msvc autotools

    Msvc autotools

    Ok, with all the talk about AppVeyor/MSYS2 I decided to try to build libconfuse using the original MSYS (which I have installed, I don't have MSYS2) and MSVC 2010. I bumped into a number of difficulties, all of which I have solved in this branch. Except one, namely the C99 initializers from when the simple option union was introduced (57b9738acd5dd976bac95270885ec3532b18b553). I reverted that commit on top of this branch and I was able to build with my old tools like this:

    Open a MSVC 2010 command shell, and launch MSYS from it. From within the MSYS shell, do .../configure --disable-examples CC=cl CFLAGS=-MD RANLIB=: NM="dumpbin -symbols" AR=lib make make check

    Everything passes. I think the C99 initializers are supported by newer MSVC, so that particular problem will solve itself over time. Other than that, for projects that I maintain, I detest multiple build systems. Therefore, I very much favor supporting MSVC through autotools instead of project files that always ends up lagging behind.

    However, that puts Windows user in a position where they have to install MSYS. But the patches in this branch doesn't look all that nasty, most of them just shows that building with older MSVC hasn't been done in a while. Has anybody built with newer MSVC recently? And these patches doesn't stop anyone from keeping maintaining the windows project files...

    Anyway, it should be possible to add a build with MSYS/MSVC on AppVeyor. But someone has to verify that the work I put into automake/libtool to support MSYS/MSVC a couple of years ago works with MSYS2 as well, I can't really see why it would fail, but I wouldn't be surprised if there is some quirk to figure out...

    Cheers, Peter

    opened by peda-r 40
  • funopen() unavailable in gcc-mingw-w64-x86-64

    funopen() unavailable in gcc-mingw-w64-x86-64

    In upgrading to libconfuse 3.1, I am now receiving the following error on mingw builds for Windows:

    libconfuse.a(libconfuse_la-fmemopen.o): In function `fmemopen':
    fmemopen.c:110: undefined reference to `funopen'
    

    This can be reproduced on Debian/Ubuntu by installing the mingw crosscompiler:

    sudo apt install gcc-mingw-w64-x86-64
    cd confuse
    CC=x86_64-w64-mingw32-gcc ./configure --enable-shared=no --disable-examples
    make
    

    Then try linking libconfuse.a to a trivial app. Since I never build the libconfuse examples in my Windows builds, I hadn't realized that they didn't compile with mingw, but in theory, they could show the issue too. If nothing else, you can see the warning the funopen isn't defined when compiling fmemopen.c.

    I'm not completely sure how best to work around this issue. In the past when I've run into uses of fmemopen, it has been pretty easy to remove them, but I don't think that's the case here. However, I also don't know how one would implement fmemopen without funopen. Hence I'm posting here to see if there are any other ideas.

    opened by fhunleth 23
  • Add feature to deprecate config options

    Add feature to deprecate config options

    We use libconfuse in tilda and often have the problem that we want to deprecate config options but this leads to problems:

    When the config option is still present in the config file (e.g. for upgrading users) then libconfuse throws an error and we need to reset the config.

    We are currently discussing if we replace libconfuse with another config library due to this, or if we are going to add a new feature to libconfuse. I would like to know if this project is still being actively maintained/developed and how likely it is that a patch will be accepted into libconfuse. If a patch would be accepted, then we might add a CFGF_DEPRECATED to the list of flags that causes libconfuse to ignore the config value and drop it when the config file is saved next. Possibly we could also split this into separate flags with a CFGF_DROP flag.

    Please let us know what your plans with libconfuse are and if we can somehow help you.

    opened by lanoxx 17
  • Add cfg_setmulti and cfg_opt_setmulti.

    Add cfg_setmulti and cfg_opt_setmulti.

    No PR in sight, that can't be right :-)

    From the commit message:

    Consider that you have a command line parser, and have parsed a line into tokens. It turns out that the first token, the command, is a 'set-cfg-variable' type of command and that the other tokens describe the new value, and possibly what variable to set.

    I.e. you are given a command "set foo-list bar gazonk zilch"

    and as a response to this command you want to set the "foo-list" option to { "bar", "gazonk", "zilch" }. There is no current API to do this in a simple maner, if you want to cover up for the possibility of syntax errors during parsing and arbitrary number of command line arguments.

    So, add cfg_setmulti (and cfg_opt_setmulti) to support this.

    opened by peda-r 16
  • more compiling error on MSVC(MSVC6/MSVC2010).

    more compiling error on MSVC(MSVC6/MSVC2010).

    1. lexer.c not generated when compile use MSVC.
    2. issue for coding. --------------------Configuration: libConfuse - Win32 Debug-------------------- Compiling... confuse.c e:\github\libconfuse\src\confuse.c(838) : error C2059: syntax error : '.' e:\github\libconfuse\src\confuse.c(1123) : error C2065: 'ssize_t' : undeclared identifier e:\github\libconfuse\src\confuse.c(1123) : error C2146: syntax error : missing ';' before identifier 'n' e:\github\libconfuse\src\confuse.c(1123) : error C2065: 'n' : undeclared identifier e:\github\libconfuse\src\confuse.c(1124) : error C2143: syntax error : missing ';' before 'type' e:\github\libconfuse\src\confuse.c(1126) : error C2065: 'path' : undeclared identifier e:\github\libconfuse\src\confuse.c(1128) : error C2143: syntax error : missing ';' before 'type' e:\github\libconfuse\src\confuse.c(1137) : error C2065: 'np' : undeclared identifier e:\github\libconfuse\src\confuse.c(1139) : warning C4047: 'return' : 'char *' differs in levels of indirection from 'int ' e:\github\libconfuse\src\confuse.c(1145) : error C2079: 'st' uses undefined struct 'stat' e:\github\libconfuse\src\confuse.c(1325) : warning C4090: 'function' : different 'const' qualifiers e:\github\libconfuse\src\confuse.c(1325) : warning C4022: 'free' : pointer mismatch for actual parameter 1 e:\github\libconfuse\src\confuse.c(1329) : warning C4090: 'function' : different 'const' qualifiers e:\github\libconfuse\src\confuse.c(1329) : warning C4022: 'free' : pointer mismatch for actual parameter 1 Error executing cl.exe.

    libConfuse.dll - 9 error(s), 5 warning(s)

    opened by bygreencn 16
  • Unconditional call to setlocale() in cfg_init()

    Unconditional call to setlocale() in cfg_init()

    setlocale might interfere with what the app wants, and a followup setlocale call might destroy the returned string from a previous setlocale call (by the app).

    opened by peda-r 14
  • confuse.mo no such file or directory - I am following the instructions for building - to no avail

    confuse.mo no such file or directory - I am following the instructions for building - to no avail

    I follow the instructions as per INSTALL document and do the following. I have Win 7 and git bash console.```

    invoke the git bash console.

    cd c:/python36/confuse-3.2 ./configure # goes through all the checking - takes about one minute creates various files. configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating examples/Makefile config.status: creating po/Makefile.in config.status: creating m4/Makefile config.status: creating tests/Makefile config.status: creating doc/Makefile config.status: creating doc/Doxyfile config.status: creating libconfuse.pc config.status: creating libconfuse.spec config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile sh: __git_ps1: command not found`

    The last line sh: __git_ps1:command not found # I don't understand how this may assist me.

    $ make C:/mingw64/bin/make all-recursive make[1]: Entering directory 'C:/python36/confuse-3.2' Making all in m4 make[2]: Entering directory 'C:/python36/confuse-3.2/m4' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory 'C:/python36/confuse-3.2/m4' Making all in po make[2]: Entering directory 'C:/python36/confuse-3.2/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory 'C:/python36/confuse-3.2/po' Making all in src make[2]: Entering directory 'C:/python36/confuse-3.2/src' C:/Program Files/Git/usr/bin/sh.exe ../libtool --tag=CC --mode=compile gcc -DLOCALEDIR="/usr/local/share/locale" -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DBUILDING_DLL -g -O2 -MT libconfuse_la-confuse.lo -MD -MP -MF .deps/libconfuse_la-confuse.Tpo -c -o libconfuse_la-confuse.lo test -f 'confuse.c' || echo './'confuse.c /usr/bin/sh: C:/Program: No such file or directory make[2]: *** [makefile:479: libconfuse_la-confuse.lo] Error 127 make[2]: Leaving directory 'C:/python36/confuse-3.2/src' make[1]: *** [makefile:521: all-recursive] Error 1 make[1]: Leaving directory 'C:/python36/confuse-3.2' make: *** [makefile:407: all] Error 2 sh: __git_ps1: command not found

    Why do I get all these errors, "no such file or directory" and sh:__git_ps1 command not found when I got the *.zip package confuse-3.2.zip without modifying it?

    Thank you in advance, Anthony of Sydney

    opened by AnthonyTheKoala 13
  • Fixes to tests to support mingw-w64 (Windows)

    Fixes to tests to support mingw-w64 (Windows)

    This pull request fixes all the tests that were failing because of differences between mingw-w64 (a GCC compiler for Windows) and Linux. When I combined this pull request with pull request #27, I got all the tests to pass in MSYS2.

    opened by DavidEGrayson 12
  • Fix for #92 causes ABI break

    Fix for #92 causes ABI break

    0285479 introduced a new field comment in the middle of struct cfg_t which causes an ABI break.

    See

    • i3/i3status#224
    • https://bugs.debian.org/872078

    Seems #81 does not catch this.

    opened by sur5r 11
  • Fix issue #33: Reindent to Linux coding style

    Fix issue #33: Reindent to Linux coding style

    This pull request reindents the code base to Linux coding style, as proposed in issue #33, skipping only the Windows specific code in windows/ and examples/wincfgtest.c.

    Signed-off-by: Joachim Nilsson [email protected]

    opened by troglobit 10
  • Memory leak - failure to free lexer allocated memory.

    Memory leak - failure to free lexer allocated memory.

    Hey, I've stumbled across a possible memory leak - not sure whether it's intentional or not -

    It appears as if the free_cfg() library function neglects to free the yy_buffer_stack global variable.

    I externed the cfg_yylex_destroy() function and used it straight after calling to free_cfg() and the memory leak was gone.

    opened by nadav2051 9
  • Pass test suite with sanitizers

    Pass test suite with sanitizers

    Pass the testsuite when build with sanitizers, e.g. CFLAGS=-O1 -g -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-address-use-after-return=always -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=nullability -fsanitize=implicit-conversion -fsanitize=integer -fsanitize=float-divide-by-zero -fsanitize=local-bounds:

    • Avoid calling memcpy with NULL pointer and length 0 Found by running the test suite with undefined behavior sanitizer:

      confuse.c:674:18: runtime error: null pointer passed as argument 2, which is declared to never be null
      /usr/include/string.h:44:28: note: nonnull attribute specified here
          #0 0x55f77032e601 in cfg_dupopt_array ./libconfuse/src/confuse.c:674:2
          https://github.com/libconfuse/libconfuse/issues/1 0x55f770328227 in cfg_setopt ./libconfuse/src/confuse.c:1063:25
          https://github.com/libconfuse/libconfuse/pull/2 0x55f77032f537 in cfg_init_defaults ./libconfuse/src/confuse.c:861:4
          https://github.com/libconfuse/libconfuse/issues/3 0x55f770335dbb in cfg_init ./libconfuse/src/confuse.c:1877:2
          https://github.com/libconfuse/libconfuse/issues/4 0x55f770321ff7 in main ./libconfuse/tests/keyval.c:50:8
          https://github.com/libconfuse/libconfuse/issues/5 0x7f4bba429209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          https://github.com/libconfuse/libconfuse/pull/6 0x7f4bba4292bb in __libc_start_main csu/../csu/libc-start.c:389:3
          https://github.com/libconfuse/libconfuse/pull/7 0x55f7702623c0 in _start (./libconfuse/tests/keyval+0x3a3c0)
      
    • Avoid implicit integer conversions

      confuse.c:601:30: runtime error: implicit conversion from type 'long' of value -1 (64-bit, signed) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned)
          #0 0x55bb8fcd6f30 in cfg_getsec ./libconfuse/src/confuse.c:601:30
          https://github.com/libconfuse/libconfuse/issues/1 0x55bb8fcd23e4 in main ./libconfuse/tests/section_getopt.c:92:2
          https://github.com/libconfuse/libconfuse/pull/2 0x7f380da29209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
          https://github.com/libconfuse/libconfuse/issues/3 0x7f380da292bb in __libc_start_main csu/../csu/libc-start.c:389:3
          https://github.com/libconfuse/libconfuse/issues/4 0x55bb8fc123b0 in _start (./libconfuse/tests/section_getopt+0x3b3b0)
      
    • tests: check additional calls and results

    • tests: skip test with broken fmemopen under sanitizers fmemopen(2) is broken with address and memory sanitizer, see https://github.com/google/sanitizers/issues/628.

    opened by cgzones 1
  • Annotate cfg_error with format attribute

    Annotate cfg_error with format attribute

    Format attributes help compilers to warn on format string misuses, like:

    cfg_error(cfg, user_defined_input)  // potential security issue
    cfg_error(cfg, "foo %d", "bar")
    
    
    confuse.c:1246:20: warning: format string is not a string literal [-Wformat-nonliteral]
                    vfprintf(stderr, fmt, ap);
                                     ^~~
    

    Guard the annotation with __GNUC__, defined by GCC and Clang, which support the GNU extension of function format attributes.

    TODO: Untested on Windows.

    opened by cgzones 1
  • `cfg_t *cfg_addtsec()`: can't return the pointer to the section if already exists

    `cfg_t *cfg_addtsec()`: can't return the pointer to the section if already exists

    Description

    cfg_t *cfg_addtsec(cfg_t *cfg, const char *name, const char *title) can't return the pointer to the section if already exists.

    Source Code Snippet

    Definition

    DLLIMPORT cfg_t *cfg_addtsec(cfg_t *cfg, const char *name, const char *title)
    {
    	cfg_opt_t *opt;
    	cfg_value_t *val;
    
    	if (cfg_gettsec(cfg, name, title))
    		return NULL;
    
    	opt = cfg_getopt(cfg, name);
    	if (!opt) {
    		cfg_error(cfg, _("no such option '%s'"), name);
    		return NULL;
    	}
    	val = cfg_setopt(cfg, opt, title);
    	if (!val)
    		return NULL;
    
    	val->section->path = cfg->path; /* Remember global search path. */
    	val->section->line = 1;
    	val->section->errfunc = cfg->errfunc;
    
    	return val->section;
    }
    

    Declaration

    Note: * @return A pointer to the created section or***if the section already exists a pointer to that section***is returned. If the section could not be created or found, 0 is returned.

    /** Create a new titled config section.
     *
     * @param cfg The configuration file context.
     * @param name The name of the option.
     * @param title The title of this section.
     *
     * @return A pointer to the created section or if the section
     * already exists a pointer to that section is returned.
     * If the section could not be created or found, 0 is returned.
     */
    DLLIMPORT cfg_t *cfg_addtsec(cfg_t *cfg, const char *name, const char *title);
    

    Possible Resolution

     DLLIMPORT cfg_t *cfg_addtsec(cfg_t *cfg, const char *name, const char *title)
     {
    +	cfg_t *sec;
     	cfg_opt_t *opt;
     	cfg_value_t *val;
    
    +	sec = cfg_gettsec(cfg, name, title);
    +	if (sec)
    +		return sec;
    -	if (cfg_gettsec(cfg, name, title))
    -		return NULL;
     
     	opt = cfg_getopt(cfg, name);
     	if (!opt) {
     		cfg_error(cfg, _("no such option '%s'"), name);
     		return NULL;
     	}
     	val = cfg_setopt(cfg, opt, title);
     	if (!val)
     		return NULL;
     
     	val->section->path = cfg->path; /* Remember global search path. */
     	val->section->line = 1;
     	val->section->errfunc = cfg->errfunc;
     
     	return val->section;
     }
    
    opened by mewo4cor 0
  • Const-qualified parameters in exported functions

    Const-qualified parameters in exported functions

    Hi! I wonder if there is any chance to make const-qualification of parameters in some exported functions?

    For example, change cfg_getopt(cfg_t *cfg, const char *name); to cfg_getopt(const cfg_t *cfg, const char *name);.

    This will allow to write more const (pure) functions, especially in C++ projects. However, it will be require to change the error reporting function prototype from: typedef void (*cfg_errfunc_t)(cfg_t *cfg, const char *fmt, va_list ap); to typedef void (*cfg_errfunc_t)(const cfg_t *cfg, const char *fmt, va_list ap);

    While I see no reason to change cfg_t data inside the callback for custom error reporting, I suppose there might be use cases for this. The above changes may also break backward compatibility. But the tests of this project pass successfully after such changes on my local machine.

    opened by pravorskyi 0
  • Format support in IDEs

    Format support in IDEs

    I think it would be great to have a general syntax highlighting direction. As a naive user I don't know what format to choose in VSCode. This could be solved by giving a general syntax highlighting direction in the README or create a plugin for mainstream IDEs. I assume that there is an existing format that is fundamentally compatible.

    enhancement 
    opened by thepian 1
Releases(v3.3)
  • v3.3(Jun 25, 2020)

    Changes

    • Support building static library on Windows
    • Support for fmemopen() in Windows UWP applications
    • Support for cfg_getopt(cfg, "sub=name|option"), i.e., get an option from a sub-section, by Peter Rosin
    • Support for CFGF_MODIFIED flag, to detect changes to settings in memory after parsing, by Peter Rosin
    • Support for filtering out settings when printing, by Peter Rosin
    • Support for dynamic key=value sections with no pre-runtime knowledge of setting names, useful for environment variables and similar
    • Updated German translation, by Chris Leick

    Fixes

    • Fix loop-forever bug found by Christian Reitter; a .conf file containing only "=", will cause even the simplest parser to loop forever in internal function cfg_getopt_secidx()
    • Issue #113: Fail to build strdup() replacement
    • Issue #118: Fix build on Windows, missing fmemopen() replacement
    • Issue #120: Handle shell and C++ comments with no space separator
    • Issue #125: Drop developer debug msg QSTR: ...
    • Issue #131: Fix CFG_PTR_CB() regression, segfaults when, e.g., cfg_free() is called. Found and fixed by Peter Rosin
    • Issue #135: Revert CFGF_RESET flag if cfg_setmulti() family fail
    • Issue #137: Memory leak in cfg_setopt() for PTR options
    Source code(tar.gz)
    Source code(zip)
    confuse-3.3.tar.gz(757.19 KB)
    confuse-3.3.tar.gz.md5(53 bytes)
    confuse-3.3.tar.xz(473.76 KB)
    confuse-3.3.tar.xz.md5(53 bytes)
    confuse-3.3.zip(925.39 KB)
    confuse-3.3.zip.md5(50 bytes)
  • v3.2.2(Aug 19, 2018)

  • v3.2.1(Aug 17, 2017)

  • v3.2(Jun 3, 2017)

  • v3.1(May 24, 2017)

    Changes

    • Refactored 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 ignored
    • Issue #69: New API for creating titled sections at runtime, by Jonas Johansson @jonasj76
    • Issue #92: Support for option annotation/comments. Every option can now have a comment, which is both read and written from/to file. Disabled by default, enable with CFGF_COMMENTS flag in cfg_init()
    • ABI bump: 1.0.0 --> 1.1.0, due to new functionality

    Fixes

    • 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

    Source code(tar.gz)
    Source code(zip)
    confuse-3.1.tar.gz(736.44 KB)
    confuse-3.1.tar.gz.md5(53 bytes)
    confuse-3.1.tar.xz(457.27 KB)
    confuse-3.1.tar.xz.md5(53 bytes)
    confuse-3.1.zip(899.83 KB)
    confuse-3.1.zip.md5(50 bytes)
  • v3.0(Mar 3, 2016)

    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.

    Changes

    • Support for handling unknown options. The idea is to provide future proofing of configuration files, i.e. if a new parameter is added, the new config file will not fail if loaded in an older version of your program. See the CFGF_IGNORE_UNKNOWN flag in the documenation for more information. Idea and implementation by Frank Hunleth.
    • Add public API for removing sections at runtime, by Peter Rosin.
    • Allow cfg_opt_getval() on options that are CFGF_MULTI sections, by Peter Rosin.
    • Add cfg_setmulti() and cfg_opt_setmulti(), by Peter Rosin.
    • Add CLI example of how to manage configuration changes at runtime, also by Peter Rosin.
    • Support for Travis-CI and Coverity Scan, by Joachim Nilsson.
    • Use autoreconf in autogen.sh instead of calling tools separately.
    • Powershell script for AppVeyor CI to build libConfuse with MSYS2 by David Grayson.
    • Removed calls to 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.
    • Reindent to Linux coding style for a clear and well defined look, this to ease future maintenance. Issue #33
    • Add support for 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 #24
    • Add HACKING.md document to detail maintenance and release checklists

    Fixes

    • Do not assert on API input validation, memory allocation, or similar. Instead, return error code to user for further handling. This change also includes fixes for a lot of unchecked API return values, e.g., strdup(). Issue #37
    • Protect callers arguments to cfg_setopt(), by Peter Rosin
    • If new value to cfg_setopt() fails parsing, do not lose old value, by Peter Rosin.
    • Fixes to update support for older versions of Microsoft Visual Studio as well as MSYS2/mingw-w64 by Peter Rosin and David Grayson.
    • Issue #45: cfg_init() does not report error on multiple options with the same name. Fixed by Peter Rosin.
    • Fixes for memory leaks, invalid expressions, unused variables and missing error handling, all thanks to Coverity Scan
    Source code(tar.gz)
    Source code(zip)
    confuse-3.0.tar.gz(708.44 KB)
    confuse-3.0.tar.gz.md5(53 bytes)
    confuse-3.0.tar.xz(438.61 KB)
    confuse-3.0.tar.xz.md5(53 bytes)
    confuse-3.0.zip(866.23 KB)
    confuse-3.0.zip.md5(50 bytes)
  • v2.8(Oct 14, 2015)

    Changes

    • Support for specifying a searchpath for cfg_parse(), by J.J. Green
    • Restore build of shared library by default, by Nathan Phillip Brink
    • Added German translation, contributed by Chris Leick, Aurelien Jarno, and Tux^verdreifelt.
    • Document CFG_SIMPLE_STR for doxygen, by Nathan Phillip Brink
    • Update ISC license to 2007 version, by Joachim Nilsson
    • Write files in a Bourne shell compatible way, by Alvaro G. M
    • Fix mid-string environment variable substitution, by Frank Hunleth

    Fixes

    • Various ISO C90 and -ansi fixes by Carlo Marcelo Arenas Belon
    • Fix C++ compiler warnings for const strings, by Craig McQueen
    • Fix make distcheck and out-of-source builds, by Nathan Phillip Brink
    • Fix missing .gitignore files, by Carlo Marcelo Arenas Belon
    • Fix CFG_SIMPLE_INT on 64-bit systems, by Carlo Marcelo Arenas Belon
    • Coding style cleanup by J.J. Green
    • Fix issue #27: searchpath free problems. Fix to new feature introduced in this release cycle.
    • Improved support for MSYS2 by David Grayson.
    Source code(tar.gz)
    Source code(zip)
    confuse-2.8.tar.gz(618.66 KB)
    confuse-2.8.tar.gz.md5(53 bytes)
    confuse-2.8.tar.xz(393.80 KB)
    confuse-2.8.tar.xz.md5(53 bytes)
    confuse-2.8.zip(725.75 KB)
    confuse-2.8.zip.md5(50 bytes)
Owner
null
Cross-platform C++ library providing a simple API to read and write INI-style configuration files

simpleini A cross-platform library that provides a simple API to read and write INI-style configuration files. It supports data files in ASCII, MBCS a

Brodie Thiesfield 797 Dec 28, 2022
Simple .INI file parser in C, good for embedded systems

inih (INI Not Invented Here) inih (INI Not Invented Here) is a simple .INI file parser written in C. It's only a couple of pages of code, and it was d

Ben Hoyt 1.9k Dec 28, 2022
ini file parser

Iniparser 4 I - Overview This modules offers parsing of ini files from the C level. See a complete documentation in HTML format, from this directory o

Nicolas D 845 Jan 1, 2023
Header-only TOML config file parser and serializer for C++17 (and later!).

toml++ homepage ✨ This README is fine, but the toml++ homepage is better. ✨ Library features Header-only Supports the latest TOML release (v1.0.0), pl

Mark Gillard 965 Dec 29, 2022
Mast is setup tool for Linux Mint configuration which provides this functionalities

Mast Mint Additional Setup Tool discord what is Mast? Mast is setup tool for Linux Mint configuration which provides this functionalities

Jakub 8 Dec 25, 2021
Lua as an advanced configuration language for wayfire

wf-lua Experiment to use Lua as an advanced configuration language for wayfire. wf-lua is meant for use-cases where writing an actual wayfire plugin s

Javier Pollak 15 Nov 3, 2022
Device configuration for Redmi K30 Ultra

The Redmi K30 Ultra (codenamed "cezanne") is a high-end smartphone from Xiaomi.

Misty 5 Oct 27, 2022
CfgManipulator is a powerful tool for manipulating configuration files.

CfgManipulator is a powerful tool for manipulating configuration files

Sanya 1 Feb 3, 2022
C++20 single-header library for embedding INI configs

ini-config A single-header library that converts INI-formatted string literals to a key-value pair list at compile-time. Requires C++20; tested on gcc

clyne 55 Nov 26, 2022
Small configuration file parser library for C.

libConfuse Introduction Documentation Examples Build & Install Origin & References Introduction libConfuse is a configuration file parser library writ

null 419 Dec 14, 2022
BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser) See http://pypi.python.org/pypi/bllipparser/ for Python module.

BLLIP Reranking Parser Copyright Mark Johnson, Eugene Charniak, 24th November 2005 --- August 2006 We request acknowledgement in any publications that

Brown Laboratory for Linguistic Information Processing 218 Dec 17, 2022
BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser)

BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser)

Brown Laboratory for Linguistic Information Processing 218 Dec 17, 2022
Universal configuration library parser

LIBUCL Table of Contents generated with DocToc Introduction Basic structure Improvements to the json notation General syntax sugar Automatic arrays cr

Vsevolod Stakhov 1.5k Dec 26, 2022
Universal configuration library parser

LIBUCL Table of Contents generated with DocToc Introduction Basic structure Improvements to the json notation General syntax sugar Automatic arrays cr

Vsevolod Stakhov 1.5k Dec 28, 2022
Simple and fast configuration file library (written in C99)

Features Configuration file reading Supported operating systems Ubuntu MacOS Windows Build requirements C99 compiler CMake 3.10+ Cloning git clone htt

Nikita Fediuchin 3 May 26, 2022
A small C library with that portably invokes native file open, folder select and file save dialogs.

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.

Bernard Teo 299 Dec 23, 2022
udmp-parser: A Windows user minidump C++ parser library.

udmp-parser: A Windows user minidump C++ parser library. This is a cross-platform (Windows / Linux / OSX / x86 / x64) C++ library that parses Windows

Axel Souchet 95 Dec 13, 2022
config-loader is a static reflection framework written in C++17 from parse configuration file to native data structure.

config-loader is a static reflection framework written in C++17 from parse configuration file to native data structure.

Netcan 121 Dec 15, 2022
tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)

PicoHTTPParser Copyright (c) 2009-2014 Kazuho Oku, Tokuhiro Matsuno, Daisuke Murase, Shigeo Mitsunari PicoHTTPParser is a tiny, primitive, fast HTTP r

H2O 1.6k Jan 1, 2023
Fast C/C++ CSS Parser (Cascading Style Sheets Parser)

MyCSS — a pure C CSS parser MyCSS is a fast CSS Parser implemented as a pure C99 library with the ability to build without dependencies. Mailing List:

Alexander 121 Sep 22, 2022