inih
Simple .INI file parser in C, good for embedded systems
Latest version: 60
Add to xmake.lua
add_requires("inih 60")Learn how to add and link packages with Xmake →
Information
- License
- BSD-3-Clause
- Recipe updated
- 2026-06-09T15:32:00.000Z
Platforms
- android: armeabi, armeabi-v7a, arm64-v8a, riscv64, x86, x86_64, mips, mip64
- msys: i386, x86_64
- mingw: i386, x86_64, arm, arm64
- windows: x86, x64, arm, arm64, arm64ec
- linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
- bsd: i386, x86_64, arm, arm64, ppc, ppc64, ppc64el, riscv64, sparc64
- harmony: armeabi-v7a, arm64-v8a, x86, x86_64
- cross: i386, x86_64, arm, armv7, arm64, mips, mips64, mips64el, riscv, riscv64, loong64, s390x, ppc, ppc64, ppc64el, sh4, sparc64
- wasm: wasm32, wasm64
- iphoneos: arm64, x86_64
- macosx: x86_64, arm64
Options
allow_no_value- allow name with no value · Type: boolean · Default: false
allow_realloc- allow initial malloc size to grow to max line length (when using the heap) · Type: boolean · Default: false
call_handler_on_new_section- call the handler each time a new section is encountered · Type: boolean · Default: false
heap- allocate memory on the heap using malloc instead using a fixed-sized line buffer on the stack · Type: boolean · Default: false
ini_parser- compile and (if selected) install INIReader · Type: boolean · Default: true
initial_malloc_size- initial malloc size in bytes (when using the heap) · Type: string · Default: 200
inline_comment_prefix- allow inline comments with the comment prefix character · Type: string · Default: ;
inline_comments- allow inline comments with the comment prefix character · Type: boolean · Default: true
max_line_length- maximum line length in bytes · Type: string · Default: 200
multi_line_entries- support for multi-line entries in the style of Python's ConfigParser · Type: boolean · Default: true
report_line_numbers- report line number on ini_handler callback · Type: boolean · Default: false
start_of_line_comment_prefix- character(s) to start a comment at the beginning of a line · Type: string · Default: ;#
stop_on_first_error- stop parsing after an error · Type: boolean · Default: false
utf_8_bom- allow a UTF-8 BOM sequence (0xEF 0xBB 0xBF) at the start of INI files · Type: boolean · Default: true
Versions
- 58
- 59
- 60
Dependencies
No dependencies declared.
Used by (1)
Packages declaring this dependency; requirements can vary by platform and configuration.
Install with xrepo
Install the package independently of a project and inspect its available configuration.
install
xrepo install "inih 60"show info
xrepo info "inih"Link a library to your target
Declare the requirement, then attach the library to the target that uses it.
xmake.lua
add_requires("inih 60")
target("demo")
set_kind("binary")
add_files("src/*.cpp")
add_packages("inih")Open a package environment
Open a shell with the environment exported by this package. Use the executable names documented by the package.
enter shell
xrepo env -b "inih 60" shell