diff options
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -3,6 +3,7 @@ #include <stdbool.h> #include <stdlib.h> +#include <stddef.h> #include <string.h> #define PROGRAM_NAME "kl" @@ -27,12 +28,28 @@ struct config { bool time; bool keys_counter; bool show_shifted; + bool repeat; }; struct config *parese_config(struct config *cfg); - struct config *prepare_config_file(); - struct config *config_init(); +typedef enum { + CFG_TYPE_BOOL, + CFG_TYPE_STR, +} cfg_type; + +struct config_item { + char *key; + cfg_type type; + size_t offset; +}; + +extern struct config_item ci[]; + +void* get_member(struct config_item*, size_t offset); + +#define CI_SIZE (int)(sizeof(ci) / sizeof(ci[0])) + #endif |
