summaryrefslogtreecommitdiff
path: root/keyword.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-05 21:51:09 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-05 22:03:10 -0300
commitfb3db9b6f2c427a5065725b6047391fe286cfc72 (patch)
treed690916de297443b128ab225e9552217eb697eb0 /keyword.h
parent40a2464cb16e318b17723a72cef857842ee16c91 (diff)
keyword: Add `get_keyword()`, `create_key_value_str()`, and
`create_key_value_file()` These functions will help in making the creation of key-value files more generic. There still needs to be some more work done on it, but that can be done later.
Diffstat (limited to 'keyword.h')
-rw-r--r--keyword.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/keyword.h b/keyword.h
index c39f13c..64183aa 100644
--- a/keyword.h
+++ b/keyword.h
@@ -39,8 +39,11 @@ union keyword_val {
extern void *get_keyword_offset_ptr(const keyword *key, void *ptr);
extern keyword_val get_keyword_value(const keyword *key, char *value, int *error);
+extern keyword_val get_keyword(const keyword *key, void *data, void *ctx, 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);
+extern char *create_key_value_str(const keyword *key, keyword_val val, const char *start_delm, const char *end_delm, int leading_whitespace, int trailing_whitespace);
+extern char *create_key_value_file(void *data, void *ctx, const keyword **keywords, const char *start_delm, const char *end_delm, int leading_whitespace, int trailing_whitespace);
#endif