#ifndef CONFIG_H #define CONFIG_H #include #include #define CFG_MAX 512 typedef struct { char git_url[CFG_MAX]; char git_user[256]; char git_token[256]; char git_password[256]; char default_target[128]; char clone_dir[CFG_MAX]; bool log_enabled; char log_dir[CFG_MAX]; } GConfig; void config_defaults(GConfig *cfg); int config_load(GConfig *cfg, const char *path); int config_save(const GConfig *cfg, const char *path); int config_init(const char *path, bool force); void config_show(const GConfig *cfg); void config_get_path(char *out, size_t n); char *expand_tilde(const char *in, char *out, size_t n); #endif /* CONFIG_H */