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;
-}
-
int pakfire_config_walk_sections(struct pakfire_config* config,
pakfire_config_walk_callback callback, void* p) {
struct pakfire_config_section* default_section = NULL;
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);
// Walk
typedef int (*pakfire_config_walk_callback)