A small, portable, and re-entrant C library for parsing INI configuration files.
iniParser is a C library for parsing INI configuration files. It reads INI files, extracts sections and key-value pairs, and provides accessor functions to retrieve configuration data as strings, integers, doubles, or booleans. It solves the problem of managing configuration settings in C applications without relying on external libraries.
C developers working on embedded systems, command-line tools, or applications that require a simple, dependency-free way to handle configuration files.
Developers choose iniParser for its minimal footprint, portability across platforms, and thread-safe design. Its straightforward API and lack of external dependencies make it a reliable choice for projects where simplicity and efficiency are paramount.
ini file parser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library is extremely small, with only about 1500 lines of code across four files, making it ideal for embedded systems and resource-constrained environments.
Written in strict ANSI C with no external libraries required, it ensures high portability and ease of integration across various platforms.
Fully re-entrant and designed for thread safety; the README notes that library calls can be made thread-safe by surrounding them with mutexes.
Supports advanced INI features like sections, multi-line values, quoted strings, and inline comments, providing robustness for diverse configuration needs.
Offers intuitive accessor functions (e.g., iniparser_getstring, iniparser_getint) for retrieving configuration data in various types, simplifying usage.
The dictionary implementation uses linear search, which can become a performance bottleneck for INI files with a large number of keys, as admitted in the 'Known defects' section.
Documentation is primarily confined to the header file and online HTML; there are no extensive tutorials or guides, which may hinder deeper integration or troubleshooting.
The project has moved to GitLab and frozen versions on GitHub, indicating potential instability or reduced support for ongoing development and bug fixes.
While parsing is robust, writing INI files is not a core feature; the example 'iniwrite' is provided, but it lacks the polish and documentation of the parsing functions.