Files
gbuild/include/config.h
T

29 lines
696 B
C
Raw Permalink Normal View History

2026-05-21 14:27:40 +02:00
#ifndef CONFIG_H
#define CONFIG_H
#include <stdbool.h>
#include <stddef.h>
#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 */