diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-06 09:28:32 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-06 09:30:17 -0300 |
commit | 2555a7caaab3d5dba812940575129fd808e9e3dc (patch) | |
tree | 76ab5187a1d9397b59c8a4843eceab5a33d29cec | |
parent | fb3db9b6f2c427a5065725b6047391fe286cfc72 (diff) |
keyword: Add `delimiter` struct
This can be used to help with `create_key_value_file()`, and
`create_key_value_str()`.
-rw-r--r-- | keyword.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <time.h> typedef enum keyword_type keyword_type; +typedef struct delimiter delimiter; typedef struct keyword keyword; typedef union keyword_val keyword_val; typedef int (set_keyword_cb)(void *ctx, void *ret, const keyword *key, keyword_val val); @@ -20,6 +21,12 @@ enum keyword_type { TYPE_COUNT, }; +struct delimiter { + char *delm; /* Delimiter. */ + int lead_space; /* Leading whitespace. */ + int trail_space; /* Trailing whitespace. */ +}; + struct keyword { const char *key; /* Keyword. */ const char *desc; /* Description of the keyword. */ |