shithub: libini

ref: e922ef10cc79b48a7085ec76f343bee5859be94b
dir: /ini.man/

View raw version
.TH INI 2
.SH NAME
parseini \- parse ini files
.SH SYNOPSIS
.B #include <ini.h>
.PP
.B
int parseini(char *file, void (*f)(char*, char*, char*), int forcelower)
.PP
.SH DESCRIPTION
This library function provides simple parsing of INI files using
.IR bio (2).
For each key-value pair within the INI file it calls the provided callback function
.IR f .
.PP
The callback function gets the section, key and value as parameters.
.PP
The
.I forcelower
flag tells the function to return all strings as lowercase strings, which can be helpful for some cases. Otherwise, all strings are returned as entered in the INI file.
.SH SOURCE
.B /sys/src/libini
.SH SEE ALSO
.IR bio (2)
.SH DIAGNOSTICS
.I Parseini
returns 0 on failure and sets
.IR errstr .
.SH BUGS
Sure.