summaryrefslogtreecommitdiff
path: root/config.h
blob: 939d86b36ad1929be377a207d83e24606f6333bd (plain)
1
2
3
4
5
6
7
8
9
10
#include <toml.h>

static inline void config_getscopes(const char *scope_path, char **scopes)
{
	FILE *fp = fopen(scope_path, "r");
	toml_table_t* toml = toml_parse_file(fp, NULL, 0);
	fclose(fp);
	*scopes = toml_string_in(toml, "scopes").u.s;
	toml_free(toml);
}