summaryrefslogtreecommitdiff
path: root/keyword.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-01 11:22:59 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-01 11:25:02 -0300
commit6de2da7f73135fcff28d33845e3b73f293125f60 (patch)
tree9fda547f42e9f2fb68ad7a083cb671c2cb07d542 /keyword.h
parent05c0cd0db19063cd3a4043a5401c00b874ededa7 (diff)
git, keyword: Move `parse_key_value_file()` to `keyword.{c,h}`
Diffstat (limited to 'keyword.h')
-rw-r--r--keyword.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/keyword.h b/keyword.h
index d4343b0..5fccbc4 100644
--- a/keyword.h
+++ b/keyword.h
@@ -7,6 +7,7 @@ typedef enum keyword_type keyword_type;
typedef struct keyword keyword;
typedef union keyword_val keyword_val;
typedef int (keyword_cb)(void *ctx, void *ret, const keyword *key, keyword_val val);
+typedef int (parse_callback)(void **ret, void *ctx, char *buf);
enum keyword_type {
TYPE_NONE,
@@ -39,4 +40,5 @@ extern keyword_val get_keyword_value(const keyword *key, char *value, int *error
extern int set_keyword(const keyword *key, keyword_val val, void *ret, void *ctx);
extern keyword_val parse_keyword(const keyword *key, char *key_str, char *value, int *error);
extern int parse_keywords(const keyword **keys, char *key, char *value, void *ret, void *ctx);
+extern int parse_key_value_file(void *ret, void *ctx, const keyword **keywords, char *buf, const char *delm, parse_callback *parse_cb);
#endif