Skip to content

Commit 73d4d76

Browse files
committed
Update README
- strict line breaks - no ansi, no C89 - new build and run instructions
1 parent 3f5833a commit 73d4d76

File tree

1 file changed

+67
-18
lines changed

1 file changed

+67
-18
lines changed

README.md

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,101 @@ Go there for:
1010
- [Merge Requests](https://gitlab.com/iniparser/iniparser/-/merge_requests/new)
1111

1212
Changes in March 2024:
13-
@lmoellendorf is taking over maintenance for this project. The objective is to get all known issues fixed and released as v4.2.
14-
After that, this project will be frozen here as v4.2 and development should continue as v5, probably on gitlab. Pointers will be updated then.
13+
@lmoellendorf is taking over maintenance for this project. The objective is to
14+
get all known issues fixed and released as v4.2. After that, this project will
15+
be frozen here as v4.2 and development should continue as v5, probably on
16+
gitlab. Pointers will be updated then.
1517

16-
Thanks a million times to Lars for his tremendous work and help in keeping this library alive!
18+
Thanks a million times to Lars for his tremendous work and help in keeping this
19+
library alive!
1720

18-
Many thanks to @touilleman for his exceptional contributions and efforts for maintaining this project for a decade. Manu, you rock!
21+
Many thanks to @touilleman for his exceptional contributions and efforts for
22+
maintaining this project for a decade. Manu, you rock!
1923

2024
## I - Overview
2125

2226
This modules offers parsing of ini files from C.
23-
See the [complete documentation](https://iniparser.gitlab.io/iniparser-meta/) in HTML format.
27+
See the [complete documentation](https://iniparser.gitlab.io/iniparser-meta/)
28+
in HTML format.
2429

2530

2631
Key features:
2732

2833
- Small : around 1500 sloc inside 4 files (2 .c and 2 .h)
29-
- Portable : no dependancies, written in `-ansi -pedantic` C89
34+
- Portable : no dependancies, written in `-pedantic` C
3035
- Fully re-entrant : easy to make it thread-safe (just surround
3136
library calls by mutex)
3237

3338
## II - Building project
3439

35-
A simple `make` at the root of the project should be enough to get the static
36-
(i.e. `libiniparser.a`) and shared (i.e. `libiniparser.so.0`) libraries compiled.
40+
This project uses CMake as build system. Use these command at the root or the
41+
project to get the static (i.e. `libiniparser.a`) and shared (i.e.
42+
`libiniparser.so`) libraries compiled:
3743

38-
You should consider trying the following rules too :
44+
```
45+
mkdir build
46+
cd build
47+
cmake ..
48+
make all
49+
```
3950

51+
There are some CMake option which are `OFF` by default:
4052

41-
- `make check` : run unit tests
42-
- `make example` : compile the example, run it with `./example/iniexample`
43-
- `make docs` : generate the documentation, open the file `html/index.html` with any HTML-capable browser.
53+
- `BUILD_TESTS`
54+
- `BUILD_EXAMPLES`
4455

45-
For installation and packaging see [iniparser-meta](https://gitlab.com/iniparser/iniparser-meta).
56+
From within build directory execute `ccmake ..` to see all.
4657

47-
## III - License
58+
## III - Tests
59+
60+
```
61+
mkdir build
62+
cd build
63+
cmake -DBUILD_TESTS ..
64+
make all
65+
```
66+
67+
While still in the build project you can run the tests by calling `ctest`.
68+
Test output can be found in build directory under
69+
`Testing/Temporary/LastTest.log`.
70+
71+
## IV - Examples
72+
73+
To build the examples:
74+
75+
```
76+
mkdir build
77+
cd build
78+
cmake -DBUILD_EXAMPLES ..
79+
make all
80+
```
81+
82+
From the build directory run the examples with:
83+
84+
- `./iniexample`
85+
- `./iniwrite`
86+
- `./parse ../example/twisted.ini`
87+
88+
## V - Documentation
89+
90+
Documentation is build by default and can be found in build directory under
91+
`html`.
92+
93+
Open the file `html/index.html` with any HTML-capable browser.
94+
95+
## VI - License
4896

4997
This software is released under MIT License.
5098
See LICENSE for more details
5199

52-
## IV - Versions
100+
## VII - Versions
53101

54-
Current version is 4.2. Version 4.0 introduces breaking changes in the api.
102+
Current version is 4.2.x. Version 4.0 introduces breaking changes in the api.
55103
Older versions 3.1 and 3.2 with the legacy api are available as tags.
56104

57-
## V - FAQ
105+
## VIII - FAQ
58106

59-
See [FAQ-en.md](FAQ-en.md) in this directory for answers to Frequently Asked Questions.
107+
See [FAQ-en.md](FAQ-en.md) in this directory for answers to Frequently Asked
108+
Questions.
60109

61110
还有简化中国翻译在[FAQ-zhcn.md](FAQ-zhcn.md).

0 commit comments

Comments
 (0)