blob: 50afb125e0ce71008bedbb40f1b7df1b27707aa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#+title: Uconfig
Uconfig - Read a Unix config file
"Uconfig" is supposed to stand for "Micro config", because it is a small
library, but maybe saying that it stands for "Unix config" makes more
sense. Choose your side.
*After* having created Uconfig, I found out about [[https://gitlab.com/iniparser/iniparser][iniParser]], it serves a very
similar purpose and is probably more reliable and better maintained, check it
out.
* Installation
Run ~make~ to compile. Run ~make check~ to run tests. Run ~make install~ to
install the static library and the header file.
* Usage
Include =uconfig.h= in the sources. Then link the programs with =-luconfig=.
In the code:
- create a Uconfig handle by calling ~uconfig_new~ and passing a Unix
configuration file to read,
- retrieve configuration parameters using ~uconfig_get~,
- finalize by calling ~uconfig_destroy~.
See the example in the =test= subdirectory.
|