From 74f04267d52ae3b081abccd13615a481ea82b66f Mon Sep 17 00:00:00 2001 From: Master92 Date: Thu, 14 Nov 2024 14:01:56 +0100 Subject: [PATCH 1/4] Fix typo in example code snippet --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5023ecf..978cdd1 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ On every write, the file is completely rewritten. #include File ini("test.ini"); -const auto intValue = init.get("section", "key"); +const auto intValue = ini.get("section", "key"); const auto newValue = 42; ini.set("section", "key", newValue); ``` From 81050c6f20317d6c756c96893c8b53d6bde9a820 Mon Sep 17 00:00:00 2001 From: Master92 Date: Thu, 14 Nov 2024 14:02:10 +0100 Subject: [PATCH 2/4] Fix hint to license --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 978cdd1..21b74d3 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,4 @@ ini.set("section", "key", newValue); ## License -cppIni is licensed under the MIT license. See [COPYING](https://github.com/Master92/cppIni/COPYING) for more information. +cppIni is licensed under the GPLv3. See [COPYING](https://github.com/Master92/cppIni/COPYING) for more information. From 7de5139be7f4b6b844e52b7554f6a30a0de93adf Mon Sep 17 00:00:00 2001 From: Master92 Date: Thu, 14 Nov 2024 14:02:41 +0100 Subject: [PATCH 3/4] Fix license file hint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21b74d3..0f3473e 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,4 @@ ini.set("section", "key", newValue); ## License -cppIni is licensed under the GPLv3. See [COPYING](https://github.com/Master92/cppIni/COPYING) for more information. +cppIni is licensed under the GPLv3. See [COPYING](https://github.com/Master92/cppIni/blob/master/COPYING) for more information. From fa6e1867249d45c9168923ed373dfa6466c03d93 Mon Sep 17 00:00:00 2001 From: Master92 Date: Thu, 14 Nov 2024 14:05:45 +0100 Subject: [PATCH 4/4] Add code snippet for usage of C API --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 0f3473e..a4ebfec 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ On every write, the file is completely rewritten. ## Usage +### C++: + ``` cpp #include @@ -54,6 +56,18 @@ const auto newValue = 42; ini.set("section", "key", newValue); ``` +### C: + +``` c +#include + +void* ini = cppIni_open("test.ini"); +const int intValue = cppIni_geti(ini, "section", "key"); +const int newValue = 42; +cppIni_set(ini, "section", "key", newValue); +cppIni_close(&ini); +``` + ## License cppIni is licensed under the GPLv3. See [COPYING](https://github.com/Master92/cppIni/blob/master/COPYING) for more information.