Small configuration file parser library for C.
C Lex Makefile M4 Shell Batchfile PowerShell
Clone or download
Permalink
Failed to load latest commit information.
doc Fix typos in documentation Dec 5, 2017
examples Update .gitignore files, skip GNU global files and *.exe files May 25, 2017
m4 Minor cleanup, remove non-existing m4 files from distribution May 24, 2017
po Update translation templates, POT creation date only Jun 3, 2017
src Fixes #109 Aug 12, 2018
tests Extend unit test with more test cases to provoke segfault on comment May 31, 2017
windows Update ChangeLog and bump version to v2.9-beta1 Oct 19, 2015
.gitignore Update .gitignore files, skip GNU global files and *.exe files May 25, 2017
.travis.yml Due to new requirements on GNU gettext we need at least Ubuntu 14.04 Feb 24, 2016
AUTHORS Update AUTHORS file, list co-maintainer and update contributor list Mar 3, 2016
CONTRIBUTING.md Fix typos in documentation Nov 16, 2016
ChangeLog.md Fix typos in documentation Dec 5, 2017
HACKING.md Fix typos in documentation Dec 5, 2017
INSTALL Remove recently introduced README symbolic link. Oct 13, 2015
LICENSE Update copyright years Feb 22, 2017
Makefile.am Add release build target with md5sum generation + misc. cleanup Oct 14, 2015
README.md Update news to mention v3.2.1 release Aug 17, 2017
autogen.sh Do not remove ABOUT-NLS, just ignore it, required for distribution Mar 3, 2016
configure.ac Fix #101: Bump ABI 1.1.0 --> 2.0.0 and prepare release v3.2.1 Aug 17, 2017
indent.sh Fix issue #33: Reindent to Linux coding style Oct 20, 2015
libconfuse.pc.in added pkgconfig support, uses AC_CONFIG_LIBCONFIG_IN for confuse-conf… Oct 3, 2004
libconfuse.spec.in Fix #71: Change Copyright --> License in .rpm specfile Jun 18, 2016

README.md

libConfuse

Travis Status Coverity Status

Table of Contents

Introduction

libConfuse is a configuration file parser library, licensed under the terms of the ISC license, and written in C. It supports sections and (lists of) values (strings, integers, floats, booleans or other sections), as well as some other features (such as single/double-quoted strings, environment variable expansion, functions and nested include statements). It makes it very easy to add configuration file capability to a program using a simple API.

The goal of libConfuse 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.

libConfuse was called libcfg before, but was changed to not confuse with other similar libraries.

Please report bugs to the GitHub issue tracker. If you want to contribute fixes or new features, see the file CONTRIBUTING.md.

Examples

Example configuration files:

  • test.conf and the source code shows most of the features of confuse, including lists and functions.
  • simple.conf shows how to use the "simple" versions of options. See the corresponding source.

Download

The source code is distributed in three files: Two tarballs in .tar.gz and .tar.xz formats with source code and Makefiles for UNIX systems, and a .zip file with Windows build files.

Building

libConfuse employs the GNU configure and build system. Simply enter ./configure --help to list available options and see the INSTALL file for the full installation instructions.

When checking out the code from GitHub, use ./autogen.sh to generate a configure script.

Documentation

For the time being, the following documentation is published at the old homepage, but also distributed with the source:

News

  • 2017-08-17: libConfuse version 3.2.1 released (major ABI bump!)
  • 2017-06-03: libConfuse version 3.2 released
  • 2017-05-24: libConfuse version 3.1 released
  • 2016-03-03: libConfuse version 3.0 released
  • 2015-10-14: libConfuse version 2.8 released
  • 2015-10-12: New patch monkey at the helm of GitHub. Joachim will help out auditing pull requests and do occasional releases.
  • 2014-01-10: code moved to github
  • 2010-02-21: libConfuse version 2.7 released. This is primarily a bugfix release
  • 2007-12-29: libConfuse version 2.6 released
  • 2007-11-29: libConfuse 2.6 will be released as soon as I can get some time for it. promise!
  • 2004-10-17: libConfuse version 2.5 released
  • 2004-09-23: There is now a tutorial available
  • 2004-08-09: libConfuse version 2.4 released
  • 2004-05-22: libConfuse version 2.3 released
  • 2003-09-25: libConfuse version 2.2 released
  • 2003-07-13: libConfuse version 2.1 released
  • 2003-07-03: libConfuse webpage moved to Savannah
  • 2003-04-05: libConfuse version 2.0 released
  • 2003-03-02: There is now a mailing list and a project page at savannah.nongnu.org
  • 2002-12-18: version 1.2.3 released that fixes a segfault due to an uninitialized user-defined error function. Support for callbacks are added, however they are not yet properly documented