|
Freeciv-3.4
|
Go to the source code of this file.
Typedefs | |
| typedef const void * | secfile_data_t |
| typedef bool(* | secfile_enum_is_valid_fn_t) (int enumerator) |
| typedef const char *(* | secfile_enum_name_fn_t) (int enumerator) |
| typedef int(* | secfile_enum_by_name_fn_t) (const char *enum_name, int(*strcmp_fn) (const char *, const char *)) |
| typedef int(* | secfile_enum_iter_fn_t) (void) |
| typedef int(* | secfile_enum_next_fn_t) (int enumerator) |
| typedef const char *(* | secfile_enum_name_data_fn_t) (secfile_data_t data, int enumerator) |
Enumerations | |
| enum | entry_special_type { EST_NORMAL , EST_INCLUDE , EST_COMMENT } |
| enum | entry_type { ENTRY_BOOL , ENTRY_INT , ENTRY_FLOAT , ENTRY_STR , ENTRY_FILEREFERENCE , ENTRY_LONG_COMMENT , ENTRY_ILLEGAL } |
Definition at line 55 of file registry_ini.h.
| #define entry_list_iterate_end LIST_ITERATE_END |
Definition at line 57 of file registry_ini.h.
| #define secfile_entry_ignore | ( | _sfile_, | |
| _fmt_, | |||
| ... | |||
| ) | (void) secfile_entry_lookup(_sfile_, _fmt_, ## __VA_ARGS__) |
Definition at line 418 of file registry_ini.h.
| #define secfile_entry_ignore_by_path | ( | _sfile_, | |
| _path_ | |||
| ) | (void) secfile_entry_by_path(_sfile_, _path_) |
Definition at line 420 of file registry_ini.h.
| #define secfile_insert_bool | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 80 of file registry_ini.h.
| #define secfile_insert_bool_comment | ( | secfile, | |
| value, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 83 of file registry_ini.h.
Definition at line 97 of file registry_ini.h.
Definition at line 100 of file registry_ini.h.
| #define secfile_insert_enum | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 270 of file registry_ini.h.
| #define secfile_insert_enum_comment | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 273 of file registry_ini.h.
Definition at line 349 of file registry_ini.h.
Definition at line 353 of file registry_ini.h.
| #define secfile_insert_enum_full | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| comment, | |||
| allow_replace, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 251 of file registry_ini.h.
| #define secfile_insert_enum_vec | ( | secfile, | |
| enumerators, | |||
| dim, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 324 of file registry_ini.h.
| #define secfile_insert_enum_vec_comment | ( | secfile, | |
| enumerators, | |||
| dim, | |||
| specenum_type, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 328 of file registry_ini.h.
Definition at line 374 of file registry_ini.h.
| #define secfile_insert_enum_vec_data_comment | ( | secfile, | |
| values, | |||
| dim, | |||
| bitwise, | |||
| name_fn, | |||
| data, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 378 of file registry_ini.h.
| #define secfile_insert_enum_vec_full | ( | secfile, | |
| enumerators, | |||
| dim, | |||
| specenum_type, | |||
| comment, | |||
| allow_replace, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 302 of file registry_ini.h.
| #define secfile_insert_float | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 154 of file registry_ini.h.
| #define secfile_insert_int | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 117 of file registry_ini.h.
| #define secfile_insert_int_comment | ( | secfile, | |
| value, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 120 of file registry_ini.h.
Definition at line 134 of file registry_ini.h.
Definition at line 137 of file registry_ini.h.
| #define secfile_insert_str | ( | secfile, | |
| string, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 174 of file registry_ini.h.
| #define secfile_insert_str_comment | ( | secfile, | |
| string, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 180 of file registry_ini.h.
| #define secfile_insert_str_noescape | ( | secfile, | |
| string, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 177 of file registry_ini.h.
| #define secfile_insert_str_noescape_comment | ( | secfile, | |
| string, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 183 of file registry_ini.h.
Definition at line 205 of file registry_ini.h.
Definition at line 211 of file registry_ini.h.
Definition at line 208 of file registry_ini.h.
Definition at line 215 of file registry_ini.h.
| #define secfile_lookup_enum | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 488 of file registry_ini.h.
| #define secfile_lookup_enum_default | ( | secfile, | |
| defval, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 520 of file registry_ini.h.
| #define secfile_lookup_enum_vec | ( | secfile, | |
| dim, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 553 of file registry_ini.h.
| #define secfile_replace_bool | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 86 of file registry_ini.h.
| #define secfile_replace_bool_comment | ( | secfile, | |
| value, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 89 of file registry_ini.h.
Definition at line 104 of file registry_ini.h.
Definition at line 107 of file registry_ini.h.
| #define secfile_replace_enum | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 277 of file registry_ini.h.
| #define secfile_replace_enum_comment | ( | secfile, | |
| enumerator, | |||
| specenum_type, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 280 of file registry_ini.h.
Definition at line 357 of file registry_ini.h.
Definition at line 361 of file registry_ini.h.
| #define secfile_replace_enum_vec | ( | secfile, | |
| enumerators, | |||
| dim, | |||
| specenum_type, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 332 of file registry_ini.h.
| #define secfile_replace_enum_vec_comment | ( | secfile, | |
| enumerators, | |||
| dim, | |||
| specenum_type, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 336 of file registry_ini.h.
Definition at line 383 of file registry_ini.h.
| #define secfile_replace_enum_vec_data_comment | ( | secfile, | |
| values, | |||
| dim, | |||
| bitwise, | |||
| name_fn, | |||
| data, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 387 of file registry_ini.h.
| #define secfile_replace_float | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 157 of file registry_ini.h.
| #define secfile_replace_int | ( | secfile, | |
| value, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 123 of file registry_ini.h.
| #define secfile_replace_int_comment | ( | secfile, | |
| value, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 126 of file registry_ini.h.
Definition at line 141 of file registry_ini.h.
Definition at line 144 of file registry_ini.h.
| #define secfile_replace_str | ( | secfile, | |
| string, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 187 of file registry_ini.h.
| #define secfile_replace_str_comment | ( | secfile, | |
| string, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 193 of file registry_ini.h.
| #define secfile_replace_str_noescape | ( | secfile, | |
| string, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 190 of file registry_ini.h.
| #define secfile_replace_str_noescape_comment | ( | secfile, | |
| string, | |||
| comment, | |||
| path, | |||
| ... | |||
| ) |
Definition at line 196 of file registry_ini.h.
Definition at line 219 of file registry_ini.h.
Definition at line 225 of file registry_ini.h.
Definition at line 222 of file registry_ini.h.
Definition at line 229 of file registry_ini.h.
| #define section_list_iterate | ( | seclist, | |
| psection | |||
| ) | TYPED_LIST_ITERATE(struct section, seclist, psection) |
Definition at line 45 of file registry_ini.h.
| #define section_list_iterate_end LIST_ITERATE_END |
Definition at line 47 of file registry_ini.h.
| #define section_list_iterate_rev | ( | seclist, | |
| psection | |||
| ) | TYPED_LIST_ITERATE_REV(struct section, seclist, psection) |
Definition at line 48 of file registry_ini.h.
| #define section_list_iterate_rev_end LIST_ITERATE_REV_END |
Definition at line 50 of file registry_ini.h.
Definition at line 43 of file registry_ini.h.
Definition at line 43 of file registry_ini.h.
Definition at line 30 of file registry_ini.h.
| typedef int(* secfile_enum_by_name_fn_t) (const char *enum_name, int(*strcmp_fn)(const char *, const char *)) |
Definition at line 34 of file registry_ini.h.
Definition at line 32 of file registry_ini.h.
Definition at line 37 of file registry_ini.h.
| typedef const char *(* secfile_enum_name_data_fn_t) (secfile_data_t data, int enumerator) |
Definition at line 39 of file registry_ini.h.
Definition at line 33 of file registry_ini.h.
Definition at line 38 of file registry_ini.h.
| Enumerator | |
|---|---|
| EST_NORMAL | |
| EST_INCLUDE | |
| EST_COMMENT | |
Definition at line 72 of file registry_ini.h.
| Enumerator | |
|---|---|
| ENTRY_BOOL | |
| ENTRY_INT | |
| ENTRY_FLOAT | |
| ENTRY_STR | |
| ENTRY_FILEREFERENCE | |
| ENTRY_LONG_COMMENT | |
| ENTRY_ILLEGAL | |
Definition at line 635 of file registry_ini.h.
Gets an boolean value. Returns TRUE on success. On old saved files, 0 and 1 can also be considered as bool.
Definition at line 3713 of file registry_ini.c.
Referenced by lookup_req_list(), secfile_lookup_bool(), secfile_lookup_bool_default(), and settable_options_load().
Sets an boolean value. Returns TRUE on success.
Definition at line 3742 of file registry_ini.c.
Referenced by secfile_insert_bool_full().
Returns the comment associated to this entry.
Definition at line 3672 of file registry_ini.c.
Referenced by secfile_save().
Entry structure destructor.
Definition at line 3539 of file registry_ini.c.
Referenced by secfile_entry_delete(), secfile_insert_bitwise_enum_full(), secfile_insert_bool_full(), secfile_insert_enum_data_full(), secfile_insert_float_full(), secfile_insert_int_full(), secfile_insert_plain_enum_full(), secfile_insert_str_full(), and secfile_section_new().
Gets an floating value. Returns TRUE on success.
Definition at line 3755 of file registry_ini.c.
Referenced by secfile_lookup_float(), and secfile_lookup_float_default().
Sets an floating value. Returns TRUE on success.
Definition at line 3771 of file registry_ini.c.
Referenced by secfile_insert_float_full().
Gets an integer value. Returns TRUE on success.
Definition at line 3785 of file registry_ini.c.
Referenced by load_action_range_max(), lookup_req_list(), secfile_lookup_int(), secfile_lookup_int_def_min_max(), secfile_lookup_int_default(), and settable_options_load().
Sets an integer value. Returns TRUE on success.
Definition at line 3801 of file registry_ini.c.
Referenced by secfile_insert_int_full().
Returns the name of this entry.
Definition at line 3616 of file registry_ini.c.
Referenced by compat_load_020400(), entry_path(), options_dialogs_load(), secfile_check_unused(), secfile_lookup_bitwise_enum_full(), secfile_lookup_enum_data(), secfile_lookup_enum_default_data(), secfile_lookup_plain_enum_full(), secfile_save(), section_entry_by_name(), and settable_options_load().
Build the entry path. Returns like snprintf().
Definition at line 3606 of file registry_ini.c.
Referenced by secfile_hash_delete(), and secfile_hash_insert().
Returns the parent section of this entry.
Definition at line 3590 of file registry_ini.c.
Referenced by entry_path(), secfile_hash_insert(), secfile_lookup_bitwise_enum_full(), secfile_lookup_enum_data(), secfile_lookup_enum_default_data(), secfile_lookup_int_def_min_max(), secfile_lookup_plain_enum_full(), and section_entry_lookup().
Sets a comment for the entry. Pass nullptr to remove the current one.
Definition at line 3680 of file registry_ini.c.
Referenced by secfile_insert_bitwise_enum_full(), secfile_insert_bool_full(), secfile_insert_enum_data_full(), secfile_insert_float_full(), secfile_insert_int_full(), secfile_insert_plain_enum_full(), and secfile_insert_str_full().
Sets the name of the entry. Returns TRUE on success.
Definition at line 3624 of file registry_ini.c.
Referenced by compat_load_020400().
Returns if the string would be escaped.
Definition at line 3852 of file registry_ini.c.
Gets an string value. Returns TRUE on success.
Definition at line 3814 of file registry_ini.c.
Referenced by load_action_range_max(), lookup_req_list(), secfile_lookup_bitwise_enum_default_full(), secfile_lookup_bitwise_enum_full(), secfile_lookup_enum_data(), secfile_lookup_enum_default_data(), secfile_lookup_plain_enum_default_full(), secfile_lookup_plain_enum_full(), secfile_lookup_str(), secfile_lookup_str_default(), and settable_options_load().
Sets an string value. Returns TRUE on success.
Definition at line 3830 of file registry_ini.c.
Referenced by secfile_insert_bitwise_enum_full(), secfile_insert_enum_data_full(), secfile_insert_plain_enum_full(), and secfile_insert_str_full().
Sets if the string would be escaped. Returns TRUE on success.
Definition at line 3864 of file registry_ini.c.
Sets if the string should get gettext marking. Returns TRUE on success.
Definition at line 3878 of file registry_ini.c.
Referenced by save_game_ruleset(), save_name_translation(), and sg_save_scenario().
| enum entry_type entry_type_get | ( | const struct entry * | pentry | ) |
Returns the type of this entry or ENTRY_ILLEGAL or error.
Definition at line 3598 of file registry_ini.c.
Referenced by load_action_range_max(), lookup_req_list(), secfile_insert_bitwise_enum_full(), secfile_insert_bool_full(), secfile_insert_enum_data_full(), secfile_insert_float_full(), secfile_insert_int_full(), secfile_insert_plain_enum_full(), secfile_insert_str_full(), and settable_options_load().
| void secfile_check_unused | ( | const struct section_file * | secfile | ) |
Print log messages for any entries in the file which have not been looked up – ie, unused or unrecognised entries. To mark an entry as used without actually doing anything with it, you could do something like: section_file_lookup(&file, "foo.bar"); / * unused * /
Definition at line 1160 of file registry_ini.c.
Referenced by boot_help_texts(), comments_load(), load_command(), load_ruleset_buildings(), load_ruleset_cities(), load_ruleset_effects(), load_ruleset_governments(), load_ruleset_nations(), load_ruleset_techs(), load_ruleset_terrain(), load_ruleset_units(), load_rulesetdir(), scan_specfile(), scan_specfile(), theme_read_toplevel(), and tileset_read_toplevel().
| struct entry struct entry bool struct entry * secfile_entry_by_path | ( | const struct section_file * | secfile, |
| const char * | path | ||
| ) |
Returns the entry by the name or nullptr if not matched.
Definition at line 2038 of file registry_ini.c.
Referenced by load_action_blocked_by_list(), load_ruleset_actions(), load_ruleset_nations(), lookup_bv_actions(), secfile_entry_delete(), secfile_entry_lookup(), secfile_lookup_bitwise_enum_default_full(), secfile_lookup_bitwise_enum_full(), secfile_lookup_bool(), secfile_lookup_bool_default(), secfile_lookup_enum_data(), secfile_lookup_enum_default_data(), secfile_lookup_float(), secfile_lookup_float_default(), secfile_lookup_int(), secfile_lookup_int_def_min_max(), secfile_lookup_int_default(), secfile_lookup_plain_enum_default_full(), secfile_lookup_plain_enum_full(), secfile_lookup_str(), secfile_lookup_str_default(), and section_entry_lookup().
| struct entry struct entry bool secfile_entry_delete | ( | struct section_file * | secfile, |
| const char * | path, | ||
| ... | |||
| ) |
| struct section_file * secfile_from_stream | ( | fz_FILE * | stream, |
| bool | allow_duplicates | ||
| ) |
Create a section file from a stream. Returns nullptr on error.
Definition at line 616 of file registry_ini.c.
Referenced by netfile_get_section_file().
| struct entry struct entry * secfile_insert_bitwise_enum_full | ( | struct section_file * | secfile, |
| int | bitwise_val, | ||
| secfile_enum_name_fn_t | name_fn, | ||
| secfile_enum_iter_fn_t | begin_fn, | ||
| secfile_enum_iter_fn_t | end_fn, | ||
| secfile_enum_next_fn_t | next_fn, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t size_t secfile_insert_bitwise_enum_vec_full | ( | struct section_file * | secfile, |
| const int * | bitwise_vals, | ||
| size_t | dim, | ||
| secfile_enum_name_fn_t | name_fn, | ||
| secfile_enum_iter_fn_t | begin_fn, | ||
| secfile_enum_iter_fn_t | end_fn, | ||
| secfile_enum_next_fn_t | next_fn, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry * secfile_insert_bool_full | ( | struct section_file * | secfile, |
| bool | value, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t secfile_insert_bool_vec_full | ( | struct section_file * | secfile, |
| const bool * | values, | ||
| size_t | dim, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry struct entry * secfile_insert_comment | ( | struct section_file * | secfile, |
| const char * | str, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry * secfile_insert_enum_data_full | ( | struct section_file * | secfile, |
| int | value, | ||
| bool | bitwise, | ||
| secfile_enum_name_data_fn_t | name_fn, | ||
| secfile_data_t | data, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t secfile_insert_enum_vec_data_full | ( | struct section_file * | secfile, |
| const int * | values, | ||
| size_t | dim, | ||
| bool | bitwise, | ||
| secfile_enum_name_data_fn_t | name_fn, | ||
| secfile_data_t | data, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry * secfile_insert_filereference | ( | struct section_file * | secfile, |
| const char * | filename, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry * secfile_insert_float_full | ( | struct section_file * | secfile, |
| float | value, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
Insert a include entry.
Definition at line 1465 of file registry_ini.c.
Referenced by save_nations_ruleset().
| struct entry * secfile_insert_int_full | ( | struct section_file * | secfile, |
| int | value, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t secfile_insert_int_vec_full | ( | struct section_file * | secfile, |
| const int * | values, | ||
| size_t | dim, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct section * secfile_insert_long_comment | ( | struct section_file * | secfile, |
| const char * | comment | ||
| ) |
Insert a long comment section.
Definition at line 1489 of file registry_ini.c.
Referenced by comment_write().
| struct entry * secfile_insert_plain_enum_full | ( | struct section_file * | secfile, |
| int | enumerator, | ||
| secfile_enum_name_fn_t | name_fn, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t secfile_insert_plain_enum_vec_full | ( | struct section_file * | secfile, |
| const int * | enumurators, | ||
| size_t | dim, | ||
| secfile_enum_name_fn_t | name_fn, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct entry * secfile_insert_str_full | ( | struct section_file * | secfile, |
| const char * | str, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| bool | no_escape, | ||
| enum entry_special_type | stype, | ||
| const char * | path, | ||
| ... | |||
| ) |
| size_t secfile_insert_str_vec_full | ( | struct section_file * | secfile, |
| const char *const * | strings, | ||
| size_t | dim, | ||
| const char * | comment, | ||
| bool | allow_replace, | ||
| bool | no_escape, | ||
| const char * | path, | ||
| ... | |||
| ) |
| struct section_file * secfile_load_section | ( | const char * | filename, |
| const char * | section, | ||
| bool | allow_duplicates | ||
| ) |
Create a section file from a file, read only one particular section. Returns nullptr on error.
Definition at line 602 of file registry_ini.c.
Referenced by secfile_load(), show_scenarios(), fc_client::slot_selection_changed(), update_scenario_page(), and fc_client::update_scenarios_page().
| int int secfile_lookup_bitwise_enum_default_full | ( | const struct section_file * | secfile, |
| int | defval, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| const char const char const char bool bool secfile_lookup_bitwise_enum_full | ( | const struct section_file * | secfile, |
| int * | penumerator, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| int int * secfile_lookup_bitwise_enum_vec_full | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool secfile_lookup_bool | ( | const struct section_file * | secfile, |
| bool * | bval, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool secfile_lookup_bool_default | ( | const struct section_file * | secfile, |
| bool | def, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool * secfile_lookup_bool_vec | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool secfile_lookup_enum_data | ( | const struct section_file * | secfile, |
| int * | pvalue, | ||
| bool | bitwise, | ||
| secfile_enum_name_data_fn_t | name_fn, | ||
| secfile_data_t | data, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool int secfile_lookup_enum_default_data | ( | const struct section_file * | secfile, |
| int | defval, | ||
| bool | bitwise, | ||
| secfile_enum_name_data_fn_t | name_fn, | ||
| secfile_data_t | data, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool int int * secfile_lookup_enum_vec_data | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| bool | bitwise, | ||
| secfile_enum_name_data_fn_t | name_fn, | ||
| secfile_data_t | data, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool bool int int int bool secfile_lookup_float | ( | const struct section_file * | secfile, |
| float * | fval, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool bool int int int bool float secfile_lookup_float_default | ( | const struct section_file * | secfile, |
| float | def, | ||
| const char * | path, | ||
| ... | |||
| ) |
Lookup a floating point value in the secfile. On failure, use the default value.
Definition at line 2405 of file registry_ini.c.
Referenced by sg_load_game(), and sg_load_game().
| bool bool bool bool secfile_lookup_int | ( | const struct section_file * | secfile, |
| int * | ival, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool bool int int secfile_lookup_int_def_min_max | ( | const struct section_file * | secfile, |
| int | defval, | ||
| int | minval, | ||
| int | maxval, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool bool int secfile_lookup_int_default | ( | const struct section_file * | secfile, |
| int | def, | ||
| const char * | path, | ||
| ... | |||
| ) |
| bool bool bool bool int int int * secfile_lookup_int_vec | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| const char * | path, | ||
| ... | |||
| ) |
| int secfile_lookup_plain_enum_default_full | ( | const struct section_file * | secfile, |
| int | defval, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| const char const char const char bool secfile_lookup_plain_enum_full | ( | const struct section_file * | secfile, |
| int * | penumerator, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| int * secfile_lookup_plain_enum_vec_full | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| secfile_enum_is_valid_fn_t | is_valid_fn, | ||
| secfile_enum_by_name_fn_t | by_name_fn, | ||
| const char * | path, | ||
| ... | |||
| ) |
| const char const char * secfile_lookup_str_default | ( | const struct section_file * | secfile, |
| const char * | def, | ||
| const char * | path, | ||
| ... | |||
| ) |
| const char const char const char ** secfile_lookup_str_vec | ( | const struct section_file * | secfile, |
| size_t * | dim, | ||
| const char * | path, | ||
| ... | |||
| ) |
| const char * secfile_name | ( | const struct section_file * | secfile | ) |
Return the filename the section file was loaded as, or "(anonymous)" if this sectionfile was created rather than loaded from file. The memory is managed internally, and should not be altered, nor used after secfile_destroy() called for the section file.
Definition at line 1196 of file registry_ini.c.
Referenced by load_action_names(), load_building_names(), load_city_name_list(), load_game_names(), load_government_names(), load_nation_names(), load_ruleset_actions(), load_ruleset_buildings(), load_ruleset_cities(), load_ruleset_effects(), load_ruleset_game(), load_ruleset_governments(), load_ruleset_nations(), load_ruleset_techs(), load_ruleset_terrain(), load_ruleset_units(), load_ruleset_veteran(), load_specialist(), load_style_names(), load_tech_names(), load_terrain_names(), load_unit_names(), lookup_cbonus_list(), lookup_req_list(), lookup_terrain(), message_options_load(), ruleset_load_names(), secfile_log(), and settings_ruleset().
| bool secfile_save | ( | const struct section_file * | secfile, |
| const char * | filename, | ||
| int | compression_level, | ||
| enum fz_method | compression_method, | ||
| bool | do_formatting | ||
| ) |
Save the previously filled in section_file to disk.
There is now limited ability to save in the new tabular format (to give smaller savefiles). The start of a table is detected by an entry with name of the form: (alphabetical_component)(zero)(period)(alphanumeric_component) Eg: u0.id, or c0.id, in the freeciv savefile. The alphabetical component is taken as the "name" of the table, and the component after the period as the first column name. This should be followed by the other column values for u0, and then subsequent u1, u2, etc, in strict order with no omissions, and with all of the columns for all uN in the same order as for u0.
If compression_level is non-zero, then compress using zlib. (Should only supply non-zero compression_level if already know that FREECIV_HAVE_LIBZ.) Below simply specifies FZ_ZLIB method, since fz_fromFile() automatically changes to FZ_PLAIN method when level == 0.
Definition at line 856 of file registry_ini.c.
Referenced by save_luadata(), save_ruleset_file(), save_thread_run(), and send_client_wants_hack().
| bool int int struct section * secfile_section_by_name | ( | const struct section_file * | secfile, |
| const char * | name | ||
| ) |
Returns the first section matching the name.
Definition at line 3082 of file registry_ini.c.
Referenced by compat_load_020400(), options_dialogs_load(), secfile_entry_by_path(), secfile_from_input_file(), secfile_insert_base(), secfile_insert_include(), secfile_insert_long_comment(), secfile_section_lookup(), secfile_section_new(), section_set_name(), settable_options_load(), and settings_ruleset().
| struct section * secfile_section_lookup | ( | const struct section_file * | secfile, |
| const char * | path, | ||
| ... | |||
| ) |
Create a new section in the secfile.
Definition at line 3184 of file registry_ini.c.
Referenced by secfile_from_input_file(), secfile_insert_base(), secfile_insert_include(), and secfile_insert_long_comment().
Checks if there's any sections with the given prefix in the secfile.
Definition at line 3159 of file registry_ini.c.
| struct section const struct section_list * secfile_sections | ( | const struct section_file * | secfile | ) |
Returns the list of sections. This list is owned by the registry module and shouldn't be modified and destroyed.
Definition at line 3119 of file registry_ini.c.
Referenced by secfile_check_unused().
| struct section_list * secfile_sections_by_name_prefix | ( | const struct section_file * | secfile, |
| const char * | prefix | ||
| ) |
Returns the list of sections which match the name prefix. Returns nullptr if no section was found. This list is not owned by the registry module and the user must destroy it when they finished working with it.
Definition at line 3130 of file registry_ini.c.
Referenced by boot_help_texts(), download_modpack_recursive(), load_building_names(), load_game_names(), load_government_names(), load_nation_names(), load_ruleset_actions(), load_ruleset_buildings(), load_ruleset_cities(), load_ruleset_effects(), load_ruleset_game(), load_ruleset_governments(), load_ruleset_nations(), load_ruleset_styles(), load_ruleset_techs(), load_ruleset_units(), load_style_names(), load_tech_names(), load_terrain_names(), load_unit_names(), scan_specfile(), scan_specfile(), and tileset_read_toplevel().
Remove all entries.
Definition at line 3255 of file registry_ini.c.
Referenced by section_destroy().
Remove this section from the secfile.
Definition at line 3228 of file registry_ini.c.
Referenced by secfile_new().
Returns a list containing all the entries. This list is owned by the secfile, so don't modify or destroy it.
Definition at line 3332 of file registry_ini.c.
Referenced by compat_load_020400(), options_dialogs_load(), secfile_check_unused(), secfile_from_input_file(), secfile_save(), and settable_options_load().
Returns a new entry of type ENTRY_BOOL.
Definition at line 3454 of file registry_ini.c.
Referenced by entry_from_token(), and secfile_insert_bool_full().
Returns the first entry matching the name.
Definition at line 3340 of file registry_ini.c.
Referenced by entry_new(), entry_set_name(), secfile_entry_by_path(), secfile_insert_bitwise_enum_full(), secfile_insert_bool_full(), secfile_insert_enum_data_full(), secfile_insert_float_full(), secfile_insert_int_full(), secfile_insert_plain_enum_full(), secfile_insert_str_full(), and section_entry_lookup().
| struct entry * section_entry_float_new | ( | struct section * | psection, |
| const char * | name, | ||
| float | value | ||
| ) |
Returns a new entry of type ENTRY_FLOAT.
Definition at line 3470 of file registry_ini.c.
Referenced by entry_from_token(), and secfile_insert_float_full().
| struct entry struct entry * section_entry_int_new | ( | struct section * | psection, |
| const char * | name, | ||
| int | value | ||
| ) |
Returns a new entry of type ENTRY_INT.
Definition at line 3438 of file registry_ini.c.
Referenced by entry_from_token(), and secfile_insert_int_full().
| struct entry * section_entry_str_new | ( | struct section * | psection, |
| const char * | name, | ||
| const char * | value, | ||
| bool | escaped | ||
| ) |
Returns a new entry of type ENTRY_STR.
Definition at line 3486 of file registry_ini.c.
Referenced by entry_from_token(), secfile_insert_bitwise_enum_full(), secfile_insert_enum_data_full(), secfile_insert_plain_enum_full(), and secfile_insert_str_full().