diff options
author | pommicket <pommicket@gmail.com> | 2025-09-11 16:40:04 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-11 16:40:47 -0400 |
commit | ec9cf4ef9b4ff2a16172e72adf5fca2a94ba3009 (patch) | |
tree | 0dfcd4d1bb36b26804d773b6a4c053e5ac4969d9 /examples | |
parent | 06b3634741718a264bef03ee7b38455a2482bb24 (diff) |
Start libpom implementation
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 3 | ||||
-rw-r--r-- | examples/read_conf.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..f49e1ae --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,3 @@ +build/read_conf: read_conf.c ../release/libpom.a + @mkdir -p build + $(CC) -I.. -Wall -o $@ read_conf.c ../release/libpom.a diff --git a/examples/read_conf.c b/examples/read_conf.c new file mode 100644 index 0000000..da23534 --- /dev/null +++ b/examples/read_conf.c @@ -0,0 +1,13 @@ +#include <stdlib.h> + +#include "pom.h" + +int main(void) { + pom_error *error; + pom_conf *conf = pom_load_path("foo", &error); + if (!conf) { + pom_error_print(error); + free(error); + return EXIT_FAILURE; + } +} |