Freeciv-3.3
|
#include "support.h"
Go to the source code of this file.
Macros | |
#define | strvec_iterate(psv, str) |
#define | strvec_iterate_end |
Definition at line 79 of file string_vector.h.
#define strvec_iterate_end |
Definition at line 86 of file string_vector.h.
Insert a string at the end of the vector.
Definition at line 279 of file string_vector.c.
Referenced by base_get_dirs(), fileinfolist(), get_effect_list_req_text(), get_themes_list(), helptext_government(), helptext_unit(), insert_allows_single(), luascript_func_check(), mapimg_get_format_list(), values_dlg::open_help(), setting_bitwise_to_str(), strvec_from_str(), strvec_insert(), strvec_store(), ts_list_cb(), and video_mode_list().
Remove all strings from the vector.
Definition at line 160 of file string_vector.c.
Referenced by helptext_unit(), tab_building::initialize_new_bldg(), tab_counter::initialize_new_counter(), tab_extras::initialize_new_extra(), tab_good::initialize_new_good(), tab_gov::initialize_new_gov(), tab_multiplier::initialize_new_multiplier(), tab_tech::initialize_new_tech(), tab_terrains::initialize_new_terrain(), tab_unit::initialize_new_utype(), receive_packet_ruleset_building_100(), receive_packet_ruleset_counter_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_unit_100(), receive_packet_ruleset_unit_class_100(), send_packet_ruleset_building_100(), send_packet_ruleset_counter_100(), send_packet_ruleset_extra_100(), send_packet_ruleset_goods_100(), send_packet_ruleset_government_100(), send_packet_ruleset_multiplier_100(), send_packet_ruleset_specialist_100(), send_packet_ruleset_tech_100(), send_packet_ruleset_terrain_100(), send_packet_ruleset_unit_100(), send_packet_ruleset_unit_class_100(), strvec_copy(), strvec_destroy(), strvec_from_str(), strvec_remove(), strvec_reserve(), and strvec_store().
Returns the data of the vector.
Definition at line 373 of file string_vector.c.
Destroy a string vector.
Definition at line 72 of file string_vector.c.
Referenced by counters_free(), enum_widget_destroy(), extras_free(), free_data_dir_names(), free_packet_ruleset_building(), free_packet_ruleset_counter(), free_packet_ruleset_extra(), free_packet_ruleset_goods(), free_packet_ruleset_government(), free_packet_ruleset_multiplier(), free_packet_ruleset_specialist(), free_packet_ruleset_tech(), free_packet_ruleset_terrain(), free_packet_ruleset_unit(), free_packet_ruleset_unit_class(), get_effect_list_req_text(), get_theme_list(), goods_free(), government_free(), helptext_government(), helptext_unit(), improvement_free(), insert_allows_single(), multipliers_free(), researches_free(), server_option_free(), setting_bitwise_to_str(), specialists_free(), tech_free(), terrains_free(), themespec_try_read(), unit_classes_free(), unit_type_free(), and video_mode_widget_destroy().
Build the string vector from a string until 'str_size' bytes are read. Passing -1 for 'str_size' will assume 'str' as the expected format. Note it's a bit dangerous.
This string format is a list of strings separated by 'separator'.
See also strvec_to_str().
Definition at line 137 of file string_vector.c.
Referenced by report_wonders_of_the_world_long().
Returns the string at the index of the vector.
Definition at line 389 of file string_vector.c.
Referenced by option_dialog::add_option(), client_option_bitwise_secfile_str(), client_option_enum_secfile_str(), get_themes_list(), option_dialog_option_add(), option_enum_def_str(), option_enum_get_str(), option_enum_int_to_str(), option_enum_str_to_int(), option_widget_apply(), option_widget_new(), research_advance_name_translation(), research_advance_rule_name(), research_future_set_name(), save_strvec(), send_packet_ruleset_building_100(), send_packet_ruleset_counter_100(), send_packet_ruleset_extra_100(), send_packet_ruleset_goods_100(), send_packet_ruleset_government_100(), send_packet_ruleset_multiplier_100(), send_packet_ruleset_specialist_100(), send_packet_ruleset_tech_100(), send_packet_ruleset_terrain_100(), send_packet_ruleset_unit_100(), send_packet_ruleset_unit_class_100(), server_option_enum_set(), and server_option_enum_support_name().
Returns TRUE if the index is valid.
Definition at line 381 of file string_vector.c.
Referenced by strvec_get(), strvec_remove(), and strvec_set().
Insert a string at the index of the vector.
Definition at line 288 of file string_vector.c.
Create a new string vector.
Definition at line 59 of file string_vector.c.
Referenced by base_get_dirs(), fileinfolist(), get_effect_list_req_text(), get_soundplugin_list(), get_themes_list(), get_tileset_list(), helptext_government(), helptext_unit(), init_packet_ruleset_building(), init_packet_ruleset_counter(), init_packet_ruleset_extra(), init_packet_ruleset_goods(), init_packet_ruleset_government(), init_packet_ruleset_multiplier(), init_packet_ruleset_specialist(), init_packet_ruleset_tech(), init_packet_ruleset_terrain(), init_packet_ruleset_unit(), init_packet_ruleset_unit_class(), insert_allows_single(), lookup_strvec(), mapimg_get_format_list(), values_dlg::open_help(), option_widget_new(), report_wonders_of_the_world_long(), researches_init(), setting_bitwise_to_str(), and video_mode_list().
Insert a string at the start of the vector.
Definition at line 269 of file string_vector.c.
Referenced by strvec_insert().
Remove the string at the index from the vector. Returns TRUE if the element has been really removed.
Definition at line 320 of file string_vector.c.
Referenced by strvec_remove_duplicate(), and strvec_remove_empty().
Remove strings which are duplicated inside the vector.
Definition at line 180 of file string_vector.c.
Referenced by fileinfolist(), get_data_dirs(), get_save_dirs(), get_scenario_dirs(), and report_wonders_of_the_world_long().
Remove all empty strings from the vector and removes all leading and trailing spaces.
Definition at line 208 of file string_vector.c.
Referenced by helpeditor::close().
Set the size of the vector.
Definition at line 81 of file string_vector.c.
Referenced by get_soundplugin_list(), option_widget_new(), receive_packet_ruleset_building_100(), receive_packet_ruleset_counter_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_unit_100(), receive_packet_ruleset_unit_class_100(), research_future_set_name(), strvec_append(), strvec_copy(), strvec_insert(), strvec_prepend(), strvec_remove(), and strvec_store().
Replace a string at the index of the vector. Returns TRUE if the element has been really set.
Definition at line 306 of file string_vector.c.
Referenced by helpeditor::close(), get_soundplugin_list(), option_widget_new(), receive_packet_ruleset_building_100(), receive_packet_ruleset_counter_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_unit_100(), receive_packet_ruleset_unit_class_100(), research_future_set_name(), and strvec_store().
Returns the size of the vector.
Definition at line 344 of file string_vector.c.
Referenced by option_dialog::add_option(), are_strvecs_equal(), client_option_bitwise_secfile_str(), client_option_enum_secfile_str(), client_option_enum_set(), helpeditor::close(), combo_popup(), get_gui_specific_themes_directories(), get_theme_list(), get_themes_list(), helpeditor::helpeditor(), helptext_government(), helptext_unit(), insert_allows_single(), values_dlg::open_help(), option_bitwise_mask(), option_dialog_option_add(), option_enum_str_to_int(), option_widget_apply(), option_widget_new(), qtg_get_gui_specific_themes_directories(), receive_packet_ruleset_building_100(), receive_packet_ruleset_counter_100(), receive_packet_ruleset_extra_100(), receive_packet_ruleset_goods_100(), receive_packet_ruleset_government_100(), receive_packet_ruleset_multiplier_100(), receive_packet_ruleset_specialist_100(), receive_packet_ruleset_tech_100(), receive_packet_ruleset_terrain_100(), receive_packet_ruleset_unit_100(), receive_packet_ruleset_unit_class_100(), research_future_set_name(), save_game_ruleset(), save_strvec(), send_packet_ruleset_building_100(), send_packet_ruleset_counter_100(), send_packet_ruleset_extra_100(), send_packet_ruleset_goods_100(), send_packet_ruleset_government_100(), send_packet_ruleset_multiplier_100(), send_packet_ruleset_specialist_100(), send_packet_ruleset_tech_100(), send_packet_ruleset_terrain_100(), send_packet_ruleset_unit_100(), send_packet_ruleset_unit_class_100(), and setting_bitwise_to_str().
void void strvec_sort | ( | struct strvec * | psv, |
int(*)(const char *const *, const char *const *) | sort_func | ||
) |
Sort the string vector, using qsort().
Definition at line 259 of file string_vector.c.
Referenced by fileinfolist(), and report_wonders_of_the_world_long().
Build a localized string with the elements of the string vector. Elements will be "and"-separated.
See also astr_build_and_list(), strvec_to_or_list().
Definition at line 441 of file string_vector.c.
Referenced by get_effect_list_req_text(), helptext_government(), helptext_unit(), insert_allows_single(), and setting_bitwise_to_str().
Build a localized string with the elements of the string vector. Elements will be "or"-separated.
See also astr_build_or_list(), strvec_to_and_list().
Definition at line 429 of file string_vector.c.
Referenced by helptext_government(), and insert_allows_single().
Build the string from a string vector.
This string format is a list of strings separated by 'separator'.
See also strvec_from_str().
Definition at line 401 of file string_vector.c.