46 if (
value !=
nullptr) {
66 delete[] oldopt->
value;
86 qCritical(
_(
"Cannot load fcdb config file '%s':\n%s"), filename,
101 qCritical(
"Value for '%s' in '%s' is not of string type, ignoring",
119 if (conf_file && strcmp(conf_file,
"-")) {
151 delete[] popt->value;
void fcdb_free(void)
Free resources allocated by fcdb system.
bool fcdb_init(const char *conf_file)
Initialize freeciv database system.
static bool fcdb_load_config(const char *filename)
Load fcdb configuration from file.
static bool fcdb_set_option(const char *key, const char *value)
Set one fcdb option (or delete it if value == nullptr).
QHash< QString, fcdb_option * > fcdb_config
const char * fcdb_option_get(const char *type)
Return the selected fcdb config value.
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
struct section_file * secfile_load(const QString &filename, bool allow_duplicates)
Create a section file from a file.
const char * secfile_error()
Returns the last error which occurred in a string.
void secfile_destroy(struct section_file *secfile)
Free a section file.
const char * entry_name(const struct entry *pentry)
Returns the name of this entry.
bool entry_str_get(const struct entry *pentry, const char **value)
Gets an string value.
struct section * secfile_section_by_name(const struct section_file *secfile, const QString &name)
Returns the first section matching the name.
const struct entry_list * section_entries(const struct section *psection)
Returns a list containing all the entries.
enum entry_type entry_type_get(const struct entry *pentry)
Returns the type of this entry or ENTRY_ILLEGAL or error.
#define entry_list_iterate_end
#define entry_list_iterate(entlist, pentry)
bool script_fcdb_init(const QString &fcdb_luafile)
Initialize the scripting state.
void script_fcdb_free()
Free the scripting data.