diff options
| author | Teddy Wing | 2018-10-19 04:11:54 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-10-19 04:11:54 +0200 |
| commit | 086ff7801a73464b06a9629ff5dc0df84a5e8e52 (patch) | |
| tree | 0c304a6ef2ce3faae50572e7e655a86f4f169e41 /dome_key_map.h | |
| parent | edba0cc4c81cc91db470fb9604edb6f283c16b88 (diff) | |
| download | dome-key-map-086ff7801a73464b06a9629ff5dc0df84a5e8e52.tar.bz2 | |
config: Add a function to read a config file (WIP)
A new function that will read a TOML config file. Doesn't currently
access the filesystem. This commit is mostly supporting code to allow
that to work.
* Add the 'toml' crate
* `parse_args()`: Take a mutable `Config` and return that config instead
of creating a new one. The recipe will now be to read the config from
a file first and then pass that config to this function to be updated.
* Modify `c_parse_args()` to take a `*Config` and mirror the new method
signature of `parse_args()`
Diffstat (limited to 'dome_key_map.h')
| -rw-r--r-- | dome_key_map.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dome_key_map.h b/dome_key_map.h index 2a73d8f..224cc21 100644 --- a/dome_key_map.h +++ b/dome_key_map.h @@ -36,7 +36,7 @@ typedef struct { size_t length; } Trigger; -Config *c_parse_args(const char *const *args, size_t length); +Config *c_parse_args(const char *const *args, size_t length, Config *config_ptr); void c_run_key_action(State *state, Trigger trigger, const Trigger *mode); |
