struct config *conf = init_config();
struct config_option *opt;
char tmp_value[1024] = "";
config_read(conf, "./default.conf");
config_read(conf, "./custom.conf");
opt = config_get(conf, "dfs", "port");
strncpy(tmp_value, opt->value, opt->value_len);
printf("%s\n", tmp_value);
opt = config_get(conf, "hive", "port");
strncpy(tmp_value, opt->value, opt->value_len);
printf("%s\n", tmp_value);
release_config(&conf);
return 0;
```
-
Notifications
You must be signed in to change notification settings - Fork 1
vChrysanthemum/ConfigParser
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
config
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published