diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2017-09-23 00:16:38 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2017-11-23 21:34:11 +0000 |
commit | 4579df9114c00075166b59a67724ec7472facb27 (patch) | |
tree | 0da6d65a35864d031ed2aa4421e20bdb4ba95db2 /src/ini.h | |
parent | c51dff6a4e5bd21491bb0c085cb08f35275332a0 (diff) | |
download | imv-4579df9114c00075166b59a67724ec7472facb27.tar.gz |
Add support for a basic config file
Diffstat (limited to 'src/ini.h')
-rw-r--r-- | src/ini.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ini.h b/src/ini.h new file mode 100644 index 0000000..12f4228 --- /dev/null +++ b/src/ini.h @@ -0,0 +1,13 @@ +#ifndef INI_H +#define INI_H + +#include <stdio.h> + +#define INI_UNKNOWN 0 +#define INI_VALUE 1 +#define INI_SECTION 2 + +int parse_ini_file(FILE* f, char *out_key, size_t key_size, char *out_value, size_t value_size); +int parse_ini_str(const char* str, char *out_key, size_t key_size, char *out_value, size_t value_size); + +#endif |