|
canfigger v0.3.2
Lightweight config file parser library
|
![codeql-badge] ![actions-c-badge] ![cirrus-badge] ![windows-badge]
Canfigger is a lightweight C language library designed to parse configuration files. It provides functionality to read them and represent their contents as a linked list of key-value pairs, along with associated attributes for each pair. It also includes utility functions for locating standard per-user directories (config, data, cache) and joining paths, with support for XDG on Linux/macOS and the Windows CSIDL equivalents.
The following config file example represents the format handled by canfigger:
You can change the attribute delimiter character by passing it as the second argument:
canfigger_parse_file(filename_ptr, ':');
Canfigger provides helpers for locating standard per-user paths on Linux (XDG), macOS, and Windows:
See the API documentation for details.
None
meson setup _build cd _build ninja
For configuration options, use meson configure (see the Meson docs for detailed usage).
meson test (-v)
Example programs will be built when you run ninja. If you want to try them with a different config file, give them the name of a config file as an argument.