return _default;
}
+FILE* pakfire_config_get_fopen(struct pakfire_config* config,
+ const char* section, const char* key) {
+ struct pakfire_config_entry* entry = pakfire_config_find(config, section, key);
+
+ // Return the value if set
+ if (entry && *entry->value)
+ return fmemopen(entry->value, strlen(entry->value), "r");
+
+ return NULL;
+}
+
static int pakfire_section_in_sections(char** sections, const char* section) {
if (!sections)
return 0;
const char* section, const char* key, int _default);
size_t pakfire_config_get_bytes(struct pakfire_config* config,
const char* section, const char* key, const size_t _default);
+FILE* pakfire_config_get_fopen(struct pakfire_config* config,
+ const char* section, const char* key);
char** pakfire_config_sections(struct pakfire_config* config);
int pakfire_config_has_section(struct pakfire_config* config, const char* section);