In some cases *_append() and *_append_all() functions are removed.
This is a lot to manage at this time so remove it.
At some future point in time I need to implement a good generic append and append all design.
This is likely to use some sort of callback that performs the individual copy calls.
Many of the existing *_append() and *_append_all() are left alone but may eventually be removed.
The dynamic string based ones, however, will remain as an exception case.
The names I originally chose for the callbacks are misleading.
Rename them to be "delete" and "destroy" rather than "resize" and "adjust", respectively.
Half way through changing this I came across the more complex cases for resizing.
These I need callbacks both both array of arrays and arrays of arrays.
I did not finish the process of converting this.
The f_type_array needs more work.
In particular, the arrays of arrays in f_type_array can be moved into a common f_memory function, such as f_memory_arrayss_resize().
The unit tests have not been updated but I did manage to get the unit test for the f_account done.
The stand alone build config.h files are not update to date either.
These changes have shown a significant improvement in the resulting binary size.
The current size is actually just barely smaller than the 0.6.7 equivalent build (when compiled using the same compiler for both).
The changes are not complete and so I anticipate the 0.7.0 branch to be smaller than the 0.6.7 branch as of this change set despite the 0.7.0 development branch having more functionality.
build_libraries -lc -lcap
-build_sources_library account.c private-account.c account/accounts.c account/private-accounts.c
+build_sources_library account.c private-account.c account/accounts.c
build_sources_library capability.c
build_sources_library color.c private-color.c color/common.c
build_sources_library compare.c compare/utf.c private-compare.c compare/private-utf.c
build_sources_library console.c console/common.c private-console.c
build_sources_library control_group.c control_group/common.c
build_sources_library conversion.c private-conversion.c conversion/common.c
-build_sources_library directory.c directory/common.c directory/type.c private-directory.c directory/private-type.c
+build_sources_library directory.c directory/common.c directory/listing.c directory/recurse_do.c directory/status.c
+build_sources_library private-directory.c
build_sources_library environment.c
build_sources_library execute.c
build_sources_library file.c private-file.c file/common.c file/stream.c
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
-build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
build_sources_library iki.c iki/common.c iki/data.c private-iki.c iki/private-data.c
build_sources_library limit.c limit/set.c limit/value.c limit/private-set.c limit/private-value.c
build_sources_library memory.c memory/array.c memory/arrays.c
build_sources_headers console.h console/common.h private-console.h
build_sources_headers control_group.h control_group/common.h
build_sources_headers conversion.h conversion/common.h
-build_sources_headers directory.h directory/common.h directory/type.h
+build_sources_headers directory.h directory/common.h directory/listing.h directory/recurse_do.h directory/status.h
build_sources_headers environment.h environment/common.h
build_sources_headers execute.h execute/common.h
build_sources_headers file.h file/common.h file/stream.h
build_libraries -lc -lcap
-build_sources_library level_0/account.c level_0/private-account.c level_0/account/accounts.c level_0/account/private-accounts.c
+build_sources_library level_0/account.c level_0/private-account.c level_0/account/accounts.c
build_sources_library level_0/capability.c
build_sources_library level_0/color.c level_0/private-color.c level_0/color/common.c
build_sources_library level_0/compare.c level_0/compare/utf.c level_0/private-compare.c level_0/compare/private-utf.c
build_sources_library level_0/console.c level_0/console/common.c level_0/private-console.c
build_sources_library level_0/control_group.c level_0/control_group/common.c
build_sources_library level_0/conversion.c level_0/private-conversion.c level_0/conversion/common.c
-build_sources_library level_0/directory.c level_0/directory/common.c level_0/directory/type.c level_0/private-directory.c level_0/directory/private-type.c
+build_sources_library level_0/directory.c level_0/directory/common.c level_0/directory/listing.c level_0/directory/recurse_do.c level_0/directory/status.c
+build_sources_library level_0/private-directory.c
build_sources_library level_0/environment.c
build_sources_library level_0/execute.c
build_sources_library level_0/file.c level_0/private-file.c level_0/file/common.c level_0/file/stream.c
build_sources_library level_0/fss.c level_0/fss/common.c level_0/fss/item.c level_0/fss/named.c level_0/fss/nest.c level_0/fss/quote.c level_0/fss/set.c level_0/fss/set_quote.c level_0/fss/simple_packet.c
-build_sources_library level_0/fss/private-item.c level_0/fss/private-named.c level_0/fss/private-nest.c level_0/fss/private-set.c level_0/fss/private-set_quote.c level_0/fss/private-simple_packet.c
build_sources_library level_0/iki.c level_0/iki/common.c level_0/iki/data.c level_0/private-iki.c level_0/iki/private-data.c
build_sources_library level_0/limit.c level_0/limit/set.c level_0/limit/value.c level_0/limit/private-set.c level_0/limit/private-value.c
build_sources_library level_0/memory.c level_0/memory/array.c level_0/memory/arrays.c
build_sources_headers level_0/console.h level_0/console/common.h level_0/private-console.h
build_sources_headers level_0/control_group.h level_0/control_group/common.h
build_sources_headers level_0/conversion.h level_0/conversion/common.h
-build_sources_headers level_0/directory.h level_0/directory/common.h level_0/directory/type.h
+build_sources_headers level_0/directory.h level_0/directory/common.h level_0/directory/listing.h level_0/directory/recurse_do.h level_0/directory/status.h
build_sources_headers level_0/environment.h level_0/environment/common.h
build_sources_headers level_0/execute.h level_0/execute/common.h
build_sources_headers level_0/file.h level_0/file/common.h level_0/file/stream.h
#define _di_f_account_group_name_by_id_
//#define _di_f_account_id_by_name_
#define _di_f_account_name_by_id_
-#define _di_f_accounts_adjust_callback_
-#define _di_f_accounts_append_
-#define _di_f_accounts_append_all_
-#define _di_f_accounts_resize_callback_
-#define _di_f_accountss_append_
-#define _di_f_accountss_append_all_
+#define _di_f_accounts_destroy_callback_
+#define _di_f_accounts_delete_callback_
#define _di_f_accountss_t_
#define _di_f_accounts_t_
//#define _di_f_account_t_
#define _di_f_capability_to_name_
#define _di_f_capability_to_text_
#define _di_f_capability_user_set_
-#define _di_f_cells_adjust_callback_
-#define _di_f_cells_resize_callback_
+#define _di_f_cells_destroy_callback_
+#define _di_f_cells_delete_callback_
#define _di_f_cellss_t_
#define _di_f_cells_t_
#define _di_f_cell_t_
//#define _di_f_directory_listing_delete_
#define _di_f_directory_listing_destroy_
//#define _di_f_directory_listing_t_
+#define _di_f_directory_listings_t_
//#define _di_f_directory_max_d_
#define _di_f_directory_mode_
//#define _di_f_directory_open_
#define _di_f_directory_recurse_do_destroy_
//#define _di_f_directory_recurse_do_flag_e_
//#define _di_f_directory_recurse_do_t_
+#define _di_f_directory_recurses_do_t_
//#define _di_f_directory_remove_
//#define _di_f_directory_remove_custom_
#define _di_f_directory_s_
-#define _di_f_directory_statuss_adjust_
-#define _di_f_directory_statuss_decimate_by_
-#define _di_f_directory_statuss_decrease_by_
-#define _di_f_directory_statuss_increase_
-#define _di_f_directory_statuss_increase_by_
-#define _di_f_directory_statuss_resize_
+#define _di_f_directory_listings_destroy_callback_
+#define _di_f_directory_listings_delete_callback_
+#define _di_f_directory_recurses_destroy_callback_
+#define _di_f_directory_recurses_delete_callback_
+#define _di_f_directory_status_delete_
+#define _di_f_directory_status_destroy_
+#define _di_f_directory_statuss_destroy_callback_
+#define _di_f_directory_statuss_delete_callback_
//#define _di_f_directory_statuss_t_
//#define _di_f_directory_status_t_
//#define _di_f_directory_touch_
#define _di_f_file_rename_at_
//#define _di_f_file_role_change_
#define _di_f_file_role_change_at_
-#define _di_f_files_adjust_callback_
+#define _di_f_files_destroy_callback_
#define _di_f_file_seek_
#define _di_f_file_seeks_d_
#define _di_f_file_select_
//#define _di_f_file_size_
#define _di_f_file_size_at_
#define _di_f_file_size_by_id_
-#define _di_f_files_resize_callback_
+#define _di_f_files_delete_callback_
#define _di_f_filess_t_
#define _di_f_files_t_
//#define _di_f_file_stat_
#define _di_f_file_write_range_
#define _di_f_file_write_until
#define _di_f_file_write_until_
-#define _di_f_fll_ids_adjust_callback_
-#define _di_f_fll_ids_resize_callback_
+#define _di_f_fll_ids_destroy_callback_
+#define _di_f_fll_ids_delete_callback_
#define _di_f_fll_idss_t_
#define _di_f_fll_ids_t_
#define _di_f_fll_id_t_
#define _di_f_iki_content_partial_is_
//#define _di_f_iki_data_delete_
#define _di_f_iki_data_destroy_
-#define _di_f_iki_datas_adjust_callback_
+#define _di_f_iki_datas_destroy_callback_
#define _di_f_iki_datas_append_
#define _di_f_iki_datas_append_all_
-#define _di_f_iki_datas_resize_callback_
+#define _di_f_iki_datas_delete_callback_
#define _di_f_iki_datass_append_
#define _di_f_iki_datass_append_all_
#define _di_f_iki_datass_t_
//#define _di_f_iki_vocabulary_0002_define_s_
//#define _di_f_iki_vocabulary_0002_parameter_s_
//#define _di_f_iki_vocabulary_0002_s_
-#define _di_f_int128s_adjust_callback_
-#define _di_f_int128s_resize_callback_
+#define _di_f_int128s_destroy_callback_
+#define _di_f_int128s_delete_callback_
#define _di_f_int128ss_t_
#define _di_f_int128s_t_
//#define _di_f_int128_t_
-#define _di_f_int16s_adjust_callback_
-#define _di_f_int16s_resize_callback_
+#define _di_f_int16s_destroy_callback_
+#define _di_f_int16s_delete_callback_
#define _di_f_int16ss_t_
#define _di_f_int16s_t_
-#define _di_f_int32s_adjust_callback_
-#define _di_f_int32s_resize_callback_
+#define _di_f_int32s_destroy_callback_
+#define _di_f_int32s_delete_callback_
#define _di_f_int32ss_t_
//#define _di_f_int32s_t_
-#define _di_f_int64s_adjust_callback_
-#define _di_f_int64s_resize_callback_
+#define _di_f_int64s_destroy_callback_
+#define _di_f_int64s_delete_callback_
#define _di_f_int64ss_t_
#define _di_f_int64s_t_
-#define _di_f_int8s_adjust_callback_
-#define _di_f_int8s_resize_callback_
+#define _di_f_int8s_destroy_callback_
+#define _di_f_int8s_delete_callback_
#define _di_f_int8ss_t_
#define _di_f_int8s_t_
//#define _di_fl_control_group_apply_
#define _di_f_network_to_host_long_
#define _di_f_network_to_host_short_
#define _di_f_network_to_ip_string_
-#define _di_f_number_unsigneds_adjust_callback_
-#define _di_f_number_unsigneds_resize_callback_
+#define _di_f_number_unsigneds_destroy_callback_
+#define _di_f_number_unsigneds_delete_callback_
#define _di_f_number_unsignedss_t_
//#define _di_f_number_unsigneds_t_
#define _di_f_parse_dynamic_partial_fll_identify_
//#define _di_f_pipe_input_exists_
#define _di_f_pipe_output_exists_
//#define _di_f_poll_e_
-#define _di_f_polls_adjust_callback_
-#define _di_f_polls_resize_callback_
+#define _di_f_polls_destroy_callback_
+#define _di_f_polls_delete_callback_
#define _di_f_pollss_t_
#define _di_f_polls_t_
//#define _di_f_poll_t_
#define _di_f_socket_write_
#define _di_f_socket_write_message_
#define _di_f_socket_write_stream_
-#define _di_f_states_adjust_callback_
-#define _di_f_states_resize_callback_
+#define _di_f_states_destroy_callback_
+#define _di_f_states_delete_callback_
#define _di_f_statess_t_
#define _di_f_states_t_
//#define _di_f_state_t_
//#define _di_f_status_number_e_
//#define _di_f_status_process_e_
//#define _di_f_status_return_e_
-#define _di_f_statuss_adjust_callback_
+#define _di_f_statuss_destroy_callback_
//#define _di_f_status_signal_e_
//#define _di_f_status_socket_e_
-#define _di_f_statuss_resize_callback_
+#define _di_f_statuss_delete_callback_
#define _di_f_statusss_t_
#define _di_f_statuss_t_
//#define _di_f_status_t_
#define _di_f_thread_attribute_scheduler_policy_set_
#define _di_f_thread_attribute_scope_get_
#define _di_f_thread_attribute_scope_set_
-#define _di_f_thread_attributes_adjust_callback_
-#define _di_f_thread_attributes_resize_callback_
+#define _di_f_thread_attributes_destroy_callback_
+#define _di_f_thread_attributes_delete_callback_
#define _di_f_thread_attributes_t_
#define _di_f_thread_attribute_stack_get_
#define _di_f_thread_attribute_stack_set_
#define _di_f_thread_barrier_attribute_delete_
#define _di_f_thread_barrier_attribute_shared_get_
#define _di_f_thread_barrier_attribute_shared_set_
-#define _di_f_thread_barrier_attributes_adjust_callback_
-#define _di_f_thread_barrier_attributes_resize_callback_
+#define _di_f_thread_barrier_attributes_destroy_callback_
+#define _di_f_thread_barrier_attributes_delete_callback_
#define _di_f_thread_barrier_attributes_t_
#define _di_f_thread_barrier_attribute_t_
#define _di_f_thread_barrier_create_
#define _di_f_thread_barrier_delete_
-#define _di_f_thread_barriers_adjust_callback_
-#define _di_f_thread_barriers_resize_callback_
+#define _di_f_thread_barriers_destroy_callback_
+#define _di_f_thread_barriers_delete_callback_
#define _di_f_thread_barriers_t_
#define _di_f_thread_barrier_t_
#define _di_f_thread_barrier_wait_
#define _di_f_thread_condition_attribute_delete_
#define _di_f_thread_condition_attribute_shared_get_
#define _di_f_thread_condition_attribute_shared_set_
-#define _di_f_thread_condition_attributes_adjust_callback_
-#define _di_f_thread_condition_attributes_resize_callback_
+#define _di_f_thread_condition_attributes_destroy_callback_
+#define _di_f_thread_condition_attributes_delete_callback_
#define _di_f_thread_condition_attributes_t_
#define _di_f_thread_condition_attribute_t_
#define _di_f_thread_condition_create_
#define _di_f_thread_condition_delete_
#define _di_f_thread_condition_signal_
#define _di_f_thread_condition_signal_all_
-#define _di_f_thread_conditions_adjust_callback_
-#define _di_f_thread_conditions_resize_callback_
+#define _di_f_thread_conditions_destroy_callback_
+#define _di_f_thread_conditions_delete_callback_
#define _di_f_thread_conditions_t_
#define _di_f_thread_condition_t_
#define _di_f_thread_condition_wait_
#define _di_f_thread_key_delete_
#define _di_f_thread_key_get_
#define _di_f_thread_key_set_
-#define _di_f_thread_keys_adjust_callback_
-#define _di_f_thread_keys_resize_callback_
+#define _di_f_thread_keys_destroy_callback_
+#define _di_f_thread_keys_delete_callback_
#define _di_f_thread_keys_t_
#define _di_f_thread_key_t_
-#define _di_f_thread_lock_attribute_adjust_callback_
+#define _di_f_thread_lock_attribute_destroy_callback_
#define _di_f_thread_lock_attribute_create_
#define _di_f_thread_lock_attribute_delete_
-#define _di_f_thread_lock_attribute_resize_callback_
+#define _di_f_thread_lock_attribute_delete_callback_
#define _di_f_thread_lock_attribute_shared_get_
#define _di_f_thread_lock_attribute_shared_set_
-#define _di_f_thread_lock_attributes_adjust_callback_
-#define _di_f_thread_lock_attributes_resize_callback_
+#define _di_f_thread_lock_attributes_destroy_callback_
+#define _di_f_thread_lock_attributes_delete_callback_
#define _di_f_thread_lock_attributes_t_
#define _di_f_thread_lock_attribute_t_
#define _di_f_thread_lock_create_
#define _di_f_thread_lock_read_
#define _di_f_thread_lock_read_timed_
#define _di_f_thread_lock_read_try_
-#define _di_f_thread_locks_adjust_callback_
-#define _di_f_thread_locks_resize_callback_
+#define _di_f_thread_locks_destroy_callback_
+#define _di_f_thread_locks_delete_callback_
#define _di_f_thread_locks_t_
#define _di_f_thread_lock_t_
#define _di_f_thread_lock_write_
#define _di_f_thread_lock_write_timed_
#define _di_f_thread_lock_write_try_
-#define _di_f_thread_mutex_attribute_adjust_callback_
+#define _di_f_thread_mutex_attribute_destroy_callback_
#define _di_f_thread_mutex_attribute_create_
#define _di_f_thread_mutex_attribute_delete_
#define _di_f_thread_mutex_attribute_priority_ceiling_get_
#define _di_f_thread_mutex_attribute_priority_ceiling_set_
#define _di_f_thread_mutex_attribute_protocol_get_
#define _di_f_thread_mutex_attribute_protocol_set_
-#define _di_f_thread_mutex_attribute_resize_callback_
+#define _di_f_thread_mutex_attribute_delete_callback_
#define _di_f_thread_mutex_attribute_shared_get_
#define _di_f_thread_mutex_attribute_shared_set_
-#define _di_f_thread_mutex_attributes_adjust_callback_
-#define _di_f_thread_mutex_attributes_resize_callback_
+#define _di_f_thread_mutex_attributes_destroy_callback_
+#define _di_f_thread_mutex_attributes_delete_callback_
#define _di_f_thread_mutex_attributes_t_
#define _di_f_thread_mutex_attribute_t_
#define _di_f_thread_mutex_attribute_type_get_
#define _di_f_thread_mutex_lock_try_
#define _di_f_thread_mutex_priority_ceiling_get_
#define _di_f_thread_mutex_priority_ceiling_set_
-#define _di_f_thread_mutexs_adjust_callback_
-#define _di_f_thread_mutexs_resize_callback_
+#define _di_f_thread_mutexs_destroy_callback_
+#define _di_f_thread_mutexs_delete_callback_
#define _di_f_thread_mutexs_t_
#define _di_f_thread_mutex_t_
#define _di_f_thread_mutex_unlock_
#define _di_f_thread_semaphore_lock_
#define _di_f_thread_semaphore_lock_timed_
#define _di_f_thread_semaphore_lock_try_
-#define _di_f_thread_semaphores_adjust_callback_
-#define _di_f_thread_semaphores_resize_callback_
+#define _di_f_thread_semaphores_destroy_callback_
+#define _di_f_thread_semaphores_delete_callback_
#define _di_f_thread_semaphores_t_
#define _di_f_thread_semaphore_t_
#define _di_f_thread_semaphore_unlock_
#define _di_f_thread_semaphore_value_get_
-#define _di_f_thread_sets_adjust_callback_
-#define _di_f_thread_sets_resize_callback_
+#define _di_f_thread_sets_destroy_callback_
+#define _di_f_thread_sets_delete_callback_
#define _di_f_thread_sets_t_
#define _di_f_thread_set_t_
//#define _di_f_thread_signal_mask_
#define _di_f_thread_spin_delete_
#define _di_f_thread_spin_lock_
#define _di_f_thread_spin_lock_try_
-#define _di_f_thread_spins_adjust_callback_
-#define _di_f_thread_spins_resize_callback_
+#define _di_f_thread_spins_destroy_callback_
+#define _di_f_thread_spins_delete_callback_
#define _di_f_thread_spins_t_
#define _di_f_thread_spin_t_
#define _di_f_thread_spin_unlock_
//#define _di_f_type_file_flag_d_
//#define _di_f_type_number_64_t_
//#define _di_f_type_sizes_d_
-#define _di_f_uint128s_adjust_callback_
-#define _di_f_uint128s_resize_callback_
+#define _di_f_uint128s_destroy_callback_
+#define _di_f_uint128s_delete_callback_
#define _di_f_uint128ss_t_
#define _di_f_uint128s_t_
//#define _di_f_uint128_t_
-#define _di_f_uint16s_adjust_callback_
-#define _di_f_uint16s_resize_callback_
+#define _di_f_uint16s_destroy_callback_
+#define _di_f_uint16s_delete_callback_
#define _di_f_uint16ss_t_
//#define _di_f_uint16s_t_
-#define _di_f_uint32s_adjust_callback_
-#define _di_f_uint32s_resize_callback_
+#define _di_f_uint32s_destroy_callback_
+#define _di_f_uint32s_delete_callback_
#define _di_f_uint32ss_t_
#define _di_f_uint32s_t_
-#define _di_f_uint64s_adjust_callback_
-#define _di_f_uint64s_resize_callback_
+#define _di_f_uint64s_destroy_callback_
+#define _di_f_uint64s_delete_callback_
#define _di_f_uint64ss_t_
#define _di_f_uint64s_t_
-#define _di_f_uint8s_adjust_callback_
-//#define _di_f_uint8s_resize_callback_
+#define _di_f_uint8s_destroy_callback_
+//#define _di_f_uint8s_delete_callback_
//#define _di_f_uint8ss_t_
//#define _di_f_uint8s_t_
#define _di_f_utf_buffer_decrement_
build_libraries -lc -lcap
-build_sources_program fll/level_0/account.c fll/level_0/private-account.c fll/level_0/account/accounts.c fll/level_0/account/private-accounts.c
+build_sources_program fll/level_0/account.c fll/level_0/private-account.c fll/level_0/account/accounts.c
build_sources_program fll/level_0/capability.c
build_sources_program fll/level_0/color.c fll/level_0/private-color.c fll/level_0/color/common.c
build_sources_program fll/level_0/compare.c fll/level_0/compare/utf.c fll/level_0/private-compare.c fll/level_0/compare/private-utf.c
build_sources_program fll/level_0/console.c fll/level_0/console/common.c fll/level_0/private-console.c
build_sources_program fll/level_0/control_group.c fll/level_0/control_group/common.c
build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c
-build_sources_program fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/directory/type.c fll/level_0/private-directory.c fll/level_0/directory/private-type.c
+build_sources_program fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/directory/type.c fll/level_0/private-directory.c
build_sources_program fll/level_0/environment.c
build_sources_program fll/level_0/execute.c
build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c
build_sources_program fll/level_0/fss.c fll/level_0/fss/common.c fll/level_0/fss/item.c fll/level_0/fss/named.c fll/level_0/fss/nest.c fll/level_0/fss/quote.c fll/level_0/fss/set.c fll/level_0/fss/set_quote.c fll/level_0/fss/simple_packet.c
-build_sources_program fll/level_0/fss/private-item.c fll/level_0/fss/private-named.c fll/level_0/fss/private-nest.c fll/level_0/fss/private-set.c fll/level_0/fss/private-set_quote.c fll/level_0/fss/private-simple_packet.c
build_sources_program fll/level_0/iki.c fll/level_0/private-iki.c fll/level_0/iki/common.c fll/level_0/iki/private-data.c fll/level_0/iki/data.c
build_sources_program fll/level_0/limit.c fll/level_0/limit/set.c fll/level_0/limit/value.c fll/level_0/limit/private-set.c fll/level_0/limit/private-value.c
build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
#include "../account.h"
#include "accounts.h"
-#include "private-accounts.h"
#ifdef __cplusplus
extern "C" {
if (!account) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = f_string_dynamic_resize(0, &account->home);
- if (F_status_is_error(status)) return status;
+ {
+ f_status_t status = f_string_dynamic_resize(0, &account->home);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &account->label);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &account->label);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &account->name);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &account->name);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &account->password);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &account->password);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &account->shell);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &account->shell);
+ if (F_status_is_error(status)) return status;
+ }
return F_none;
}
if (!account) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = f_string_dynamic_adjust(0, &account->home);
- if (F_status_is_error(status)) return status;
+ account->id_user = 0;
+ account->id_group = 0;
+
+ {
+ f_status_t status = f_string_dynamic_adjust(0, &account->home);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &account->label);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &account->label);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &account->name);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &account->name);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &account->password);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &account->password);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &account->shell);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &account->shell);
+ if (F_status_is_error(status)) return status;
+ }
return F_none;
}
#endif // _di_f_account_destroy_
-#ifndef _di_f_accounts_adjust_callback_
- f_status_t f_accounts_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_accounts_delete_callback_
+ f_status_t f_accounts_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_accounts_t * const array = (f_accounts_t *) void_array;
+ f_account_t * const array = (f_account_t *) void_array;
f_status_t status = F_none;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_string_dynamic_adjust(0, &array->array[i].home);
+ status = f_string_dynamic_resize(0, &array[i].home);
if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &array->array[i].label);
+ status = f_string_dynamic_resize(0, &array[i].label);
if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &array->array[i].name);
+ status = f_string_dynamic_resize(0, &array[i].name);
if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &array->array[i].password);
+ status = f_string_dynamic_resize(0, &array[i].password);
if (F_status_is_error(status)) return status;
- status = f_string_dynamic_adjust(0, &array->array[i].shell);
+ status = f_string_dynamic_resize(0, &array[i].shell);
if (F_status_is_error(status)) return status;
} // for
}
return F_none;
}
-#endif // _di_f_accounts_adjust_callback_
+#endif // _di_f_accounts_delete_callback_
-#ifndef _di_f_accounts_append_
- f_status_t f_accounts_append(const f_account_t source, f_accounts_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_accounts_destroy_callback_
+ f_status_t f_accounts_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_account_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
+ {
+ f_account_t * const array = (f_account_t *) void_array;
+ f_status_t status = F_none;
- destination->array[destination->used].home.used = 0;
- destination->array[destination->used].label.used = 0;
- destination->array[destination->used].name.used = 0;
- destination->array[destination->used].password.used = 0;
- destination->array[destination->used].shell.used = 0;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_string_dynamic_append(source.home, &destination->array[destination->used].home);
- if (F_status_is_error(status)) return status;
+ array[i].id_user = 0;
+ array[i].id_group = 0;
- status = f_string_dynamic_append(source.label, &destination->array[destination->used].label);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &array[i].home);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_append(source.name, &destination->array[destination->used].name);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &array[i].label);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_append(source.password, &destination->array[destination->used].password);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &array[i].name);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_append(source.shell, &destination->array[destination->used].shell);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &array[i].password);
+ if (F_status_is_error(status)) return status;
- ++destination->used;
+ status = f_string_dynamic_adjust(0, &array[i].shell);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
return F_none;
}
-#endif // _di_f_accounts_append_
-
-#ifndef _di_f_accounts_append_all_
- f_status_t f_accounts_append_all(const f_accounts_t source, f_accounts_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_accounts_append_all(source, destination);
- }
-#endif // _di_f_accounts_append_all_
+#endif // _di_f_accounts_destroy_callback_
-#ifndef _di_f_accounts_resize_callback_
- f_status_t f_accounts_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_accountss_delete_callback_
+ f_status_t f_accountss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_accounts_t * const array = (f_accounts_t *) void_array;
f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_string_dynamic_resize(0, &array->array[i].home);
- if (F_status_is_error(status)) return status;
+ for (j = 0; j < array[i].size; ++j) {
- status = f_string_dynamic_resize(0, &array->array[i].label);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &array[i].array[j].home);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &array->array[i].name);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &array[i].array[j].label);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &array->array[i].password);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &array[i].array[j].name);
+ if (F_status_is_error(status)) return status;
- status = f_string_dynamic_resize(0, &array->array[i].shell);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_resize(0, &array[i].array[j].password);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_resize(0, &array[i].array[j].shell);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_account_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_accounts_resize_callback_
-
-#ifndef _di_f_accountss_append_
- f_status_t f_accountss_append(const f_accounts_t source, f_accountss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+#endif // _di_f_accountss_delete_callback_
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_accounts_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
+#ifndef _di_f_accountss_destroy_callback_
+ f_status_t f_accountss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- status = private_f_accounts_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
+ {
+ f_accounts_t * const array = (f_accounts_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
- ++destination->used;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return F_none;
- }
-#endif // _di_f_accountss_append_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_accountss_append_all_
- f_status_t f_accountss_append_all(const f_accountss_t source, f_accountss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_dynamic_adjust(0, &array[i].array[j].home);
+ if (F_status_is_error(status)) return status;
- if (!source.used) return F_data_not;
+ status = f_string_dynamic_adjust(0, &array[i].array[j].label);
+ if (F_status_is_error(status)) return status;
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_accounts_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
+ status = f_string_dynamic_adjust(0, &array[i].array[j].name);
+ if (F_status_is_error(status)) return status;
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
+ status = f_string_dynamic_adjust(0, &array[i].array[j].password);
+ if (F_status_is_error(status)) return status;
- destination->array[destination->used].used = 0;
+ status = f_string_dynamic_adjust(0, &array[i].array[j].shell);
+ if (F_status_is_error(status)) return status;
+ } // for
- if (source.array[i].used) {
- status = private_f_accounts_append_all(source.array[i], &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
- }
- } // for
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_account_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
return F_none;
}
-#endif // _di_f_accountss_append_all_
+#endif // _di_f_accountss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_account_destroy_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_accountss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_accounts_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_string_dynamic_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_string_dynamic_resize()
*/
-#ifndef _di_f_accounts_adjust_callback_
- extern f_status_t f_accounts_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_accounts_adjust_callback_
+#ifndef _di_f_accounts_delete_callback_
+ extern f_status_t f_accounts_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_accounts_delete_callback_
/**
- * Append the single source account onto the destination.
- *
- * @param source
- * The source account to append.
- * @param destination
- * The destination accounts the source is appended onto.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_accounts_t structure.
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: f_string_dynamic_append().
- *
- * @see f_memory_resize()
- * @see f_string_dynamic_append()
- */
-#ifndef _di_f_accounts_append_
- extern f_status_t f_accounts_append(const f_account_t source, f_accounts_t * const destination);
-#endif // _di_f_accounts_append_
-
-/**
- * Append the source accounts onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source accounts to append.
- * @param destination
- * The destination accounts the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: f_string_dynamic_append().
+ * Errors (with error bit) from: f_string_dynamic_adjust().
*
- * @see f_memory_resize()
- * @see f_string_dynamic_append()
+ * @see f_string_dynamic_adjust()
*/
-#ifndef _di_f_accounts_append_all_
- extern f_status_t f_accounts_append_all(const f_accounts_t source, f_accounts_t * const destination);
-#endif // _di_f_accounts_append_all_
+#ifndef _di_f_accounts_destroy_callback_
+ extern f_status_t f_accounts_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_accounts_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_accountss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
*
* @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_string_dynamic_resize()
*/
-#ifndef _di_f_accounts_resize_callback_
- extern f_status_t f_accounts_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_accounts_resize_callback_
+#ifndef _di_f_accountss_delete_callback_
+ extern f_status_t f_accountss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_accountss_delete_callback_
/**
- * Append the single source accounts onto the destination.
- *
- * @param source
- * The source accounts to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_accountss_t structure.
*
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @see f_memory_resize()
- * @see f_string_dynamic_resize()
- */
-#ifndef _di_f_accountss_append_
- extern f_status_t f_accountss_append(const f_accounts_t source, f_accountss_t * const destination);
-#endif // _di_f_accountss_append_
-
-/**
- * Append the source accountss onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source accountss to append.
- * @param destination
- * The destination ranges the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_string_dynamic_adjust().
*
- * @see f_memory_resize()
- * @see f_string_dynamic_resize()
+ * @see f_memory_array_adjust()
+ * @see f_string_dynamic_adjust()
*/
-#ifndef _di_f_accountss_append_all_
- extern f_status_t f_accountss_append_all(const f_accountss_t source, f_accountss_t * const destination);
-#endif // _di_f_accountss_append_all_
+#ifndef _di_f_accountss_destroy_callback_
+ extern f_status_t f_accountss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_accountss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
build_libraries -lc
build_libraries-individual -lf_memory -lf_string
-build_sources_library account.c private-account.c account/accounts.c account/private-accounts.c
+build_sources_library account.c private-account.c account/accounts.c
build_sources_headers account.h account/accounts.h account/common.h
build_libraries -lc
build_libraries-individual -lf_memory -lf_string
-build_sources_library account.c private-account.c account/accounts.c account/private-accounts.c ../../tests/unit/c/mock-account.c
+build_sources_library account.c private-account.c account/accounts.c
+build_sources_library ../../tests/unit/c/mock-account.c
build_sources_headers account.h account/accounts.h account/common.h
flags_library -fPIC
# Inject mocks.
+flags -Wl,--wrap=f_memory_array_adjust
+flags -Wl,--wrap=f_memory_array_resize
flags -Wl,--wrap=f_string_dynamic_adjust
flags -Wl,--wrap=f_string_dynamic_resize
flags -Wl,--wrap=getpwnam_r
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_account
build_sources_program test-account-by_id.c test-account-by_name.c test-account-group_name_by_id.c test-account-group_id_by_name.c test-account-id_by_name.c test-account-name_by_id.c
-build_sources_program test-account-s_adjust_callback.c test-account-s_append.c test-account-s_append_all.c test-account-s_resize_callback.c
-build_sources_program test-account-ss_append.c test-account-ss_append_all.c
+build_sources_program test-account-s_delete_callback.c test-account-s_destroy_callback.c test-account-ss_delete_callback.c test-account-ss_destroy_callback.c
build_sources_program test-account.c
build_script no
#endif
int mock_unwrap = 0;
+int mock_unwrap_f_memory = 1;
+
+f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_array_adjust(length, width, array, used, size);
+ }
+
+ if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ *size = length;
+
+ return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_array_resize(length, width, array, used, size);
+ }
+
+ if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ *size = length;
+
+ return mock_type(f_status_t);
+}
f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
const static int mock_errno_generic = 32767;
extern int mock_unwrap;
+extern int mock_unwrap_f_memory;
+extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
extern f_status_t __real_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
extern f_status_t __real_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
extern f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
extern f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+++ /dev/null
-#include "test-account.h"
-#include "test-account-s_adjust_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_accounts_adjust_callback__fails(void **state) {
-
- mock_unwrap = 0;
-
- f_account_t data = f_account_t_initialize;
- f_account_t data_array[] = { data };
- f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
- f_accounts_t datass_array[] = { datas };
-
- {
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
-
- const f_status_t status = f_accounts_adjust_callback(0, 1, (void *) datass_array);
-
- assert_int_equal(status, F_status_set_error(F_failure));
- }
-}
-
-void test__f_accounts_adjust_callback__works(void **state) {
-
- mock_unwrap = 0;
-
- f_account_t data = f_account_t_initialize;
- f_account_t data_array[] = { data };
- f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
- f_accounts_t datass_array[] = { datas };
- const f_number_unsigned_t length = 1;
-
- {
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_none);
-
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_none);
-
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_none);
-
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_none);
-
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_none);
-
- const f_status_t status = f_accounts_adjust_callback(0, length, (void *) datass_array);
-
- assert_int_equal(status, F_none);
- }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account__s_adjust_callback
-#define _TEST__F_account__s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_accounts_adjust_callback()
- */
-extern void test__f_accounts_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accounts_adjust_callback()
- */
-extern void test__f_accounts_adjust_callback__works(void **state);
-
-#endif // _TEST__F_account__s_adjust_callback
+++ /dev/null
-#include "test-account.h"
-#include "test-account-s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_accounts_append__parameter_checking(void **state) {
-
- const f_account_t data = f_account_t_initialize;
-
- {
- const f_status_t status = f_accounts_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_accounts_append__works(void **state) {
-
- mock_unwrap = 1;
-
- f_string_static_t home = macro_f_string_static_t_initialize_1("home", 0, 4);
- f_string_static_t label = macro_f_string_static_t_initialize_1("label", 0, 5);
- f_string_static_t name = macro_f_string_static_t_initialize_1("name", 0, 4);
- f_string_static_t password = macro_f_string_static_t_initialize_1("password", 0, 8);
- f_string_static_t shell = macro_f_string_static_t_initialize_1("shell", 0, 5);
-
- const f_account_t source = { .home = home, .label = label, .name = name, .password = password, .shell = shell };
- f_accounts_t destination = f_accounts_t_initialize;
-
- {
- const f_status_t status = f_accounts_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
-
- assert_string_equal(destination.array[0].home.string, source.home.string);
- assert_string_equal(destination.array[0].label.string, source.label.string);
- assert_string_equal(destination.array[0].name.string, source.name.string);
- assert_string_equal(destination.array[0].password.string, source.password.string);
- assert_string_equal(destination.array[0].shell.string, source.shell.string);
-
- assert_int_equal(destination.array[0].home.used, source.home.used);
- assert_int_equal(destination.array[0].label.used, source.label.used);
- assert_int_equal(destination.array[0].name.used, source.name.used);
- assert_int_equal(destination.array[0].password.used, source.password.used);
- assert_int_equal(destination.array[0].shell.used, source.shell.used);
- }
-
- free((void *) destination.array[0].home.string);
- free((void *) destination.array[0].label.string);
- free((void *) destination.array[0].name.string);
- free((void *) destination.array[0].password.string);
- free((void *) destination.array[0].shell.string);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account_s_append
-#define _TEST__F_account_s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_accounts_append()
- */
-extern void test__f_accounts_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accounts_append()
- */
-extern void test__f_accounts_append__works(void **state);
-
-#endif // _TEST__F_account_s_append
+++ /dev/null
-#include "test-account.h"
-#include "test-account-s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_accounts_append_all__parameter_checking(void **state) {
-
- const f_accounts_t data = f_accounts_t_initialize;
-
- {
- const f_status_t status = f_accounts_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_accounts_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_accounts_t source = f_accounts_t_initialize;
- f_accounts_t destination = f_accounts_t_initialize;
-
- {
- const f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &source.array, &source.used, &source.size);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_accounts_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_accounts_append_all__works(void **state) {
-
- mock_unwrap = 1;
-
- const int length = 5;
- f_accounts_t source = f_accounts_t_initialize;
- f_accounts_t destination = f_accounts_t_initialize;
-
- f_string_static_t home_0 = macro_f_string_static_t_initialize_1("home_0", 0, 6);
- f_string_static_t label_0 = macro_f_string_static_t_initialize_1("label_0", 0, 7);
- f_string_static_t name_0 = macro_f_string_static_t_initialize_1("name_0", 0, 6);
- f_string_static_t password_0 = macro_f_string_static_t_initialize_1("password_0", 0, 10);
- f_string_static_t shell_0 = macro_f_string_static_t_initialize_1("shell_0", 0, 7);
-
- f_string_static_t home_1 = macro_f_string_static_t_initialize_1("home_1", 0, 6);
- f_string_static_t label_1 = macro_f_string_static_t_initialize_1("label_1", 0, 7);
- f_string_static_t name_1 = macro_f_string_static_t_initialize_1("name_1", 0, 6);
- f_string_static_t password_1 = macro_f_string_static_t_initialize_1("password_1", 0, 10);
- f_string_static_t shell_1 = macro_f_string_static_t_initialize_1("shell_1", 0, 7);
-
- const f_account_t account_0 = { .home = home_0, .label = label_0, .name = name_0, .password = password_0, .shell = shell_0 };
- const f_account_t account_1 = { .home = home_1, .label = label_1, .name = name_1, .password = password_1, .shell = shell_1 };
-
- {
- const f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &source.array, &source.used, &source.size);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- memcpy(&source.array[source.used++], (void *) &account_0, sizeof(f_account_t));
- memcpy(&source.array[source.used++], (void *) &account_1, sizeof(f_account_t));
-
- {
- const f_status_t status = f_accounts_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_string_equal(destination.array[0].home.string, account_0.home.string);
- assert_string_equal(destination.array[0].label.string, account_0.label.string);
- assert_string_equal(destination.array[0].name.string, account_0.name.string);
- assert_string_equal(destination.array[0].password.string, account_0.password.string);
- assert_string_equal(destination.array[0].shell.string, account_0.shell.string);
-
- assert_string_equal(destination.array[1].home.string, account_1.home.string);
- assert_string_equal(destination.array[1].label.string, account_1.label.string);
- assert_string_equal(destination.array[1].name.string, account_1.name.string);
- assert_string_equal(destination.array[1].password.string, account_1.password.string);
- assert_string_equal(destination.array[1].shell.string, account_1.shell.string);
- }
-
- free((void *) source.array);
-
- free((void *) destination.array[0].home.string);
- free((void *) destination.array[0].label.string);
- free((void *) destination.array[0].name.string);
- free((void *) destination.array[0].password.string);
- free((void *) destination.array[0].shell.string);
- free((void *) destination.array[1].home.string);
- free((void *) destination.array[1].label.string);
- free((void *) destination.array[1].name.string);
- free((void *) destination.array[1].password.string);
- free((void *) destination.array[1].shell.string);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account_s_append_all
-#define _TEST__F_account_s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_accounts_append_all()
- */
-extern void test__f_accounts_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_accounts_append_all()
- */
-extern void test__f_accounts_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accounts_append_all()
- */
-extern void test__f_accounts_append_all__works(void **state);
-
-#endif // _TEST__F_account_s_append_all
--- /dev/null
+#include "test-account.h"
+#include "test-account-s_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_accounts_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
+
+ f_account_t data = f_account_t_initialize;
+ f_account_t data_array[] = { data };
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_delete_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_delete_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_delete_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_delete_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_delete_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_accounts_delete_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_accounts_t datas = f_accounts_t_initialize;
+
+ {
+ f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].home);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].label);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].name);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].password);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].shell);
+ assert_int_equal(status, F_none);
+ }
+
+ {
+ const f_status_t status = f_accounts_delete_callback(0, length, (void *) datas.array);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(datas.array[0].home.size, 0);
+ assert_int_equal(datas.array[0].label.size, 0);
+ assert_int_equal(datas.array[0].name.size, 0);
+ assert_int_equal(datas.array[0].password.size, 0);
+ assert_int_equal(datas.array[0].shell.size, 0);
+ }
+
+ free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Account
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_account__s_delete_callback
+#define _TEST__F_account__s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_accounts_delete_callback()
+ */
+extern void test__f_accounts_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_accounts_delete_callback()
+ */
+extern void test__f_accounts_delete_callback__works(void **state);
+
+#endif // _TEST__F_account__s_delete_callback
--- /dev/null
+#include "test-account.h"
+#include "test-account-s_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_accounts_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
+
+ f_account_t data = f_account_t_initialize;
+ f_account_t data_array[] = { data };
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_destroy_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_destroy_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_destroy_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_destroy_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accounts_destroy_callback(0, 1, (void *) data_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_accounts_destroy_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_accounts_t datas = f_accounts_t_initialize;
+
+ {
+ f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].home);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].label);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].name);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].password);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datas.array[0].shell);
+ assert_int_equal(status, F_none);
+ }
+
+ {
+ const f_status_t status = f_accounts_destroy_callback(0, length, (void *) datas.array);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(datas.array[0].home.size, 0);
+ assert_int_equal(datas.array[0].label.size, 0);
+ assert_int_equal(datas.array[0].name.size, 0);
+ assert_int_equal(datas.array[0].password.size, 0);
+ assert_int_equal(datas.array[0].shell.size, 0);
+ }
+
+ free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Account
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_account__s_destroy_callback
+#define _TEST__F_account__s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_accounts_destroy_callback()
+ */
+extern void test__f_accounts_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_accounts_destroy_callback()
+ */
+extern void test__f_accounts_destroy_callback__works(void **state);
+
+#endif // _TEST__F_account__s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account__s_resize_callback
-#define _TEST__F_account__s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_accounts_resize_callback()
- */
-extern void test__f_accounts_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accounts_resize_callback()
- */
-extern void test__f_accounts_resize_callback__works(void **state);
-
-#endif // _TEST__F_account__s_resize_callback
+++ /dev/null
-#include "test-account.h"
-#include "test-account-ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_accountss_append__parameter_checking(void **state) {
-
- f_accounts_t data = f_accounts_t_initialize;
-
- {
- const f_status_t status = f_accountss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_accountss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_accounts_t source = f_accountss_t_initialize;
- f_accountss_t destination = f_accountss_t_initialize;
-
- {
- const f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &source.array, &source.used, &source.size);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_accountss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_accountss_append__works(void **state) {
-
- mock_unwrap = 1;
-
- const int length = 5;
- f_accounts_t sources = f_accounts_t_initialize;
- f_accountss_t destination = f_accountss_t_initialize;
-
- f_string_static_t home = macro_f_string_static_t_initialize_1("home", 0, 4);
- f_string_static_t label = macro_f_string_static_t_initialize_1("label", 0, 5);
- f_string_static_t name = macro_f_string_static_t_initialize_1("name", 0, 4);
- f_string_static_t password = macro_f_string_static_t_initialize_1("password", 0, 8);
- f_string_static_t shell = macro_f_string_static_t_initialize_1("shell", 0, 5);
-
- const f_account_t source = { .home = home, .label = label, .name = name, .password = password, .shell = shell };
-
- {
- const f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &sources.array, &sources.used, &sources.size);
-
- assert_int_equal(status, F_none);
- assert_int_equal(sources.used, 0);
- assert_int_equal(sources.size, length);
- }
-
- while (sources.used < length) {
- memcpy(&sources.array[sources.used++], (void *) &source, sizeof(f_account_t));
- } // while
-
- {
- const f_status_t status = f_accountss_append(sources, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, sources.used);
- assert_int_equal(destination.array[0].size, sources.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
-
- assert_string_equal(destination.array[0].array[i].home.string, source.home.string);
- assert_string_equal(destination.array[0].array[i].label.string, source.label.string);
- assert_string_equal(destination.array[0].array[i].name.string, source.name.string);
- assert_string_equal(destination.array[0].array[i].password.string, source.password.string);
- assert_string_equal(destination.array[0].array[i].shell.string, source.shell.string);
-
- assert_int_equal(destination.array[0].array[i].home.used, source.home.used);
- assert_int_equal(destination.array[0].array[i].label.used, source.label.used);
- assert_int_equal(destination.array[0].array[i].name.used, source.name.used);
- assert_int_equal(destination.array[0].array[i].password.used, source.password.used);
- assert_int_equal(destination.array[0].array[i].shell.used, source.shell.used);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- for (f_number_unsigned_t j = 0; j < destination.array[i].used; ++j) {
-
- free((void *) destination.array[i].array[j].home.string);
- free((void *) destination.array[i].array[j].label.string);
- free((void *) destination.array[i].array[j].name.string);
- free((void *) destination.array[i].array[j].password.string);
- free((void *) destination.array[i].array[j].shell.string);
- }
-
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) sources.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account_ss_append
-#define _TEST__F_account_ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_accountss_append()
- */
-extern void test__f_accountss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_accountss_append()
- */
-extern void test__f_accountss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accountss_append()
- */
-extern void test__f_accountss_append__works(void **state);
-
-#endif // _TEST__F_account_ss_append
+++ /dev/null
-#include "test-account.h"
-#include "test-account-ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_accountss_append_all__parameter_checking(void **state) {
-
- const f_accountss_t data = f_accountss_t_initialize;
-
- {
- const f_status_t status = f_accountss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_accountss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_accountss_t source = f_accountss_t_initialize;
- f_accountss_t destination = f_accountss_t_initialize;
-
- {
- const f_status_t status = f_memory_arrays_resize(length, sizeof(f_accounts_t), (void **) &source.array, &source.used, &source.size, &f_accounts_resize_callback);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_accountss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_accountss_append_all__works(void **state) {
-
- mock_unwrap = 1;
-
- const int length = 5;
- const int length_inner = 2;
- f_accountss_t source = f_accountss_t_initialize;
- f_accountss_t destination = f_accountss_t_initialize;
-
- f_string_static_t home_0 = macro_f_string_static_t_initialize_1("home_0", 0, 6);
- f_string_static_t label_0 = macro_f_string_static_t_initialize_1("label_0", 0, 7);
- f_string_static_t name_0 = macro_f_string_static_t_initialize_1("name_0", 0, 6);
- f_string_static_t password_0 = macro_f_string_static_t_initialize_1("password_0", 0, 10);
- f_string_static_t shell_0 = macro_f_string_static_t_initialize_1("shell_0", 0, 7);
-
- f_string_static_t home_1 = macro_f_string_static_t_initialize_1("home_1", 0, 6);
- f_string_static_t label_1 = macro_f_string_static_t_initialize_1("label_1", 0, 7);
- f_string_static_t name_1 = macro_f_string_static_t_initialize_1("name_1", 0, 6);
- f_string_static_t password_1 = macro_f_string_static_t_initialize_1("password_1", 0, 10);
- f_string_static_t shell_1 = macro_f_string_static_t_initialize_1("shell_1", 0, 7);
-
- const f_account_t account_0 = { .home = home_0, .label = label_0, .name = name_0, .password = password_0, .shell = shell_0 };
- const f_account_t account_1 = { .home = home_1, .label = label_1, .name = name_1, .password = password_1, .shell = shell_1 };
-
- {
- const f_status_t status = f_memory_arrays_resize(length, sizeof(f_accounts_t), (void **) &source.array, &source.used, &source.size, &f_accounts_resize_callback);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_memory_array_resize(length_inner, sizeof(f_account_t), (void **) &source.array[source.used].array, &source.array[source.used].used, &source.array[source.used].size);
-
- assert_int_equal(status, F_none);
-
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &account_0, sizeof(f_account_t));
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &account_1, sizeof(f_account_t));
- } // for
- }
-
- {
- const f_status_t status = f_accountss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- assert_string_equal(destination.array[i].array[0].home.string, account_0.home.string);
- assert_string_equal(destination.array[i].array[0].label.string, account_0.label.string);
- assert_string_equal(destination.array[i].array[0].name.string, account_0.name.string);
- assert_string_equal(destination.array[i].array[0].password.string, account_0.password.string);
- assert_string_equal(destination.array[i].array[0].shell.string, account_0.shell.string);
-
- assert_string_equal(destination.array[i].array[1].home.string, account_1.home.string);
- assert_string_equal(destination.array[i].array[1].label.string, account_1.label.string);
- assert_string_equal(destination.array[i].array[1].name.string, account_1.name.string);
- assert_string_equal(destination.array[i].array[1].password.string, account_1.password.string);
- assert_string_equal(destination.array[i].array[1].shell.string, account_1.shell.string);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- for (f_number_unsigned_t j = 0; j < destination.array[i].used; ++j) {
-
- free((void *) destination.array[i].array[j].home.string);
- free((void *) destination.array[i].array[j].label.string);
- free((void *) destination.array[i].array[j].name.string);
- free((void *) destination.array[i].array[j].password.string);
- free((void *) destination.array[i].array[j].shell.string);
- }
-
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Account
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_account_ss_append_all
-#define _TEST__F_account_ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_accountss_append_all()
- */
-extern void test__f_accountss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_accountss_append_all()
- */
-extern void test__f_accountss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_accountss_append_all()
- */
-extern void test__f_accountss_append_all__works(void **state);
-
-#endif // _TEST__F_account_ss_append_all
#include "test-account.h"
-#include "test-account-s_resize_callback.h"
+#include "test-account-ss_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_accounts_resize_callback__fails(void **state) {
+void test__f_accountss_delete_callback__fails(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 0;
f_account_t data = f_account_t_initialize;
f_account_t data_array[] = { data };
will_return(__wrap_f_string_dynamic_resize, true);
will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
- const f_status_t status = f_accounts_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_dynamic_resize, true);
will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
- const f_status_t status = f_accounts_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_dynamic_resize, true);
will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
- const f_status_t status = f_accounts_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_dynamic_resize, true);
will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
- const f_status_t status = f_accounts_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_dynamic_resize, true);
will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
- const f_status_t status = f_accounts_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
-}
-
-void test__f_accounts_resize_callback__works(void **state) {
-
- mock_unwrap = 0;
-
- f_account_t data = f_account_t_initialize;
- f_account_t data_array[] = { data };
- f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
- f_accounts_t datass_array[] = { datas };
- const f_number_unsigned_t length = 1;
{
will_return(__wrap_f_string_dynamic_resize, false);
will_return(__wrap_f_string_dynamic_resize, false);
will_return(__wrap_f_string_dynamic_resize, F_none);
- const f_status_t status = f_accounts_resize_callback(0, length, (void *) datass_array);
+ will_return(__wrap_f_memory_array_resize, true);
+ will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_accountss_delete_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_accountss_t datass = f_accountss_t_initialize;
+ {
+ f_status_t status = f_memory_array_resize(length, sizeof(f_accounts_t), (void **) &datass.array, &datass.used, &datass.size);
+ assert_int_equal(status, F_none);
+
+ status = f_memory_array_resize(1, sizeof(f_account_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].home);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].label);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].name);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].password);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].shell);
assert_int_equal(status, F_none);
}
+
+ {
+ const f_status_t status = f_accountss_delete_callback(0, length, (void *) datass.array);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(datass.array[0].size, 0);
+ }
+
+ free((void *) datass.array);
}
#ifdef __cplusplus
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Account
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_account__ss_delete_callback
+#define _TEST__F_account__ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_accountss_delete_callback()
+ */
+extern void test__f_accountss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_accountss_delete_callback()
+ */
+extern void test__f_accountss_delete_callback__works(void **state);
+
+#endif // _TEST__F_account__ss_delete_callback
--- /dev/null
+#include "test-account.h"
+#include "test-account-ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_accountss_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+ mock_unwrap_f_memory = 0;
+
+ f_account_t data = f_account_t_initialize;
+ f_account_t data_array[] = { data };
+ f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_accounts_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_memory_array_adjust, true);
+ will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_accountss_destroy_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_accountss_t datass = f_accountss_t_initialize;
+
+ {
+ f_status_t status = f_memory_array_resize(length, sizeof(f_accounts_t), (void **) &datass.array, &datass.used, &datass.size);
+ assert_int_equal(status, F_none);
+
+ status = f_memory_array_resize(1, sizeof(f_account_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].home);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].label);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].name);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].password);
+ assert_int_equal(status, F_none);
+
+ status = f_string_dynamic_resize(1, &datass.array[0].array[0].shell);
+ assert_int_equal(status, F_none);
+ }
+
+ {
+ const f_status_t status = f_accountss_destroy_callback(0, length, (void *) datass.array);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(datass.array[0].size, 0);
+ }
+
+ free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Account
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_account__ss_destroy_callback
+#define _TEST__F_account__ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_accountss_destroy_callback()
+ */
+extern void test__f_accountss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_accountss_destroy_callback()
+ */
+extern void test__f_accountss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_account__ss_destroy_callback
cmocka_unit_test(test__f_account_name_by_id__not_found),
cmocka_unit_test(test__f_account_name_by_id__works),
- cmocka_unit_test(test__f_accounts_adjust_callback__fails),
- cmocka_unit_test(test__f_accounts_resize_callback__fails),
+ cmocka_unit_test(test__f_accounts_delete_callback__fails),
+ cmocka_unit_test(test__f_accounts_destroy_callback__fails),
- cmocka_unit_test(test__f_accounts_adjust_callback__works),
- cmocka_unit_test(test__f_accounts_resize_callback__works),
+ cmocka_unit_test(test__f_accounts_delete_callback__works),
+ cmocka_unit_test(test__f_accounts_destroy_callback__works),
- cmocka_unit_test(test__f_accounts_append_all__returns_data_not),
+ cmocka_unit_test(test__f_accountss_delete_callback__fails),
+ cmocka_unit_test(test__f_accountss_destroy_callback__fails),
- cmocka_unit_test(test__f_accounts_append__works),
- cmocka_unit_test(test__f_accounts_append_all__works),
-
- cmocka_unit_test(test__f_accountss_append__returns_data_not),
- cmocka_unit_test(test__f_accountss_append_all__returns_data_not),
-
- cmocka_unit_test(test__f_accountss_append__works),
- cmocka_unit_test(test__f_accountss_append_all__works),
+ cmocka_unit_test(test__f_accountss_delete_callback__works),
+ //cmocka_unit_test(test__f_accountss_destroy_callback__works),
#ifndef _di_level_0_parameter_checking_
cmocka_unit_test(test__f_account_by_id__parameter_checking),
cmocka_unit_test(test__f_account_id_by_name__parameter_checking),
cmocka_unit_test(test__f_account_name_by_id__parameter_checking),
- // f_accounts_adjust_callback() doesn't use parameter checking.
- // f_accounts_resize_callback() doesn't use parameter checking.
-
- cmocka_unit_test(test__f_accounts_append__parameter_checking),
- cmocka_unit_test(test__f_accounts_append_all__parameter_checking),
+ // f_accounts_delete_callback() doesn't use parameter checking.
+ // f_accounts_destroy_callback() doesn't use parameter checking.
- cmocka_unit_test(test__f_accountss_append__parameter_checking),
- cmocka_unit_test(test__f_accountss_append_all__parameter_checking),
+ // f_accountss_delete_callback() doesn't use parameter checking.
+ // f_accountss_destroy_callback() doesn't use parameter checking.
#endif // _di_level_0_parameter_checking_
};
#include "test-account-group_name_by_id.h"
#include "test-account-id_by_name.h"
#include "test-account-name_by_id.h"
-#include "test-account-s_adjust_callback.h"
-#include "test-account-s_append.h"
-#include "test-account-s_append_all.h"
-#include "test-account-s_resize_callback.h"
-#include "test-account-ss_append.h"
-#include "test-account-ss_append_all.h"
+#include "test-account-s_destroy_callback.h"
+#include "test-account-s_delete_callback.h"
+#include "test-account-ss_destroy_callback.h"
+#include "test-account-ss_delete_callback.h"
#ifdef __cplusplus
extern "C" {
// FLL-0 directory includes.
#include <fll/level_0/directory/common.h>
-#include <fll/level_0/directory/type.h>
+#include <fll/level_0/directory/listing.h>
+#include <fll/level_0/directory/recurse_do.h>
+#include <fll/level_0/directory/status.h>
#ifdef __cplusplus
extern "C" {
--- /dev/null
+#include "../directory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_directory_listing_delete_
+ f_status_t f_directory_listing_delete(f_directory_listing_t * const listing) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!listing) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ {
+ f_status_t status = f_string_dynamics_resize(0, &listing->block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &listing->unknown);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listing_delete_
+
+#ifndef _di_f_directory_listing_destroy_
+ f_status_t f_directory_listing_destroy(f_directory_listing_t * const listing) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!listing) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ {
+ f_status_t status = f_string_dynamics_adjust(0, &listing->block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &listing->unknown);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listing_destroy_
+
+#ifndef _di_f_directory_listings_delete_callback_
+ f_status_t f_directory_listings_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_listing_t * const array = (f_directory_listing_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ status = f_string_dynamics_resize(0, &array[i].block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listings_delete_callback_
+
+#ifndef _di_f_directory_listings_destroy_callback_
+ f_status_t f_directory_listings_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_listing_t * const array = (f_directory_listing_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ status = f_string_dynamics_adjust(0, &array[i].block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listings_destroy_callback_
+
+#ifndef _di_f_directory_listingss_delete_callback_
+ f_status_t f_directory_listingss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_listings_t * const array = (f_directory_listings_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_directory_listing_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listingss_delete_callback_
+
+#ifndef _di_f_directory_listingss_destroy_callback_
+ f_status_t f_directory_listingss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_listings_t * const array = (f_directory_listings_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_directory_listing_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_listingss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines type-specific data to be used for/by project directory.
+ *
+ * This is auto-included by directory.h and should not need to be explicitly included.
+ */
+#ifndef _F_directory_listing_h
+#define _F_directory_listing_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure representing a listing of paths found within a directory.
+ *
+ * Each property represents a set of paths grouped by directory entity file type.
+ *
+ * Properties:
+ * - block: For S_IFBLK.
+ * - character: For S_IFCHR.
+ * - directory: For S_IFDIR.
+ * - regular: For S_IFREG.
+ * - link: For S_IFLNK.
+ * - fifo: For S_IFIFO.
+ * - socket: For S_IFSOCK.
+ * - unknown: For anything else.
+ */
+#ifndef _di_f_directory_listing_t_
+ typedef struct {
+ f_string_dynamics_t block; // S_IFBLK
+ f_string_dynamics_t character; // S_IFCHR
+ f_string_dynamics_t directory; // S_IFDIR
+ f_string_dynamics_t regular; // S_IFREG
+ f_string_dynamics_t link; // S_IFLNK
+ f_string_dynamics_t fifo; // S_IFIFO
+ f_string_dynamics_t socket; // S_IFSOCK
+ f_string_dynamics_t unknown;
+ } f_directory_listing_t;
+
+ #define f_directory_listing_t_initialize { \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ }
+
+ #define macro_f_directory_listing_t_initialize_1(block, character, directory, regular, link, fifo, socket, unknown) { \
+ block, \
+ character, \
+ directory, \
+ regular, \
+ link, \
+ fifo, \
+ socket, \
+ unknown, \
+ }
+#endif // _di_f_directory_listing_t_
+
+/**
+ * An array of directory listing.
+ *
+ * Properties:
+ * - array: An array of directory status.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_listings_t_
+ typedef struct {
+ f_directory_listing_t *array;
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_directory_listings_t;
+
+ #define f_directory_listings_t_initialize { 0, 0, 0 }
+
+ #define macro_f_directory_listings_t_initialize_1(content, size, used) { array, size, used }
+ #define macro_f_directory_listings_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_directory_listings_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_listings_t_
+
+/**
+ * Delete all arrays within the listing.
+ *
+ * @param listing
+ * The listing to fully delete.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_listing_delete_
+ extern f_status_t f_directory_listing_delete(f_directory_listing_t * const listing);
+#endif // _di_f_directory_listing_delete_
+
+/**
+ * Destroy all arrays within the listing.
+ *
+ * @param listing
+ * The listing to fully destroy.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_listing_destroy_
+ extern f_status_t f_directory_listing_destroy(f_directory_listing_t * const listing);
+#endif // _di_f_directory_listing_destroy_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_listings_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_listings_delete_callback_
+ extern f_status_t f_directory_listings_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_listings_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_listings_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_listings_destroy_callback_
+ extern f_status_t f_directory_listings_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_listings_destroy_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_listingss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_listingss_delete_callback_
+ extern f_status_t f_directory_listingss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_listingss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_listingss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_listingss_destroy_callback_
+ extern f_status_t f_directory_listingss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_listingss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_directory_listing_h
+++ /dev/null
-#include "../directory.h"
-#include "private-type.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_directory_statuss_adjust_) || !defined(_di_f_directory_statuss_decimate_by_)
- f_status_t private_f_directory_statuss_adjust(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) {
-
- {
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < statuss->size; ++i) {
-
- status = f_string_dynamic_adjust(0, &statuss->array[i].path);
- if (F_status_is_error(status)) return status;
- } // for
- }
-
- return f_memory_array_adjust(length, sizeof(f_directory_status_t), (void **) &statuss->array, &statuss->used, &statuss->size);
- }
-#endif // !defined(_di_f_directory_statuss_adjust_) || !defined(_di_f_directory_statuss_decimate_by_)
-
-#if !defined(_di_f_directory_statuss_decrease_by_) || !defined(_di_f_directory_statuss_resize_)
- f_status_t private_f_directory_statuss_resize(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) {
-
- {
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < statuss->size; ++i) {
-
- status = f_string_dynamic_resize(0, &statuss->array[i].path);
- if (F_status_is_error(status)) return status;
- } // for
- }
-
- return f_memory_array_resize(length, sizeof(f_directory_status_t), (void **) &statuss->array, &statuss->used, &statuss->size);
- }
-#endif // !defined(_di_f_directory_statuss_decrease_by_) || !defined(_di_f_directory_statuss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Directory
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_directory_type_h
-#define _PRIVATE_F_directory_type_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param statuss
- * The statuss to adjust.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_string_dynamic_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_string_dynamic_adjust()
- *
- * @see f_directory_statuss_adjust()
- * @see f_directory_statuss_decimate_by()
- */
-#if !defined(_di_f_directory_statuss_adjust_) || !defined(_di_f_directory_statuss_decimate_by_)
- extern f_status_t private_f_directory_statuss_adjust(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_directory_statuss_adjust_) || !defined(_di_f_directory_statuss_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The new size to use.
- * @param statuss
- * The statuss to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
- *
- * @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
- *
- * @see f_directory_statuss_resize()
- * @see f_directory_statuss_decimate_by()
- */
-#if !defined(_di_f_directory_statuss_decrease_by_) || !defined(_di_f_directory_statuss_resize_)
- extern f_status_t private_f_directory_statuss_resize(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_directory_statuss_decrease_by_) || !defined(_di_f_directory_statuss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_directory_type_h
--- /dev/null
+#include "../directory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_directory_recurse_do_delete_
+ f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!recurse) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ {
+ f_status_t status = f_string_dynamic_resize(0, &recurse->path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_resize(0, &recurse->path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &recurse->listing.unknown);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_do_delete_
+
+#ifndef _di_f_directory_recurse_do_destroy_
+ f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!recurse) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ recurse->depth = 0;
+ recurse->depth_max = 0;
+ recurse->flag = 0;
+ recurse->path_top = 0;
+
+ macro_f_state_t_clear(recurse->state);
+ memset((void *) &recurse->mode, 0, sizeof(f_mode_t));
+
+ {
+ f_status_t status = f_string_dynamic_adjust(0, &recurse->path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_adjust(0, &recurse->path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &recurse->listing.unknown);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_do_destroy_
+
+#ifndef _di_f_directory_recurse_dos_delete_callback_
+ f_status_t f_directory_recurse_dos_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_recurse_do_t * const array = (f_directory_recurse_do_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ status = f_string_dynamic_resize(0, &array[i].path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_resize(0, &array[i].path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].listing.unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_dos_delete_callback_
+
+#ifndef _di_f_directory_recurse_dos_destroy_callback_
+ f_status_t f_directory_recurse_dos_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_recurse_do_t * const array = (f_directory_recurse_do_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ array[i].depth = 0;
+ array[i].depth_max = 0;
+ array[i].flag = 0;
+ array[i].path_top = 0;
+
+ macro_f_state_t_clear(array[i].state);
+
+ memset((void *) &array[i].mode, 0, sizeof(f_mode_t));
+
+ status = f_string_dynamic_adjust(0, &array[i].path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_adjust(0, &array[i].path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].listing.unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_dos_destroy_callback_
+
+#ifndef _di_f_directory_recurse_doss_delete_callback_
+ f_status_t f_directory_recurse_doss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_recurse_dos_t * const array = (f_directory_recurse_dos_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_dynamic_resize(0, &array[i].array[j].path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_resize(0, &array[i].array[j].path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_resize(0, &array[i].array[j].listing.unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_directory_recurse_do_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_doss_delete_callback_
+
+#ifndef _di_f_directory_recurse_doss_destroy_callback_
+ f_status_t f_directory_recurse_doss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_recurse_dos_t * const array = (f_directory_recurse_dos_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ array[i].array[j].depth = 0;
+ array[i].array[j].depth_max = 0;
+ array[i].array[j].flag = 0;
+ array[i].array[j].path_top = 0;
+
+ macro_f_state_t_clear(array[i].array[j].state);
+
+ memset((void *) &array[i].array[j].mode, 0, sizeof(f_mode_t));
+
+ status = f_string_dynamic_adjust(0, &array[i].array[j].path);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamic_adjust(0, &array[i].array[j].path_cache);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.block);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.character);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.directory);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.regular);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.link);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.fifo);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.socket);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_dynamics_adjust(0, &array[i].array[j].listing.unknown);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_directory_recurse_do_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_doss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines type-specific data to be used for/by project directory.
+ *
+ * This is auto-included by directory.h and should not need to be explicitly included.
+ */
+#ifndef _F_directory_recurse_do_h
+#define _F_directory_recurse_do_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A structure containing directory recursion information.
+ *
+ * The action() callback provide full access to this f_directory_recurse_do_t structure.
+ * The action callback may set any of the following on the state.status to have the following effects:
+ * - Any status (with error bit set): Immediately return as error.
+ * - F_break: Break out of the current loop.
+ * - F_continue: Skip to the next iteration in the current loop.
+ * - F_done: Immedately return as success but do nothing else in this recursion.
+ *
+ * The action parameters are:
+ * - recurse: Must be of type f_directory_recurse_do_t and represents this data. Must not be NULL.
+ * - name: The name of the file or directory the action is being performed on (does not have the parent directory path) (may be empty at the top level).
+ * - flag: A flag representing the particular action being performed.
+ *
+ * The handle() callback provides a callback identical to the handle() except that it is for handling exceptions in place of state.handle().
+ * The handle() provides additional information not provided by state.handle() but if it is NULL, then state.handle() is called.
+ * The state.handle() and state.interrupt() callbacks internal parameter must be of type f_directory_recurse_do_t.
+ *
+ * The callbacks must take care to properly modify the structure or they could cause security, integrity, or functionality problems.
+ *
+ * Properties:
+ * - depth: A number representing the depth recursed thus far (generally assigned internally).
+ * - depth_max: The maximum recursion depth to use.
+ * - flag: A set of flags used exclusively by the directory recurse process (not to be confused with state.flag).
+ * - mode: A file mode flag to use when working on files, such as when copying a file.
+ *
+ * - state: A pointer to the state information, where state.interrupt() and state.handle() are called appopriately.
+ * - listing: A directory listing structure used internally to help reduce repeated memory allocation overhead.
+ *
+ * - path: A path representing the current directory path being operated on and usually represents the parent path of some file or directory (generally assigned internally).
+ * - path_cache: A path-related cache made available for the caller to use, such as combining the path and the file name in the action callback.
+ * - path_top: A pointer to the top path string, used for error handling and printing (generally assigned internally).
+ *
+ * - action: A callback used for performing some action (this is required to do anything).
+ * - handle: A callback used for performing error handling during recursion directly relating to a file.
+ *
+ * The macro_f_directory_recurse_do_t_initialize_1() all arguments.
+ * The macro_f_directory_recurse_do_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
+ */
+#ifndef _di_f_directory_recurse_do_t_
+ typedef struct {
+ f_number_unsigned_t depth;
+ f_number_unsigned_t depth_max;
+ uint16_t flag;
+ f_mode_t mode;
+
+ f_state_t state;
+ f_directory_listing_t listing;
+
+ f_string_dynamic_t path;
+ f_string_dynamic_t path_cache;
+ const f_string_static_t *path_top;
+
+ void (*action)(void * const recurse, const f_string_static_t name, const uint16_t flag);
+ void (*handle)(void * const recurse, const f_string_static_t name, const uint16_t flag);
+ } f_directory_recurse_do_t;
+
+ #define f_directory_recurse_do_t_initialize { \
+ 0, \
+ F_directory_max_recurse_depth_d, \
+ f_directory_recurse_do_flag_none_e, \
+ f_mode_t_initialize, \
+ f_state_t_initialize, \
+ f_directory_listing_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ 0, \
+ 0, \
+ 0, \
+ }
+
+ #define macro_f_directory_recurse_do_t_initialize_1(depth, depth_max, flag, mode, state, listing, path, path_cache, path_top, action, handle) { \
+ depth, \
+ depth_max, \
+ flag, \
+ mode, \
+ state, \
+ listing, \
+ path, \
+ path_cache, \
+ path_top, \
+ action, \
+ handle, \
+ }
+
+ #define macro_f_directory_recurse_do_t_initialize_2(depth, depth_max, flag, mode, state, action, handle) { \
+ depth,\
+ depth_max \
+ flag, \
+ mode, \
+ state, \
+ f_directory_listing_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ 0, \
+ action, \
+ handle, \
+ }
+#endif // _di_f_directory_recurse_do_t_
+
+/**
+ * An array of directory recurse.
+ *
+ * Properties:
+ * - array: An array of directory status.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_recurse_dos_t_
+ typedef struct {
+ f_directory_recurse_do_t *array;
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_directory_recurse_dos_t;
+
+ #define f_directory_recurse_dos_t_initialize { 0, 0, 0 }
+
+ #define macro_f_directory_recurse_dos_t_initialize_1(content, size, used) { array, size, used }
+ #define macro_f_directory_recurse_dos_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_directory_recurse_dos_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_recurse_dos_t_
+
+/**
+ * Delete all non-pointer based dynamic arrays within the recurse.
+ *
+ * @param recurse
+ * The recurse to fully delete.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_recurse_do_delete_
+ extern f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse);
+#endif // _di_f_directory_recurse_do_delete_
+
+/**
+ * Destroy all non-pointer based dynamic arrays within the recurse.
+ *
+ * @param recurse
+ * The recurse to fully destroy.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_adjust().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_recurse_do_destroy_
+ extern f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse);
+#endif // _di_f_directory_recurse_do_destroy_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_recurse_dos_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_recurse_dos_delete_callback_
+ extern f_status_t f_directory_recurse_dos_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_recurse_dos_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_recurse_dos_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_adjust().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_recurse_dos_destroy_callback_
+ extern f_status_t f_directory_recurse_dos_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_recurse_dos_destroy_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_recurse_doss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_recurse_doss_delete_callback_
+ extern f_status_t f_directory_recurse_doss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_recurse_doss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_recurse_doss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_adjust().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_recurse_doss_destroy_callback_
+ extern f_status_t f_directory_recurse_doss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_recurse_doss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_directory_recurse_do_h
--- /dev/null
+#include "../directory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_directory_status_delete_
+ f_status_t f_directory_status_delete(f_directory_status_t * const directory_status) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!directory_status) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ {
+ const f_status_t status = f_string_dynamic_resize(0, &directory_status->path);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_status_delete_
+
+#ifndef _di_f_directory_status_destroy_
+ f_status_t f_directory_status_destroy(f_directory_status_t * const directory_status) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!directory_status) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ directory_status->status = 0;
+
+ {
+ const f_status_t status = f_string_dynamic_adjust(0, &directory_status->path);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_status_destroy_
+
+#ifndef _di_f_directory_statuss_delete_callback_
+ f_status_t f_directory_statuss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_status_t * const array = (f_directory_status_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ status = f_string_dynamic_resize(0, &array[i].path);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_statuss_delete_callback_
+
+#ifndef _di_f_directory_statuss_destroy_callback_
+ f_status_t f_directory_statuss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_status_t * const array = (f_directory_status_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ array[i].status = F_none;
+
+ status = f_string_dynamic_adjust(0, &array[i].path);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_statuss_destroy_callback_
+
+#ifndef _di_f_directory_statusss_delete_callback_
+ f_status_t f_directory_statusss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_statuss_t * const array = (f_directory_statuss_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_dynamic_resize(0, &array[i].array[j].path);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_directory_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_statusss_delete_callback_
+
+#ifndef _di_f_directory_statusss_destroy_callback_
+ f_status_t f_directory_statusss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_directory_statuss_t * const array = (f_directory_statuss_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ array[i].array[j].status = F_none;
+
+ status = f_string_dynamic_adjust(0, &array[i].array[j].path);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_directory_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_directory_statusss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines type-specific data to be used for/by project directory.
+ *
+ * This is auto-included by directory.h and should not need to be explicitly included.
+ */
+#ifndef _F_directory_status_h
+#define _F_directory_status_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * An association of a path and a status code.
+ *
+ * The allocation macros apply to the path.
+ *
+ * Properties:
+ * - step: The allocation step.
+ * - status: The status code.
+ * - path: The dynamically allocated path associated with the status code.
+ */
+#ifndef _di_f_directory_status_t_
+ typedef struct {
+ f_status_t status;
+ f_string_dynamic_t path;
+ } f_directory_status_t;
+
+ #define f_directory_status_t_initialize { 0, f_string_dynamic_t_initialize }
+
+ #define macro_f_directory_status_t_initialize_1(status, path) { status, path }
+
+ #define macro_f_directory_status_t_clear(directory) \
+ directory.status = 0; \
+ macro_f_string_dynamic_t_clear(directory.path);
+#endif // _di_f_directory_status_t_
+
+/**
+ * An array of directory status.
+ *
+ * Properties:
+ * - array: An array of directory status.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_statuss_t_
+ typedef struct {
+ f_directory_status_t *array;
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_directory_statuss_t;
+
+ #define f_directory_statuss_t_initialize { 0, 0, 0 }
+
+ #define macro_f_directory_statuss_t_initialize_1(content, size, used) { array, size, used }
+ #define macro_f_directory_statuss_t_initialize_2(array, length) { array, length, length }
+
+ #define macro_f_directory_statuss_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_statuss_t_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_statuss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ *
+ * @see f_string_dynamic_resize()
+ */
+#ifndef _di_f_directory_statuss_delete_callback_
+ extern f_status_t f_directory_statuss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_statuss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_statuss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ */
+#ifndef _di_f_directory_statuss_destroy_callback_
+ extern f_status_t f_directory_statuss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_statuss_destroy_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_statusss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ *
+ * @see f_string_dynamic_resize()
+ */
+#ifndef _di_f_directory_statusss_delete_callback_
+ extern f_status_t f_directory_statusss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_statusss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_directory_statusss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamic_adjust().
+ *
+ * @see f_string_dynamic_adjust()
+ */
+#ifndef _di_f_directory_statusss_destroy_callback_
+ extern f_status_t f_directory_statusss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_directory_statusss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_directory_status_h
+++ /dev/null
-#include "../directory.h"
-#include "private-type.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_f_directory_listing_delete_
- f_status_t f_directory_listing_delete(f_directory_listing_t * const listing) {
- #ifndef _di_level_0_parameter_checking_
- if (!listing) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_string_dynamics_resize(0, &listing->block);
- f_string_dynamics_resize(0, &listing->character);
- f_string_dynamics_resize(0, &listing->directory);
- f_string_dynamics_resize(0, &listing->regular);
- f_string_dynamics_resize(0, &listing->link);
- f_string_dynamics_resize(0, &listing->fifo);
- f_string_dynamics_resize(0, &listing->socket);
- f_string_dynamics_resize(0, &listing->unknown);
-
- return F_none;
- }
-#endif // _di_f_directory_listing_delete_
-
-#ifndef _di_f_directory_listing_destroy_
- f_status_t f_directory_listing_destroy(f_directory_listing_t * const listing) {
- #ifndef _di_level_0_parameter_checking_
- if (!listing) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_string_dynamics_adjust(0, &listing->block);
- f_string_dynamics_adjust(0, &listing->character);
- f_string_dynamics_adjust(0, &listing->directory);
- f_string_dynamics_adjust(0, &listing->regular);
- f_string_dynamics_adjust(0, &listing->link);
- f_string_dynamics_adjust(0, &listing->fifo);
- f_string_dynamics_adjust(0, &listing->socket);
- f_string_dynamics_adjust(0, &listing->unknown);
-
- return F_none;
- }
-#endif // _di_f_directory_listing_destroy_
-
-#ifndef _di_f_directory_recurse_do_delete_
- f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse) {
- #ifndef _di_level_0_parameter_checking_
- if (!recurse) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_directory_listing_delete(&recurse->listing);
-
- f_string_dynamic_resize(0, &recurse->path);
- f_string_dynamic_resize(0, &recurse->path_cache);
-
- return F_none;
- }
-#endif // _di_f_directory_recurse_do_delete_
-
-#ifndef _di_f_directory_recurse_do_destroy_
- f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse) {
- #ifndef _di_level_0_parameter_checking_
- if (!recurse) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_directory_listing_destroy(&recurse->listing);
-
- f_string_dynamic_adjust(0, &recurse->path);
- f_string_dynamic_adjust(0, &recurse->path_cache);
-
- return F_none;
- }
-#endif // _di_f_directory_recurse_do_destroy_
-
-#ifndef _di_f_directory_statuss_adjust_
- f_status_t f_directory_statuss_adjust(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_directory_statuss_adjust(length, statuss);
- }
-#endif // _di_f_directory_statuss_adjust_
-
-#ifndef _di_f_directory_statuss_decimate_by_
- f_status_t f_directory_statuss_decimate_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_directory_statuss_adjust((statuss->size - amount > 0) ? statuss->size - amount : 0, statuss);
- }
-#endif // _di_f_directory_statuss_decimate_by_
-
-#ifndef _di_f_directory_statuss_decrease_by_
- f_status_t f_directory_statuss_decrease_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_directory_statuss_resize((statuss->size - amount > 0) ? statuss->size - amount : 0, statuss);
- }
-#endif // _di_f_directory_statuss_decrease_by_
-
-#ifndef _di_f_directory_statuss_increase_
- f_status_t f_directory_statuss_increase(const f_number_unsigned_t step, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_directory_status_t), (void **) &statuss->array, &statuss->used, &statuss->size);
- }
-#endif // _di_f_directory_statuss_increase_
-
-#ifndef _di_f_directory_statuss_increase_by_
- f_status_t f_directory_statuss_increase_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_directory_status_t), (void **) &statuss->array, &statuss->used, &statuss->size);
- }
-#endif // _di_f_directory_statuss_increase_by_
-
-#ifndef _di_f_directory_statuss_resize_
- f_status_t f_directory_statuss_resize(const f_number_unsigned_t length, f_directory_statuss_t * const statuss) {
- #ifndef _di_level_0_parameter_checking_
- if (!statuss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_directory_statuss_resize(length, statuss);
- }
-#endif // _di_f_directory_statuss_resize_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Directory
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines type-specific data to be used for/by project directory.
- *
- * This is auto-included by directory.h and should not need to be explicitly included.
- */
-#ifndef _F_directory_type_h
-#define _F_directory_type_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * A structure representing a listing of paths found within a directory.
- *
- * Each property represents a set of paths grouped by directory entity file type.
- *
- * Properties:
- * - block: For S_IFBLK.
- * - character: For S_IFCHR.
- * - directory: For S_IFDIR.
- * - regular: For S_IFREG.
- * - link: For S_IFLNK.
- * - fifo: For S_IFIFO.
- * - socket: For S_IFSOCK.
- * - unknown: For anything else.
- */
-#ifndef _di_f_directory_listing_t_
- typedef struct {
- f_string_dynamics_t block; // S_IFBLK
- f_string_dynamics_t character; // S_IFCHR
- f_string_dynamics_t directory; // S_IFDIR
- f_string_dynamics_t regular; // S_IFREG
- f_string_dynamics_t link; // S_IFLNK
- f_string_dynamics_t fifo; // S_IFIFO
- f_string_dynamics_t socket; // S_IFSOCK
- f_string_dynamics_t unknown;
- } f_directory_listing_t;
-
- #define f_directory_listing_t_initialize { \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- }
-
- #define macro_f_directory_listing_t_initialize_1(block, character, directory, regular, link, fifo, socket, unknown) { \
- block, \
- character, \
- directory, \
- regular, \
- link, \
- fifo, \
- socket, \
- unknown, \
- }
-#endif // _di_f_directory_listing_t_
-
-/**
- * An association of a path and a status code.
- *
- * The allocation macros apply to the path.
- *
- * Properties:
- * - step: The allocation step.
- * - status: The status code.
- * - path: The dynamically allocated path associated with the status code.
- */
-#ifndef _di_f_directory_status_t_
- typedef struct {
- f_status_t status;
- f_string_dynamic_t path;
- } f_directory_status_t;
-
- #define f_directory_status_t_initialize { 0, f_string_dynamic_t_initialize }
-
- #define macro_f_directory_status_t_initialize_1(status, path) { status, path }
-
- #define macro_f_directory_status_t_clear(directory) \
- directory.status = 0; \
- macro_f_string_dynamic_t_clear(directory.path);
-#endif // _di_f_directory_status_t_
-
-/**
- * An array of directory status.
- *
- * Properties:
- * - array: An array of directory status.
- * - size: Total amount of allocated space.
- * - used: Total number of allocated spaces used.
- */
-#ifndef _di_f_directory_statuss_t_
- typedef struct {
- f_directory_status_t *array;
- f_number_unsigned_t size;
- f_number_unsigned_t used;
- } f_directory_statuss_t;
-
- #define f_directory_statuss_t_initialize { 0, 0, 0 }
-
- #define macro_f_directory_statuss_t_initialize_1(content, size, used) { array, size, used }
- #define macro_f_directory_statuss_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_directory_statuss_t_clear(structures) macro_f_memory_structures_clear(structures)
-#endif // _di_f_directory_statuss_t_
-
-/**
- * A structure containing directory recursion information.
- *
- * The action() callback provide full access to this f_directory_recurse_do_t structure.
- * The action callback may set any of the following on the state.status to have the following effects:
- * - Any status (with error bit set): Immediately return as error.
- * - F_break: Break out of the current loop.
- * - F_continue: Skip to the next iteration in the current loop.
- * - F_done: Immedately return as success but do nothing else in this recursion.
- *
- * The action parameters are:
- * - recurse: Must be of type f_directory_recurse_do_t and represents this data. Must not be NULL.
- * - name: The name of the file or directory the action is being performed on (does not have the parent directory path) (may be empty at the top level).
- * - flag: A flag representing the particular action being performed.
- *
- * The handle() callback provides a callback identical to the handle() except that it is for handling exceptions in place of state.handle().
- * The handle() provides additional information not provided by state.handle() but if it is NULL, then state.handle() is called.
- * The state.handle() and state.interrupt() callbacks internal parameter must be of type f_directory_recurse_do_t.
- *
- * The callbacks must take care to properly modify the structure or they could cause security, integrity, or functionality problems.
- *
- * Properties:
- * - depth: A number representing the depth recursed thus far (generally assigned internally).
- * - depth_max: The maximum recursion depth to use.
- * - flag: A set of flags used exclusively by the directory recurse process (not to be confused with state.flag).
- * - mode: A file mode flag to use when working on files, such as when copying a file.
- *
- * - state: A pointer to the state information, where state.interrupt() and state.handle() are called appopriately.
- * - listing: A directory listing structure used internally to help reduce repeated memory allocation overhead.
- *
- * - path: A path representing the current directory path being operated on and usually represents the parent path of some file or directory (generally assigned internally).
- * - path_cache: A path-related cache made available for the caller to use, such as combining the path and the file name in the action callback.
- * - path_top: A pointer to the top path string, used for error handling and printing (generally assigned internally).
- *
- * - action: A callback used for performing some action (this is required to do anything).
- * - handle: A callback used for performing error handling during recursion directly relating to a file.
- *
- * The macro_f_directory_recurse_do_t_initialize_1() all arguments.
- * The macro_f_directory_recurse_do_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
- */
-#ifndef _di_f_directory_recurse_do_t_
- typedef struct {
- f_number_unsigned_t depth;
- f_number_unsigned_t depth_max;
- uint16_t flag;
- f_mode_t mode;
-
- f_state_t state;
- f_directory_listing_t listing;
-
- f_string_dynamic_t path;
- f_string_dynamic_t path_cache;
- const f_string_static_t *path_top;
-
- void (*action)(void * const recurse, const f_string_static_t name, const uint16_t flag);
- void (*handle)(void * const recurse, const f_string_static_t name, const uint16_t flag);
- } f_directory_recurse_do_t;
-
- #define f_directory_recurse_do_t_initialize { \
- 0, \
- F_directory_max_recurse_depth_d, \
- f_directory_recurse_do_flag_none_e, \
- f_mode_t_initialize, \
- f_state_t_initialize, \
- f_directory_listing_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- 0, \
- 0, \
- 0, \
- }
-
- #define macro_f_directory_recurse_do_t_initialize_1(depth, depth_max, flag, mode, state, listing, path, path_cache, path_top, action, handle) { \
- depth, \
- depth_max, \
- flag, \
- mode, \
- state, \
- listing, \
- path, \
- path_cache, \
- path_top, \
- action, \
- handle, \
- }
-
- #define macro_f_directory_recurse_do_t_initialize_2(depth, depth_max, flag, mode, state, action, handle) { \
- depth,\
- depth_max \
- flag, \
- mode, \
- state, \
- f_directory_listing_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- 0, \
- action, \
- handle, \
- }
-#endif // _di_f_directory_recurse_do_t_
-
-/**
- * Delete all arrays within the listing.
- *
- * @param listing
- * The listing to fully delete.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_string_dynamics_resize().
- *
- * @see f_string_dynamics_resize()
- */
-#ifndef _di_f_directory_listing_delete_
- extern f_status_t f_directory_listing_delete(f_directory_listing_t * const listing);
-#endif // _di_f_directory_listing_delete_
-
-/**
- * Destroy all arrays within the listing.
- *
- * @param listing
- * The listing to fully destroy.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_string_dynamics_adjust().
- *
- * @see f_string_dynamics_adjust()
- */
-#ifndef _di_f_directory_listing_destroy_
- extern f_status_t f_directory_listing_destroy(f_directory_listing_t * const listing);
-#endif // _di_f_directory_listing_destroy_
-
-/**
- * Delete all non-pointer based dynamic arrays within the recurse.
- *
- * @param recurse
- * The recurse to fully delete.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_directory_listing_delete().
- * Errors (with error bit) from: f_string_dynamic_resize().
- *
- * @see f_directory_listing_delete()
- * @see f_string_dynamic_resize()
- */
-#ifndef _di_f_directory_recurse_do_delete_
- extern f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse);
-#endif // _di_f_directory_recurse_do_delete_
-
-/**
- * Destroy all non-pointer based dynamic arrays within the recurse.
- *
- * @param recurse
- * The recurse to fully destroy.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_directory_listing_destroy().
- * Errors (with error bit) from: f_string_dynamic_adjust().
- *
- * @see f_directory_listing_destroy()
- * @see f_string_dynamic_adjust()
- */
-#ifndef _di_f_directory_recurse_do_destroy_
- extern f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse);
-#endif // _di_f_directory_recurse_do_destroy_
-
-/**
- * Resize all parts of the directory statuss structure using the same length.
- *
- * @param length
- * The new size to use.
- * @param statuss
- * The statuss structure to adjust.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_string_dynamic_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_string_dynamic_adjust()
- */
-#ifndef _di_f_directory_statuss_adjust_
- extern f_status_t f_directory_statuss_adjust(const f_number_unsigned_t length, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_adjust_
-
-/**
- * Resize all parts of the directory statuss structure to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param statuss
- * The statuss array to resize.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_string_dynamic_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_string_dynamic_adjust()
- */
-#ifndef _di_f_directory_statuss_decimate_by_
- extern f_status_t f_directory_statuss_decimate_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_decimate_by_
-
-/**
- * Resize all parts of the directory statuss structure to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param statuss
- * The statuss array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
- *
- * @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
- */
-#ifndef _di_f_directory_statuss_decrease_by_
- extern f_status_t f_directory_statuss_decrease_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_decrease_by_
-
-/**
- * Increase the size of all parts of the directory statuss structure, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param statuss
- * The statuss array to resize.
- *
- * @return
- * Success from f_memory_array_increase().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_directory_statuss_increase_
- extern f_status_t f_directory_statuss_increase(const f_number_unsigned_t step, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_increase_
-
-/**
- * Resize all parts of the directory statuss structure to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param statuss
- * The statuss array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_directory_statuss_increase_by_
- extern f_status_t f_directory_statuss_increase_by(const f_number_unsigned_t amount, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_increase_by_
-
-/**
- * Resize all parts of the directory statuss structure using the same length.
- *
- * @param length
- * The new size to use.
- * @param statuss
- * The directory status array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
- *
- * @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
- */
-#ifndef _di_f_directory_statuss_resize_
- extern f_status_t f_directory_statuss_resize(const f_number_unsigned_t length, f_directory_statuss_t * const statuss);
-#endif // _di_f_directory_statuss_resize_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_directory_type_h
build_libraries -lc
build_libraries-individual -lf_memory -lf_string
-build_sources_library directory.c directory/common.c directory/type.c private-directory.c directory/private-type.c
+build_sources_library directory.c directory/common.c directory/listing.c directory/recurse_do.c directory/status.c
+build_sources_library private-directory.c
-build_sources_headers directory.h directory/common.h directory/type.h
+build_sources_headers directory.h directory/common.h directory/listing.h directory/recurse_do.h directory/status.h
build_script yes
build_shared yes
build_libraries -lc
build_libraries-individual -lf_memory -lf_string
-build_sources_library directory.c directory/common.c directory/type.c private-directory.c directory/private-type.c ../../tests/unit/c/mock-directory.c
+build_sources_library directory.c directory/common.c directory/listing.c directory/recurse_do.c directory/status.c
+build_sources_library private-directory.c
+build_sources_library ../../tests/unit/c/mock-directory.c
-build_sources_headers directory.h directory/common.h directory/type.h
+build_sources_headers directory.h directory/common.h directory/listing.h directory/recurse_do.h directory/status.h
build_script yes
build_shared yes
flags_library -fPIC
# Inject mocks.
+flags -Wl,--wrap=f_string_dynamic_adjust
+flags -Wl,--wrap=f_string_dynamic_resize
+flags -Wl,--wrap=f_string_dynamics_adjust
+flags -Wl,--wrap=f_string_dynamics_resize
flags -Wl,--wrap=alphasort
flags -Wl,--wrap=fstatat
flags -Wl,--wrap=mkdir
build_libraries -lc -lcmocka
build_libraries-individual -lf_memory -lf_string -lf_directory
-build_sources_program test-directory-create.c test-directory-create_at.c test-directory-exists.c test-directory-exists_at.c test-directory-is.c test-directory-is_at.c test-directory-list.c test-directory-open.c test-directory-open_at.c test-directory-remove.c test-directory-remove_custom.c test-directory-touch.c test-directory-touch_at.c test-directory.c
+build_sources_program test-directory.c test-directory-create.c test-directory-create_at.c test-directory-exists.c test-directory-exists_at.c test-directory-is.c test-directory-is_at.c test-directory-list.c test-directory-open.c test-directory-open_at.c test-directory-remove.c test-directory-remove_custom.c test-directory-touch.c test-directory-touch_at.c
+build_sources_program test-directory-listings_destroy_callback.c test-directory-listings_delete_callback.c
+build_sources_program test-directory-recurse_dos_destroy_callback.c test-directory-recurse_dos_delete_callback.c
+build_sources_program test-directory-statuss_destroy_callback.c test-directory-statuss_delete_callback.c
build_script no
build_shared yes
extern "C" {
#endif
+int mock_unwrap = 0;
+
+f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
+
+ if (mock_unwrap) {
+ return __real_f_string_dynamic_adjust(length, structure);
+ }
+
+ if (!structure) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ structure->size = length;
+
+ return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
+
+ if (mock_unwrap) {
+ return __real_f_string_dynamic_resize(length, structure);
+ }
+
+ if (!structure) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ structure->size = length;
+
+ return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure) {
+
+ if (mock_unwrap) {
+ return __real_f_string_dynamics_adjust(length, structure);
+ }
+
+ if (!structure) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ structure->size = length;
+
+ return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure) {
+
+ if (mock_unwrap) {
+ return __real_f_string_dynamics_resize(length, structure);
+ }
+
+ if (!structure) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ structure->size = length;
+
+ return mock_type(f_status_t);
+}
+
int __wrap_alphasort(const struct dirent **a, const struct dirent **b) {
const bool failure = mock_type(bool);
const static int mock_errno_generic = 32767;
+extern int mock_unwrap;
+
+extern f_status_t __real_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __real_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __real_f_string_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
+extern f_status_t __real_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
+
+extern f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __wrap_f_string_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
+extern f_status_t __wrap_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
+
extern int __wrap_alphasort(const struct dirent **a, const struct dirent **b);
extern int __wrap_fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags);
extern int __wrap_mkdir(const char *pathname, mode_t mode);
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-listings_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_listings_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_listing_t data = f_directory_listing_t_initialize;
+ f_directory_listing_t data_array[] = { data };
+ f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_listings_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_listings_delete_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_listing_t data = f_directory_listing_t_initialize;
+ f_directory_listing_t data_array[] = { data };
+ f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_listings_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ const f_status_t status = f_directory_listings_delete_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__listings_delete_callback
+#define _TEST__F_directory__listings_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_listings_delete_callback()
+ */
+extern void test__f_directory_listings_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_listings_delete_callback()
+ */
+extern void test__f_directory_listings_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__listings_delete_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-listings_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_listings_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_listing_t data = f_directory_listing_t_initialize;
+ f_directory_listing_t data_array[] = { data };
+ f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_listings_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_listings_destroy_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_listing_t data = f_directory_listing_t_initialize;
+ f_directory_listing_t data_array[] = { data };
+ f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_listings_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ const f_status_t status = f_directory_listings_destroy_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__listings_destroy_callback
+#define _TEST__F_directory__listings_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_listings_destroy_callback()
+ */
+extern void test__f_directory_listings_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_listings_destroy_callback()
+ */
+extern void test__f_directory_listings_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__listings_destroy_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-recurse_dos_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_recurse_dos_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+ f_directory_recurse_do_t data_array[] = { data };
+ f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_recurse_dos_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_recurse_dos_delete_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+ f_directory_recurse_do_t data_array[] = { data };
+ f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_recurse_dos_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__recurse_dos_delete_callback
+#define _TEST__F_directory__recurse_dos_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_recurse_dos_delete_callback()
+ */
+extern void test__f_directory_recurse_dos_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_recurse_dos_delete_callback()
+ */
+extern void test__f_directory_recurse_dos_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__recurse_dos_delete_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-recurse_dos_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_recurse_dos_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+ f_directory_recurse_do_t data_array[] = { data };
+ f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_recurse_dos_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_recurse_dos_destroy_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+ f_directory_recurse_do_t data_array[] = { data };
+ f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_recurse_dos_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__recurse_dos_destroy_callback
+#define _TEST__F_directory__recurse_dos_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_recurse_dos_destroy_callback()
+ */
+extern void test__f_directory_recurse_dos_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_recurse_dos_destroy_callback()
+ */
+extern void test__f_directory_recurse_dos_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__recurse_dos_destroy_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-statuss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_statuss_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_status_t data = f_directory_status_t_initialize;
+ f_directory_status_t data_array[] = { data };
+ f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_statuss_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, true);
+ will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_statuss_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_statuss_delete_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_status_t data = f_directory_status_t_initialize;
+ f_directory_status_t data_array[] = { data };
+ f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_statuss_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamic_resize, false);
+ will_return(__wrap_f_string_dynamic_resize, F_none);
+
+ const f_status_t status = f_directory_statuss_delete_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__statuss_delete_callback
+#define _TEST__F_directory__statuss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_statuss_delete_callback()
+ */
+extern void test__f_directory_statuss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_statuss_delete_callback()
+ */
+extern void test__f_directory_statuss_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__statuss_delete_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-statuss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_statuss_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_status_t data = f_directory_status_t_initialize;
+ f_directory_status_t data_array[] = { data };
+ f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_statuss_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, true);
+ will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_directory_statuss_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_directory_statuss_destroy_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_directory_status_t data = f_directory_status_t_initialize;
+ f_directory_status_t data_array[] = { data };
+ f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_directory_statuss_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamic_adjust, false);
+ will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+ const f_status_t status = f_directory_statuss_destroy_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__statuss_destroy_callback
+#define _TEST__F_directory__statuss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_statuss_destroy_callback()
+ */
+extern void test__f_directory_statuss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_statuss_destroy_callback()
+ */
+extern void test__f_directory_statuss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__statuss_destroy_callback
cmocka_unit_test(test__f_directory_remove_custom__returns_data_not),
cmocka_unit_test(test__f_directory_remove_custom__works),
+ cmocka_unit_test(test__f_directory_listings_destroy_callback__fails),
+ cmocka_unit_test(test__f_directory_listings_delete_callback__fails),
+
+ cmocka_unit_test(test__f_directory_listings_destroy_callback__works),
+ cmocka_unit_test(test__f_directory_listings_delete_callback__works),
+
+ cmocka_unit_test(test__f_directory_recurse_dos_destroy_callback__fails),
+ cmocka_unit_test(test__f_directory_recurse_dos_delete_callback__fails),
+
+ cmocka_unit_test(test__f_directory_recurse_dos_destroy_callback__works),
+ cmocka_unit_test(test__f_directory_recurse_dos_delete_callback__works),
+
+ cmocka_unit_test(test__f_directory_statuss_destroy_callback__fails),
+ cmocka_unit_test(test__f_directory_statuss_delete_callback__fails),
+
+ cmocka_unit_test(test__f_directory_statuss_destroy_callback__works),
+ cmocka_unit_test(test__f_directory_statuss_delete_callback__works),
+
cmocka_unit_test(test__f_directory_touch__fails),
cmocka_unit_test(test__f_directory_touch__returns_data_not),
cmocka_unit_test(test__f_directory_touch__works),
cmocka_unit_test(test__f_directory_open_at__parameter_checking),
cmocka_unit_test(test__f_directory_remove__parameter_checking),
cmocka_unit_test(test__f_directory_remove_custom__parameter_checking),
+ // f_directory_statuss_destroy_callback() doesn't use parameter checking.
+ // f_directory_statuss_delete_callback() doesn't use parameter checking.
// f_directory_touch() doesn't use parameter checking.
// f_directory_touch_at() doesn't use parameter checking.
#endif // _di_level_0_parameter_checking_
#include "test-directory-open_at.h"
#include "test-directory-remove.h"
#include "test-directory-remove_custom.h"
+#include "test-directory-listings_destroy_callback.h"
+#include "test-directory-listings_delete_callback.h"
+#include "test-directory-recurse_dos_destroy_callback.h"
+#include "test-directory-recurse_dos_delete_callback.h"
+#include "test-directory-statuss_destroy_callback.h"
+#include "test-directory-statuss_delete_callback.h"
#include "test-directory-touch.h"
#include "test-directory-touch_at.h"
+
#ifdef __cplusplus
extern "C" {
#endif
#include "../fss.h"
-#include "private-item.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_items_adjust_
- f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
+#ifndef _di_f_fss_item_delete_
+ f_status_t f_fss_item_delete(f_fss_item_t * const item) {
#ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
+ if (!item) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_fss_items_adjust(length, items);
+ return f_string_ranges_resize(0, &item->content);
}
-#endif // _di_f_fss_items_adjust_
+#endif // _di_f_fss_item_delete_
-#ifndef _di_f_fss_items_decimate_by_
- f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
+#ifndef _di_f_fss_item_destroy_
+ f_status_t f_fss_item_destroy(f_fss_item_t * const item) {
#ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
+ if (!item) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!amount) return F_data_not;
+ item->object.start = 1;
+ item->object.stop = 0;
+ item->parent = 0;
- return private_f_fss_items_adjust((items->size > amount) ? items->size - amount : 0, items);
+ return f_string_ranges_adjust(0, &item->content);
}
-#endif // _di_f_fss_items_decimate_by_
+#endif // _di_f_fss_item_destroy_
-#ifndef _di_f_fss_items_decrease_by_
- f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_items_delete_callback_
+ f_status_t f_fss_items_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_item_t * const array = (f_fss_item_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (!amount) return F_data_not;
+ status = f_string_ranges_resize(0, &array[i].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
- return private_f_fss_items_resize((items->size > amount) ? items->size - amount : 0, items);
+ return F_none;
}
-#endif // _di_f_fss_items_decrease_by_
+#endif // _di_f_fss_items_delete_callback_
-#ifndef _di_f_fss_items_increase_
- f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_items_destroy_callback_
+ f_status_t f_fss_items_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_item_t * const array = (f_fss_item_t *) void_array;
+ f_status_t status = F_none;
- return f_memory_array_increase(step, sizeof(f_fss_item_t), (void **) &items->array, &items->used, &items->size);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ array[i].object.start = 1;
+ array[i].object.stop = 0;
+ array[i].parent = 0;
+
+ status = f_string_ranges_adjust(0, &array[i].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
}
-#endif // _di_f_fss_items_increase_
+#endif // _di_f_fss_items_destroy_callback_
-#ifndef _di_f_fss_items_increase_by_
- f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_itemss_delete_callback_
+ f_status_t f_fss_itemss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_items_t * const array = (f_fss_items_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
- return f_memory_array_increase_by(amount, sizeof(f_fss_item_t), (void **) &items->array, &items->used, &items->size);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_ranges_resize(0, &array[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_item_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
}
-#endif // _di_f_fss_items_increase_by_
+#endif // _di_f_fss_itemss_delete_callback_
-#ifndef _di_f_fss_items_resize_
- f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
- #ifndef _di_level_0_parameter_checking_
- if (!items) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_itemss_destroy_callback_
+ f_status_t f_fss_itemss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_items_t * const array = (f_fss_items_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ array[i].array[j].object.start = 1;
+ array[i].array[j].object.stop = 0;
+ array[i].array[j].parent = 0;
+
+ status = f_string_ranges_adjust(0, &array[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_item_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_items_resize(length, items);
+ return F_none;
}
-#endif // _di_f_fss_items_resize_
+#endif // _di_f_fss_itemss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
macro_f_string_range_t_clear(item.object); \
macro_f_string_ranges_t_clear(item.content); \
item.parent = 0;
-
- #define macro_f_fss_item_t_resize(status, item, length) macro_f_string_ranges_t_resize(status, item.content, length)
- #define macro_f_fss_item_t_adjust(status, item, length) macro_f_string_ranges_t_adjust(status, item.content, length)
-
- #define macro_f_fss_item_t_delete_simple(item) macro_f_string_ranges_t_delete_simple(item.content)
- #define macro_f_fss_item_t_destroy_simple(item) macro_f_string_ranges_t_destroy_simple(item.content)
-
- #define macro_f_fss_item_t_increase(status, step, item) macro_f_string_ranges_t_increase(status, step, item.content)
- #define macro_f_fss_item_t_increase_by(status, item, amount) macro_f_string_ranges_t_increase_by(status, item.content, amount)
- #define macro_f_fss_item_t_decrease_by(status, item, amount) macro_f_string_ranges_t_decrease_by(status, item.content, amount)
- #define macro_f_fss_item_t_decimate_by(status, item, amount) macro_f_string_ranges_t_decimate_by(status, item.content, amount)
#endif // _di_f_fss_item_t_
/**
#define macro_f_fss_items_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_items_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_fss_items_t_resize(status, items, length) status = f_fss_items_resize(length, &items);
- #define macro_f_fss_items_t_adjust(status, items, length) status = f_fss_items_adjust(length, &items);
-
- #define macro_f_fss_items_t_delete_simple(items) f_fss_items_resize(0, &items);
- #define macro_f_fss_items_t_destroy_simple(items) f_fss_items_adjust(0, &items);
-
- #define macro_f_fss_items_t_increase(status, step, items) status = f_fss_items_increase(step, &items);
- #define macro_f_fss_items_t_increase_by(status, items, amount) status = f_fss_items_increase_by(amount, &items);
- #define macro_f_fss_items_t_decrease_by(status, items, amount) status = f_fss_items_decrease_by(amount, &items);
- #define macro_f_fss_items_t_decimate_by(status, items, amount) status = f_fss_items_decimate_by(amount, &items);
#endif // _di_f_fss_items_t_
/**
- * Resize the nest array.
+ * Delete an item.
*
- * @param length
- * The new size to use.
- * @param items
- * The items array to resize.
+ * @param item
+ * The item to delete.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_ranges_resize().
+ *
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_f_fss_items_adjust_
- extern f_status_t f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items);
-#endif // _di_f_fss_items_adjust_
+#ifndef _di_f_fss_item_delete_
+ extern f_status_t f_fss_item_delete(f_fss_item_t * const item);
+#endif // _di_f_fss_item_delete_
/**
- * Resize the nest array to a smaller size.
+ * Destroy an item.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param items
- * The items array to resize.
+ * @param item
+ * The item to destroy.
*
* @return
* F_none on success.
- * F_data_not if amount is 0.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ *
+ * @see f_string_ranges_adjust()
*/
-#ifndef _di_f_fss_items_decimate_by_
- extern f_status_t f_fss_items_decimate_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_decimate_by_
+#ifndef _di_f_fss_item_destroy_
+ extern f_status_t f_fss_item_destroy(f_fss_item_t * const item);
+#endif // _di_f_fss_item_destroy_
/**
- * Resize the nest array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_items_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * This does not do parameter checking.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param items
- * The items array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_adjust().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_string_dynamic_adjust().
+ * Errors (with error bit) from: f_string_ranges_resize().
*
- * @see f_memory_array_adjust()
- * @see f_string_dynamic_adjust()
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_f_fss_items_decrease_by_
- extern f_status_t f_fss_items_decrease_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_decrease_by_
+#ifndef _di_f_fss_items_delete_callback_
+ extern f_status_t f_fss_items_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_items_delete_callback_
/**
- * Increase the size of the items array, but only if necessary.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_items_t structure.
*
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param items
- * The items array to resize.
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_increase().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_string_ranges_adjust().
*
- * @see f_memory_array_increase()
+ * @see f_string_ranges_adjust()
*/
-#ifndef _di_f_fss_items_increase_
- extern f_status_t f_fss_items_increase(const f_number_unsigned_t step, f_fss_items_t * const items);
-#endif // _di_f_fss_items_increase_
+#ifndef _di_f_fss_items_destroy_callback_
+ extern f_status_t f_fss_items_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_items_destroy_callback_
/**
- * Resize the items array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_itemss_t structure.
*
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param items
- * The items array to resize.
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_increase_by().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase_by().
+ * Errors (with error bit) from: f_string_ranges_resize().
*
- * @see f_memory_array_increase_by()
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_f_fss_items_increase_by_
- extern f_status_t f_fss_items_increase_by(const f_number_unsigned_t amount, f_fss_items_t * const items);
-#endif // _di_f_fss_items_increase_by_
+#ifndef _di_f_fss_itemss_delete_callback_
+ extern f_status_t f_fss_itemss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_itemss_delete_callback_
/**
- * Resize the items array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_itemss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param length
- * The new size to use.
- * @param items
- * The items array to resize.
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_resize().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_string_ranges_adjust().
*
- * @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
+ * @see f_string_ranges_adjust()
*/
-#ifndef _di_f_fss_items_resize_
- extern f_status_t f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items);
-#endif // _di_f_fss_items_resize_
+#ifndef _di_f_fss_itemss_destroy_callback_
+ extern f_status_t f_fss_itemss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_itemss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#include "../fss.h"
-#include "private-named.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_named_adjust_
- f_status_t f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) {
+#ifndef _di_f_fss_named_delete_
+ f_status_t f_fss_named_delete(f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_fss_named_adjust(length, named);
- }
-#endif // _di_f_fss_named_adjust_
+ {
+ f_status_t status = f_string_ranges_resize(0, &named->objects);
+ if (F_status_is_error(status)) return status;
-#ifndef _di_f_fss_named_decimate_by_
- f_status_t f_fss_named_decimate_by(const f_number_unsigned_t amount, f_fss_named_t * const named) {
- #ifndef _di_level_0_parameter_checking_
- if (!named) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_rangess_resize(0, &named->contents);
+ if (F_status_is_error(status)) return status;
- if (!amount) return F_data_not;
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ }
- return private_f_fss_named_adjust((named->objects.size - amount > 0) ? named->objects.size - amount : 0, named);
+ return F_none;
}
-#endif // _di_f_fss_named_decimate_by_
+#endif // _di_f_fss_named_delete_
-#ifndef _di_f_fss_named_decrease_by_
- f_status_t f_fss_named_decrease_by(const f_number_unsigned_t amount, f_fss_named_t * const named) {
+#ifndef _di_f_fss_named_destroy_
+ f_status_t f_fss_named_destroy(f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!amount) return F_data_not;
+ named->name.start = 1;
+ named->name.stop = 0;
+
+ {
+ f_status_t status = f_string_ranges_adjust(0, &named->objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_named_resize((named->objects.size - amount > 0) ? named->objects.size - amount : 0, named);
+ status = f_string_rangess_adjust(0, &named->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
}
-#endif // _di_f_fss_named_decrease_by_
+#endif // _di_f_fss_named_destroy_
-#ifndef _di_f_fss_named_increase_
- f_status_t f_fss_named_increase(const f_number_unsigned_t step, f_fss_named_t * const named) {
- #ifndef _di_level_0_parameter_checking_
- if (!named) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nameds_delete_callback_
+ f_status_t f_fss_nameds_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (step && named->objects.used + 1 > named->objects.size) {
- if (named->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ {
+ f_fss_named_t * const array = (f_fss_named_t *) void_array;
+ f_status_t status = F_none;
- f_number_unsigned_t length = named->objects.used + step;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (length > F_number_t_size_unsigned_d) {
- if (named->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_ranges_resize(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- length = F_number_t_size_unsigned_d;
- }
+ status = f_string_rangess_resize(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_named_resize(length, named);
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &array[i].quotess.array, &array[i].quotess.used, &array[i].quotess.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_named_increase_
+#endif // _di_f_fss_nameds_delete_callback_
-#ifndef _di_f_fss_named_increase_by_
- f_status_t f_fss_named_increase_by(const f_number_unsigned_t amount, f_fss_named_t * const named) {
- #ifndef _di_level_0_parameter_checking_
- if (!named) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nameds_destroy_callback_
+ f_status_t f_fss_nameds_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_named_t * const array = (f_fss_named_t *) void_array;
+ f_status_t status = F_none;
- if (amount) {
- if (named->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- const f_number_unsigned_t length = named->objects.used + amount;
+ array[i].name.start = 1;
+ array[i].name.stop = 0;
- if (length > named->objects.size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_ranges_adjust(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_named_resize(length, named);
- }
+ status = f_string_rangess_adjust(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &array[i].quotess.array, &array[i].quotess.used, &array[i].quotess.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_named_increase_by_
+#endif // _di_f_fss_nameds_destroy_callback_
-#ifndef _di_f_fss_named_resize_
- f_status_t f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) {
- #ifndef _di_level_0_parameter_checking_
- if (!named) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_namedss_delete_callback_
+ f_status_t f_fss_namedss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return private_f_fss_named_resize(length, named);
- }
-#endif // _di_f_fss_named_resize_
+ {
+ f_fss_nameds_t * const array = (f_fss_nameds_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_nameds_adjust_
- f_status_t f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return private_f_fss_nameds_adjust(length, nameds);
- }
-#endif // _di_f_fss_nameds_adjust_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_nameds_decimate_by_
- f_status_t f_fss_nameds_decimate_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_ranges_resize(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
- if (!amount) return F_data_not;
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &array[i].array[j].quotess.array, &array[i].array[j].quotess.used, &array[i].array[j].quotess.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
- return private_f_fss_nameds_adjust((nameds->size > amount) ? nameds->size - amount : 0, nameds);
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_named_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
}
-#endif // _di_f_fss_nameds_decimate_by_
+#endif // _di_f_fss_namedss_delete_callback_
-#ifndef _di_f_fss_nameds_decrease_by_
- f_status_t f_fss_nameds_decrease_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_namedss_destroy_callback_
+ f_status_t f_fss_namedss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (!amount) return F_data_not;
+ {
+ f_fss_nameds_t * const array = (f_fss_nameds_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
- return private_f_fss_nameds_resize((nameds->size > amount) ? nameds->size - amount : 0, nameds);
- }
-#endif // _di_f_fss_nameds_decrease_by_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
-#ifndef _di_f_fss_nameds_increase_
- f_status_t f_fss_nameds_increase(const f_number_unsigned_t step, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (j = 0; j < array[i].size; ++j) {
- return f_memory_array_increase(step, sizeof(f_fss_named_t), (void **) &nameds->array, &nameds->used, &nameds->size);
- }
-#endif // _di_f_fss_nameds_increase_
+ array[i].array[j].name.start = 1;
+ array[i].array[j].name.stop = 0;
-#ifndef _di_f_fss_nameds_increase_by_
- f_status_t f_fss_nameds_increase_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
- return f_memory_array_increase_by(amount, sizeof(f_fss_named_t), (void **) &nameds->array, &nameds->used, &nameds->size);
- }
-#endif // _di_f_fss_nameds_increase_by_
+ status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
-#ifndef _di_f_fss_nameds_resize_
- f_status_t f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
- #ifndef _di_level_0_parameter_checking_
- if (!nameds) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &array[i].array[j].quotess.array, &array[i].array[j].quotess.used, &array[i].array[j].quotess.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_named_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_nameds_resize(length, nameds);
+ return F_none;
}
-#endif // _di_f_fss_nameds_resize_
+#endif // _di_f_fss_namedss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
macro_f_string_ranges_t_clear(named.objects) \
macro_f_string_rangess_t_clear(named.contents) \
macro_f_uint8ss_t_clear(named.quotess)
-
- #define macro_f_fss_named_t_resize(status, named, length) status = f_fss_named_resize(length, &named);
- #define macro_f_fss_named_t_adjust(status, named, length) status = f_fss_named_adjust(length, &named);
-
- #define macro_f_fss_named_t_delete_simple(named) f_fss_named_resize(0, &named);
- #define macro_f_fss_named_t_destroy_simple(named) f_fss_named_adjust(0, &named);
-
- #define macro_f_fss_named_t_increase(status, step, named) status = f_fss_named_increase(step, &named);
- #define macro_f_fss_named_t_increase_by(status, named, amount) status = f_fss_named_increase_by(amount, &named);
- #define macro_f_fss_named_t_decrease_by(status, named, amount) status = f_fss_named_decrease_by(amount, &named);
- #define macro_f_fss_named_t_decimate_by(status, named, amount) status = f_fss_named_decimate_by(amount, &named);
#endif // _di_f_fss_named_t_
/**
#define macro_f_fss_nameds_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_nameds_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_nameds_t_resize(status, nameds, length) status = f_fss_nameds_resize(length, &nameds);
- #define macro_f_fss_nameds_t_adjust(status, nameds, length) status = f_fss_nameds_adjust(length, &nameds);
-
- #define macro_f_fss_nameds_t_delete_simple(nameds) f_fss_nameds_resize(0, &nameds);
- #define macro_f_fss_nameds_t_destroy_simple(nameds) f_fss_nameds_adjust(0, &nameds);
-
- #define macro_f_fss_nameds_t_increase(status, step, nameds) status = f_fss_nameds_increase(step, &nameds);
- #define macro_f_fss_nameds_t_increase_by(status, nameds, amount) status = f_fss_nameds_increase_by(amount, &nameds);
- #define macro_f_fss_nameds_t_decrease_by(status, nameds, amount) status = f_fss_nameds_decrease_by(amount, &nameds);
- #define macro_f_fss_nameds_t_decimate_by(status, nameds, amount) status = f_fss_nameds_decimate_by(amount, &nameds);
+ #define macro_f_fss_nameds_t_clear(nameds) macro_f_memory_structures_clear(nameds)
#endif // _di_f_fss_nameds_t_
/**
- * Resize all parts of the named structure using the same length.
+ * Delete a named.
*
- * @param length
- * The new size to use.
* @param named
- * The named structure to adjust.
+ * The named to delete.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_named_adjust_
- extern f_status_t f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named);
-#endif // _di_f_fss_named_adjust_
-
-/**
- * Resize all parts of the named structure to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param named
- * The named array to resize.
*
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
+ * Errors (with error bit) from: f_string_ranges_resize().
+ * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_string_ranges_resize()
+ * @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_fss_named_decimate_by_
- extern f_status_t f_fss_named_decimate_by(const f_number_unsigned_t amount, f_fss_named_t * const named);
-#endif // _di_f_fss_named_decimate_by_
+#ifndef _di_f_fss_named_delete_
+ extern f_status_t f_fss_named_delete(f_fss_named_t * const named);
+#endif // _di_f_fss_named_delete_
/**
- * Resize all parts of the named structure to a smaller size.
+ * Destroy a named.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
* @param named
- * The named array to resize.
+ * The named to destroy.
*
* @return
* F_none on success.
- * F_data_not if amount is 0.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_named_decrease_by_
- extern f_status_t f_fss_named_decrease_by(const f_number_unsigned_t amount, f_fss_named_t * const named);
-#endif // _di_f_fss_named_decrease_by_
-
-/**
- * Increase the size of all parts of the named structure, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param named
- * The named array to resize.
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ * Errors (with error bit) from: f_string_rangess_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_string_ranges_adjust()
+ * @see f_string_rangess_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_fss_named_increase_
- extern f_status_t f_fss_named_increase(const f_number_unsigned_t step, f_fss_named_t * const named);
-#endif // _di_f_fss_named_increase_
+#ifndef _di_f_fss_named_destroy_
+ extern f_status_t f_fss_named_destroy(f_fss_named_t * const named);
+#endif // _di_f_fss_named_destroy_
/**
- * Resize all parts of the named structure to a larger size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_nameds_t structure.
*
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param named
- * The named array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- */
-#ifndef _di_f_fss_named_increase_by_
- extern f_status_t f_fss_named_increase_by(const f_number_unsigned_t amount, f_fss_named_t * const named);
-#endif // _di_f_fss_named_increase_by_
-
-/**
- * Resize all parts of the named structure using the same length.
- *
- * @param length
- * The new size to use.
- * @param named
- * The named array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_named_resize_
- extern f_status_t f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named);
-#endif // _di_f_fss_named_resize_
-
-/**
- * Adjust the named array.
*
- * @param length
- * The new size to use.
- * @param nameds
- * The nameds array to adjust.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_fss_nameds_adjust_
- extern f_status_t f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_adjust_
+#ifndef _di_f_fss_nameds_delete_callback_
+ extern f_status_t f_fss_nameds_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nameds_delete_callback_
/**
- * Resize the named array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_nameds_t structure.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param nameds
- * The nameds array to resize.
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_nameds_decimate_by_
- extern f_status_t f_fss_nameds_decimate_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_decimate_by_
-
-/**
- * Resize the named array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param nameds
- * The nameds array to resize.
- *
- * @return
- * F_none on success.
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ * Errors (with error bit) from: f_string_rangess_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_string_ranges_adjust()
+ * @see f_string_rangess_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_fss_nameds_decrease_by_
- extern f_status_t f_fss_nameds_decrease_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_decrease_by_
+#ifndef _di_f_fss_nameds_destroy_callback_
+ extern f_status_t f_fss_nameds_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nameds_destroy_callback_
/**
- * Increase the size of the nameds array, but only if necessary.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_namedss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This does not do parameter checking.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param nameds
- * The nameds array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_increase().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_string_ranges_resize().
+ * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
*
- * @see f_memory_array_increase()
+ * @see f_string_ranges_resize()
+ * @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_fss_nameds_increase_
- extern f_status_t f_fss_nameds_increase(const f_number_unsigned_t step, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_increase_
+#ifndef _di_f_fss_namedss_delete_callback_
+ extern f_status_t f_fss_namedss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_namedss_delete_callback_
/**
- * Resize the nameds array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_namedss_t structure.
*
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param nameds
- * The nameds array to resize.
+ * This does not do parameter checking.
*
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_nameds_increase_by_
- extern f_status_t f_fss_nameds_increase_by(const f_number_unsigned_t amount, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_increase_by_
-
-/**
- * Resize the nameds array.
- *
- * @param length
- * The new size to use.
- * @param nameds
- * The nameds array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_resize().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ * Errors (with error bit) from: f_string_rangess_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_string_ranges_adjust()
+ * @see f_string_rangess_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_fss_nameds_resize_
- extern f_status_t f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds);
-#endif // _di_f_fss_nameds_resize_
+#ifndef _di_f_fss_namedss_destroy_callback_
+ extern f_status_t f_fss_namedss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_namedss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#include "../fss.h"
-#include "private-item.h"
-#include "private-nest.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_nest_adjust_
- f_status_t f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
+#ifndef _di_f_fss_nest_delete_
+ f_status_t f_fss_nest_delete(f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_fss_nest_adjust(length, nest);
- }
-#endif // _di_f_fss_nest_adjust_
+ {
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_nest_decimate_by_
- f_status_t f_fss_nest_decimate_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest) {
- #ifndef _di_level_0_parameter_checking_
- if (!nest) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = 0; i < nest->size; ++i) {
- if (!amount) return F_data_not;
+ for (j = 0; j < nest->depth[i].size; ++j) {
- return private_f_fss_nest_adjust((nest->size > amount) ? nest->size - amount : 0, nest);
- }
-#endif // _di_f_fss_nest_decimate_by_
+ status = f_string_ranges_resize(0, &nest->depth[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+ } // for
-#ifndef _di_f_fss_nest_decrease_by_
- f_status_t f_fss_nest_decrease_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest) {
- #ifndef _di_level_0_parameter_checking_
- if (!nest) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
+ if (nest->depth[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_item_t), (void **) &nest->depth[i].array, &nest->depth[i].used, &nest->depth[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_nest_resize((nest->size > amount) ? nest->size - amount : 0, nest);
+ return f_memory_array_resize(0, sizeof(f_fss_items_t), (void **) &nest->depth, &nest->used, &nest->size);
}
-#endif // _di_f_fss_nest_decrease_by_
+#endif // _di_f_fss_nest_delete_
-#ifndef _di_f_fss_nest_increase_
- f_status_t f_fss_nest_increase(const f_number_unsigned_t step, f_fss_nest_t * const nest) {
+#ifndef _di_f_fss_nest_destroy_
+ f_status_t f_fss_nest_destroy(f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (step && nest->used + 1 > nest->size) {
- if (nest->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ {
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = 0; i < nest->size; ++i) {
- f_number_unsigned_t length = nest->used + step;
+ for (j = 0; j < nest->depth[i].size; ++j) {
- if (length > F_number_t_size_unsigned_d) {
- if (nest->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ nest->depth[i].array[j].object.start = 1;
+ nest->depth[i].array[j].object.stop = 0;
+ nest->depth[i].array[j].parent = 0;
- length = F_number_t_size_unsigned_d;
- }
+ status = f_string_ranges_adjust(0, &nest->depth[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+ } // for
- return private_f_fss_nest_resize(length, nest);
+ if (nest->depth[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_item_t), (void **) &nest->depth[i].array, &nest->depth[i].used, &nest->depth[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
}
- return F_data_not;
+ return f_memory_array_adjust(0, sizeof(f_fss_items_t), (void **) &nest->depth, &nest->used, &nest->size);
}
-#endif // _di_f_fss_nest_increase_
+#endif // _di_f_fss_nest_destroy_
-#ifndef _di_f_fss_nest_increase_by_
- f_status_t f_fss_nest_increase_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest) {
- #ifndef _di_level_0_parameter_checking_
- if (!nest) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nests_delete_callback_
+ f_status_t f_fss_nests_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (amount) {
- if (nest->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ {
+ f_fss_nest_t * const array = (f_fss_nest_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+ f_number_unsigned_t k = 0;
- const f_number_unsigned_t length = nest->used + amount;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (length > nest->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (j = 0; j < array[i].size; ++j) {
- return private_f_fss_nest_resize(length, nest);
- }
+ for (k = 0; k < array[i].depth[j].size; ++k) {
+
+ status = f_string_ranges_resize(0, &array[i].depth[j].array[k].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].depth[j].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_item_t), (void **) &array[i].depth[j].array, &array[i].depth[j].used, &array[i].depth[j].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_nest_increase_by_
+#endif // _di_f_fss_nests_delete_callback_
-#ifndef _di_f_fss_nest_resize_
- f_status_t f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
- #ifndef _di_level_0_parameter_checking_
- if (!nest) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nests_destroy_callback_
+ f_status_t f_fss_nests_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return private_f_fss_nest_resize(length, nest);
- }
-#endif // _di_f_fss_nest_resize_
+ {
+ f_fss_nest_t * const array = (f_fss_nest_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+ f_number_unsigned_t k = 0;
-#ifndef _di_f_fss_nests_adjust_
- f_status_t f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return private_f_fss_nests_adjust(length, nests);
- }
-#endif // _di_f_fss_nests_adjust_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_nests_decimate_by_
- f_status_t f_fss_nests_decimate_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (k = 0; k < array[i].depth[j].size; ++k) {
- if (!amount) return F_data_not;
+ array[i].depth[j].array[k].object.start = 1;
+ array[i].depth[j].array[k].object.stop = 0;
+ array[i].depth[j].array[k].parent = 0;
+
+ status = f_string_ranges_adjust(0, &array[i].depth[j].array[k].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].depth[j].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_item_t), (void **) &array[i].depth[j].array, &array[i].depth[j].used, &array[i].depth[j].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ } // for
+ }
- return private_f_fss_nests_adjust((nests->size > amount) ? nests->size - amount : 0, nests);
+ return F_none;
}
-#endif // _di_f_fss_nests_decimate_by_
+#endif // _di_f_fss_nests_destroy_callback_
-#ifndef _di_f_fss_nests_decrease_by_
- f_status_t f_fss_nests_decrease_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nestss_delete_callback_
+ f_status_t f_fss_nestss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (!amount) return F_data_not;
+ {
+ f_fss_nests_t * const array = (f_fss_nests_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+ f_number_unsigned_t k = 0;
+ f_number_unsigned_t l = 0;
- return private_f_fss_nests_resize((nests->size > amount) ? nests->size - amount : 0, nests);
- }
-#endif // _di_f_fss_nests_decrease_by_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
-#ifndef _di_f_fss_nests_increase_
- f_status_t f_fss_nests_increase(const f_number_unsigned_t step, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (j = 0; j < array[i].size; ++j) {
- if (step && nests->used + 1 > nests->size) {
- if (nests->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (k = 0; k < array[i].array[j].size; ++k) {
- f_number_unsigned_t length = nests->used + step;
+ for (l = 0; l < array[i].array[j].depth[k].size; ++l) {
- if (length > F_number_t_size_unsigned_d) {
- if (nests->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_ranges_resize(0, &array[i].array[j].depth[k].array[l].content);
+ if (F_status_is_error(status)) return status;
+ } // for
- length = F_number_t_size_unsigned_d;
- }
+ if (array[i].array[j].depth[k].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_item_t), (void **) &array[i].array[j].depth[k].array, &array[i].array[j].depth[k].used, &array[i].array[j].depth[k].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ } // for
- return private_f_fss_nests_resize(length, nests);
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_nest_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_nests_increase_
+#endif // _di_f_fss_nestss_delete_callback_
-#ifndef _di_f_fss_nests_increase_by_
- f_status_t f_fss_nests_increase_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_nestss_destroy_callback_
+ f_status_t f_fss_nestss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (amount) {
- if (nests->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ {
+ f_fss_nests_t * const array = (f_fss_nests_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+ f_number_unsigned_t k = 0;
+ f_number_unsigned_t l = 0;
- const f_number_unsigned_t length = nests->used + amount;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (length > nests->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (j = 0; j < array[i].size; ++j) {
- return private_f_fss_nests_resize(length, nests);
- }
- }
+ for (k = 0; k < array[i].array[j].size; ++k) {
- return F_data_not;
- }
-#endif // _di_f_fss_nests_increase_by_
+ for (l = 0; l < array[i].array[j].depth[k].size; ++l) {
-#ifndef _di_f_fss_nests_resize_
- f_status_t f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) {
- #ifndef _di_level_0_parameter_checking_
- if (!nests) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ array[i].array[j].depth[k].array[l].object.start = 1;
+ array[i].array[j].depth[k].array[l].object.stop = 0;
+ array[i].array[j].depth[k].array[l].parent = 0;
+
+ status = f_string_ranges_adjust(0, &array[i].array[j].depth[k].array[l].content);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].array[j].depth[k].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_item_t), (void **) &array[i].array[j].depth[k].array, &array[i].array[j].depth[k].used, &array[i].array[j].depth[k].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_nest_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_nests_resize(length, nests);
+ return F_none;
}
-#endif // _di_f_fss_nests_resize_
+#endif // _di_f_fss_nestss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#define macro_f_fss_nest_t_initialize_2(depth, length) { depth, length, length }
#define macro_f_fss_nest_t_clear(nest) macro_f_memory_structures_clear(nest)
-
- #define macro_f_fss_nest_t_resize(status, nest, length) status = f_fss_nest_resize(length, &nest);
- #define macro_f_fss_nest_t_adjust(status, nest, length) status = f_fss_nest_adjust(length, &nest);
-
- #define macro_f_fss_nest_t_delete_simple(nest) f_fss_nest_resize(0, &nest);
- #define macro_f_fss_nest_t_destroy_simple(nest) f_fss_nest_adjust(0, &nest);
-
- #define macro_f_fss_nest_t_increase(status, step, nest) status = f_fss_nest_increase(step, &nest);
- #define macro_f_fss_nest_t_increase_by(status, nest, amount) status = f_fss_nest_increase_by(amount, &nest);
- #define macro_f_fss_nest_t_decrease_by(status, nest, amount) status = f_fss_nest_decrease_by(amount, &nest);
- #define macro_f_fss_nest_t_decimate_by(status, nest, amount) status = f_fss_nest_decimate_by(amount, &nest);
#endif // _di_f_fss_nest_t_
/**
#define macro_f_fss_nests_t_initialize_2(array, length) { array, length, length }
#define macro_f_fss_nests_t_clear(nests) macro_f_memory_structures_clear(nests)
-
- #define macro_f_fss_nests_t_resize(status, nests, length) status = f_fss_nests_resize(length, &nests);
- #define macro_f_fss_nests_t_adjust(status, nests, length) status = f_fss_nests_adjust(length, &nests);
-
- #define macro_f_fss_nests_t_delete_simple(nests) f_fss_nests_resize(0, &nests);
- #define macro_f_fss_nests_t_destroy_simple(nests) f_fss_nests_adjust(0, &nests);
-
- #define macro_f_fss_nests_t_increase(status, step, nests) status = f_fss_nests_increase(step, &nests);
- #define macro_f_fss_nests_t_increase_by(status, nests, amount) status = f_fss_nests_increase_by(amount, &nests);
- #define macro_f_fss_nests_t_decrease_by(status, nests, amount) status = f_fss_nests_decrease_by(amount, &nests);
- #define macro_f_fss_nests_t_decimate_by(status, nests, amount) status = f_fss_nests_decimate_by(amount, &nests);
#endif // _di_f_fss_nests_t_
/**
- * Resize the nest array.
+ * Delete a nest.
*
- * @param length
- * The new size to use.
* @param nest
- * The nest array to resize.
+ * The nest to delete.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_nest_adjust_
- extern f_status_t f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_adjust_
-
-/**
- * Resize the nest array to a smaller size.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * Errors (with error bit) from: f_string_ranges_resize().
*
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param nest
- * The nest array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_f_fss_nest_decimate_by_
- extern f_status_t f_fss_nest_decimate_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_decimate_by_
+#ifndef _di_f_fss_nest_delete_
+ extern f_status_t f_fss_nest_delete(f_fss_nest_t * const nest);
+#endif // _di_f_fss_nest_delete_
/**
- * Resize the nest array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * Destroy a nest.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
* @param nest
- * The nest array to resize.
+ * The nest to destroy.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_nest_decrease_by_
- extern f_status_t f_fss_nest_decrease_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_decrease_by_
-
-/**
- * Increase the size of the nest array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param nest
- * The nest array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_ranges_resize().
*
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_memory_array_resize()
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_f_fss_nest_increase_
- extern f_status_t f_fss_nest_increase(const f_number_unsigned_t step, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_increase_
+#ifndef _di_f_fss_nest_destroy_
+ extern f_status_t f_fss_nest_destroy(f_fss_nest_t * const nest);
+#endif // _di_f_fss_nest_destroy_
/**
- * Resize the nest array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_nests_t structure.
*
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param nest
- * The nest array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- */
-#ifndef _di_f_fss_nest_increase_by_
- extern f_status_t f_fss_nest_increase_by(const f_number_unsigned_t amount, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_increase_by_
-
-/**
- * Resize the nest array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param nest
- * The nest array to adjust.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_fss_nest_resize_
- extern f_status_t f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest);
-#endif // _di_f_fss_nest_resize_
-
-/**
- * Resize the nest array.
- *
- * @param length
- * The new size to use.
- * @param nests
- * The nests array to adjust.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_string_dynamics_resize().
*
- * @see f_memory_array_adjust()
+ * @see f_string_dynamics_resize()
*/
-#ifndef _di_f_fss_nests_adjust_
- extern f_status_t f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_adjust_
+#ifndef _di_f_fss_nests_delete_callback_
+ extern f_status_t f_fss_nests_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nests_delete_callback_
/**
- * Resize the nest array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_nests_t structure.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param nests
- * The nests array to resize.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- *
- * @see f_memory_array_adjust()
- */
-#ifndef _di_f_fss_nests_decimate_by_
- extern f_status_t f_fss_nests_decimate_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_decimate_by_
-
-/**
- * Resize the nest array to a smaller size.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * This does not do parameter checking.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param nests
- * The nests array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_resize().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamics_adjust()
*/
-#ifndef _di_f_fss_nests_decrease_by_
- extern f_status_t f_fss_nests_decrease_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_decrease_by_
+#ifndef _di_f_fss_nests_destroy_callback_
+ extern f_status_t f_fss_nests_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nests_destroy_callback_
/**
- * Increase the size of the nests array, but only if necessary.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_nestss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This does not do parameter checking.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param nests
- * The nests array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_increase().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_string_dynamics_resize().
*
- * @see f_memory_array_increase()
+ * @see f_string_dynamics_resize()
*/
-#ifndef _di_f_fss_nests_increase_
- extern f_status_t f_fss_nests_increase(const f_number_unsigned_t step, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_increase_
+#ifndef _di_f_fss_nestss_delete_callback_
+ extern f_status_t f_fss_nestss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nestss_delete_callback_
/**
- * Resize the nests array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param nests
- * The nests array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_nestss_t structure.
*
- * F_parameter (with error bit) if a parameter is invalid.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * Errors (with error bit) from: f_memory_array_increase_by().
+ * This does not do parameter checking.
*
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_nests_increase_by_
- extern f_status_t f_fss_nests_increase_by(const f_number_unsigned_t amount, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_increase_by_
-
-/**
- * Resize the nests array.
- *
- * @param length
- * The new size to use.
- * @param nests
- * The nests array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_resize().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamics_adjust()
*/
-#ifndef _di_f_fss_nests_resize_
- extern f_status_t f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests);
-#endif // _di_f_fss_nests_resize_
+#ifndef _di_f_fss_nestss_destroy_callback_
+ extern f_status_t f_fss_nestss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_nestss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
status = f_string_rangess_adjust(length, &named->contents);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_string_rangess_resize(length, &named->contents);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_memory_array_adjust(length, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_memory_array_resize(length, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &set_quotes->array[i].objects_quote.array, &set_quotes->array[i].objects_quote.used, &set_quotes->array[i].objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_adjust(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_adjust(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
} // for
}
status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &set_quotes->array[i].objects_quote.array, &set_quotes->array[i].objects_quote.used, &set_quotes->array[i].objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_resize_callback);
+ status = f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_delete_callback);
if (F_status_is_error(status)) return status;
} // for
}
#include "../fss.h"
-#include "private-set.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_set_adjust_
- f_status_t f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) {
+#ifndef _di_f_fss_set_delete_
+ f_status_t f_fss_set_delete(f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_fss_set_adjust(length, set);
- }
-#endif // _di_f_fss_set_adjust_
-
-#ifndef _di_f_fss_set_decimate_by_
- f_status_t f_fss_set_decimate_by(const f_number_unsigned_t amount, f_fss_set_t * const set) {
- #ifndef _di_level_0_parameter_checking_
- if (!set) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ {
+ f_status_t status = f_string_ranges_resize(0, &set->objects);
+ if (F_status_is_error(status)) return status;
- if (!amount) return F_data_not;
+ status = f_string_rangess_resize(0, &set->contents);
+ if (F_status_is_error(status)) return status;
+ }
- return private_f_fss_set_adjust((set->objects.size - amount > 0) ? set->objects.size - amount : 0, set);
+ return F_none;
}
-#endif // _di_f_fss_set_decimate_by_
+#endif // _di_f_fss_set_delete_
-#ifndef _di_f_fss_set_decrease_by_
- f_status_t f_fss_set_decrease_by(const f_number_unsigned_t amount, f_fss_set_t * const set) {
+#ifndef _di_f_fss_set_destroy_
+ f_status_t f_fss_set_destroy(f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!amount) return F_data_not;
+ {
+ f_status_t status = f_string_ranges_adjust(0, &set->objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_resize((set->objects.size - amount > 0) ? set->objects.size - amount : 0, set);
- }
-#endif // _di_f_fss_set_decrease_by_
+ status = f_string_rangess_adjust(0, &set->contents);
+ if (F_status_is_error(status)) return status;
+ }
-#ifndef _di_f_fss_set_increase_
- f_status_t f_fss_set_increase(const f_number_unsigned_t step, f_fss_set_t * const set) {
- #ifndef _di_level_0_parameter_checking_
- if (!set) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ return F_none;
+ }
+#endif // _di_f_fss_set_destroy_
- if (step && set->objects.used + 1 > set->objects.size) {
- if (set->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_fss_sets_delete_callback_
+ f_status_t f_fss_sets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- f_number_unsigned_t length = set->objects.used + step;
+ {
+ f_fss_set_t * const array = (f_fss_set_t *) void_array;
+ f_status_t status = F_none;
- if (length > F_number_t_size_unsigned_d) {
- if (set->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- length = F_number_t_size_unsigned_d;
- }
+ status = f_string_ranges_resize(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_resize(length, set);
+ status = f_string_rangess_resize(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_set_increase_
+#endif // _di_f_fss_sets_delete_callback_
-#ifndef _di_f_fss_set_increase_by_
- f_status_t f_fss_set_increase_by(const f_number_unsigned_t amount, f_fss_set_t * const set) {
- #ifndef _di_level_0_parameter_checking_
- if (!set) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_sets_destroy_callback_
+ f_status_t f_fss_sets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (amount) {
- if (set->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ {
+ f_fss_set_t * const array = (f_fss_set_t *) void_array;
+ f_status_t status = F_none;
- const f_number_unsigned_t length = set->objects.used + amount;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (length > set->objects.size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_ranges_adjust(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_resize(length, set);
- }
+ status = f_string_rangess_adjust(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_set_increase_by_
+#endif // _di_f_fss_sets_destroy_callback_
-#ifndef _di_f_fss_set_resize_
- f_status_t f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t * const set) {
- #ifndef _di_level_0_parameter_checking_
- if (!set) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_setss_delete_callback_
+ f_status_t f_fss_setss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return private_f_fss_set_resize(length, set);
- }
-#endif // _di_f_fss_set_resize_
+ {
+ f_fss_sets_t * const array = (f_fss_sets_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_sets_adjust_
- f_status_t f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t *sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return private_f_fss_sets_adjust(length, sets);
- }
-#endif // _di_f_fss_sets_adjust_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_sets_decimate_by_
- f_status_t f_fss_sets_decimate_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_ranges_resize(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_resize(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
- if (!amount) return F_data_not;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_set_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_sets_adjust((sets->size > amount) ? sets->size - amount : 0, sets);
+ return F_none;
}
-#endif // _di_f_fss_sets_decimate_by_
+#endif // _di_f_fss_setss_delete_callback_
-#ifndef _di_f_fss_sets_decrease_by_
- f_status_t f_fss_sets_decrease_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_setss_destroy_callback_
+ f_status_t f_fss_setss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (!amount) return F_data_not;
+ {
+ f_fss_sets_t * const array = (f_fss_sets_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
- return private_f_fss_sets_resize((sets->size > amount) ? sets->size - amount : 0, sets);
- }
-#endif // _di_f_fss_sets_decrease_by_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
-#ifndef _di_f_fss_sets_increase_
- f_status_t f_fss_sets_increase(const f_number_unsigned_t step, f_fss_sets_t * const sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (j = 0; j < array[i].size; ++j) {
- return f_memory_array_increase(step, sizeof(f_fss_set_t), (void **) &sets->array, &sets->used, &sets->size);
- }
-#endif // _di_f_fss_sets_increase_
+ status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
-#ifndef _di_f_fss_sets_increase_by_
- f_status_t f_fss_sets_increase_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
+ } // for
- return f_memory_array_increase_by(amount, sizeof(f_fss_set_t), (void **) &sets->array, &sets->used, &sets->size);
- }
-#endif // _di_f_fss_sets_increase_by_
-
-#ifndef _di_f_fss_sets_resize_
- f_status_t f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
- #ifndef _di_level_0_parameter_checking_
- if (!sets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fss_set_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_sets_resize(length, sets);
+ return F_none;
}
-#endif // _di_f_fss_sets_resize_
+#endif // _di_f_fss_setss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#define macro_f_fss_set_t_clear(set) \
macro_f_string_ranges_t_clear(set.objects) \
macro_f_string_rangess_t_clear(set.contents)
-
- #define macro_f_fss_set_t_resize(status, set, length) status = f_fss_set_resize(length, &set);
- #define macro_f_fss_set_t_adjust(status, set, length) status = f_fss_set_adjust(length, &set);
-
- #define macro_f_fss_set_t_delete_simple(set) f_fss_set_resize(0, &set);
- #define macro_f_fss_set_t_destroy_simple(set) f_fss_set_adjust(0, &set);
-
- #define macro_f_fss_set_t_increase(status, step, set) status = f_fss_set_increase(step, &set);
- #define macro_f_fss_set_t_increase_by(status, set, amount) status = f_fss_set_increase_by(amount, &set);
- #define macro_f_fss_set_t_decrease_by(status, set, amount) status = f_fss_set_decrease_by(amount, &set);
- #define macro_f_fss_set_t_decimate_by(status, set, amount) status = f_fss_set_decimate_by(amount, &set);
#endif // _di_f_fss_set_t_
/**
#define macro_f_fss_sets_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_sets_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_sets_t_resize(status, sets, length) status = f_fss_sets_resize(length, &sets);
- #define macro_f_fss_sets_t_adjust(status, sets, length) status = f_fss_sets_adjust(length, &sets);
-
- #define macro_f_fss_sets_t_delete_simple(sets) f_fss_sets_resize(0, &sets);
- #define macro_f_fss_sets_t_destroy_simple(sets) f_fss_sets_adjust(0, &sets);
-
- #define macro_f_fss_sets_t_increase(status, step, sets) status = f_fss_sets_increase(step, &sets);
- #define macro_f_fss_sets_t_increase_by(status, sets, amount) status = f_fss_sets_increase_by(amount, &sets);
- #define macro_f_fss_sets_t_decrease_by(status, sets, amount) status = f_fss_sets_decrease_by(amount, &sets);
- #define macro_f_fss_sets_t_decimate_by(status, sets, amount) status = f_fss_sets_decimate_by(amount, &sets);
+ #define macro_f_fss_sets_t_clear(sets) macro_f_memory_structures_clear(sets)
#endif // _di_f_fss_sets_t_
/**
- * Resize the set array.
+ * Delete a set.
*
- * @param length
- * The new size to use.
* @param set
- * The set array to resize.
+ * The set to delete.
*
* @return
* F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_string_ranges_adjust().
- * Errors (with error bit) from: f_string_rangess_adjust().
- *
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
- */
-#ifndef _di_f_fss_set_adjust_
- extern f_status_t f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set);
-#endif // _di_f_fss_set_adjust_
-
-/**
- * Resize the set array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param set
- * The set array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_string_ranges_adjust().
- * Errors (with error bit) from: f_string_rangess_adjust().
- *
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
- */
-#ifndef _di_f_fss_set_decimate_by_
- extern f_status_t f_fss_set_decimate_by(const f_number_unsigned_t amount, f_fss_set_t * const set);
-#endif // _di_f_fss_set_decimate_by_
-
-/**
- * Resize the set array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param set
- * The set array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
*
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
*/
-#ifndef _di_f_fss_set_decrease_by_
- extern f_status_t f_fss_set_decrease_by(const f_number_unsigned_t amount, f_fss_set_t * const set);
-#endif // _di_f_fss_set_decrease_by_
+#ifndef _di_f_fss_set_delete_
+ extern f_status_t f_fss_set_delete(f_fss_set_t * const set);
+#endif // _di_f_fss_set_delete_
/**
- * Increase the size of the set array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * Destroy a set.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
* @param set
- * The set array to resize.
+ * The set to destroy.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ * Errors (with error bit) from: f_string_rangess_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_ranges_adjust
+ * @see f_string_rangess_adjust()()
*/
-#ifndef _di_f_fss_set_increase_
- extern f_status_t f_fss_set_increase(const f_number_unsigned_t step, f_fss_set_t * const set);
-#endif // _di_f_fss_set_increase_
+#ifndef _di_f_fss_set_destroy_
+ extern f_status_t f_fss_set_destroy(f_fss_set_t * const set);
+#endif // _di_f_fss_set_destroy_
/**
- * Resize the set array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_sets_t structure.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param set
- * The set array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_set_increase_by_
- extern f_status_t f_fss_set_increase_by(const f_number_unsigned_t amount, f_fss_set_t * const set);
-#endif // _di_f_fss_set_increase_by_
-
-/**
- * Resize the set array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param set
- * The set array to adjust.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * @return
- * Success from f_memory_array_resize().
- *
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamics_resize().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamics_resize()
*/
-#ifndef _di_f_fss_set_resize_
- extern f_status_t f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t * const set);
-#endif // _di_f_fss_set_resize_
+#ifndef _di_f_fss_sets_delete_callback_
+ extern f_status_t f_fss_sets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_sets_delete_callback_
/**
- * Resize the set array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_sets_t structure.
*
- * @param length
- * The new size to use.
- * @param sets
- * The sets array to resize.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @return
- * F_none on success.
+ * This does not do parameter checking.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_sets_adjust_
- extern f_status_t f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_adjust_
-
-/**
- * Resize the set array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param sets
- * The sets array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * @return
- * Success from f_memory_array_resize().
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamics_adjust()
*/
-#ifndef _di_f_fss_sets_decimate_by_
- extern f_status_t f_fss_sets_decimate_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_decimate_by_
+#ifndef _di_f_fss_sets_destroy_callback_
+ extern f_status_t f_fss_sets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_sets_destroy_callback_
/**
- * Resize the set array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_setss_t structure.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param sets
- * The sets array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_sets_decrease_by_
- extern f_status_t f_fss_sets_decrease_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_decrease_by_
-
-/**
- * Increase the size of the sets array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param sets
- * The sets array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * @return
- * Success from f_memory_array_increase().
+ * Errors (with error bit) from: f_string_dynamics_resize().
*
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
+ * @see f_string_dynamics_resize()
*/
-#ifndef _di_f_fss_sets_increase_
- extern f_status_t f_fss_sets_increase(const f_number_unsigned_t step, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_increase_
+#ifndef _di_f_fss_setss_delete_callback_
+ extern f_status_t f_fss_setss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_setss_delete_callback_
/**
- * Resize the sets array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_setss_t structure.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param sets
- * The sets array to resize.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- *
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * This does not do parameter checking.
*
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_sets_increase_by_
- extern f_status_t f_fss_sets_increase_by(const f_number_unsigned_t amount, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_increase_by_
-
-/**
- * Resize the sets array.
- *
- * @param length
- * The new size to use.
- * @param sets
- * The sets array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
- * Success from f_memory_array_resize().
+ * F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamics_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamics_adjust()
*/
-#ifndef _di_f_fss_sets_resize_
- extern f_status_t f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets);
-#endif // _di_f_fss_sets_resize_
+#ifndef _di_f_fss_setss_destroy_callback_
+ extern f_status_t f_fss_setss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_sets_sdestroy_callback_
#ifdef __cplusplus
} // extern "C"
#include "../fss.h"
-#include "private-set_quote.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fss_set_quote_adjust_
- f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
+#ifndef _di_f_fss_set_quote_delete_
+ f_status_t f_fss_set_quote_delete(f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_f_fss_set_quote_adjust(length, set_quote);
- }
-#endif // _di_f_fss_set_quote_adjust_
+ {
+ f_status_t status = f_string_ranges_resize(0, &set_quote->objects);
+ if (F_status_is_error(status)) return status;
-#ifndef _di_f_fss_set_quote_decimate_by_
- f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_rangess_resize(0, &set_quote->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
+ if (F_status_is_error(status)) return status;
- if (!amount) return F_data_not;
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ }
- return private_f_fss_set_quote_adjust((set_quote->objects.size - amount > 0) ? set_quote->objects.size - amount : 0, set_quote);
+ return F_none;
}
-#endif // _di_f_fss_set_quote_decimate_by_
+#endif // _di_f_fss_set_quote_delete_
-#ifndef _di_f_fss_set_quote_decrease_by_
- f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
+#ifndef _di_f_fss_set_quote_destroy_
+ f_status_t f_fss_set_quote_destroy(f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (!amount) return F_data_not;
+ {
+ f_status_t status = f_string_ranges_adjust(0, &set_quote->objects);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_quote_resize((set_quote->objects.size - amount > 0) ? set_quote->objects.size - amount : 0, set_quote);
+ status = f_string_rangess_adjust(0, &set_quote->contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return F_none;
}
-#endif // _di_f_fss_set_quote_decrease_by_
+#endif // _di_f_fss_set_quote_destroy_
-#ifndef _di_f_fss_set_quote_increase_
- f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_set_quotes_delete_callback_
+ f_status_t f_fss_set_quotes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_set_quote_t * const array = (f_fss_set_quote_t *) void_array;
+ f_status_t status = F_none;
- if (step && set_quote->objects.used + 1 > set_quote->objects.size) {
- if (set_quote->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- f_number_unsigned_t length = set_quote->objects.used + step;
+ status = f_string_ranges_resize(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- if (length > F_number_t_size_unsigned_d) {
- if (set_quote->objects.used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_rangess_resize(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
- length = F_number_t_size_unsigned_d;
- }
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &array[i].objects_quote.array, &array[i].objects_quote.used, &array[i].objects_quote.size);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_quote_resize(length, set_quote);
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &array[i].contents_quote.array, &array[i].contents_quote.used, &array[i].contents_quote.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_set_quote_increase_
+#endif // _di_f_fss_set_quotes_delete_callback_
-#ifndef _di_f_fss_set_quote_increase_by_
- f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_set_quotes_destroy_callback_
+ f_status_t f_fss_set_quotes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_fss_set_quote_t * const array = (f_fss_set_quote_t *) void_array;
+ f_status_t status = F_none;
- if (amount) {
- if (set_quote->objects.used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- const f_number_unsigned_t length = set_quote->objects.used + amount;
+ status = f_string_ranges_adjust(0, &array[i].objects);
+ if (F_status_is_error(status)) return status;
- if (length > set_quote->objects.size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ status = f_string_rangess_adjust(0, &array[i].contents);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_quote_resize(length, set_quote);
- }
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &array[i].objects_quote.array, &array[i].objects_quote.used, &array[i].objects_quote.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &array[i].contents_quote.array, &array[i].contents_quote.used, &array[i].contents_quote.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fss_set_quote_increase_by_
+#endif // _di_f_fss_set_quotes_destroy_callback_
-#ifndef _di_f_fss_set_quote_resize_
- f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quote) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_set_quotess_delete_callback_
+ f_status_t f_fss_set_quotess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return private_f_fss_set_quote_resize(length, set_quote);
- }
-#endif // _di_f_fss_set_quote_resize_
+ {
+ f_fss_set_quotes_t * const array = (f_fss_set_quotes_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_set_quotes_adjust_
- f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return private_f_fss_set_quotes_adjust(length, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_adjust_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_set_quotes_decimate_by_
- f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_ranges_resize(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
- if (!amount) return F_data_not;
+ status = f_string_rangess_resize(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
- return private_f_fss_set_quotes_adjust((set_quotes->size > amount) ? set_quotes->size - amount : 0, set_quotes);
- }
-#endif // _di_f_fss_set_quotes_decimate_by_
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &array[i].array[j].objects_quote.array, &array[i].array[j].objects_quote.used, &array[i].array[j].objects_quote.size);
+ if (F_status_is_error(status)) return status;
-#ifndef _di_f_fss_set_quotes_decrease_by_
- f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &array[i].array[j].contents_quote.array, &array[i].array[j].contents_quote.used, &array[i].array[j].contents_quote.size, &f_uint8ss_delete_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
- if (!amount) return F_data_not;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_set_quote_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_set_quotes_resize((set_quotes->size > amount) ? set_quotes->size - amount : 0, set_quotes);
+ return F_none;
}
-#endif // _di_f_fss_set_quotes_decrease_by_
+#endif // _di_f_fss_set_quotess_delete_callback_
-#ifndef _di_f_fss_set_quotes_increase_
- f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_set_quotess_destroy_callback_
+ f_status_t f_fss_set_quotess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return f_memory_array_increase(step, sizeof(f_fss_set_quote_t), (void **) &set_quotes->array, &set_quotes->used, &set_quotes->size);
- }
-#endif // _di_f_fss_set_quotes_increase_
+ {
+ f_fss_set_quotes_t * const array = (f_fss_set_quotes_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_set_quotes_increase_by_
- f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return f_memory_array_increase_by(amount, sizeof(f_fss_set_quote_t), (void **) &set_quotes->array, &set_quotes->used, &set_quotes->size);
- }
-#endif // _di_f_fss_set_quotes_increase_by_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_set_quotes_resize_
- f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
- #ifndef _di_level_0_parameter_checking_
- if (!set_quotes) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &array[i].array[j].objects_quote.array, &array[i].array[j].objects_quote.used, &array[i].array[j].objects_quote.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_arrays_adjust(0, sizeof(uint8_t), (void **) &array[i].array[j].contents_quote.array, &array[i].array[j].contents_quote.used, &array[i].array[j].contents_quote.size, &f_uint8ss_destroy_callback);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_set_quote_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_set_quotes_resize(length, set_quotes);
+ return F_none;
}
-#endif // _di_f_fss_set_quotes_resize_
+#endif // _di_f_fss_set_quotess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
macro_f_string_rangess_t_clear(set.contents) \
macro_f_uint8s_t_clear(set.objects_quote) \
macro_f_uint8ss_t_clear(set.contents_quote)
-
- #define macro_f_fss_set_quote_t_resize(status, set_quote, length) status = f_fss_set_quote_resize(length, &set_quote);
- #define macro_f_fss_set_quote_t_adjust(status, set_quote, length) status = f_fss_set_quote_adjust(length, &set_quote);
-
- #define macro_f_fss_set_quote_t_delete_simple(set_quote) f_fss_set_quote_resize(0, &set_quote);
- #define macro_f_fss_set_quote_t_destroy_simple(set_quote) f_fss_set_quote_adjust(0, &set_quote);
-
- #define macro_f_fss_set_quote_t_increase(status, step, set_quote) status = f_fss_set_quote_increase(step, &set_quote);
- #define macro_f_fss_set_quote_t_increase_by(status, set_quote, amount) status = f_fss_set_quote_increase_by(amount, &set_quote);
- #define macro_f_fss_set_quote_t_decrease_by(status, set_quote, amount) status = f_fss_set_quote_decrease_by(amount, &set_quote);
- #define macro_f_fss_set_quote_t_decimate_by(status, set_quote, amount) status = f_fss_set_quote_decimate_by(amount, &set_quote);
#endif // _di_f_fss_set_quote_t_
/**
#define macro_f_fss_set_quotes_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_set_quotes_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_set_quotes_t_resize(status, set_quotes, length) status = f_fss_set_quotes_resize(length, &set_quotes);
- #define macro_f_fss_set_quotes_t_adjust(status, set_quotes, length) status = f_fss_set_quotes_adjust(length, &set_quotes);
-
- #define macro_f_fss_set_quotes_t_delete_simple(set_quotes) f_fss_set_quotes_resize(0, &set_quotes);
- #define macro_f_fss_set_quotes_t_destroy_simple(set_quotes) f_fss_set_quotes_adjust(0, &set_quotes);
-
- #define macro_f_fss_set_quotes_t_increase(status, step, set_quotes) status = f_fss_set_quotes_increase(step, &set_quotes);
- #define macro_f_fss_set_quotes_t_increase_by(status, set_quotes, amount) status = f_fss_set_quotes_increase_by(amount, &set_quotes);
- #define macro_f_fss_set_quotes_t_decrease_by(status, set_quotes, amount) status = f_fss_set_quotes_decrease_by(amount, &set_quotes);
- #define macro_f_fss_set_quotes_t_decimate_by(status, set_quotes, amount) status = f_fss_set_quotes_decimate_by(amount, &set_quotes);
+ #define macro_f_fss_set_quotes_t_clear(set_quotes) macro_f_memory_structures_clear(set_quotes)
#endif // _di_f_fss_set_quotes_t_
/**
- * Resize the set_quote array.
+ * Delete a quote set.
*
- * @param length
- * The new size to use.
* @param set_quote
- * The set_quote array to resize.
+ * The quote set to delete.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_memory_arrays_adjust().
- * Errors (with error bit) from: f_string_ranges_adjust().
- * Errors (with error bit) from: f_string_rangess_adjust().
+ * Errors (with error bit) from: f_string_ranges_resize().
+ * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_uint8s_resize().
+ * Errors (with error bit) from: f_uint8ss_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
+ * @see f_string_ranges_resize()
+ * @see f_string_rangess_resize()
+ * @see f_uint8s_resize()
+ * @see f_uint8ss_resize()
*/
-#ifndef _di_f_fss_set_quote_adjust_
- extern f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_adjust_
+#ifndef _di_f_fss_set_quote_delete_
+ extern f_status_t f_fss_set_quote_delete(f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_delete_
/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * Destroy a quote set.
*
- * @param amount
- * A positive number representing how much to decimate the size by.
* @param set_quote
- * The set_quote array to resize.
+ * The quote set to destroy.
*
* @return
* F_none on success.
- * F_data_not if amount is 0.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
+ * Errors (with error bit) from: f_uint8s_adjust().
+ * Errors (with error bit) from: f_uint8ss_adjust().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
+ * @see f_uint8s_adjust()
+ * @see f_uint8ss_adjust()
*/
-#ifndef _di_f_fss_set_quote_decimate_by_
- extern f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_decimate_by_
+#ifndef _di_f_fss_set_quote_destroy_
+ extern f_status_t f_fss_set_quote_destroy(f_fss_set_quote_t * const set_quote);
+#endif // _di_f_fss_set_quote_destroy_
/**
- * Resize the set_quote array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_set_quotes_t structure.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
- *
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- */
-#ifndef _di_f_fss_set_quote_decrease_by_
- extern f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_decrease_by_
-
-/**
- * Increase the size of the set_quote array, but only if necessary.
+ * This does not do parameter checking.
*
- * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
- * If already set_quote to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param set_quote
- * The set_quote array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
*
- * @see f_memory_array_increase()
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- */
-#ifndef _di_f_fss_set_quote_increase_
- extern f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_increase_
-
-/**
- * Resize the set_quote array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set_quote max buffer size (F_number_t_size_unsigned_d).
- * If already set_quote to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param set_quote
- * The set_quote array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_uint8s_resize().
+ * Errors (with error bit) from: f_uint8ss_resize().
*
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
+ * @see f_uint8s_resize()
+ * @see f_uint8ss_resize()
*/
-#ifndef _di_f_fss_set_quote_increase_by_
- extern f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_increase_by_
+#ifndef _di_f_fss_set_quotes_delete_callback_
+ extern f_status_t f_fss_set_quotes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_set_quotes_delete_callback_
/**
- * Resize the set_quote array.
- *
- * @param length
- * The new size to use.
- * @param set_quote
- * The set_quote array to adjust.
- *
- * @return
- * F_none on success.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_set_quotes_t structure.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
- *
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- */
-#ifndef _di_f_fss_set_quote_resize_
- extern f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
-#endif // _di_f_fss_set_quote_resize_
-
-/**
- * Resize the set_quote array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
- */
-#ifndef _di_f_fss_set_quotes_adjust_
- extern f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_adjust_
-
-/**
- * Resize the set_quote array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
+ * Errors (with error bit) from: f_uint8s_adjust().
+ * Errors (with error bit) from: f_uint8ss_adjust().
*
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_memory_arrays_adjust().
- * Errors (with error bit) from: f_string_ranges_adjust().
- * Errors (with error bit) from: f_string_rangess_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
+ * @see f_uint8s_adjust()
+ * @see f_uint8ss_adjust()
*/
-#ifndef _di_f_fss_set_quotes_decimate_by_
- extern f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_decimate_by_
+#ifndef _di_f_fss_set_quotes_destroy_callback_
+ extern f_status_t f_fss_set_quotes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_set_quotes_destroy_callback_
/**
- * Resize the set_quote array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_set_quotess_t structure.
*
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * F_none on success.
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * This does not do parameter checking.
*
- * Errors (with error bit) from: f_memory_array_adjust().
- * Errors (with error bit) from: f_memory_arrays_adjust().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
- *
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- */
-#ifndef _di_f_fss_set_quotes_decrease_by_
- extern f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_decrease_by_
-
-/**
- * Increase the size of the set_quotes array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param set_quotes
- * The set_quotes array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
*
- * @see f_memory_array_increase()
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * Errors (with error bit) from: f_uint8s_resize().
+ * Errors (with error bit) from: f_uint8ss_resize().
+ *
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
+ * @see f_uint8s_resize()
+ * @see f_uint8ss_resize()
*/
-#ifndef _di_f_fss_set_quotes_increase_
- extern f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_increase_
+#ifndef _di_f_fss_set_quotess_delete_callback_
+ extern f_status_t f_fss_set_quotess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_set_quotess_delete_callback_
/**
- * Resize the set_quotes array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_set_quotess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This does not do parameter checking.
*
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param set_quotes
- * The set_quotes array to resize.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- * F_array_too_large (with error bit) if the new array length is too large.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- */
-#ifndef _di_f_fss_set_quotes_increase_by_
- extern f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_increase_by_
-
-/**
- * Resize the set_quotes array.
*
- * @param length
- * The new size to use.
- * @param set_quotes
- * The set_quotes array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * Errors (with error bit) from: f_string_ranges_adjust().
+ * Errors (with error bit) from: f_string_rangess_adjust().
*
- * Errors (with error bit) from: f_memory_array_resize().
- * Errors (with error bit) from: f_memory_arrays_resize().
- * Errors (with error bit) from: f_string_ranges_resize().
- * Errors (with error bit) from: f_string_rangess_resize().
+ * Errors (with error bit) from: f_uint8s_adjust().
+ * Errors (with error bit) from: f_uint8ss_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_string_ranges_adjust()
+ * @see f_string_rangess_adjust()
+ * @see f_uint8s_adjust()
+ * @see f_uint8ss_adjust()
*/
-#ifndef _di_f_fss_set_quotes_resize_
- extern f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
-#endif // _di_f_fss_set_quotes_resize_
+#ifndef _di_f_fss_set_quotess_destroy_callback_
+ extern f_status_t f_fss_set_quotess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_set_quotess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#include "../fss.h"
-#include "private-simple_packet.h"
#ifdef __cplusplus
extern "C" {
if (!packet) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ packet->control = 0;
+ packet->size = 0;
+
return f_string_dynamic_adjust(0, &packet->payload);
}
#endif // _di_f_fss_simple_packet_destroy_
}
#endif // _di_f_fss_simple_packet_identify_
-#ifndef _di_f_fss_simple_packet_ranges_adjust_
- f_status_t f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_adjust(length, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_adjust_
-
-#ifndef _di_f_fss_simple_packet_ranges_append_
- f_status_t f_fss_simple_packet_ranges_append(const f_fss_simple_packet_range_t source, f_fss_simple_packet_ranges_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packet_ranges_append(source, destination);
- }
-#endif // _di_f_fss_simple_packet_ranges_append_
-
-#ifndef _di_f_fss_simple_packet_ranges_append_all_
- f_status_t f_fss_simple_packet_ranges_append_all(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_ranges_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_fss_simple_packet_ranges_append_all(source, destination);
- }
-#endif // _di_f_fss_simple_packet_ranges_append_all_
-
-#ifndef _di_f_fss_simple_packet_ranges_decimate_by_
- f_status_t f_fss_simple_packet_ranges_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_decimate_by_
-
-#ifndef _di_f_fss_simple_packet_ranges_decrease_by_
- f_status_t f_fss_simple_packet_ranges_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_simple_packets_delete_callback_
+ f_status_t f_fss_simple_packets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- return f_memory_array_decrease_by(amount, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_decrease_by_
+ {
+ f_fss_simple_packet_t * const array = (f_fss_simple_packet_t *) void_array;
+ f_status_t status = F_none;
-#ifndef _di_f_fss_simple_packet_ranges_increase_
- f_status_t f_fss_simple_packet_ranges_increase(const f_number_unsigned_t step, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_increase_
-
-#ifndef _di_f_fss_simple_packet_ranges_increase_by_
- f_status_t f_fss_simple_packet_ranges_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_increase_by_
-
-#ifndef _di_f_fss_simple_packet_ranges_resize_
- f_status_t f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t *ranges) {
- #ifndef _di_level_0_parameter_checking_
- if (!ranges) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(f_fss_simple_packet_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
- }
-#endif // _di_f_fss_simple_packet_ranges_resize_
-
-#ifndef _di_f_fss_simple_packet_rangess_adjust_
- f_status_t f_fss_simple_packet_rangess_adjust(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return private_f_fss_simple_packet_rangess_adjust(length, rangess);
- }
-#endif // _di_f_fss_simple_packet_rangess_adjust_
-
-#ifndef _di_f_fss_simple_packet_rangess_append_
- f_status_t f_fss_simple_packet_rangess_append(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_rangess_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fss_simple_packet_ranges_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_fss_simple_packet_ranges_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
-
- return F_none;
- }
-#endif // _di_f_fss_simple_packet_rangess_append_
-
-#ifndef _di_f_fss_simple_packet_rangess_append_all_
- f_status_t f_fss_simple_packet_rangess_append_all(const f_fss_simple_packet_rangess_t source, f_fss_simple_packet_rangess_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fss_simple_packet_ranges_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_fss_simple_packet_ranges_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_string_dynamic_resize(0, &array[i].payload);
if (F_status_is_error(status)) return status;
- }
- } // for
+ } // for
+ }
return F_none;
}
-#endif // _di_f_fss_simple_packet_rangess_append_all_
+#endif // _di_f_fss_simple_packets_delete_callback_
-#ifndef _di_f_fss_simple_packet_rangess_decimate_by_
- f_status_t f_fss_simple_packet_rangess_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fss_simple_packet_rangess_adjust((rangess->size > amount) ? rangess->size - amount : 0, rangess);
- }
-#endif // _di_f_fss_simple_packet_rangess_decimate_by_
-
-#ifndef _di_f_fss_simple_packet_rangess_decrease_by_
- f_status_t f_fss_simple_packet_rangess_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fss_simple_packet_rangess_resize((rangess->size > amount) ? rangess->size - amount : 0, rangess);
- }
-#endif // _di_f_fss_simple_packet_rangess_decrease_by_
+#ifndef _di_f_fss_simple_packets_destroy_callback_
+ f_status_t f_fss_simple_packets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
-#ifndef _di_f_fss_simple_packet_rangess_increase_
- f_status_t f_fss_simple_packet_rangess_increase(const f_number_unsigned_t step, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_fss_simple_packet_ranges_t), (void **) &rangess->array, &rangess->used, &rangess->size);
- }
-#endif // _di_f_fss_simple_packet_rangess_increase_
+ {
+ f_fss_simple_packet_t * const array = (f_fss_simple_packet_t *) void_array;
+ f_status_t status = F_none;
-#ifndef _di_f_fss_simple_packet_rangess_increase_by_
- f_status_t f_fss_simple_packet_rangess_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return f_memory_array_increase_by(amount, sizeof(f_fss_simple_packet_ranges_t), (void **) &rangess->array, &rangess->used, &rangess->size);
- }
-#endif // _di_f_fss_simple_packet_rangess_increase_by_
+ array[i].control = 0;
+ array[i].size = 0;
-#ifndef _di_f_fss_simple_packet_rangess_resize_
- f_status_t f_fss_simple_packet_rangess_resize(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) {
- #ifndef _di_level_0_parameter_checking_
- if (!rangess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packet_rangess_resize(length, rangess);
- }
-#endif // _di_f_fss_simple_packet_rangess_resize_
-
-#ifndef _di_f_fss_simple_packets_adjust_
- f_status_t f_fss_simple_packets_adjust(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packets_adjust(length, packets);
- }
-#endif // _di_f_fss_simple_packets_adjust_
-
-#ifndef _di_f_fss_simple_packets_append_
- f_status_t f_fss_simple_packets_append(const f_fss_simple_packet_t source, f_fss_simple_packets_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packets_append(source, destination);
- }
-#endif // _di_f_fss_simple_packets_append_
-
-#ifndef _di_f_fss_simple_packets_append_all_
- f_status_t f_fss_simple_packets_append_all(const f_fss_simple_packets_t source, f_fss_simple_packets_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_fss_simple_packets_append_all(source, destination);
- }
-#endif // _di_f_fss_simple_packets_append_all_
-
-#ifndef _di_f_fss_simple_packets_decimate_by_
- f_status_t f_fss_simple_packets_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
- }
-#endif // _di_f_fss_simple_packets_decimate_by_
-
-#ifndef _di_f_fss_simple_packets_decrease_by_
- f_status_t f_fss_simple_packets_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
- }
-#endif // _di_f_fss_simple_packets_decrease_by_
-
-#ifndef _di_f_fss_simple_packets_increase_
- f_status_t f_fss_simple_packets_increase(const f_number_unsigned_t step, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
- }
-#endif // _di_f_fss_simple_packets_increase_
-
-#ifndef _di_f_fss_simple_packets_increase_by_
- f_status_t f_fss_simple_packets_increase_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
- }
-#endif // _di_f_fss_simple_packets_increase_by_
-
-#ifndef _di_f_fss_simple_packets_resize_
- f_status_t f_fss_simple_packets_resize(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) {
- #ifndef _di_level_0_parameter_checking_
- if (!packets) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packets_resize(length, packets);
- }
-#endif // _di_f_fss_simple_packets_resize_
-
-#ifndef _di_f_fss_simple_packetss_adjust_
- f_status_t f_fss_simple_packetss_adjust(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fss_simple_packetss_adjust(length, packetss);
- }
-#endif // _di_f_fss_simple_packetss_adjust_
-
-#ifndef _di_f_fss_simple_packetss_append_
- f_status_t f_fss_simple_packetss_append(const f_fss_simple_packets_t source, f_fss_simple_packetss_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fss_simple_packets_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_fss_simple_packets_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ status = f_string_dynamic_adjust(0, &array[i].payload);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
return F_none;
}
-#endif // _di_f_fss_simple_packetss_append_
+#endif // _di_f_fss_simple_packets_destroy_callback_
-#ifndef _di_f_fss_simple_packetss_append_all_
- f_status_t f_fss_simple_packetss_append_all(const f_fss_simple_packetss_t source, f_fss_simple_packetss_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fss_simple_packetss_delete_callback_
+ f_status_t f_fss_simple_packetss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
- if (!source.used) return F_data_not;
+ {
+ f_fss_simple_packets_t * const array = (f_fss_simple_packets_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fss_simple_packets_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
+ for (j = 0; j < array[i].size; ++j) {
- destination->array[destination->used].used = 0;
+ status = f_string_dynamic_resize(0, &array[i].array[j].payload);
+ if (F_status_is_error(status)) return status;
+ } // for
- if (source.array[i].used) {
- status = private_f_fss_simple_packets_append_all(source.array[i], &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
- }
- } // for
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_simple_packet_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
return F_none;
}
-#endif // _di_f_fss_simple_packetss_append_all_
+#endif // _di_f_fss_simple_packetss_delete_callback_
-#ifndef _di_f_fss_simple_packetss_decimate_by_
- f_status_t f_fss_simple_packetss_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fss_simple_packetss_adjust((packetss->size > amount) ? packetss->size - amount : 0, packetss);
- }
-#endif // _di_f_fss_simple_packetss_decimate_by_
+#ifndef _di_f_fss_simple_packetss_destroy_callback_
+ f_status_t f_fss_simple_packetss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
-#ifndef _di_f_fss_simple_packetss_decrease_by_
- f_status_t f_fss_simple_packetss_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fss_simple_packetss_resize((packetss->size > amount) ? packetss->size - amount : 0, packetss);
- }
-#endif // _di_f_fss_simple_packetss_decrease_by_
+ {
+ f_fss_simple_packets_t * const array = (f_fss_simple_packets_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
-#ifndef _di_f_fss_simple_packetss_increase_
- f_status_t f_fss_simple_packetss_increase(const f_number_unsigned_t step, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
- return f_memory_array_increase(step, sizeof(f_fss_simple_packets_t), (void **) &packetss->array, &packetss->used, &packetss->size);
- }
-#endif // _di_f_fss_simple_packetss_increase_
+ for (j = 0; j < array[i].size; ++j) {
-#ifndef _di_f_fss_simple_packetss_increase_by_
- f_status_t f_fss_simple_packetss_increase_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ array[i].array[j].control = 0;
+ array[i].array[j].size = 0;
- return f_memory_array_increase_by(amount, sizeof(f_fss_simple_packets_t), (void **) &packetss->array, &packetss->used, &packetss->size);
- }
-#endif // _di_f_fss_simple_packetss_increase_by_
+ status = f_string_dynamic_adjust(0, &array[i].array[j].payload);
+ if (F_status_is_error(status)) return status;
+ } // for
-#ifndef _di_f_fss_simple_packetss_resize_
- f_status_t f_fss_simple_packetss_resize(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) {
- #ifndef _di_level_0_parameter_checking_
- if (!packetss) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fss_simple_packet_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
- return private_f_fss_simple_packetss_resize(length, packetss);
+ return F_none;
}
-#endif // _di_f_fss_simple_packetss_resize_
+#endif // _di_f_fss_simple_packetss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#define macro_f_fss_simple_packets_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_simple_packets_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_simple_packets_t_resize(status, simple_packets, length) status = f_fss_simple_packets_resize(length, &simple_packets);
- #define macro_f_fss_simple_packets_t_adjust(status, simple_packets, length) status = f_fss_simple_packets_adjust(length, &simple_packets);
-
- #define macro_f_fss_simple_packets_t_delete_simple(simple_packets) f_fss_simple_packets_resize(0, &simple_packets);
- #define macro_f_fss_simple_packets_t_destroy_simple(simple_packets) f_fss_simple_packets_adjust(0, &simple_packets);
-
- #define macro_f_fss_simple_packets_t_increase(status, step, simple_packets) status = f_fss_simple_packets_increase(step, &simple_packets);
- #define macro_f_fss_simple_packets_t_increase_by(status, simple_packets, amount) status = f_fss_simple_packets_increase_by(amount, &simple_packets);
- #define macro_f_fss_simple_packets_t_decrease_by(status, simple_packets, amount) status = f_fss_simple_packets_decrease_by(amount, &simple_packets);
- #define macro_f_fss_simple_packets_t_decimate_by(status, simple_packets, amount) status = f_fss_simple_packets_decimate_by(amount, &simple_packets);
+ #define macro_f_fss_simple_packets_t_clear(simple_packets) macro_f_memory_structures_clear(simple_packets)
#endif // _di_f_fss_simple_packets_t_
/**
#define macro_f_fss_simple_packetss_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_simple_packetss_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_simple_packetss_t_resize(status, simple_packetss, length) status = f_fss_simple_packetss_resize(length, &simple_packetss);
- #define macro_f_fss_simple_packetss_t_adjust(status, simple_packetss, length) status = f_fss_simple_packetss_adjust(length, &simple_packetss);
-
- #define macro_f_fss_simple_packetss_t_delete_simple(simple_packetss) f_fss_simple_packetss_resize(0, &simple_packetss);
- #define macro_f_fss_simple_packetss_t_destroy_simple(simple_packetss) f_fss_simple_packetss_adjust(0, &simple_packetss);
-
- #define macro_f_fss_simple_packetss_t_increase(status, step, simple_packetss) status = f_fss_simple_packetss_increase(step, &simple_packetss);
- #define macro_f_fss_simple_packetss_t_increase_by(status, simple_packetss, amount) status = f_fss_simple_packetss_increase_by(amount, &simple_packetss);
- #define macro_f_fss_simple_packetss_t_decrease_by(status, simple_packetss, amount) status = f_fss_simple_packetss_decrease_by(amount, &simple_packetss);
- #define macro_f_fss_simple_packetss_t_decimate_by(status, simple_packetss, amount) status = f_fss_simple_packetss_decimate_by(amount, &simple_packetss);
+ #define macro_f_fss_simple_packetss_t_clear(simple_packetss) macro_f_memory_structures_clear(simple_packetss)
#endif // _di_f_fss_simple_packetss_t_
/**
* A set of string ranges intending to designate the different ranges for a Simple Packet representing each Block.
#define macro_f_fss_simple_packet_ranges_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_simple_packet_ranges_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_simple_packet_ranges_t_resize(status, simple_packet_ranges, length) status = f_fss_simple_packet_ranges_resize(length, &simple_packet_ranges);
- #define macro_f_fss_simple_packet_ranges_t_adjust(status, simple_packet_ranges, length) status = f_fss_simple_packet_ranges_adjust(length, &simple_packet_ranges);
-
- #define macro_f_fss_simple_packet_ranges_t_delete_simple(simple_packet_ranges) f_fss_simple_packet_ranges_resize(0, &simple_packet_ranges);
- #define macro_f_fss_simple_packet_ranges_t_destroy_simple(simple_packet_ranges) f_fss_simple_packet_ranges_adjust(0, &simple_packet_ranges);
-
- #define macro_f_fss_simple_packet_ranges_t_increase(status, step, simple_packet_ranges) status = f_fss_simple_packet_ranges_increase(step, &simple_packet_ranges);
- #define macro_f_fss_simple_packet_ranges_t_increase_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_increase_by(amount, &simple_packet_ranges);
- #define macro_f_fss_simple_packet_ranges_t_decrease_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_decrease_by(amount, &simple_packet_ranges);
- #define macro_f_fss_simple_packet_ranges_t_decimate_by(status, simple_packet_ranges, amount) status = f_fss_simple_packet_ranges_decimate_by(amount, &simple_packet_ranges);
+ #define macro_f_fss_simple_packet_ranges_t_clear(simple_packet_ranges) macro_f_memory_structures_clear(simple_packet_ranges)
#endif // _di_f_fss_simple_packet_ranges_t_
/**
#define macro_f_fss_simple_packet_rangess_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_fss_simple_packet_rangess_t_initialize_2(array, length) { array, length, length }
- #define macro_f_fss_simple_packet_rangess_t_resize(status, simple_packet_rangess, length) status = f_fss_simple_packet_rangess_resize(length, &simple_packet_rangess);
- #define macro_f_fss_simple_packet_rangess_t_adjust(status, simple_packet_rangess, length) status = f_fss_simple_packet_rangess_adjust(length, &simple_packet_rangess);
-
- #define macro_f_fss_simple_packet_rangess_t_delete_simple(simple_packet_rangess) f_fss_simple_packet_rangess_resize(0, &simple_packet_rangess);
- #define macro_f_fss_simple_packet_rangess_t_destroy_simple(simple_packet_rangess) f_fss_simple_packet_rangess_adjust(0, &simple_packet_rangess);
-
- #define macro_f_fss_simple_packet_rangess_t_increase(status, step, simple_packet_rangess) status = f_fss_simple_packet_rangess_increase(step, &simple_packet_rangess);
- #define macro_f_fss_simple_packet_rangess_t_increase_by(status, simple_packet_rangess, amount) status = f_fss_simple_packet_rangess_increase_by(amount, &simple_packet_rangess);
- #define macro_f_fss_simple_packet_rangess_t_decrease_by(status, simple_packet_rangess, amount) status = f_fss_simple_packet_rangess_decrease_by(amount, &simple_packet_rangess);
- #define macro_f_fss_simple_packet_rangess_t_decimate_by(status, simple_packet_rangess, amount) status = f_fss_simple_packet_rangess_decimate_by(amount, &simple_packet_rangess);
+ #define macro_f_fss_simple_packet_rangess_t_clear(simple_packet_rangess) macro_f_memory_structures_clear(simple_packet_rangess)
#endif // _di_f_fss_simple_packet_rangess_t_
/**
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * F_failure (with error bit) on any other error.
+ * Errors (with error bit) from: f_string_dynamic_resize().
*
* @see f_string_dynamic_resize()
*/
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * F_failure (with error bit) on any other error.
+ * Errors (with error bit) from: f_string_dynamic_adjust().
*
* @see f_string_dynamic_adjust()
*/
#endif // _di_f_fss_simple_packet_identify_
/**
- * Resize the ranges array.
- *
- * @param length
- * The new size to use.
- * @param ranges
- * The ranges array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_ranges_adjust_
- extern f_status_t f_fss_simple_packet_ranges_adjust(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_adjust_
-
-/**
- * Append the single source range onto the destination.
- *
- * @param source
- * The source range to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_simple_packets_t structure.
*
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @see f_memory_array_increase()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_ranges_append_
- extern f_status_t f_fss_simple_packet_ranges_append(const f_fss_simple_packet_range_t source, f_fss_simple_packet_ranges_t *destination);
-#endif // _di_f_fss_simple_packet_ranges_append_
-
-/**
- * Append the source ranges onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source ranges to append.
- * @param destination
- * The destination ranges the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_ranges_append_all_
- extern f_status_t f_fss_simple_packet_ranges_append_all(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_ranges_t *destination);
-#endif // _di_f_fss_simple_packet_ranges_append_all_
-
-/**
- * Resize the ranges array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param ranges
- * The ranges array to resize.
- *
- * @return
- * @return
- * Success from f_memory_array_decimate_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_fss_simple_packet_ranges_decimate_by_
- extern f_status_t f_fss_simple_packet_ranges_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_decimate_by_
-
-/**
- * Resize the ranges array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param ranges
- * The ranges array to resize.
- *
- * @return
- * Success from f_memory_array_decrease_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_fss_simple_packet_ranges_decrease_by_
- extern f_status_t f_fss_simple_packet_ranges_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_decrease_by_
-
-/**
- * Increase the size of the ranges array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to range max buffer size (F_number_t_size_unsigned_d).
- * If already range to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param ranges
- * The ranges array to resize.
- *
- * @return
- * Success from f_memory_array_increase().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fss_simple_packet_ranges_increase_
- extern f_status_t f_fss_simple_packet_ranges_increase(const f_number_unsigned_t step, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_increase_
-
-/**
- * Resize the ranges array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to range max buffer size (F_number_t_size_unsigned_d).
- * If already range to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param ranges
- * The ranges array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_simple_packet_ranges_increase_by_
- extern f_status_t f_fss_simple_packet_ranges_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_increase_by_
-
-/**
- * Resize the ranges array.
+ * Errors (with error bit) from: f_string_dynamic_resize().
*
- * @param length
- * The new size to use.
- * @param ranges
- * The ranges array to adjust.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_ranges_resize_
- extern f_status_t f_fss_simple_packet_ranges_resize(const f_number_unsigned_t length, f_fss_simple_packet_ranges_t *ranges);
-#endif // _di_f_fss_simple_packet_ranges_resize_
-
-/**
- * Resize the rangess array.
- *
- * @param length
- * The new size to use.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- *
- * @see f_memory_array_adjust()
+ * @see f_string_dynamic_resize()
*/
-#ifndef _di_f_fss_simple_packet_rangess_adjust_
- extern f_status_t f_fss_simple_packet_rangess_adjust(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_adjust_
+#ifndef _di_f_fss_simple_packets_delete_callback_
+ extern f_status_t f_fss_simple_packets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_simple_packets_delete_callback_
/**
- * Append the single source ranges onto the destination.
- *
- * @param source
- * The source ranges to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_simple_packets_t structure.
*
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_rangess_append_
- extern f_status_t f_fss_simple_packet_rangess_append(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_rangess_t *destination);
-#endif // _di_f_fss_simple_packet_rangess_append_
-
-/**
- * Append the source rangess onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source rangess to append.
- * @param destination
- * The destination ranges the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_rangess_append_all_
- extern f_status_t f_fss_simple_packet_rangess_append_all(const f_fss_simple_packet_rangess_t source, f_fss_simple_packet_rangess_t *destination);
-#endif // _di_f_fss_simple_packet_rangess_append_all_
-
-/**
- * Resize the rangess array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * F_data_not on success, but the amount to decrease by is 0.
- *
- * Success from f_memory_array_decimate_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_fss_simple_packet_rangess_decimate_by_
- extern f_status_t f_fss_simple_packet_rangess_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_decimate_by_
-
-/**
- * Resize the rangess array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * F_data_not on success, but the amount to decrease by is 0.
- *
- * Success from f_memory_array_decrease_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_fss_simple_packet_rangess_decrease_by_
- extern f_status_t f_fss_simple_packet_rangess_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_decrease_by_
-
-/**
- * Increase the size of the rangess array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to range max buffer size (F_number_t_size_unsigned_d).
- * If already range to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * Success from f_memory_array_increase().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fss_simple_packet_rangess_increase_
- extern f_status_t f_fss_simple_packet_rangess_increase(const f_number_unsigned_t step, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_increase_
-
-/**
- * Resize the rangess array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to range max buffer size (F_number_t_size_unsigned_d).
- * If already range to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_simple_packet_rangess_increase_by_
- extern f_status_t f_fss_simple_packet_rangess_increase_by(const f_number_unsigned_t amount, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_increase_by_
-
-/**
- * Resize the rangess array.
- *
- * @param length
- * The new size to use.
- * @param rangess
- * The rangess array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packet_rangess_resize_
- extern f_status_t f_fss_simple_packet_rangess_resize(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess);
-#endif // _di_f_fss_simple_packet_rangess_resize_
-
-/**
- * Resize the simple packet array.
- *
- * @param length
- * The new size to use.
- * @param packets
- * The simple packet array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamic_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_string_dynamic_adjust()
*/
-#ifndef _di_f_fss_simple_packets_adjust_
- extern f_status_t f_fss_simple_packets_adjust(const f_number_unsigned_t length, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_adjust_
+#ifndef _di_f_fss_simple_packets_destroy_callback_
+ extern f_status_t f_fss_simple_packets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_simple_packets_destroy_callback_
/**
- * Append the single source simple packet onto the destination.
- *
- * @param source
- * The source packet to append.
- * @param destination
- * The destination simple packet the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_simple_packetss_t structure.
*
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * @see f_memory_array_increase()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packets_append_
- extern f_status_t f_fss_simple_packets_append(const f_fss_simple_packet_t source, f_fss_simple_packets_t *destination);
-#endif // _di_f_fss_simple_packets_append_
-
-/**
- * Append the source simple packet onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source packets to append.
- * @param destination
- * The destination simple packet the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packets_append_all_
- extern f_status_t f_fss_simple_packets_append_all(const f_fss_simple_packets_t source, f_fss_simple_packets_t *destination);
-#endif // _di_f_fss_simple_packets_append_all_
-
-/**
- * Resize the simple packet array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param packets
- * The simple packet array to resize.
- *
- * @return
- * @return
- * Success from f_memory_array_decimate_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_fss_simple_packets_decimate_by_
- extern f_status_t f_fss_simple_packets_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_decimate_by_
-
-/**
- * Resize the simple packet array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param packets
- * The simple packet array to resize.
- *
- * @return
- * Success from f_memory_array_decrease_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_fss_simple_packets_decrease_by_
- extern f_status_t f_fss_simple_packets_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_decrease_by_
-
-/**
- * Increase the size of the simple packet array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to packet max buffer size (F_number_t_size_unsigned_d).
- * If already packet to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param packets
- * The simple packet array to resize.
- *
- * @return
- * Success from f_memory_array_increase().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fss_simple_packets_increase_
- extern f_status_t f_fss_simple_packets_increase(const f_number_unsigned_t step, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_increase_
-
-/**
- * Resize the simple packet array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to packet max buffer size (F_number_t_size_unsigned_d).
- * If already packet to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param packets
- * The simple packet array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_simple_packets_increase_by_
- extern f_status_t f_fss_simple_packets_increase_by(const f_number_unsigned_t amount, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_increase_by_
-
-/**
- * Resize the simple packet array.
- *
- * @param length
- * The new size to use.
- * @param packets
- * The simple packet array to adjust.
- *
- * @return
- * Success from f_memory_array_resize().
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
*
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packets_resize_
- extern f_status_t f_fss_simple_packets_resize(const f_number_unsigned_t length, f_fss_simple_packets_t *packets);
-#endif // _di_f_fss_simple_packets_resize_
-
-/**
- * Resize the simple packets array.
- *
- * @param length
- * The new size to use.
- * @param packetss
- * The simple packets array to resize.
- *
- * @return
- * Success from f_memory_array_adjust().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- *
- * @see f_memory_array_adjust()
+ * @see f_string_dynamic_resize()
*/
-#ifndef _di_f_fss_simple_packetss_adjust_
- extern f_status_t f_fss_simple_packetss_adjust(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_adjust_
+#ifndef _di_f_fss_simple_packetss_delete_callback_
+ extern f_status_t f_fss_simple_packetss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_simple_packetss_delete_callback_
/**
- * Append the single source simple packets onto the destination.
- *
- * @param source
- * The source simple packets to append.
- * @param destination
- * The destination simple packets the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_simple_packetss_t structure.
*
- * Success from f_memory_array_resize().
+ * This is only called when shrinking the array and generally should perform deallocations.
*
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packetss_append_
- extern f_status_t f_fss_simple_packetss_append(const f_fss_simple_packets_t source, f_fss_simple_packetss_t *destination);
-#endif // _di_f_fss_simple_packetss_append_
-
-/**
- * Append the source simple packets onto the destination.
+ * This does not do parameter checking.
*
- * @param source
- * The source simple packets to append.
- * @param destination
- * The destination simple packets the source is appended onto.
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_increase_by()
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fss_simple_packetss_append_all_
- extern f_status_t f_fss_simple_packetss_append_all(const f_fss_simple_packetss_t source, f_fss_simple_packetss_t *destination);
-#endif // _di_f_fss_simple_packetss_append_all_
-
-/**
- * Resize the simple packets array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param packetss
- * The simple packets array to resize.
- *
- * @return
- * F_data_not on success, but the amount to decrease by is 0.
- *
- * Success from f_memory_array_decimate_by().
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_fss_simple_packetss_decimate_by_
- extern f_status_t f_fss_simple_packetss_decimate_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_decimate_by_
-
-/**
- * Resize the simple packets array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param packetss
- * The simple packets array to resize.
+ * Errors (with error bit) from: f_string_dynamic_adjust().
*
- * @return
- * F_data_not on success, but the amount to decrease by is 0.
- *
- * Success from f_memory_array_decrease_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_fss_simple_packetss_decrease_by_
- extern f_status_t f_fss_simple_packetss_decrease_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_decrease_by_
-
-/**
- * Increase the size of the simple packets array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to packet max buffer size (F_number_t_size_unsigned_d).
- * If already packet to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param packetss
- * The simple packets array to resize.
- *
- * @return
- * Success from f_memory_array_increase().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fss_simple_packetss_increase_
- extern f_status_t f_fss_simple_packetss_increase(const f_number_unsigned_t step, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_increase_
-
-/**
- * Resize the simple packets array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to packet max buffer size (F_number_t_size_unsigned_d).
- * If already packet to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param packetss
- * The simple packets array to resize.
- *
- * @return
- * Success from f_memory_array_increase_by().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fss_simple_packetss_increase_by_
- extern f_status_t f_fss_simple_packetss_increase_by(const f_number_unsigned_t amount, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_increase_by_
-
-/**
- * Resize the simple packets array.
- *
- * @param length
- * The new size to use.
- * @param packetss
- * The simple packets array to resize.
- *
- * @return
- * Success from f_memory_array_resize().
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
+ * @see f_string_dynamic_adjust()
*/
-#ifndef _di_f_fss_simple_packetss_resize_
- extern f_status_t f_fss_simple_packetss_resize(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss);
-#endif // _di_f_fss_simple_packetss_resize_
+#ifndef _di_f_fss_simple_packetss_destroy_callback_
+ extern f_status_t f_fss_simple_packetss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fss_simple_packetss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c
-build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf
build_sources_library fss.c fss/common.c fss/item.c fss/named.c fss/nest.c fss/quote.c fss/set.c fss/set_quote.c fss/simple_packet.c ../../tests/unit/c/mock-fss.c
-build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_sources_program test-fss-apply_delimit.c test-fss-apply_delimit_range.c test-fss-count_lines.c test-fss-count_lines_range.c test-fss-fail_utf.c test-fss-fail_utf_to_false.c test-fss-is_combining.c test-fss-is_graph.c test-fss-is_space.c test-fss-is_zero_width.c test-fss-seek_to_eol.c test-fss-skip_past_delimit.c test-fss-skip_past_space.c
-build_sources_program test-fss-items_adjust.c test-fss-items_decimate_by.c test-fss-items_decrease_by.c test-fss-items_increase.c test-fss-items_increase_by.c test-fss-items_resize.c
-build_sources_program test-fss-named_adjust.c test-fss-named_decimate_by.c test-fss-named_decrease_by.c test-fss-named_increase.c test-fss-named_increase_by.c test-fss-named_resize.c
-build_sources_program test-fss-nameds_adjust.c test-fss-nameds_decimate_by.c test-fss-nameds_decrease_by.c test-fss-nameds_increase.c test-fss-nameds_increase_by.c test-fss-nameds_resize.c
-build_sources_program test-fss-nest_adjust.c test-fss-nest_decimate_by.c test-fss-nest_decrease_by.c test-fss-nest_increase.c test-fss-nest_increase_by.c test-fss-nest_resize.c
-build_sources_program test-fss-nests_adjust.c test-fss-nests_decimate_by.c test-fss-nests_decrease_by.c test-fss-nests_increase.c test-fss-nests_increase_by.c test-fss-nests_resize.c
-build_sources_program test-fss-set_adjust.c test-fss-set_decimate_by.c test-fss-set_decrease_by.c test-fss-set_increase.c test-fss-set_increase_by.c test-fss-set_resize.c
-build_sources_program test-fss-set_quote_adjust.c test-fss-set_quote_decimate_by.c test-fss-set_quote_decrease_by.c test-fss-set_quote_increase.c test-fss-set_quote_increase_by.c test-fss-set_quote_resize.c
-build_sources_program test-fss-set_quotes_adjust.c test-fss-set_quotes_decimate_by.c test-fss-set_quotes_decrease_by.c test-fss-set_quotes_increase.c test-fss-set_quotes_increase_by.c test-fss-set_quotes_resize.c
-build_sources_program test-fss-sets_adjust.c test-fss-sets_decimate_by.c test-fss-sets_decrease_by.c test-fss-sets_increase.c test-fss-sets_increase_by.c test-fss-sets_resize.c
-build_sources_program test-fss-simple_packet_ranges_adjust.c test-fss-simple_packet_ranges_decimate_by.c test-fss-simple_packet_ranges_decrease_by.c test-fss-simple_packet_ranges_increase.c test-fss-simple_packet_ranges_increase_by.c test-fss-simple_packet_ranges_resize.c
+#build_sources_program test-fss-items_destroy_callback.c test-fss-items_delete_callback.c
+#build_sources_program test-fss-named_destroy_callback.c test-fss-named_delete_callback.c
+#build_sources_program test-fss-nameds_destroy_callback.c test-fss-nameds_delete_callback.c
+#build_sources_program test-fss-nest_destroy_callback.c test-fss-nest_delete_callback.c
+#build_sources_program test-fss-nests_destroy_callback.c test-fss-nests_delete_callback.c
+#build_sources_program test-fss-set_destroy_callback.c test-fss-set_delete_callback.c
+#build_sources_program test-fss-set_quote_destroy_callback.c test-fss-set_quote_delete_callback.c
+#build_sources_program test-fss-set_quotes_destroy_callback.c test-fss-set_quotes_delete_callback.c
+#build_sources_program test-fss-sets_destroy_callback.c test-fss-sets_delete_callback.c
+#build_sources_program test-fss-simple_packet_ranges_destroy_callback.c test-fss-simple_packet_ranges_delete_callback.c
build_sources_program test-fss.c
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_items_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items adjust in the fss project.
- */
-#ifndef _TEST__F_fss__items_adjust
-#define _TEST__F_fss__items_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_adjust()
- */
-extern void test__f_fss_items_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_adjust()
- */
-extern void test__f_fss_items_adjust__works(void **state);
-
-#endif // _TEST__F_fss__items_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_items_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_items_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__items_decimate_by
-#define _TEST__F_fss__items_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_decimate_by()
- */
-extern void test__f_fss_items_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_items_decimate_by()
- */
-extern void test__f_fss_items_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_decimate_by()
- */
-extern void test__f_fss_items_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__items_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_items_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_items_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__items_decrease_by
-#define _TEST__F_fss__items_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_decrease_by()
- */
-extern void test__f_fss_items_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_items_decrease_by()
- */
-extern void test__f_fss_items_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_decrease_by()
- */
-extern void test__f_fss_items_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__items_decrease_by
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-listings_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_fss_item_t data = f_fss_item_t_initialize;
+ f_fss_item_t data_array[] = { data };
+ f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fss_items_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, true);
+ will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_fss_items_delete_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_fss_item_t data = f_fss_item_t_initialize;
+ f_fss_item_t data_array[] = { data };
+ f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fss_items_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ will_return(__wrap_f_string_dynamics_resize, false);
+ will_return(__wrap_f_string_dynamics_resize, F_none);
+
+ const f_status_t status = f_fss_items_delete_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__listings_delete_callback
+#define _TEST__F_fss__listings_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_items_delete_callback()
+ */
+extern void test__f_fss_items_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_delete_callback()
+ */
+extern void test__f_fss_items_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__listings_delete_callback
--- /dev/null
+#include "test-directory.h"
+#include "test-directory-listings_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+
+ f_fss_item_t data = f_fss_item_t_initialize;
+ f_fss_item_t data_array[] = { data };
+ f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fss_items_t datass_array[] = { datas };
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, true);
+ will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_fss_items_destroy_callback__works(void **state) {
+
+ mock_unwrap = 0;
+
+ f_fss_item_t data = f_fss_item_t_initialize;
+ f_fss_item_t data_array[] = { data };
+ f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fss_items_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ will_return(__wrap_f_string_dynamics_adjust, false);
+ will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+ const f_status_t status = f_fss_items_destroy_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__listings_destroy_callback
+#define _TEST__F_fss__listings_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_items_destroy_callback()
+ */
+extern void test__f_fss_items_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_destroy_callback()
+ */
+extern void test__f_fss_items_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__listings_destroy_callback
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_items_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_items_increase__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_items_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items increase in the fss project.
- */
-#ifndef _TEST__F_fss__items_increase
-#define _TEST__F_fss__items_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_increase()
- */
-extern void test__f_fss_items_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_items_increase()
- */
-extern void test__f_fss_items_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_increase()
- */
-extern void test__f_fss_items_increase__works(void **state);
-
-#endif // _TEST__F_fss__items_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_items_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_items_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_items_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_items_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items increase by in the fss project.
- */
-#ifndef _TEST__F_fss__items_increase_by
-#define _TEST__F_fss__items_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_increase_by()
- */
-extern void test__f_fss_items_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_items_increase_by()
- */
-extern void test__f_fss_items_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_increase_by()
- */
-extern void test__f_fss_items_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__items_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-items_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_items_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_items_resize__works(void **state) {
-
- const int length = 5;
- f_fss_items_t data = f_fss_items_t_initialize;
-
- {
- const f_status_t status = f_fss_items_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test items resize in the fss project.
- */
-#ifndef _TEST__F_fss__items_resize
-#define _TEST__F_fss__items_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_items_resize()
- */
-extern void test__f_fss_items_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_items_resize()
- */
-extern void test__f_fss_items_resize__works(void **state);
-
-#endif // _TEST__F_fss__items_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-void test__f_fss_named_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named adjust in the fss project.
- */
-#ifndef _TEST__F_fss__named_adjust
-#define _TEST__F_fss__named_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_adjust()
- */
-extern void test__f_fss_named_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_adjust()
- */
-extern void test__f_fss_named_adjust__works(void **state);
-
-#endif // _TEST__F_fss__named_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-void test__f_fss_named_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-void test__f_fss_named_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__named_decimate_by
-#define _TEST__F_fss__named_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_decimate_by()
- */
-extern void test__f_fss_named_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_named_decimate_by()
- */
-extern void test__f_fss_named_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_decimate_by()
- */
-extern void test__f_fss_named_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__named_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-void test__f_fss_named_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-void test__f_fss_named_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__named_decrease_by
-#define _TEST__F_fss__named_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_decrease_by()
- */
-extern void test__f_fss_named_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_named_decrease_by()
- */
-extern void test__f_fss_named_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_decrease_by()
- */
-extern void test__f_fss_named_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__named_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-void test__f_fss_named_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-void test__f_fss_named_increase__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
- data.quotess.used = length;
-
- const f_status_t status = f_fss_named_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_in_range(data.objects.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- assert_int_equal(data.contents.used, length);
- assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- assert_int_equal(data.quotess.used, length);
- assert_in_range(data.quotess.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named increase in the fss project.
- */
-#ifndef _TEST__F_fss__named_increase
-#define _TEST__F_fss__named_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_increase()
- */
-extern void test__f_fss_named_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_named_increase()
- */
-extern void test__f_fss_named_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_increase()
- */
-extern void test__f_fss_named_increase__works(void **state);
-
-#endif // _TEST__F_fss__named_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-void test__f_fss_named_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- const f_status_t status = f_fss_named_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-void test__f_fss_named_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
- data.quotess.used = length;
-
- const f_status_t status = f_fss_named_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_int_equal(data.objects.size, length * 2);
- assert_int_equal(data.contents.used, length);
- assert_int_equal(data.contents.size, length * 2);
- assert_int_equal(data.quotess.used, length);
- assert_int_equal(data.quotess.size, length * 2);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named increase by in the fss project.
- */
-#ifndef _TEST__F_fss__named_increase_by
-#define _TEST__F_fss__named_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_increase_by()
- */
-extern void test__f_fss_named_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_named_increase_by()
- */
-extern void test__f_fss_named_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_increase_by()
- */
-extern void test__f_fss_named_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__named_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_named_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.quotess.array);
-}
-
-void test__f_fss_named_resize__works(void **state) {
-
- const int length = 5;
- f_fss_named_t data = f_fss_named_t_initialize;
-
- {
- const f_status_t status = f_fss_named_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.quotess.used, 0);
- assert_int_equal(data.quotess.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.quotess.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test named resize in the fss project.
- */
-#ifndef _TEST__F_fss__named_resize
-#define _TEST__F_fss__named_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_named_resize()
- */
-extern void test__f_fss_named_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_named_resize()
- */
-extern void test__f_fss_named_resize__works(void **state);
-
-#endif // _TEST__F_fss__named_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nameds_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds adjust in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_adjust
-#define _TEST__F_fss__nameds_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_adjust()
- */
-extern void test__f_fss_nameds_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_adjust()
- */
-extern void test__f_fss_nameds_adjust__works(void **state);
-
-#endif // _TEST__F_fss__nameds_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nameds_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nameds_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_decimate_by
-#define _TEST__F_fss__nameds_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_decimate_by()
- */
-extern void test__f_fss_nameds_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nameds_decimate_by()
- */
-extern void test__f_fss_nameds_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_decimate_by()
- */
-extern void test__f_fss_nameds_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__nameds_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nameds_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nameds_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_decrease_by
-#define _TEST__F_fss__nameds_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_decrease_by()
- */
-extern void test__f_fss_nameds_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nameds_decrease_by()
- */
-extern void test__f_fss_nameds_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_decrease_by()
- */
-extern void test__f_fss_nameds_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__nameds_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nameds_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nameds_increase__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nameds_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds increase in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_increase
-#define _TEST__F_fss__nameds_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_increase()
- */
-extern void test__f_fss_nameds_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nameds_increase()
- */
-extern void test__f_fss_nameds_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_increase()
- */
-extern void test__f_fss_nameds_increase__works(void **state);
-
-#endif // _TEST__F_fss__nameds_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nameds_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nameds_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nameds_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nameds_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds increase by in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_increase_by
-#define _TEST__F_fss__nameds_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_increase_by()
- */
-extern void test__f_fss_nameds_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nameds_increase_by()
- */
-extern void test__f_fss_nameds_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_increase_by()
- */
-extern void test__f_fss_nameds_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__nameds_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nameds_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nameds_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nameds_resize__works(void **state) {
-
- const int length = 5;
- f_fss_nameds_t data = f_fss_nameds_t_initialize;
-
- {
- const f_status_t status = f_fss_nameds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nameds resize in the fss project.
- */
-#ifndef _TEST__F_fss__nameds_resize
-#define _TEST__F_fss__nameds_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nameds_resize()
- */
-extern void test__f_fss_nameds_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nameds_resize()
- */
-extern void test__f_fss_nameds_resize__works(void **state);
-
-#endif // _TEST__F_fss__nameds_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-void test__f_fss_nest_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest adjust in the fss project.
- */
-#ifndef _TEST__F_fss__nest_adjust
-#define _TEST__F_fss__nest_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_adjust()
- */
-extern void test__f_fss_nest_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_adjust()
- */
-extern void test__f_fss_nest_adjust__works(void **state);
-
-#endif // _TEST__F_fss__nest_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-void test__f_fss_nest_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-void test__f_fss_nest_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__nest_decimate_by
-#define _TEST__F_fss__nest_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_decimate_by()
- */
-extern void test__f_fss_nest_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nest_decimate_by()
- */
-extern void test__f_fss_nest_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_decimate_by()
- */
-extern void test__f_fss_nest_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__nest_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-void test__f_fss_nest_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-void test__f_fss_nest_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__nest_decrease_by
-#define _TEST__F_fss__nest_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_decrease_by()
- */
-extern void test__f_fss_nest_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nest_decrease_by()
- */
-extern void test__f_fss_nest_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_decrease_by()
- */
-extern void test__f_fss_nest_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__nest_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.depth);
-}
-
-void test__f_fss_nest_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-void test__f_fss_nest_increase__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nest_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest increase in the fss project.
- */
-#ifndef _TEST__F_fss__nest_increase
-#define _TEST__F_fss__nest_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_increase()
- */
-extern void test__f_fss_nest_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nest_increase()
- */
-extern void test__f_fss_nest_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_increase()
- */
-extern void test__f_fss_nest_increase__works(void **state);
-
-#endif // _TEST__F_fss__nest_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-void test__f_fss_nest_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nest_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-void test__f_fss_nest_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nest_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest increase by in the fss project.
- */
-#ifndef _TEST__F_fss__nest_increase_by
-#define _TEST__F_fss__nest_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_increase_by()
- */
-extern void test__f_fss_nest_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nest_increase_by()
- */
-extern void test__f_fss_nest_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_increase_by()
- */
-extern void test__f_fss_nest_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__nest_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nest_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.depth);
-}
-
-void test__f_fss_nest_resize__works(void **state) {
-
- const int length = 5;
- f_fss_nest_t data = f_fss_nest_t_initialize;
-
- {
- const f_status_t status = f_fss_nest_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.depth);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nest resize in the fss project.
- */
-#ifndef _TEST__F_fss__nest_resize
-#define _TEST__F_fss__nest_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nest_resize()
- */
-extern void test__f_fss_nest_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nest_resize()
- */
-extern void test__f_fss_nest_resize__works(void **state);
-
-#endif // _TEST__F_fss__nest_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nests_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests adjust in the fss project.
- */
-#ifndef _TEST__F_fss__nests_adjust
-#define _TEST__F_fss__nests_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_adjust()
- */
-extern void test__f_fss_nests_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_adjust()
- */
-extern void test__f_fss_nests_adjust__works(void **state);
-
-#endif // _TEST__F_fss__nests_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nests_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nests_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__nests_decimate_by
-#define _TEST__F_fss__nests_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_decimate_by()
- */
-extern void test__f_fss_nests_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nests_decimate_by()
- */
-extern void test__f_fss_nests_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_decimate_by()
- */
-extern void test__f_fss_nests_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__nests_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nests_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nests_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__nests_decrease_by
-#define _TEST__F_fss__nests_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_decrease_by()
- */
-extern void test__f_fss_nests_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nests_decrease_by()
- */
-extern void test__f_fss_nests_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_decrease_by()
- */
-extern void test__f_fss_nests_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__nests_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nests_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nests_increase__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nests_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests increase in the fss project.
- */
-#ifndef _TEST__F_fss__nests_increase
-#define _TEST__F_fss__nests_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_increase()
- */
-extern void test__f_fss_nests_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nests_increase()
- */
-extern void test__f_fss_nests_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_increase()
- */
-extern void test__f_fss_nests_increase__works(void **state);
-
-#endif // _TEST__F_fss__nests_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nests_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_nests_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_nests_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_nests_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests increase by in the fss project.
- */
-#ifndef _TEST__F_fss__nests_increase_by
-#define _TEST__F_fss__nests_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_increase_by()
- */
-extern void test__f_fss_nests_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_nests_increase_by()
- */
-extern void test__f_fss_nests_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_increase_by()
- */
-extern void test__f_fss_nests_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__nests_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-nests_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_nests_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_nests_resize__works(void **state) {
-
- const int length = 5;
- f_fss_nests_t data = f_fss_nests_t_initialize;
-
- {
- const f_status_t status = f_fss_nests_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test nests resize in the fss project.
- */
-#ifndef _TEST__F_fss__nests_resize
-#define _TEST__F_fss__nests_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_nests_resize()
- */
-extern void test__f_fss_nests_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_nests_resize()
- */
-extern void test__f_fss_nests_resize__works(void **state);
-
-#endif // _TEST__F_fss__nests_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-void test__f_fss_set_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set adjust in the fss project.
- */
-#ifndef _TEST__F_fss__set_adjust
-#define _TEST__F_fss__set_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_adjust()
- */
-extern void test__f_fss_set_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_adjust()
- */
-extern void test__f_fss_set_adjust__works(void **state);
-
-#endif // _TEST__F_fss__set_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-void test__f_fss_set_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-void test__f_fss_set_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__set_decimate_by
-#define _TEST__F_fss__set_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_decimate_by()
- */
-extern void test__f_fss_set_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_decimate_by()
- */
-extern void test__f_fss_set_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_decimate_by()
- */
-extern void test__f_fss_set_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__set_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-void test__f_fss_set_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-void test__f_fss_set_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__set_decrease_by
-#define _TEST__F_fss__set_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_decrease_by()
- */
-extern void test__f_fss_set_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_decrease_by()
- */
-extern void test__f_fss_set_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_decrease_by()
- */
-extern void test__f_fss_set_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__set_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-void test__f_fss_set_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-void test__f_fss_set_increase__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
-
- const f_status_t status = f_fss_set_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set increase in the fss project.
- */
-#ifndef _TEST__F_fss__set_increase
-#define _TEST__F_fss__set_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_increase()
- */
-extern void test__f_fss_set_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_increase()
- */
-extern void test__f_fss_set_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_increase()
- */
-extern void test__f_fss_set_increase__works(void **state);
-
-#endif // _TEST__F_fss__set_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-void test__f_fss_set_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-void test__f_fss_set_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
-
- const f_status_t status = f_fss_set_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_int_equal(data.contents.size, length * 2);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set increase by in the fss project.
- */
-#ifndef _TEST__F_fss__set_increase_by
-#define _TEST__F_fss__set_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_increase_by()
- */
-extern void test__f_fss_set_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_increase_by()
- */
-extern void test__f_fss_set_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_increase_by()
- */
-extern void test__f_fss_set_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__set_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote adjust in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_adjust
-#define _TEST__F_fss__set_quote_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_adjust()
- */
-extern void test__f_fss_set_quote_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_adjust()
- */
-extern void test__f_fss_set_quote_adjust__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_decimate_by
-#define _TEST__F_fss__set_quote_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_decimate_by()
- */
-extern void test__f_fss_set_quote_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quote_decimate_by()
- */
-extern void test__f_fss_set_quote_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_decimate_by()
- */
-extern void test__f_fss_set_quote_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_decrease_by
-#define _TEST__F_fss__set_quote_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_decrease_by()
- */
-extern void test__f_fss_set_quote_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quote_decrease_by()
- */
-extern void test__f_fss_set_quote_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_decrease_by()
- */
-extern void test__f_fss_set_quote_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_increase__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
- data.objects_quote.used = length;
- data.contents_quote.used = length;
-
- const f_status_t status = f_fss_set_quote_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_in_range(data.objects.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- assert_int_equal(data.contents.used, length);
- assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- assert_int_equal(data.objects_quote.used, length);
- assert_in_range(data.objects_quote.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- assert_int_equal(data.contents_quote.used, length);
- assert_in_range(data.contents_quote.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_increase
-#define _TEST__F_fss__set_quote_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_increase()
- */
-extern void test__f_fss_set_quote_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quote_increase()
- */
-extern void test__f_fss_set_quote_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_increase()
- */
-extern void test__f_fss_set_quote_increase__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quote_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- {
- data.objects.used = length;
- data.contents.used = length;
- data.objects_quote.used = length;
- data.contents_quote.used = length;
-
- const f_status_t status = f_fss_set_quote_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, length);
- assert_int_equal(data.objects.size, length * 2);
- assert_int_equal(data.contents.used, length);
- assert_int_equal(data.contents.size, length * 2);
- assert_int_equal(data.objects_quote.used, length);
- assert_int_equal(data.objects_quote.size, length * 2);
- assert_int_equal(data.contents_quote.used, length);
- assert_int_equal(data.contents_quote.size, length * 2);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_increase_by
-#define _TEST__F_fss__set_quote_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_increase_by()
- */
-extern void test__f_fss_set_quote_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quote_increase_by()
- */
-extern void test__f_fss_set_quote_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_increase_by()
- */
-extern void test__f_fss_set_quote_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quote_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quote_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, 0);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
- assert_null(data.objects_quote.array);
- assert_null(data.contents_quote.array);
-}
-
-void test__f_fss_set_quote_resize__works(void **state) {
-
- const int length = 5;
- f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quote_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- assert_int_equal(data.objects_quote.used, 0);
- assert_int_equal(data.objects_quote.size, length);
- assert_int_equal(data.contents_quote.used, 0);
- assert_int_equal(data.contents_quote.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
- free((void *) data.objects_quote.array);
- free((void *) data.contents_quote.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote resize in the fss project.
- */
-#ifndef _TEST__F_fss__set_quote_resize
-#define _TEST__F_fss__set_quote_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quote_resize()
- */
-extern void test__f_fss_set_quote_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quote_resize()
- */
-extern void test__f_fss_set_quote_resize__works(void **state);
-
-#endif // _TEST__F_fss__set_quote_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_set_quotes_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote adjust in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_adjust
-#define _TEST__F_fss__set_quotes_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_adjust()
- */
-extern void test__f_fss_set_quotes_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_adjust()
- */
-extern void test__f_fss_set_quotes_adjust__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_set_quotes_decimate_by__returns_data_not(void **state) {
-
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- }
-}
-
-void test__f_fss_set_quotes_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quotes_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_decimate_by
-#define _TEST__F_fss__set_quotes_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_decimate_by()
- */
-extern void test__f_fss_set_quotes_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quotes_decimate_by()
- */
-extern void test__f_fss_set_quotes_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_decimate_by()
- */
-extern void test__f_fss_set_quotes_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_set_quotes_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quotes_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_set_quotes_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quotes_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_decrease_by
-#define _TEST__F_fss__set_quotes_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_decrease_by()
- */
-extern void test__f_fss_set_quotes_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quotes_decrease_by()
- */
-extern void test__f_fss_set_quotes_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_decrease_by()
- */
-extern void test__f_fss_set_quotes_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_set_quotes_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quotes_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_set_quotes_increase__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_set_quotes_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_increase
-#define _TEST__F_fss__set_quotes_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_increase()
- */
-extern void test__f_fss_set_quotes_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quotes_increase()
- */
-extern void test__f_fss_set_quotes_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_increase()
- */
-extern void test__f_fss_set_quotes_increase__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_set_quotes_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_set_quotes_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_set_quotes_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_set_quotes_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase by in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_increase_by
-#define _TEST__F_fss__set_quotes_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_increase_by()
- */
-extern void test__f_fss_set_quotes_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_set_quotes_increase_by()
- */
-extern void test__f_fss_set_quotes_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_increase_by()
- */
-extern void test__f_fss_set_quotes_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_quotes_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_quotes_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_set_quotes_resize__works(void **state) {
-
- const int length = 5;
- f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
-
- {
- const f_status_t status = f_fss_set_quotes_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote resize in the fss project.
- */
-#ifndef _TEST__F_fss__set_quotes_resize
-#define _TEST__F_fss__set_quotes_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_quotes_resize()
- */
-extern void test__f_fss_set_quotes_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_quotes_resize()
- */
-extern void test__f_fss_set_quotes_resize__works(void **state);
-
-#endif // _TEST__F_fss__set_quotes_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-set_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_set_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, 0);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, 0);
- }
-
- assert_null(data.objects.array);
- assert_null(data.contents.array);
-}
-
-void test__f_fss_set_resize__works(void **state) {
-
- const int length = 5;
- f_fss_set_t data = f_fss_set_t_initialize;
-
- {
- const f_status_t status = f_fss_set_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.objects.used, 0);
- assert_int_equal(data.objects.size, length);
- assert_int_equal(data.contents.used, 0);
- assert_int_equal(data.contents.size, length);
- }
-
- free((void *) data.objects.array);
- free((void *) data.contents.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set resize in the fss project.
- */
-#ifndef _TEST__F_fss__set_resize
-#define _TEST__F_fss__set_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_set_resize()
- */
-extern void test__f_fss_set_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_set_resize()
- */
-extern void test__f_fss_set_resize__works(void **state);
-
-#endif // _TEST__F_fss__set_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_sets_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets adjust in the fss project.
- */
-#ifndef _TEST__F_fss__sets_adjust
-#define _TEST__F_fss__sets_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_adjust()
- */
-extern void test__f_fss_sets_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_adjust()
- */
-extern void test__f_fss_sets_adjust__works(void **state);
-
-#endif // _TEST__F_fss__sets_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_sets_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_sets_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__sets_decimate_by
-#define _TEST__F_fss__sets_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_decimate_by()
- */
-extern void test__f_fss_sets_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_sets_decimate_by()
- */
-extern void test__f_fss_sets_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_decimate_by()
- */
-extern void test__f_fss_sets_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__sets_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_sets_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_sets_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__sets_decrease_by
-#define _TEST__F_fss__sets_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_decrease_by()
- */
-extern void test__f_fss_sets_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_sets_decrease_by()
- */
-extern void test__f_fss_sets_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_decrease_by()
- */
-extern void test__f_fss_sets_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__sets_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_sets_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_sets_increase__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_sets_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets increase in the fss project.
- */
-#ifndef _TEST__F_fss__sets_increase
-#define _TEST__F_fss__sets_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_increase()
- */
-extern void test__f_fss_sets_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_sets_increase()
- */
-extern void test__f_fss_sets_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_increase()
- */
-extern void test__f_fss_sets_increase__works(void **state);
-
-#endif // _TEST__F_fss__sets_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_sets_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_sets_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_sets_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_sets_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets increase by in the fss project.
- */
-#ifndef _TEST__F_fss__sets_increase_by
-#define _TEST__F_fss__sets_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_increase_by()
- */
-extern void test__f_fss_sets_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_sets_increase_by()
- */
-extern void test__f_fss_sets_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_increase_by()
- */
-extern void test__f_fss_sets_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__sets_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-sets_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_sets_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_sets_resize__works(void **state) {
-
- const int length = 5;
- f_fss_sets_t data = f_fss_sets_t_initialize;
-
- {
- const f_status_t status = f_fss_sets_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test sets resize by in the fss project.
- */
-#ifndef _TEST__F_fss__sets_resize
-#define _TEST__F_fss__sets_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_sets_resize()
- */
-extern void test__f_fss_sets_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_sets_resize()
- */
-extern void test__f_fss_sets_resize__works(void **state);
-
-#endif // _TEST__F_fss__sets_resize
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_adjust__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote adjust in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_adjust
-#define _TEST__F_fss__simple_packet_range_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_adjust()
- */
-extern void test__f_fss_simple_packet_ranges_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_adjust()
- */
-extern void test__f_fss_simple_packet_ranges_adjust__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_adjust
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_simple_packet_ranges_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decimate by in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_decimate_by
-#define _TEST__F_fss__simple_packet_range_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_decimate_by()
- */
-extern void test__f_fss_simple_packet_ranges_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_simple_packet_ranges_decimate_by()
- */
-extern void test__f_fss_simple_packet_ranges_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_decimate_by()
- */
-extern void test__f_fss_simple_packet_ranges_decimate_by__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_decimate_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_simple_packet_ranges_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote decrease by in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_decrease_by
-#define _TEST__F_fss__simple_packet_range_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_decrease_by()
- */
-extern void test__f_fss_simple_packet_ranges_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_simple_packet_ranges_decrease_by()
- */
-extern void test__f_fss_simple_packet_ranges_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_decrease_by()
- */
-extern void test__f_fss_simple_packet_ranges_decrease_by__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_decrease_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_simple_packet_ranges_increase__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_simple_packet_ranges_increase(1, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length + 1);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_increase
-#define _TEST__F_fss__simple_packet_range_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_increase()
- */
-extern void test__f_fss_simple_packet_ranges_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_simple_packet_ranges_increase()
- */
-extern void test__f_fss_simple_packet_ranges_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_increase()
- */
-extern void test__f_fss_simple_packet_ranges_increase__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_increase
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_fss_simple_packet_ranges_increase_by__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fss_simple_packet_ranges_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote increase by in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_increase_by
-#define _TEST__F_fss__simple_packet_range_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_increase_by()
- */
-extern void test__f_fss_simple_packet_ranges_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fss_simple_packet_ranges_increase_by()
- */
-extern void test__f_fss_simple_packet_ranges_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_increase_by()
- */
-extern void test__f_fss_simple_packet_ranges_increase_by__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_increase_by
+++ /dev/null
-#include "test-fss.h"
-#include "test-fss-simple_packet_ranges_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_fss_simple_packet_ranges_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_fss_simple_packet_ranges_resize__works(void **state) {
-
- const int length = 5;
- f_fss_simple_packet_ranges_t data = f_fss_simple_packet_ranges_t_initialize;
-
- {
- const f_status_t status = f_fss_simple_packet_ranges_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test set quote resize in the fss project.
- */
-#ifndef _TEST__F_fss__simple_packet_range_resize
-#define _TEST__F_fss__simple_packet_range_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fss_simple_packet_ranges_resize()
- */
-extern void test__f_fss_simple_packet_ranges_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fss_simple_packet_ranges_resize()
- */
-extern void test__f_fss_simple_packet_ranges_resize__works(void **state);
-
-#endif // _TEST__F_fss__simple_packet_range_resize
cmocka_unit_test(test__f_fss_fail_utf__works_for_no_error),
cmocka_unit_test(test__f_fss_fail_utf_to_false__works_for_no_error),
- cmocka_unit_test(test__f_fss_items_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_items_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_items_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_items_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_named_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_named_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_named_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_named_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_nameds_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nameds_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nameds_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_nameds_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_nest_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nest_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nest_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_nest_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_nests_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nests_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_nests_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_nests_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_set_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_set_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_set_quote_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quote_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quote_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quote_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_set_quotes_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quotes_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quotes_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_set_quotes_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_sets_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_sets_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_sets_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_sets_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_fss_simple_packet_ranges_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_increase__returns_data_not),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_increase_by__returns_data_not),
-
#ifndef _di_level_0_parameter_checking_
cmocka_unit_test(test__f_fss_apply_delimit__parameter_checking),
cmocka_unit_test(test__f_fss_apply_delimit_range__parameter_checking),
cmocka_unit_test(test__f_fss_seek_to_eol__parameter_checking),
cmocka_unit_test(test__f_fss_skip_past_delimit__parameter_checking),
cmocka_unit_test(test__f_fss_skip_past_space__parameter_checking),
-
- cmocka_unit_test(test__f_fss_items_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_items_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_items_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_items_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_items_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_items_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_named_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_named_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_named_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_named_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_named_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_named_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_nameds_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_nameds_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nameds_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nameds_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_nameds_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nameds_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_nest_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_nest_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nest_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nest_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_nest_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nest_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_nests_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_nests_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nests_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nests_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_nests_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_nests_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_set_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_set_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_set_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_set_quote_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quote_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quote_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quote_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quote_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quote_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_set_quotes_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quotes_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quotes_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quotes_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quotes_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_set_quotes_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_sets_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_sets_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_sets_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_sets_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_sets_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_sets_resize__parameter_checking),
-
- cmocka_unit_test(test__f_fss_simple_packet_ranges_adjust__parameter_checking),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_increase__parameter_checking),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_increase_by__parameter_checking),
- cmocka_unit_test(test__f_fss_simple_packet_ranges_resize__parameter_checking),
#endif // _di_level_0_parameter_checking_
};
#include "test-fss-is_graph.h"
#include "test-fss-is_space.h"
#include "test-fss-is_zero_width.h"
-#include "test-fss-items_adjust.h"
-#include "test-fss-items_decimate_by.h"
-#include "test-fss-items_decrease_by.h"
-#include "test-fss-items_increase.h"
-#include "test-fss-items_increase_by.h"
-#include "test-fss-items_resize.h"
-#include "test-fss-named_adjust.h"
-#include "test-fss-named_decimate_by.h"
-#include "test-fss-named_decrease_by.h"
-#include "test-fss-named_increase.h"
-#include "test-fss-named_increase_by.h"
-#include "test-fss-named_resize.h"
-#include "test-fss-nameds_adjust.h"
-#include "test-fss-nameds_decimate_by.h"
-#include "test-fss-nameds_decrease_by.h"
-#include "test-fss-nameds_increase.h"
-#include "test-fss-nameds_increase_by.h"
-#include "test-fss-nameds_resize.h"
-#include "test-fss-nest_adjust.h"
-#include "test-fss-nest_decimate_by.h"
-#include "test-fss-nest_decrease_by.h"
-#include "test-fss-nest_increase.h"
-#include "test-fss-nest_increase_by.h"
-#include "test-fss-nest_resize.h"
-#include "test-fss-nests_adjust.h"
-#include "test-fss-nests_decimate_by.h"
-#include "test-fss-nests_decrease_by.h"
-#include "test-fss-nests_increase.h"
-#include "test-fss-nests_increase_by.h"
-#include "test-fss-nests_resize.h"
+//#include "test-fss-items_destroy_callback.h"
+//#include "test-fss-items_delete_callback.h"
+//#include "test-fss-named_destroy_callback.h"
+//#include "test-fss-named_delete_callback.h"
+//#include "test-fss-nameds_destroy_callback.h"
+//#include "test-fss-nameds_delete_callback.h"
+//#include "test-fss-nest_destroy_callback.h"
+//#include "test-fss-nest_delete_callback.h"
+//#include "test-fss-nests_destroy_callback.h"
+//#include "test-fss-nests_delete_callback.h"
#include "test-fss-seek_to_eol.h"
-#include "test-fss-set_adjust.h"
-#include "test-fss-set_decimate_by.h"
-#include "test-fss-set_decrease_by.h"
-#include "test-fss-set_increase.h"
-#include "test-fss-set_increase_by.h"
-#include "test-fss-set_resize.h"
-#include "test-fss-set_quote_adjust.h"
-#include "test-fss-set_quote_decimate_by.h"
-#include "test-fss-set_quote_decrease_by.h"
-#include "test-fss-set_quote_increase.h"
-#include "test-fss-set_quote_increase_by.h"
-#include "test-fss-set_quote_resize.h"
-#include "test-fss-set_quotes_adjust.h"
-#include "test-fss-set_quotes_decimate_by.h"
-#include "test-fss-set_quotes_decrease_by.h"
-#include "test-fss-set_quotes_increase.h"
-#include "test-fss-set_quotes_increase_by.h"
-#include "test-fss-set_quotes_resize.h"
-#include "test-fss-sets_adjust.h"
-#include "test-fss-sets_decimate_by.h"
-#include "test-fss-sets_decrease_by.h"
-#include "test-fss-sets_increase.h"
-#include "test-fss-sets_increase_by.h"
-#include "test-fss-sets_resize.h"
-#include "test-fss-simple_packet_ranges_adjust.h"
-#include "test-fss-simple_packet_ranges_decimate_by.h"
-#include "test-fss-simple_packet_ranges_decrease_by.h"
-#include "test-fss-simple_packet_ranges_increase.h"
-#include "test-fss-simple_packet_ranges_increase_by.h"
-#include "test-fss-simple_packet_ranges_resize.h"
+//#include "test-fss-set_destroy_callback.h"
+//#include "test-fss-set_delete_callback.h"
+//#include "test-fss-set_quote_destroy_callback.h"
+//#include "test-fss-set_quote_delete_callback.h"
+//#include "test-fss-set_quotes_destroy_callback.h"
+//#include "test-fss-set_quotes_delete_callback.h"
+//#include "test-fss-sets_destroy_callback.h"
+//#include "test-fss-sets_delete_callback.h"
+//#include "test-fss-simple_packet_ranges_destroy_callback.h"
+//#include "test-fss-simple_packet_ranges_delete_callback.h"
#include "test-fss-skip_past_delimit.h"
#include "test-fss-skip_past_space.h"
if (!data) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = f_string_ranges_resize(0, &data->content);
- if (F_status_is_error(status)) return status;
+ {
+ f_status_t status = f_string_ranges_resize(0, &data->content);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
+ if (F_status_is_error(status)) return status;
- status = f_string_ranges_resize(0, &data->variable);
- if (F_status_is_error(status)) return status;
+ status = f_string_ranges_resize(0, &data->variable);
+ if (F_status_is_error(status)) return status;
- status = f_string_ranges_resize(0, &data->vocabulary);
- if (F_status_is_error(status)) return status;
+ status = f_string_ranges_resize(0, &data->vocabulary);
+ if (F_status_is_error(status)) return status;
+ }
return F_none;
}
if (!data) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = f_string_ranges_adjust(0, &data->content);
- if (F_status_is_error(status)) return status;
-
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
- if (F_status_is_error(status)) return status;
-
- status = f_string_ranges_adjust(0, &data->variable);
- if (F_status_is_error(status)) return status;
-
- status = f_string_ranges_adjust(0, &data->vocabulary);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // _di_f_iki_data_destroy_
-
-#ifndef _di_f_iki_datas_adjust_callback_
- f_status_t f_iki_datas_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
-
{
- f_iki_datas_t * const array = (f_iki_datas_t *) void_array;
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = start; i < stop; ++i) {
-
- status = f_string_ranges_adjust(0, &array->array[i].content);
- if (F_status_is_error(status)) return status;
+ f_status_t status = f_string_ranges_adjust(0, &data->content);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array->array[i].delimits.array, &array->array[i].delimits.used, &array->array[i].delimits.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
+ if (F_status_is_error(status)) return status;
- status = f_string_ranges_adjust(0, &array->array[i].variable);
- if (F_status_is_error(status)) return status;
+ status = f_string_ranges_adjust(0, &data->variable);
+ if (F_status_is_error(status)) return status;
- status = f_string_ranges_adjust(0, &array->array[i].vocabulary);
- if (F_status_is_error(status)) return status;
- } // for
+ status = f_string_ranges_adjust(0, &data->vocabulary);
+ if (F_status_is_error(status)) return status;
}
return F_none;
}
-#endif // _di_f_iki_datas_adjust_callback_
+#endif // _di_f_iki_data_destroy_
#ifndef _di_f_iki_datas_append_
f_status_t f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination) {
}
#endif // _di_f_iki_datas_append_all_
-#ifndef _di_f_iki_datas_resize_callback_
- f_status_t f_iki_datas_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_iki_datas_delete_callback_
+ f_status_t f_iki_datas_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_iki_datas_t * const array = (f_iki_datas_t *) void_array;
+ f_iki_data_t * const array = (f_iki_data_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ status = f_string_ranges_resize(0, &array[i].content);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array[i].delimits.array, &array[i].delimits.used, &array[i].delimits.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_resize(0, &array[i].variable);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_resize(0, &array[i].vocabulary);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_iki_datas_delete_callback_
+
+#ifndef _di_f_iki_datas_destroy_callback_
+ f_status_t f_iki_datas_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_iki_data_t * const array = (f_iki_data_t *) void_array;
f_status_t status = F_none;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_string_ranges_resize(0, &array->array[i].content);
+ status = f_string_ranges_adjust(0, &array[i].content);
if (F_status_is_error(status)) return status;
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array->array[i].delimits.array, &array->array[i].delimits.used, &array->array[i].delimits.size);
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array[i].delimits.array, &array[i].delimits.used, &array[i].delimits.size);
if (F_status_is_error(status)) return status;
- status = f_string_ranges_resize(0, &array->array[i].variable);
+ status = f_string_ranges_adjust(0, &array[i].variable);
if (F_status_is_error(status)) return status;
- status = f_string_ranges_resize(0, &array->array[i].vocabulary);
+ status = f_string_ranges_adjust(0, &array[i].vocabulary);
if (F_status_is_error(status)) return status;
} // for
}
return F_none;
}
-#endif // _di_f_iki_datas_resize_callback_
+#endif // _di_f_iki_datas_destroy_callback_
#ifndef _di_f_iki_datass_append_
f_status_t f_iki_datass_append(const f_iki_datas_t source, f_iki_datass_t *destination) {
}
#endif // _di_f_iki_datass_append_all_
+#ifndef _di_f_iki_datass_delete_callback_
+ f_status_t f_iki_datass_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_iki_datas_t * const array = (f_iki_datas_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_ranges_resize(0, &array[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array[i].array[j].delimits.array, &array[i].array[j].delimits.used, &array[i].array[j].delimits.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_resize(0, &array[i].array[j].variable);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_resize(0, &array[i].array[j].vocabulary);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_iki_data_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_iki_datass_delete_callback_
+
+#ifndef _di_f_iki_datass_destroy_callback_
+ f_status_t f_iki_datass_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_iki_datas_t * const array = (f_iki_datas_t *) void_array;
+ f_status_t status = F_none;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ status = f_string_ranges_adjust(0, &array[i].array[j].content);
+ if (F_status_is_error(status)) return status;
+
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array[i].array[j].delimits.array, &array[i].array[j].delimits.used, &array[i].array[j].delimits.size);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_adjust(0, &array[i].array[j].variable);
+ if (F_status_is_error(status)) return status;
+
+ status = f_string_ranges_adjust(0, &array[i].array[j].vocabulary);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_iki_data_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_iki_datass_destroy_callback_
+
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _di_f_iki_data_destroy_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_iki_datass_t structure.
- *
- * This does not do parameter checking.
- *
- * @param start
- * The inclusive start position in the array to start deleting.
- * @param stop
- * The exclusive stop position in the array to stop deleting.
- * @param array
- * The array structure to delete all values of.
- * Must not be NULL.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
- */
-#ifndef _di_f_iki_datas_adjust_callback_
- extern f_status_t f_iki_datas_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_iki_datas_adjust_callback_
-
-/**
* Append the single source iki_data onto the destination.
*
* @param source
#endif // _di_f_iki_datas_append_all_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_iki_datass_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_iki_datas_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_iki_datas_resize_callback_
- extern f_status_t f_iki_datas_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_iki_datas_resize_callback_
+#ifndef _di_f_iki_datas_delete_callback_
+ extern f_status_t f_iki_datas_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_iki_datas_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_iki_datas_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_iki_datas_destroy_callback_
+ extern f_status_t f_iki_datas_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_iki_datas_destroy_callback_
/**
* Append the single source iki_datas onto the destination.
extern f_status_t f_iki_datass_append_all(const f_iki_datass_t source, f_iki_datass_t *destination);
#endif // _di_f_iki_datass_append_all_
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_iki_datass_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_iki_datass_delete_callback_
+ extern f_status_t f_iki_datass_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_iki_datass_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_iki_datass_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_iki_datass_destroy_callback_
+ extern f_status_t f_iki_datass_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_iki_datass_destroy_callback_
+
#ifdef __cplusplus
} // extern "C"
#endif
build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_iki
build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c
-build_sources_program test-iki-datas_adjust_callback.c test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datas_resize_callback.c test-iki-datass_append.c test-iki-datass_append_all.c
+build_sources_program test-iki-datas_destroy_callback.c test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datas_delete_callback.c test-iki-datass_append.c test-iki-datass_append_all.c
build_sources_program test-iki.c
build_script no
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: IKI
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_iki__datas_adjust_callback
-#define _TEST__F_iki__datas_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_iki_datas_adjust_callback()
- */
-extern void test__f_iki_datas_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_iki_datas_adjust_callback()
- */
-extern void test__f_iki_datas_adjust_callback__works(void **state);
-
-#endif // _TEST__F_iki__datas_adjust_callback
#include "test-iki.h"
-#include "test-iki-datas_resize_callback.h"
+#include "test-iki-datas_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_iki_datas_resize_callback__fails(void **state) {
+void test__f_iki_datas_delete_callback__fails(void **state) {
mock_unwrap = 0;
will_return(__wrap_f_string_ranges_resize, true);
will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_ranges_resize, true);
will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_ranges_resize, true);
will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_iki_datas_resize_callback__works(void **state) {
+void test__f_iki_datas_delete_callback__works(void **state) {
mock_unwrap = 0;
will_return(__wrap_f_string_ranges_resize, false);
will_return(__wrap_f_string_ranges_resize, F_none);
- const f_status_t status = f_iki_datas_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_iki_datas_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: IKI
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki__datas_delete_callback
+#define _TEST__F_iki__datas_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_iki_datas_delete_callback()
+ */
+extern void test__f_iki_datas_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_delete_callback()
+ */
+extern void test__f_iki_datas_delete_callback__works(void **state);
+
+#endif // _TEST__F_iki__datas_delete_callback
#include "test-iki.h"
-#include "test-iki-datas_adjust_callback.h"
+#include "test-iki-datas_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_iki_datas_adjust_callback__fails(void **state) {
+void test__f_iki_datas_destroy_callback__fails(void **state) {
mock_unwrap = 0;
will_return(__wrap_f_string_ranges_adjust, true);
will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_ranges_adjust, true);
will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
will_return(__wrap_f_string_ranges_adjust, true);
will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_iki_datas_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_iki_datas_adjust_callback__works(void **state) {
+void test__f_iki_datas_destroy_callback__works(void **state) {
mock_unwrap = 0;
will_return(__wrap_f_string_ranges_adjust, false);
will_return(__wrap_f_string_ranges_adjust, F_none);
- const f_status_t status = f_iki_datas_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_iki_datas_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: IKI
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki__datas_destroy_callback
+#define _TEST__F_iki__datas_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_iki_datas_destroy_callback()
+ */
+extern void test__f_iki_datas_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_destroy_callback()
+ */
+extern void test__f_iki_datas_destroy_callback__works(void **state);
+
+#endif // _TEST__F_iki__datas_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: IKI
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_iki__datas_resize_callback
-#define _TEST__F_iki__datas_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_iki_datas_resize_callback()
- */
-extern void test__f_iki_datas_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_iki_datas_resize_callback()
- */
-extern void test__f_iki_datas_resize_callback__works(void **state);
-
-#endif // _TEST__F_iki__datas_resize_callback
f_iki_datass_t destination = f_iki_datass_t_initialize;
{
- f_status_t status = f_memory_arrays_resize(length_outer, sizeof(f_iki_data_t), (void **) &source.array, &source.used, &source.size, &f_iki_datas_resize_callback);
+ f_status_t status = f_memory_arrays_resize(length_outer, sizeof(f_iki_data_t), (void **) &source.array, &source.used, &source.size, &f_iki_datas_delete_callback);
assert_int_equal(status, F_none);
assert_int_equal(source.size, length_outer);
f_iki_datass_t destination = f_iki_datass_t_initialize;
{
- const f_status_t status = f_memory_arrays_resize(length, sizeof(f_iki_data_t), (void **) &source.array, &source.used, &source.size, &f_iki_datas_resize_callback);
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(f_iki_data_t), (void **) &source.array, &source.used, &source.size, &f_iki_datas_delete_callback);
assert_int_equal(status, F_none);
assert_int_equal(source.used, 0);
cmocka_unit_test(test__f_iki_content_partial_is__returns_false),
cmocka_unit_test(test__f_iki_content_partial_is__returns_true),
- cmocka_unit_test(test__f_iki_datas_adjust_callback__fails),
- cmocka_unit_test(test__f_iki_datas_resize_callback__fails),
+ cmocka_unit_test(test__f_iki_datas_destroy_callback__fails),
+ cmocka_unit_test(test__f_iki_datas_delete_callback__fails),
- cmocka_unit_test(test__f_iki_datas_adjust_callback__works),
- cmocka_unit_test(test__f_iki_datas_resize_callback__works),
+ cmocka_unit_test(test__f_iki_datas_destroy_callback__works),
+ cmocka_unit_test(test__f_iki_datas_delete_callback__works),
cmocka_unit_test(test__f_iki_datas_append__works),
cmocka_unit_test(test__f_iki_datas_append_all__works),
cmocka_unit_test(test__f_iki_content_is__parameter_checking),
cmocka_unit_test(test__f_iki_content_partial_is__parameter_checking),
- // f_iki_datas_adjust_callback() doesn't use parameter checking.
- // f_iki_datas_resize_callback() doesn't use parameter checking.
+ // f_iki_datas_destroy_callback() doesn't use parameter checking.
+ // f_iki_datas_delete_callback() doesn't use parameter checking.
cmocka_unit_test(test__f_iki_datas_append__parameter_checking),
cmocka_unit_test(test__f_iki_datas_append_all__parameter_checking),
// Test includes.
#include "test-iki-content_is.h"
#include "test-iki-content_partial_is.h"
-#include "test-iki-datas_adjust_callback.h"
+#include "test-iki-datas_destroy_callback.h"
#include "test-iki-datas_append.h"
#include "test-iki-datas_append_all.h"
-#include "test-iki-datas_resize_callback.h"
+#include "test-iki-datas_delete_callback.h"
#include "test-iki-datass_append.h"
#include "test-iki-datass_append_all.h"
#include "test-iki-object_is.h"
* @param callback
* A callback to call on each array value when reducing the length of the array.
* This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ * This callback is intended to be used for deleting data and does not get called when adding new data.
*
* This is only called when the requested length is less than the given size.
*
* @param callback
* A callback to call on each array value when reducing the length of the array.
* This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ * This callback is intended to be used for deleting data and does not get called when adding new data.
*
* This is only called when the requested length is less than the given size.
*
--- /dev/null
+#include "../memory.h"
+#include "private-array.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_memory_arrayss_adjust_
+ f_status_t f_memory_arrayss_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*destroy_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!width) return F_status_set_error(F_parameter);
+ if (!array) return F_status_set_error(F_parameter);
+ if (!used) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
+ if (!destroy_callback) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ if (length < *size) {
+ const f_status_t status = destroy_callback(length, *size, *array);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_memory_array_adjust(length, width, array, used, size);
+ }
+#endif // _di_f_memory_arrayss_adjust_
+
+#ifndef _di_f_memory_arrayss_resize_
+ f_status_t f_memory_arrayss_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*delete_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!width) return F_status_set_error(F_parameter);
+ if (!array) return F_status_set_error(F_parameter);
+ if (!used) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
+ if (!delete_callback) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ if (length < *size) {
+ const f_status_t status = delete_callback(length, *size, *array);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_memory_array_resize(length, width, array, used, size);
+ }
+#endif // _di_f_memory_arrayss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines memory array data.
+ *
+ * This is auto-included by memory.h and should not need to be explicitly included.
+ */
+#ifndef _F_memory_arrayss_h
+#define _F_memory_arrayss_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the memory array of arrays of arrays.
+ *
+ * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
+ * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
+ *
+ * The inner array can be a more complex structure because the callback is expected to know the type.
+ *
+ * @param length
+ * The new size to use.
+ * @param width
+ * The size of the structure represented by array.
+ * The word "width" is used due to conflicts of already using "length" and "size".
+ * Must not be 0.
+ * @param array
+ * The structure.array to resize.
+ * @param used
+ * The structure.used.
+ * @param size
+ * The structure.size.
+ * @param destroy_callback
+ * A callback to call on each array value when reducing the length of the array.
+ * This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ * This callback is intended to be used for deleting data and does not get called when adding new data.
+ *
+ * This is only called when the requested length is less than the given size.
+ *
+ * Callback Parameters:
+ * - start: The start position in the array to start deleting.
+ * - stop: The stop in the array to stop deleting.
+ * - array: The array structure to delete all values of.
+ *
+ * Callback Returns:
+ * The standard status codes similar to this function.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_memory_arrayss_adjust_
+ extern f_status_t f_memory_arrayss_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*destroy_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+#endif // _di_f_memory_arrayss_adjust_
+
+/**
+ * Resize the memory array of arrays of arrays.
+ *
+ * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
+ * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
+ *
+ * The inner array can be a more complex structure because the callback is expected to know the type.
+ *
+ * @param length
+ * The new size to use.
+ * @param width
+ * The size of the structure represented by array.
+ * The word "width" is used due to conflicts of already using "length" and "size".
+ * Must not be 0.
+ * @param array
+ * The structure.array to resize.
+ * @param used
+ * The structure.used.
+ * @param size
+ * The structure.size.
+ * @param delete_callback
+ * A callback to call on each array value when reducing the length of the array.
+ * This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ * This callback is intended to be used for deleting data and does not get called when adding new data.
+ *
+ * This is only called when the requested length is less than the given size.
+ *
+ * Callback Parameters:
+ * - start: The start position in the array to start deleting.
+ * - stop: The stop in the array to stop deleting.
+ * - array: The array structure to delete all values of.
+ *
+ * Callback Returns:
+ * The standard status codes similar to this function.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_memory_arrayss_resize_
+ extern f_status_t f_memory_arrayss_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*delete_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+#endif // _di_f_memory_arrayss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_memory_arrayss_h
build_libraries -lc
-build_sources_library memory.c memory/array.c memory/arrays.c
+build_sources_library memory.c memory/array.c memory/arrays.c memory/arrayss.c
build_sources_library private-memory.c memory/private-array.c
-build_sources_headers memory.h memory/array.h memory/arrays.h memory/common.h
+build_sources_headers memory.h memory/array.h memory/arrays.h memory/arrayss.h memory/common.h
build_script yes
build_shared yes
build_sources_program test-memory-adjust.c test-memory-delete.c test-memory-destroy.c test-memory-new_aligned.c test-memory-new.c test-memory-resize.c test-memory.c
build_sources_program test-memory-array_adjust.c test-memory-array_append.c test-memory-array_append_all.c test-memory-array_decimate_by.c test-memory-array_decrease_by.c test-memory-array_increase.c test-memory-array_increase_by.c test-memory-array_resize.c
build_sources_program test-memory-arrays_adjust.c test-memory-arrays_resize.c
+build_sources_program test-memory-arrayss_adjust.c test-memory-arrayss_resize.c
build_script no
build_shared yes
cmocka_unit_test(test__f_memory_arrays_adjust__returns_array_too_large),
cmocka_unit_test(test__f_memory_arrays_resize__returns_array_too_large),
+ cmocka_unit_test(test__f_memory_arrayss_adjust__returns_array_too_large),
+ cmocka_unit_test(test__f_memory_arrayss_resize__returns_array_too_large),
+
cmocka_unit_test(test__f_memory_array_append_all__returns_data_not),
cmocka_unit_test(test__f_memory_array_decimate_by__returns_data_not),
cmocka_unit_test(test__f_memory_array_decrease_by__returns_data_not),
cmocka_unit_test(test__f_memory_arrays_adjust__works),
cmocka_unit_test(test__f_memory_arrays_resize__works),
+ cmocka_unit_test(test__f_memory_arrayss_adjust__works),
+ cmocka_unit_test(test__f_memory_arrayss_resize__works),
+
#ifndef _di_level_0_parameter_checking_
cmocka_unit_test(test__f_memory_adjust__parameter_checking),
cmocka_unit_test(test__f_memory_delete__parameter_checking),
cmocka_unit_test(test__f_memory_arrays_adjust__parameter_checking),
cmocka_unit_test(test__f_memory_arrays_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_memory_arrayss_adjust__parameter_checking),
+ cmocka_unit_test(test__f_memory_arrayss_resize__parameter_checking),
#endif // _di_level_0_parameter_checking_
};
#include "test-memory-array_resize.h"
#include "test-memory-arrays_adjust.h"
#include "test-memory-arrays_resize.h"
+#include "test-memory-arrayss_adjust.h"
+#include "test-memory-arrayss_resize.h"
#include "test-memory-delete.h"
#include "test-memory-destroy.h"
#include "test-memory-new.h"
#define test_memory_arrays_t_initialize { 0, 0, 0 }
/**
+ * A structure used for testing the memory arrayss functions.
+ */
+typedef struct {
+ test_memory_arrays_t *array;
+ f_number_unsigned_t used;
+ f_number_unsigned_t size;
+} test_memory_arrayss_t;
+
+#define test_memory_arrayss_t_initialize { 0, 0, 0 }
+
+/**
* Perform any setup operations.
*
* @param state
extern "C" {
#endif
-#ifndef _di_f_thread_attributes_adjust_callback_
- f_status_t f_thread_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_attributes_delete_callback_
+ f_status_t f_thread_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_attribute_t * const array = (f_thread_attribute_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_attr_destroy(&array[i])) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_attributes_delete_callback_
+
+#ifndef _di_f_thread_attributes_destroy_callback_
+ f_status_t f_thread_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_attribute_t * const array = (f_thread_attribute_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_attr_destroy(&array[i])) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_attributes_destroy_callback_
+
+#ifndef _di_f_thread_attributess_delete_callback_
+ f_status_t f_thread_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_attributes_t * const array = (f_thread_attributes_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_attr_destroy(&array->array[i])) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_attr_destroy(&array[i].array[j])) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_attributes_adjust_callback_
+#endif // _di_f_thread_attributess_delete_callback_
-#ifndef _di_f_thread_attributes_resize_callback_
- f_status_t f_thread_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_attributess_destroy_callback_
+ f_status_t f_thread_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_attributes_t * const array = (f_thread_attributes_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_attr_destroy(&array->array[i])) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_attr_destroy(&array[i].array[j])) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_attributes_resize_callback_
+#endif // _di_f_thread_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_attributes_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_attributess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_attributes_delete_callback_
+ extern f_status_t f_thread_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_attributes_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_attributes_adjust_callback_
- extern f_status_t f_thread_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_attributes_adjust_callback_
+#ifndef _di_f_thread_attributes_destroy_callback_
+ extern f_status_t f_thread_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_attributes_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_attributess_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_attributes_resize_callback_
- extern f_status_t f_thread_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_attributes_resize_callback_
+#ifndef _di_f_thread_attributess_delete_callback_
+ extern f_status_t f_thread_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_attributess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_attributess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_attributess_destroy_callback_
+ extern f_status_t f_thread_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_barriers_adjust_callback_
- f_status_t f_thread_barriers_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_barriers_delete_callback_
+ f_status_t f_thread_barriers_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_barriers_t * const array = (f_thread_barriers_t *) void_array;
+ f_thread_barrier_t * const array = (f_thread_barrier_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_barrier_destroy(&array->array[i]);
+ error = pthread_barrier_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_barriers_adjust_callback_
+#endif // _di_f_thread_barriers_delete_callback_
-#ifndef _di_f_thread_barriers_resize_callback_
- f_status_t f_thread_barriers_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_barriers_destroy_callback_
+ f_status_t f_thread_barriers_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_barriers_t * const array = (f_thread_barriers_t *) void_array;
+ f_thread_barrier_t * const array = (f_thread_barrier_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_barrier_destroy(&array->array[i]);
+ error = pthread_barrier_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_barriers_resize_callback_
+#endif // _di_f_thread_barriers_destroy_callback_
+
+#ifndef _di_f_thread_barrierss_delete_callback_
+ f_status_t f_thread_barrierss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_barriers_t * const array = (f_thread_barriers_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_barrier_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_barrier_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_barrierss_delete_callback_
+
+#ifndef _di_f_thread_barrierss_destroy_callback_
+ f_status_t f_thread_barrierss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_barriers_t * const array = (f_thread_barriers_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_barrier_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_barrier_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_barrierss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_barriers_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barrierss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_barriers_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_barriers_delete_callback_
+ extern f_status_t f_thread_barriers_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barriers_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barriers_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_barriers_adjust_callback_
- extern f_status_t f_thread_barriers_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_barriers_adjust_callback_
+#ifndef _di_f_thread_barriers_destroy_callback_
+ extern f_status_t f_thread_barriers_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barriers_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_barrierss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_barriers_resize_callback_
- extern f_status_t f_thread_barriers_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_barriers_resize_callback_
+#ifndef _di_f_thread_barrierss_delete_callback_
+ extern f_status_t f_thread_barrierss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrierss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barrierss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_barrierss_destroy_callback_
+ extern f_status_t f_thread_barrierss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrierss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_barrier_attributes_adjust_callback_
- f_status_t f_thread_barrier_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_barrier_attributes_delete_callback_
+ f_status_t f_thread_barrier_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_barrier_attribute_t * const array = (f_thread_barrier_attribute_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_barrierattr_destroy(&array[i])) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_barrier_attributes_delete_callback_
+
+#ifndef _di_f_thread_barrier_attributes_destroy_callback_
+ f_status_t f_thread_barrier_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_barrier_attribute_t * const array = (f_thread_barrier_attribute_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_barrierattr_destroy(&array[i])) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_barrier_attributes_destroy_callback_
+
+#ifndef _di_f_thread_barrier_attributess_delete_callback_
+ f_status_t f_thread_barrier_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_barrier_attributes_t * const array = (f_thread_barrier_attributes_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_barrierattr_destroy(&array->array[i])) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_barrierattr_destroy(&array[i].array[j])) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_barrier_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_barrier_attributes_adjust_callback_
+#endif // _di_f_thread_barrier_attributess_delete_callback_
-#ifndef _di_f_thread_barrier_attributes_resize_callback_
- f_status_t f_thread_barrier_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_barrier_attributess_destroy_callback_
+ f_status_t f_thread_barrier_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_barrier_attributes_t * const array = (f_thread_barrier_attributes_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_barrierattr_destroy(&array->array[i])) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_barrierattr_destroy(&array[i].array[j])) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_barrier_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_barrier_attributes_resize_callback_
+#endif // _di_f_thread_barrier_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_barrier_attributes_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barrier_attributess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_barrier_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_barrier_attributes_delete_callback_
+ extern f_status_t f_thread_barrier_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrier_attributes_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barrier_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_barrier_attributes_adjust_callback_
- extern f_status_t f_thread_barrier_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_barrier_attributes_adjust_callback_
+#ifndef _di_f_thread_barrier_attributes_destroy_callback_
+ extern f_status_t f_thread_barrier_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrier_attributes_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_barrier_attributess_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_barrier_attributes_resize_callback_
- extern f_status_t f_thread_barrier_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_barrier_attributes_resize_callback_
+#ifndef _di_f_thread_barrier_attributess_delete_callback_
+ extern f_status_t f_thread_barrier_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrier_attributess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_barrier_attributess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_barrier_attributess_destroy_callback_
+ extern f_status_t f_thread_barrier_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_barrier_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_conditions_adjust_callback_
- f_status_t f_thread_conditions_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_conditions_delete_callback_
+ f_status_t f_thread_conditions_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_conditions_t * const array = (f_thread_conditions_t *) void_array;
+ f_thread_condition_t * const array = (f_thread_condition_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_cond_destroy(&array->array[i]);
+ error = pthread_cond_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_conditions_adjust_callback_
+#endif // _di_f_thread_conditions_delete_callback_
-#ifndef _di_f_thread_conditions_resize_callback_
- f_status_t f_thread_conditions_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_conditions_destroy_callback_
+ f_status_t f_thread_conditions_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_conditions_t * const array = (f_thread_conditions_t *) void_array;
+ f_thread_condition_t * const array = (f_thread_condition_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_cond_destroy(&array->array[i]);
+ error = pthread_cond_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_conditions_resize_callback_
+#endif // _di_f_thread_conditions_destroy_callback_
+
+#ifndef _di_f_thread_conditionss_delete_callback_
+ f_status_t f_thread_conditionss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_conditions_t * const array = (f_thread_conditions_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_cond_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_condition_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_conditionss_delete_callback_
+
+#ifndef _di_f_thread_conditionss_destroy_callback_
+ f_status_t f_thread_conditionss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_conditions_t * const array = (f_thread_conditions_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_cond_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_condition_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_conditionss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_conditions_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_conditionss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_conditions_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_conditions_delete_callback_
+ extern f_status_t f_thread_conditions_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_conditions_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_conditions_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_conditions_adjust_callback_
- extern f_status_t f_thread_conditions_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_conditions_adjust_callback_
+#ifndef _di_f_thread_conditions_destroy_callback_
+ extern f_status_t f_thread_conditions_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_conditions_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_conditionss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_conditions_resize_callback_
- extern f_status_t f_thread_conditions_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_conditions_resize_callback_
+#ifndef _di_f_thread_conditionss_delete_callback_
+ extern f_status_t f_thread_conditionss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_conditionss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_conditionss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_conditionss_destroy_callback_
+ extern f_status_t f_thread_conditionss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_conditionss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_condition_attributes_adjust_callback_
- f_status_t f_thread_condition_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_condition_attributes_delete_callback_
+ f_status_t f_thread_condition_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_condition_attributes_t * const array = (f_thread_condition_attributes_t *) void_array;
+ f_thread_condition_attribute_t * const array = (f_thread_condition_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_condattr_destroy(&array->array[i]);
+ error = pthread_condattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_condition_attributes_adjust_callback_
+#endif // _di_f_thread_condition_attributes_delete_callback_
-#ifndef _di_f_thread_condition_attributes_resize_callback_
- f_status_t f_thread_condition_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_condition_attributes_destroy_callback_
+ f_status_t f_thread_condition_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_condition_attributes_t * const array = (f_thread_condition_attributes_t *) void_array;
+ f_thread_condition_attribute_t * const array = (f_thread_condition_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_condattr_destroy(&array->array[i]);
+ error = pthread_condattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_condition_attributes_resize_callback_
+#endif // _di_f_thread_condition_attributes_destroy_callback_
+
+#ifndef _di_f_thread_condition_attributess_delete_callback_
+ f_status_t f_thread_condition_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_condition_attributes_t * const array = (f_thread_condition_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_condattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_condition_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_condition_attributess_delete_callback_
+
+#ifndef _di_f_thread_condition_attributess_destroy_callback_
+ f_status_t f_thread_condition_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_condition_attributes_t * const array = (f_thread_condition_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_condattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_condition_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_condition_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_condition_attributes_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_condition_attributess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_condition_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_condition_attributes_delete_callback_
+ extern f_status_t f_thread_condition_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_condition_attributes_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_condition_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_condition_attributes_adjust_callback_
- extern f_status_t f_thread_condition_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_condition_attributes_adjust_callback_
+#ifndef _di_f_thread_condition_attributes_destroy_callback_
+ extern f_status_t f_thread_condition_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_condition_attributes_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_condition_attributess_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_condition_attributes_resize_callback_
- extern f_status_t f_thread_condition_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_condition_attributes_resize_callback_
+#ifndef _di_f_thread_condition_attributess_delete_callback_
+ extern f_status_t f_thread_condition_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_condition_attributess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_condition_attributess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_condition_attributess_destroy_callback_
+ extern f_status_t f_thread_condition_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_condition_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_keys_adjust_callback_
- f_status_t f_thread_keys_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_keys_delete_callback_
+ f_status_t f_thread_keys_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_key_t * const array = (f_thread_key_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ if (pthread_key_delete(array[i])) return F_status_set_error(F_failure);
+
+ array[i] = 0;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_keys_delete_callback_
+
+#ifndef _di_f_thread_keys_destroy_callback_
+ f_status_t f_thread_keys_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_key_t * const array = (f_thread_key_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ if (pthread_key_delete(array[i])) return F_status_set_error(F_failure);
+
+ array[i] = 0;
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_keys_destroy_callback_
+
+#ifndef _di_f_thread_keyss_delete_callback_
+ f_status_t f_thread_keyss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_keys_t * const array = (f_thread_keys_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_key_delete(array->array[i])) return F_status_set_error(F_failure);
+ for (j = 0; j < array[i].size; ++j) {
+
+ if (pthread_key_delete(array[i].array[j])) return F_status_set_error(F_failure);
- array->array[i] = 0;
+ array[i].array[j] = 0;
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_key_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_keys_adjust_callback_
+#endif // _di_f_thread_keyss_delete_callback_
-#ifndef _di_f_thread_keys_resize_callback_
- f_status_t f_thread_keys_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_keyss_destroy_callback_
+ f_status_t f_thread_keyss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_keys_t * const array = (f_thread_keys_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_key_delete(array->array[i])) return F_status_set_error(F_failure);
+ for (j = 0; j < array[i].size; ++j) {
+
+ if (pthread_key_delete(array[i].array[j])) return F_status_set_error(F_failure);
+
+ array[i].array[j] = 0;
+ } // for
- array->array[i] = 0;
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_key_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_keys_resize_callback_
+#endif // _di_f_thread_keyss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_keys_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_keyss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_keys_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_keys_delete_callback_
+ extern f_status_t f_thread_keys_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_keys_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_keys_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_keys_adjust_callback_
- extern f_status_t f_thread_keys_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_keys_adjust_callback_
+#ifndef _di_f_thread_keys_destroy_callback_
+ extern f_status_t f_thread_keys_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_keys_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_keyss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_keys_resize_callback_
- extern f_status_t f_thread_keys_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_keys_resize_callback_
+#ifndef _di_f_thread_keyss_delete_callback_
+ extern f_status_t f_thread_keyss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_keyss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_keyss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_keyss_destroy_callback_
+ extern f_status_t f_thread_keyss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_keyss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_locks_adjust_callback_
- f_status_t f_thread_locks_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_locks_delete_callback_
+ f_status_t f_thread_locks_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_locks_t * const array = (f_thread_locks_t *) void_array;
+ f_thread_lock_t * const array = (f_thread_lock_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_rwlock_destroy(&array->array[i]);
+ error = pthread_rwlock_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_locks_adjust_callback_
+#endif // _di_f_thread_locks_delete_callback_
-#ifndef _di_f_thread_locks_resize_callback_
- f_status_t f_thread_locks_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_locks_destroy_callback_
+ f_status_t f_thread_locks_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_locks_t * const array = (f_thread_locks_t *) void_array;
+ f_thread_lock_t * const array = (f_thread_lock_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_rwlock_destroy(&array->array[i]);
+ error = pthread_rwlock_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_locks_resize_callback_
+#endif // _di_f_thread_locks_destroy_callback_
+
+#ifndef _di_f_thread_lockss_delete_callback_
+ f_status_t f_thread_lockss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_locks_t * const array = (f_thread_locks_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_rwlock_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_lock_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_lockss_delete_callback_
+
+#ifndef _di_f_thread_lockss_destroy_callback_
+ f_status_t f_thread_lockss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_locks_t * const array = (f_thread_locks_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_rwlock_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_lock_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_lockss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_locks_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_lockss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_locks_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_locks_delete_callback_
+ extern f_status_t f_thread_locks_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_locks_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_locks_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_locks_adjust_callback_
- extern f_status_t f_thread_locks_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_locks_adjust_callback_
+#ifndef _di_f_thread_locks_destroy_callback_
+ extern f_status_t f_thread_locks_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_locks_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_lockss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_locks_resize_callback_
- extern f_status_t f_thread_locks_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_locks_resize_callback_
+#ifndef _di_f_thread_lockss_delete_callback_
+ extern f_status_t f_thread_lockss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lockss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_lockss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_lockss_destroy_callback_
+ extern f_status_t f_thread_lockss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lockss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_lock_attributes_adjust_callback_
- f_status_t f_thread_lock_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_lock_attributes_delete_callback_
+ f_status_t f_thread_lock_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_lock_attributes_t * const array = (f_thread_lock_attributes_t *) void_array;
+ f_thread_lock_attribute_t * const array = (f_thread_lock_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_rwlockattr_destroy(&array->array[i]);
+ error = pthread_rwlockattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_lock_attributes_adjust_callback_
+#endif // _di_f_thread_lock_attributes_delete_callback_
-#ifndef _di_f_thread_lock_attributes_resize_callback_
- f_status_t f_thread_lock_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_lock_attributes_destroy_callback_
+ f_status_t f_thread_lock_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_lock_attributes_t * const array = (f_thread_lock_attributes_t *) void_array;
+ f_thread_lock_attribute_t * const array = (f_thread_lock_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_rwlockattr_destroy(&array->array[i]);
+ error = pthread_rwlockattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_lock_attributes_resize_callback_
+#endif // _di_f_thread_lock_attributes_destroy_callback_
+
+#ifndef _di_f_thread_lock_attributess_delete_callback_
+ f_status_t f_thread_lock_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_lock_attributes_t * const array = (f_thread_lock_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_rwlockattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_lock_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_lock_attributess_delete_callback_
+
+#ifndef _di_f_thread_lock_attributess_destroy_callback_
+ f_status_t f_thread_lock_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_lock_attributes_t * const array = (f_thread_lock_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_rwlockattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_lock_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_lock_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_lock_attributes_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_lock_attributess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_lock_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_lock_attributes_delete_callback_
+ extern f_status_t f_thread_lock_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lock_attributes_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_lock_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_lock_attributes_adjust_callback_
- extern f_status_t f_thread_lock_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_lock_attributes_adjust_callback_
+#ifndef _di_f_thread_lock_attributes_destroy_callback_
+ extern f_status_t f_thread_lock_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lock_attributes_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_lock_attributess_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_lock_attributes_resize_callback_
- extern f_status_t f_thread_lock_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_lock_attributes_resize_callback_
+#ifndef _di_f_thread_lock_attributess_delete_callback_
+ extern f_status_t f_thread_lock_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lock_attributess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_lock_attributess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_lock_attributess_destroy_callback_
+ extern f_status_t f_thread_lock_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_lock_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_mutexs_adjust_callback_
- f_status_t f_thread_mutexs_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_mutexs_delete_callback_
+ f_status_t f_thread_mutexs_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_mutexs_t * const array = (f_thread_mutexs_t *) void_array;
+ f_thread_mutex_t * const array = (f_thread_mutex_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_mutex_destroy(&array->array[i]);
+ error = pthread_mutex_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_mutexs_adjust_callback_
+#endif // _di_f_thread_mutexs_delete_callback_
-#ifndef _di_f_thread_mutexs_resize_callback_
- f_status_t f_thread_mutexs_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_mutexs_destroy_callback_
+ f_status_t f_thread_mutexs_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_mutexs_t * const array = (f_thread_mutexs_t *) void_array;
+ f_thread_mutex_t * const array = (f_thread_mutex_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_mutex_destroy(&array->array[i]);
+ error = pthread_mutex_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_mutexs_resize_callback_
+#endif // _di_f_thread_mutexs_destroy_callback_
+
+#ifndef _di_f_thread_mutexss_delete_callback_
+ f_status_t f_thread_mutexss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_mutexs_t * const array = (f_thread_mutexs_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_mutex_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_mutex_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_mutexss_delete_callback_
+
+#ifndef _di_f_thread_mutexss_destroy_callback_
+ f_status_t f_thread_mutexss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_mutexs_t * const array = (f_thread_mutexs_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_mutex_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_mutex_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_mutexss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_mutexs_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutexss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_mutexs_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_mutexs_delete_callback_
+ extern f_status_t f_thread_mutexs_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutexs_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutexs_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_mutexs_adjust_callback_
- extern f_status_t f_thread_mutexs_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_mutexs_adjust_callback_
+#ifndef _di_f_thread_mutexs_destroy_callback_
+ extern f_status_t f_thread_mutexs_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutexs_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_mutexss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_mutexs_resize_callback_
- extern f_status_t f_thread_mutexs_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_mutexs_resize_callback_
+#ifndef _di_f_thread_mutexss_delete_callback_
+ extern f_status_t f_thread_mutexss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutexss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutexss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_mutexss_destroy_callback_
+ extern f_status_t f_thread_mutexss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutexss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_mutex_attributes_adjust_callback_
- f_status_t f_thread_mutex_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_mutex_attributes_delete_callback_
+ f_status_t f_thread_mutex_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_mutex_attributes_t * const array = (f_thread_mutex_attributes_t *) void_array;
+ f_thread_mutex_attribute_t * const array = (f_thread_mutex_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_mutexattr_destroy(&array->array[i]);
+ error = pthread_mutexattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_mutex_attributes_adjust_callback_
+#endif // _di_f_thread_mutex_attributes_delete_callback_
-#ifndef _di_f_thread_mutex_attributes_resize_callback_
- f_status_t f_thread_mutex_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_mutex_attributes_destroy_callback_
+ f_status_t f_thread_mutex_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_mutex_attributes_t * const array = (f_thread_mutex_attributes_t *) void_array;
+ f_thread_mutex_attribute_t * const array = (f_thread_mutex_attribute_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_mutexattr_destroy(&array->array[i]);
+ error = pthread_mutexattr_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_mutex_attributes_resize_callback_
+#endif // _di_f_thread_mutex_attributes_destroy_callback_
+
+#ifndef _di_f_thread_mutex_attributess_delete_callback_
+ f_status_t f_thread_mutex_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_mutex_attributes_t * const array = (f_thread_mutex_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_mutexattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_mutex_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_mutex_attributess_delete_callback_
+
+#ifndef _di_f_thread_mutex_attributess_destroy_callback_
+ f_status_t f_thread_mutex_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_mutex_attributes_t * const array = (f_thread_mutex_attributes_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_mutexattr_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_mutex_attribute_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_mutex_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_mutex_attributes_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutex_attributess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_mutex_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_mutex_attributes_delete_callback_
+ extern f_status_t f_thread_mutex_attributes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutex_attributes_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutex_attributes_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_mutex_attributes_adjust_callback_
- extern f_status_t f_thread_mutex_attributes_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_mutex_attributes_adjust_callback_
+#ifndef _di_f_thread_mutex_attributes_destroy_callback_
+ extern f_status_t f_thread_mutex_attributes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutex_attributes_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_mutex_attributess_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_mutex_attributes_resize_callback_
- extern f_status_t f_thread_mutex_attributes_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_mutex_attributes_resize_callback_
+#ifndef _di_f_thread_mutex_attributess_delete_callback_
+ extern f_status_t f_thread_mutex_attributess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutex_attributess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_mutex_attributess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_mutex_attributess_destroy_callback_
+ extern f_status_t f_thread_mutex_attributess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_mutex_attributess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_semaphores_adjust_callback_
- f_status_t f_thread_semaphores_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_semaphores_delete_callback_
+ f_status_t f_thread_semaphores_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_semaphore_t * const array = (f_thread_semaphore_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (sem_destroy(&array[i]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_semaphores_delete_callback_
+
+#ifndef _di_f_thread_semaphores_destroy_callback_
+ f_status_t f_thread_semaphores_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_semaphore_t * const array = (f_thread_semaphore_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (sem_destroy(&array[i]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_semaphores_destroy_callback_
+
+#ifndef _di_f_thread_semaphoress_delete_callback_
+ f_status_t f_thread_semaphoress_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_semaphores_t * const array = (f_thread_semaphores_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (sem_destroy(&array->array[i]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (sem_destroy(&array[i].array[j]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_semaphore_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_semaphores_adjust_callback_
+#endif // _di_f_thread_semaphoress_delete_callback_
-#ifndef _di_f_thread_semaphores_resize_callback_
- f_status_t f_thread_semaphores_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_semaphoress_destroy_callback_
+ f_status_t f_thread_semaphoress_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_semaphores_t * const array = (f_thread_semaphores_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (sem_destroy(&array->array[i]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (sem_destroy(&array[i].array[j]) == -1) return (errno == EINVAL) ? F_status_set_error(F_parameter) : F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_semaphore_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_semaphores_resize_callback_
+#endif // _di_f_thread_semaphoress_destroy_callback_
+
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _di_f_thread_semaphores_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_semaphoress_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_semaphores_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_semaphores_delete_callback_
+ extern f_status_t f_thread_semaphores_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_semaphores_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_semaphores_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_semaphores_adjust_callback_
- extern f_status_t f_thread_semaphores_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_semaphores_adjust_callback_
+#ifndef _di_f_thread_semaphores_destroy_callback_
+ extern f_status_t f_thread_semaphores_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_semaphores_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_semaphoress_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_semaphores_resize_callback_
- extern f_status_t f_thread_semaphores_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_semaphores_resize_callback_
+#ifndef _di_f_thread_semaphoress_delete_callback_
+ extern f_status_t f_thread_semaphoress_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_semaphoress_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_semaphoress_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_semaphoress_destroy_callback_
+ extern f_status_t f_thread_semaphoress_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_semaphoress_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_sets_adjust_callback_
- f_status_t f_thread_sets_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_sets_delete_callback_
+ f_status_t f_thread_sets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_set_t * const array = (f_thread_set_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_attr_destroy(&array[i].attribute)) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_sets_delete_callback_
+
+#ifndef _di_f_thread_sets_destroy_callback_
+ f_status_t f_thread_sets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_set_t * const array = (f_thread_set_t *) void_array;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+ if (pthread_attr_destroy(&array[i].attribute)) return F_status_set_error(F_failure);
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_sets_destroy_callback_
+
+#ifndef _di_f_thread_setss_delete_callback_
+ f_status_t f_thread_setss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_sets_t * const array = (f_thread_sets_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_attr_destroy(&array->array[i].attribute)) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_attr_destroy(&array[i].array[j].attribute)) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_set_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_sets_adjust_callback_
+#endif // _di_f_thread_setss_delete_callback_
-#ifndef _di_f_thread_sets_resize_callback_
- f_status_t f_thread_sets_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_setss_destroy_callback_
+ f_status_t f_thread_setss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_thread_sets_t * const array = (f_thread_sets_t *) void_array;
+ f_number_unsigned_t j = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- if (pthread_attr_destroy(&array->array[i].attribute)) return F_status_set_error(F_failure);
+
+ for (j = 0; j < array[i].size; ++j) {
+ if (pthread_attr_destroy(&array[i].array[j].attribute)) return F_status_set_error(F_failure);
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_set_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_thread_sets_resize_callback_
+#endif // _di_f_thread_setss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_sets_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_setss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_sets_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_sets_delete_callback_
+ extern f_status_t f_thread_sets_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_sets_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_sets_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_sets_adjust_callback_
- extern f_status_t f_thread_sets_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_sets_adjust_callback_
+#ifndef _di_f_thread_sets_destroy_callback_
+ extern f_status_t f_thread_sets_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_sets_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_setss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_sets_resize_callback_
- extern f_status_t f_thread_sets_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_sets_resize_callback_
+#ifndef _di_f_thread_setss_delete_callback_
+ extern f_status_t f_thread_setss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_setss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_setss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_setss_destroy_callback_
+ extern f_status_t f_thread_setss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_setss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_thread_spins_adjust_callback_
- f_status_t f_thread_spins_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_spins_delete_callback_
+ f_status_t f_thread_spins_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_spins_t * const array = (f_thread_spins_t *) void_array;
+ f_thread_spin_t * const array = (f_thread_spin_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_spin_destroy(&array->array[i]);
+ error = pthread_spin_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_spins_adjust_callback_
+#endif // _di_f_thread_spins_delete_callback_
-#ifndef _di_f_thread_spins_resize_callback_
- f_status_t f_thread_spins_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_thread_spins_destroy_callback_
+ f_status_t f_thread_spins_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
- f_thread_spins_t * const array = (f_thread_spins_t *) void_array;
+ f_thread_spin_t * const array = (f_thread_spin_t *) void_array;
int error = 0;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- error = pthread_spin_destroy(&array->array[i]);
+ error = pthread_spin_destroy(&array[i]);
if (error) {
if (error == EBUSY) return F_status_set_error(F_busy);
return F_none;
}
-#endif // _di_f_thread_spins_resize_callback_
+#endif // _di_f_thread_spins_destroy_callback_
+
+#ifndef _di_f_thread_spinss_delete_callback_
+ f_status_t f_thread_spinss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_spins_t * const array = (f_thread_spins_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_spin_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_resize(0, sizeof(f_thread_spin_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_spinss_delete_callback_
+
+#ifndef _di_f_thread_spinss_destroy_callback_
+ f_status_t f_thread_spinss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_thread_spins_t * const array = (f_thread_spins_t *) void_array;
+ int error = 0;
+ f_number_unsigned_t j = 0;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ for (j = 0; j < array[i].size; ++j) {
+
+ error = pthread_spin_destroy(&array[i].array[j]);
+
+ if (error) {
+ if (error == EBUSY) return F_status_set_error(F_busy);
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+ } // for
+
+ if (array[i].size) {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(f_thread_spin_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_spinss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif // _di_f_thread_spins_t_
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_spinss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_thread_spins_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_thread_spins_delete_callback_
+ extern f_status_t f_thread_spins_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_spins_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_spins_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_thread_spins_adjust_callback_
- extern f_status_t f_thread_spins_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_spins_adjust_callback_
+#ifndef _di_f_thread_spins_destroy_callback_
+ extern f_status_t f_thread_spins_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_spins_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_thread_spinss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_thread_spins_resize_callback_
- extern f_status_t f_thread_spins_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_thread_spins_resize_callback_
+#ifndef _di_f_thread_spinss_delete_callback_
+ extern f_status_t f_thread_spinss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_spinss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_thread_spinss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_thread_spinss_destroy_callback_
+ extern f_status_t f_thread_spinss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_thread_spinss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
build_libraries -lc -lcmocka
build_libraries-individual -lf_memory -lf_string -lf_thread
-build_sources_program test-thread-attributes_adjust_callback.c test-thread-attributes_resize_callback.c
-build_sources_program test-thread-barriers_adjust_callback.c test-thread-barriers_resize_callback.c
-build_sources_program test-thread-barrier_attributes_adjust_callback.c test-thread-barrier_attributes_resize_callback.c
-build_sources_program test-thread-conditions_adjust_callback.c test-thread-conditions_resize_callback.c
-build_sources_program test-thread-condition_attributes_adjust_callback.c test-thread-condition_attributes_resize_callback.c
-build_sources_program test-thread-keys_adjust_callback.c test-thread-keys_resize_callback.c
-build_sources_program test-thread-locks_adjust_callback.c test-thread-locks_resize_callback.c
-build_sources_program test-thread-lock_attributes_adjust_callback.c test-thread-lock_attributes_resize_callback.c
-build_sources_program test-thread-mutexs_adjust_callback.c test-thread-mutexs_resize_callback.c
-build_sources_program test-thread-mutex_attributes_adjust_callback.c test-thread-mutex_attributes_resize_callback.c
-build_sources_program test-thread-semaphores_adjust_callback.c test-thread-semaphores_resize_callback.c
-build_sources_program test-thread-sets_adjust_callback.c test-thread-sets_resize_callback.c
-build_sources_program test-thread-spins_adjust_callback.c test-thread-spins_resize_callback.c
+build_sources_program test-thread-attributes_destroy_callback.c test-thread-attributes_delete_callback.c
+build_sources_program test-thread-barriers_destroy_callback.c test-thread-barriers_delete_callback.c
+build_sources_program test-thread-barrier_attributes_destroy_callback.c test-thread-barrier_attributes_delete_callback.c
+build_sources_program test-thread-conditions_destroy_callback.c test-thread-conditions_delete_callback.c
+build_sources_program test-thread-condition_attributes_destroy_callback.c test-thread-condition_attributes_delete_callback.c
+build_sources_program test-thread-keys_destroy_callback.c test-thread-keys_delete_callback.c
+build_sources_program test-thread-locks_destroy_callback.c test-thread-locks_delete_callback.c
+build_sources_program test-thread-lock_attributes_destroy_callback.c test-thread-lock_attributes_delete_callback.c
+build_sources_program test-thread-mutexs_destroy_callback.c test-thread-mutexs_delete_callback.c
+build_sources_program test-thread-mutex_attributes_destroy_callback.c test-thread-mutex_attributes_delete_callback.c
+build_sources_program test-thread-semaphores_destroy_callback.c test-thread-semaphores_delete_callback.c
+build_sources_program test-thread-sets_destroy_callback.c test-thread-sets_delete_callback.c
+build_sources_program test-thread-spins_destroy_callback.c test-thread-spins_delete_callback.c
build_sources_program test-thread-at_fork.c
build_sources_program test-thread-attribute_affinity_get.c test-thread-attribute_affinity_set.c
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__attributes_adjust_callback
-#define _TEST__F_thread__attributes_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_attributes_adjust_callback_()
- */
-extern void test__f_thread_attributes_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_attributes_adjust_callback_()
- */
-extern void test__f_thread_attributes_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__attributes_adjust_callback
#include "test-thread.h"
-#include "test-thread-attributes_adjust_callback.h"
+#include "test-thread-attributes_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_attributes_adjust_callback__fails(void **state) {
+void test__f_thread_attributes_delete_callback__fails(void **state) {
f_thread_attribute_t data = f_thread_attribute_t_initialize;
f_thread_attribute_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_attributes_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_attributes_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_attributes_adjust_callback__works(void **state) {
+void test__f_thread_attributes_delete_callback__works(void **state) {
f_thread_attribute_t data = f_thread_attribute_t_initialize;
f_thread_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_attributes_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_attributes_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__attributes_delete_callback
+#define _TEST__F_thread__attributes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_attributes_delete_callback_()
+ */
+extern void test__f_thread_attributes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_delete_callback_()
+ */
+extern void test__f_thread_attributes_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__attributes_delete_callback
#include "test-thread.h"
-#include "test-thread-attributes_resize_callback.h"
+#include "test-thread-attributes_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_attributes_resize_callback__fails(void **state) {
+void test__f_thread_attributes_destroy_callback__fails(void **state) {
f_thread_attribute_t data = f_thread_attribute_t_initialize;
f_thread_attribute_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_attributes_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_attributes_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_attributes_resize_callback__works(void **state) {
+void test__f_thread_attributes_destroy_callback__works(void **state) {
f_thread_attribute_t data = f_thread_attribute_t_initialize;
f_thread_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_attributes_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_attributes_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__attributes_destroy_callback
+#define _TEST__F_thread__attributes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_attributes_destroy_callback_()
+ */
+extern void test__f_thread_attributes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_destroy_callback_()
+ */
+extern void test__f_thread_attributes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__attributes_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__attributes_resize_callback
-#define _TEST__F_thread__attributes_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_attributes_resize_callback_()
- */
-extern void test__f_thread_attributes_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_attributes_resize_callback_()
- */
-extern void test__f_thread_attributes_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__attributes_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__barrier_attributes_adjust_callback
-#define _TEST__F_thread__barrier_attributes_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_barrier_attributes_adjust_callback_()
- */
-extern void test__f_thread_barrier_attributes_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_barrier_attributes_adjust_callback_()
- */
-extern void test__f_thread_barrier_attributes_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__barrier_attributes_adjust_callback
#include "test-thread.h"
-#include "test-thread-barrier_attributes_adjust_callback.h"
+#include "test-thread-barrier_attributes_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_barrier_attributes_adjust_callback__fails(void **state) {
+void test__f_thread_barrier_attributes_delete_callback__fails(void **state) {
f_thread_barrier_attribute_t data = f_thread_barrier_attribute_t_initialize;
f_thread_barrier_attribute_t data_array[] = { data };
will_return(__wrap_pthread_barrierattr_destroy, true);
will_return(__wrap_pthread_barrierattr_destroy, errnos[i]);
- const f_status_t status = f_thread_barrier_attributes_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_barrier_attributes_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_barrier_attributes_adjust_callback__works(void **state) {
+void test__f_thread_barrier_attributes_delete_callback__works(void **state) {
f_thread_barrier_attribute_t data = f_thread_barrier_attribute_t_initialize;
f_thread_barrier_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_barrierattr_destroy, false);
- const f_status_t status = f_thread_barrier_attributes_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_barrier_attributes_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__barrier_attributes_delete_callback
+#define _TEST__F_thread__barrier_attributes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_barrier_attributes_delete_callback_()
+ */
+extern void test__f_thread_barrier_attributes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_delete_callback_()
+ */
+extern void test__f_thread_barrier_attributes_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__barrier_attributes_delete_callback
#include "test-thread.h"
-#include "test-thread-barrier_attributes_resize_callback.h"
+#include "test-thread-barrier_attributes_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_barrier_attributes_resize_callback__fails(void **state) {
+void test__f_thread_barrier_attributes_destroy_callback__fails(void **state) {
f_thread_barrier_attribute_t data = f_thread_barrier_attribute_t_initialize;
f_thread_barrier_attribute_t data_array[] = { data };
will_return(__wrap_pthread_barrierattr_destroy, true);
will_return(__wrap_pthread_barrierattr_destroy, errnos[i]);
- const f_status_t status = f_thread_barrier_attributes_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_barrier_attributes_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_barrier_attributes_resize_callback__works(void **state) {
+void test__f_thread_barrier_attributes_destroy_callback__works(void **state) {
f_thread_barrier_attribute_t data = f_thread_barrier_attribute_t_initialize;
f_thread_barrier_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_barrierattr_destroy, false);
- const f_status_t status = f_thread_barrier_attributes_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_barrier_attributes_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__barrier_attributes_destroy_callback
+#define _TEST__F_thread__barrier_attributes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_barrier_attributes_destroy_callback_()
+ */
+extern void test__f_thread_barrier_attributes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_destroy_callback_()
+ */
+extern void test__f_thread_barrier_attributes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__barrier_attributes_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__barrier_attributes_resize_callback
-#define _TEST__F_thread__barrier_attributes_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_barrier_attributes_resize_callback_()
- */
-extern void test__f_thread_barrier_attributes_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_barrier_attributes_resize_callback_()
- */
-extern void test__f_thread_barrier_attributes_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__barrier_attributes_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__barriers_adjust_callback
-#define _TEST__F_thread__barriers_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_barriers_adjust_callback_()
- */
-extern void test__f_thread_barriers_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_barriers_adjust_callback_()
- */
-extern void test__f_thread_barriers_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__barriers_adjust_callback
#include "test-thread.h"
-#include "test-thread-barriers_resize_callback.h"
+#include "test-thread-barriers_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_barriers_resize_callback__fails(void **state) {
+void test__f_thread_barriers_delete_callback__fails(void **state) {
f_thread_barrier_t data = f_thread_barrier_t_initialize;
f_thread_barrier_t data_array[] = { data };
will_return(__wrap_pthread_barrier_destroy, true);
will_return(__wrap_pthread_barrier_destroy, errnos[i]);
- const f_status_t status = f_thread_barriers_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_barriers_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_barriers_resize_callback__works(void **state) {
+void test__f_thread_barriers_delete_callback__works(void **state) {
f_thread_barrier_t data = f_thread_barrier_t_initialize;
f_thread_barrier_t data_array[] = { data };
{
will_return(__wrap_pthread_barrier_destroy, false);
- const f_status_t status = f_thread_barriers_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_barriers_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__barriers_delete_callback
+#define _TEST__F_thread__barriers_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_barriers_delete_callback_()
+ */
+extern void test__f_thread_barriers_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_delete_callback_()
+ */
+extern void test__f_thread_barriers_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__barriers_delete_callback
#include "test-thread.h"
-#include "test-thread-barriers_adjust_callback.h"
+#include "test-thread-barriers_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_barriers_adjust_callback__fails(void **state) {
+void test__f_thread_barriers_destroy_callback__fails(void **state) {
f_thread_barrier_t data = f_thread_barrier_t_initialize;
f_thread_barrier_t data_array[] = { data };
will_return(__wrap_pthread_barrier_destroy, true);
will_return(__wrap_pthread_barrier_destroy, errnos[i]);
- const f_status_t status = f_thread_barriers_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_barriers_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_barriers_adjust_callback__works(void **state) {
+void test__f_thread_barriers_destroy_callback__works(void **state) {
f_thread_barrier_t data = f_thread_barrier_t_initialize;
f_thread_barrier_t data_array[] = { data };
{
will_return(__wrap_pthread_barrier_destroy, false);
- const f_status_t status = f_thread_barriers_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_barriers_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__barriers_destroy_callback
+#define _TEST__F_thread__barriers_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_barriers_destroy_callback_()
+ */
+extern void test__f_thread_barriers_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_destroy_callback_()
+ */
+extern void test__f_thread_barriers_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__barriers_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__barriers_resize_callback
-#define _TEST__F_thread__barriers_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_barriers_resize_callback_()
- */
-extern void test__f_thread_barriers_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_barriers_resize_callback_()
- */
-extern void test__f_thread_barriers_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__barriers_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__condition_attributes_adjust_callback
-#define _TEST__F_thread__condition_attributes_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_condition_attributes_adjust_callback_()
- */
-extern void test__f_thread_condition_attributes_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_condition_attributes_adjust_callback_()
- */
-extern void test__f_thread_condition_attributes_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__condition_attributes_adjust_callback
#include "test-thread.h"
-#include "test-thread-condition_attributes_adjust_callback.h"
+#include "test-thread-condition_attributes_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_condition_attributes_adjust_callback__fails(void **state) {
+void test__f_thread_condition_attributes_delete_callback__fails(void **state) {
f_thread_condition_attribute_t data = f_thread_condition_attribute_t_initialize;
f_thread_condition_attribute_t data_array[] = { data };
will_return(__wrap_pthread_condattr_destroy, true);
will_return(__wrap_pthread_condattr_destroy, errnos[i]);
- const f_status_t status = f_thread_condition_attributes_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_condition_attributes_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_condition_attributes_adjust_callback__works(void **state) {
+void test__f_thread_condition_attributes_delete_callback__works(void **state) {
f_thread_condition_attribute_t data = f_thread_condition_attribute_t_initialize;
f_thread_condition_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_condattr_destroy, false);
- const f_status_t status = f_thread_condition_attributes_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_condition_attributes_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__condition_attributes_delete_callback
+#define _TEST__F_thread__condition_attributes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_condition_attributes_delete_callback_()
+ */
+extern void test__f_thread_condition_attributes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_delete_callback_()
+ */
+extern void test__f_thread_condition_attributes_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__condition_attributes_delete_callback
#include "test-thread.h"
-#include "test-thread-condition_attributes_resize_callback.h"
+#include "test-thread-condition_attributes_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_condition_attributes_resize_callback__fails(void **state) {
+void test__f_thread_condition_attributes_destroy_callback__fails(void **state) {
f_thread_condition_attribute_t data = f_thread_condition_attribute_t_initialize;
f_thread_condition_attribute_t data_array[] = { data };
will_return(__wrap_pthread_condattr_destroy, true);
will_return(__wrap_pthread_condattr_destroy, errnos[i]);
- const f_status_t status = f_thread_condition_attributes_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_condition_attributes_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_condition_attributes_resize_callback__works(void **state) {
+void test__f_thread_condition_attributes_destroy_callback__works(void **state) {
f_thread_condition_attribute_t data = f_thread_condition_attribute_t_initialize;
f_thread_condition_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_condattr_destroy, false);
- const f_status_t status = f_thread_condition_attributes_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_condition_attributes_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__condition_attributes_destroy_callback
+#define _TEST__F_thread__condition_attributes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_condition_attributes_destroy_callback_()
+ */
+extern void test__f_thread_condition_attributes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_destroy_callback_()
+ */
+extern void test__f_thread_condition_attributes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__condition_attributes_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__condition_attributes_resize_callback
-#define _TEST__F_thread__condition_attributes_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_condition_attributes_resize_callback_()
- */
-extern void test__f_thread_condition_attributes_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_condition_attributes_resize_callback_()
- */
-extern void test__f_thread_condition_attributes_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__condition_attributes_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__conditions_adjust_callback
-#define _TEST__F_thread__conditions_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_conditions_adjust_callback_()
- */
-extern void test__f_thread_conditions_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_conditions_adjust_callback_()
- */
-extern void test__f_thread_conditions_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__conditions_adjust_callback
#include "test-thread.h"
-#include "test-thread-conditions_adjust_callback.h"
+#include "test-thread-conditions_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_conditions_adjust_callback__fails(void **state) {
+void test__f_thread_conditions_delete_callback__fails(void **state) {
f_thread_condition_t data = f_thread_condition_t_initialize;
f_thread_condition_t data_array[] = { data };
will_return(__wrap_pthread_cond_destroy, true);
will_return(__wrap_pthread_cond_destroy, errnos[i]);
- const f_status_t status = f_thread_conditions_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_conditions_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_conditions_adjust_callback__works(void **state) {
+void test__f_thread_conditions_delete_callback__works(void **state) {
f_thread_condition_t data = f_thread_condition_t_initialize;
f_thread_condition_t data_array[] = { data };
{
will_return(__wrap_pthread_cond_destroy, false);
- const f_status_t status = f_thread_conditions_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_conditions_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__conditions_delete_callback
+#define _TEST__F_thread__conditions_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_conditions_delete_callback_()
+ */
+extern void test__f_thread_conditions_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_delete_callback_()
+ */
+extern void test__f_thread_conditions_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__conditions_delete_callback
#include "test-thread.h"
-#include "test-thread-conditions_resize_callback.h"
+#include "test-thread-conditions_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_conditions_resize_callback__fails(void **state) {
+void test__f_thread_conditions_destroy_callback__fails(void **state) {
f_thread_condition_t data = f_thread_condition_t_initialize;
f_thread_condition_t data_array[] = { data };
will_return(__wrap_pthread_cond_destroy, true);
will_return(__wrap_pthread_cond_destroy, errnos[i]);
- const f_status_t status = f_thread_conditions_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_conditions_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_conditions_resize_callback__works(void **state) {
+void test__f_thread_conditions_destroy_callback__works(void **state) {
f_thread_condition_t data = f_thread_condition_t_initialize;
f_thread_condition_t data_array[] = { data };
{
will_return(__wrap_pthread_cond_destroy, false);
- const f_status_t status = f_thread_conditions_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_conditions_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__conditions_destroy_callback
+#define _TEST__F_thread__conditions_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_conditions_destroy_callback_()
+ */
+extern void test__f_thread_conditions_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_destroy_callback_()
+ */
+extern void test__f_thread_conditions_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__conditions_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__conditions_resize_callback
-#define _TEST__F_thread__conditions_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_conditions_resize_callback_()
- */
-extern void test__f_thread_conditions_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_conditions_resize_callback_()
- */
-extern void test__f_thread_conditions_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__conditions_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__keys_adjust_callback
-#define _TEST__F_thread__keys_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_keys_adjust_callback_()
- */
-extern void test__f_thread_keys_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_keys_adjust_callback_()
- */
-extern void test__f_thread_keys_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__keys_adjust_callback
#include "test-thread.h"
-#include "test-thread-keys_adjust_callback.h"
+#include "test-thread-keys_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_keys_adjust_callback__fails(void **state) {
+void test__f_thread_keys_delete_callback__fails(void **state) {
f_thread_key_t data = f_thread_key_t_initialize;
f_thread_key_t data_array[] = { data };
will_return(__wrap_pthread_key_delete, errnos[i]);
- const f_status_t status = f_thread_keys_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_keys_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_keys_adjust_callback__works(void **state) {
+void test__f_thread_keys_delete_callback__works(void **state) {
f_thread_key_t data = f_thread_key_t_initialize;
f_thread_key_t data_array[] = { data };
{
will_return(__wrap_pthread_key_delete, false);
- const f_status_t status = f_thread_keys_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_keys_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__keys_delete_callback
+#define _TEST__F_thread__keys_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_keys_delete_callback_()
+ */
+extern void test__f_thread_keys_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_delete_callback_()
+ */
+extern void test__f_thread_keys_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__keys_delete_callback
#include "test-thread.h"
-#include "test-thread-keys_resize_callback.h"
+#include "test-thread-keys_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_keys_resize_callback__fails(void **state) {
+void test__f_thread_keys_destroy_callback__fails(void **state) {
f_thread_key_t data = f_thread_key_t_initialize;
f_thread_key_t data_array[] = { data };
will_return(__wrap_pthread_key_delete, errnos[i]);
- const f_status_t status = f_thread_keys_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_keys_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_keys_resize_callback__works(void **state) {
+void test__f_thread_keys_destroy_callback__works(void **state) {
f_thread_key_t data = f_thread_key_t_initialize;
f_thread_key_t data_array[] = { data };
{
will_return(__wrap_pthread_key_delete, false);
- const f_status_t status = f_thread_keys_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_keys_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__keys_destroy_callback
+#define _TEST__F_thread__keys_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_keys_destroy_callback_()
+ */
+extern void test__f_thread_keys_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_destroy_callback_()
+ */
+extern void test__f_thread_keys_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__keys_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__keys_resize_callback
-#define _TEST__F_thread__keys_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_keys_resize_callback_()
- */
-extern void test__f_thread_keys_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_keys_resize_callback_()
- */
-extern void test__f_thread_keys_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__keys_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__lock_attributes_adjust_callback
-#define _TEST__F_thread__lock_attributes_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_lock_attributes_adjust_callback_()
- */
-extern void test__f_thread_lock_attributes_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_lock_attributes_adjust_callback_()
- */
-extern void test__f_thread_lock_attributes_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__lock_attributes_adjust_callback
#include "test-thread.h"
-#include "test-thread-lock_attributes_resize_callback.h"
+#include "test-thread-lock_attributes_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_lock_attributes_resize_callback__fails(void **state) {
+void test__f_thread_lock_attributes_delete_callback__fails(void **state) {
f_thread_lock_attribute_t data = f_thread_lock_attribute_t_initialize;
f_thread_lock_attribute_t data_array[] = { data };
will_return(__wrap_pthread_rwlockattr_destroy, true);
will_return(__wrap_pthread_rwlockattr_destroy, errnos[i]);
- const f_status_t status = f_thread_lock_attributes_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_lock_attributes_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_lock_attributes_resize_callback__works(void **state) {
+void test__f_thread_lock_attributes_delete_callback__works(void **state) {
f_thread_lock_attribute_t data = f_thread_lock_attribute_t_initialize;
f_thread_lock_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_rwlockattr_destroy, false);
- const f_status_t status = f_thread_lock_attributes_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_lock_attributes_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__lock_attributes_delete_callback
+#define _TEST__F_thread__lock_attributes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_lock_attributes_delete_callback_()
+ */
+extern void test__f_thread_lock_attributes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_delete_callback_()
+ */
+extern void test__f_thread_lock_attributes_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__lock_attributes_delete_callback
#include "test-thread.h"
-#include "test-thread-lock_attributes_adjust_callback.h"
+#include "test-thread-lock_attributes_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_lock_attributes_adjust_callback__fails(void **state) {
+void test__f_thread_lock_attributes_destroy_callback__fails(void **state) {
f_thread_lock_attribute_t data = f_thread_lock_attribute_t_initialize;
f_thread_lock_attribute_t data_array[] = { data };
will_return(__wrap_pthread_rwlockattr_destroy, true);
will_return(__wrap_pthread_rwlockattr_destroy, errnos[i]);
- const f_status_t status = f_thread_lock_attributes_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_lock_attributes_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_lock_attributes_adjust_callback__works(void **state) {
+void test__f_thread_lock_attributes_destroy_callback__works(void **state) {
f_thread_lock_attribute_t data = f_thread_lock_attribute_t_initialize;
f_thread_lock_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_rwlockattr_destroy, false);
- const f_status_t status = f_thread_lock_attributes_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_lock_attributes_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__lock_attributes_destroy_callback
+#define _TEST__F_thread__lock_attributes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_lock_attributes_destroy_callback_()
+ */
+extern void test__f_thread_lock_attributes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_destroy_callback_()
+ */
+extern void test__f_thread_lock_attributes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__lock_attributes_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__lock_attributes_resize_callback
-#define _TEST__F_thread__lock_attributes_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_lock_attributes_resize_callback_()
- */
-extern void test__f_thread_lock_attributes_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_lock_attributes_resize_callback_()
- */
-extern void test__f_thread_lock_attributes_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__lock_attributes_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__locks_adjust_callback
-#define _TEST__F_thread__locks_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_locks_adjust_callback_()
- */
-extern void test__f_thread_locks_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_locks_adjust_callback_()
- */
-extern void test__f_thread_locks_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__locks_adjust_callback
#include "test-thread.h"
-#include "test-thread-locks_adjust_callback.h"
+#include "test-thread-locks_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_locks_adjust_callback__fails(void **state) {
+void test__f_thread_locks_delete_callback__fails(void **state) {
f_thread_lock_t data = f_thread_lock_t_initialize;
f_thread_lock_t data_array[] = { data };
will_return(__wrap_pthread_rwlock_destroy, true);
will_return(__wrap_pthread_rwlock_destroy, errnos[i]);
- const f_status_t status = f_thread_locks_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_locks_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_locks_adjust_callback__works(void **state) {
+void test__f_thread_locks_delete_callback__works(void **state) {
f_thread_lock_t data = f_thread_lock_t_initialize;
f_thread_lock_t data_array[] = { data };
{
will_return(__wrap_pthread_rwlock_destroy, false);
- const f_status_t status = f_thread_locks_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_locks_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__locks_delete_callback
+#define _TEST__F_thread__locks_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_locks_delete_callback_()
+ */
+extern void test__f_thread_locks_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_delete_callback_()
+ */
+extern void test__f_thread_locks_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__locks_delete_callback
#include "test-thread.h"
-#include "test-thread-locks_resize_callback.h"
+#include "test-thread-locks_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_locks_resize_callback__fails(void **state) {
+void test__f_thread_locks_destroy_callback__fails(void **state) {
f_thread_lock_t data = f_thread_lock_t_initialize;
f_thread_lock_t data_array[] = { data };
will_return(__wrap_pthread_rwlock_destroy, true);
will_return(__wrap_pthread_rwlock_destroy, errnos[i]);
- const f_status_t status = f_thread_locks_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_locks_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_locks_resize_callback__works(void **state) {
+void test__f_thread_locks_destroy_callback__works(void **state) {
f_thread_lock_t data = f_thread_lock_t_initialize;
f_thread_lock_t data_array[] = { data };
{
will_return(__wrap_pthread_rwlock_destroy, false);
- const f_status_t status = f_thread_locks_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_locks_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__locks_destroy_callback
+#define _TEST__F_thread__locks_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_locks_destroy_callback_()
+ */
+extern void test__f_thread_locks_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_destroy_callback_()
+ */
+extern void test__f_thread_locks_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__locks_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__locks_resize_callback
-#define _TEST__F_thread__locks_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_locks_resize_callback_()
- */
-extern void test__f_thread_locks_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_locks_resize_callback_()
- */
-extern void test__f_thread_locks_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__locks_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__mutex_attributes_adjust_callback
-#define _TEST__F_thread__mutex_attributes_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_mutex_attributes_adjust_callback_()
- */
-extern void test__f_thread_mutex_attributes_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_mutex_attributes_adjust_callback_()
- */
-extern void test__f_thread_mutex_attributes_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__mutex_attributes_adjust_callback
#include "test-thread.h"
-#include "test-thread-mutex_attributes_adjust_callback.h"
+#include "test-thread-mutex_attributes_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_mutex_attributes_adjust_callback__fails(void **state) {
+void test__f_thread_mutex_attributes_delete_callback__fails(void **state) {
f_thread_mutex_attribute_t data = f_thread_mutex_attribute_t_initialize;
f_thread_mutex_attribute_t data_array[] = { data };
will_return(__wrap_pthread_mutexattr_destroy, true);
will_return(__wrap_pthread_mutexattr_destroy, errnos[i]);
- const f_status_t status = f_thread_mutex_attributes_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_mutex_attributes_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_mutex_attributes_adjust_callback__works(void **state) {
+void test__f_thread_mutex_attributes_delete_callback__works(void **state) {
f_thread_mutex_attribute_t data = f_thread_mutex_attribute_t_initialize;
f_thread_mutex_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_mutexattr_destroy, false);
- const f_status_t status = f_thread_mutex_attributes_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_mutex_attributes_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__mutex_attributes_delete_callback
+#define _TEST__F_thread__mutex_attributes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_mutex_attributes_delete_callback_()
+ */
+extern void test__f_thread_mutex_attributes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_delete_callback_()
+ */
+extern void test__f_thread_mutex_attributes_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__mutex_attributes_delete_callback
#include "test-thread.h"
-#include "test-thread-mutex_attributes_resize_callback.h"
+#include "test-thread-mutex_attributes_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_mutex_attributes_resize_callback__fails(void **state) {
+void test__f_thread_mutex_attributes_destroy_callback__fails(void **state) {
f_thread_mutex_attribute_t data = f_thread_mutex_attribute_t_initialize;
f_thread_mutex_attribute_t data_array[] = { data };
will_return(__wrap_pthread_mutexattr_destroy, true);
will_return(__wrap_pthread_mutexattr_destroy, errnos[i]);
- const f_status_t status = f_thread_mutex_attributes_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_mutex_attributes_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_mutex_attributes_resize_callback__works(void **state) {
+void test__f_thread_mutex_attributes_destroy_callback__works(void **state) {
f_thread_mutex_attribute_t data = f_thread_mutex_attribute_t_initialize;
f_thread_mutex_attribute_t data_array[] = { data };
{
will_return(__wrap_pthread_mutexattr_destroy, false);
- const f_status_t status = f_thread_mutex_attributes_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_mutex_attributes_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__mutex_attributes_destroy_callback
+#define _TEST__F_thread__mutex_attributes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_mutex_attributes_destroy_callback_()
+ */
+extern void test__f_thread_mutex_attributes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_destroy_callback_()
+ */
+extern void test__f_thread_mutex_attributes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__mutex_attributes_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__mutex_attributes_resize_callback
-#define _TEST__F_thread__mutex_attributes_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_mutex_attributes_resize_callback_()
- */
-extern void test__f_thread_mutex_attributes_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_mutex_attributes_resize_callback_()
- */
-extern void test__f_thread_mutex_attributes_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__mutex_attributes_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__mutexs_adjust_callback
-#define _TEST__F_thread__mutexs_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_mutexs_adjust_callback_()
- */
-extern void test__f_thread_mutexs_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_mutexs_adjust_callback_()
- */
-extern void test__f_thread_mutexs_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__mutexs_adjust_callback
#include "test-thread.h"
-#include "test-thread-mutexs_resize_callback.h"
+#include "test-thread-mutexs_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_mutexs_resize_callback__fails(void **state) {
+void test__f_thread_mutexs_delete_callback__fails(void **state) {
f_thread_mutex_t data = f_thread_mutex_t_initialize;
f_thread_mutex_t data_array[] = { data };
will_return(__wrap_pthread_mutex_destroy, true);
will_return(__wrap_pthread_mutex_destroy, errnos[i]);
- const f_status_t status = f_thread_mutexs_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_mutexs_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_mutexs_resize_callback__works(void **state) {
+void test__f_thread_mutexs_delete_callback__works(void **state) {
f_thread_mutex_t data = f_thread_mutex_t_initialize;
f_thread_mutex_t data_array[] = { data };
{
will_return(__wrap_pthread_mutex_destroy, false);
- const f_status_t status = f_thread_mutexs_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_mutexs_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__mutexs_delete_callback
+#define _TEST__F_thread__mutexs_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_mutexs_delete_callback_()
+ */
+extern void test__f_thread_mutexs_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_delete_callback_()
+ */
+extern void test__f_thread_mutexs_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__mutexs_delete_callback
#include "test-thread.h"
-#include "test-thread-mutexs_adjust_callback.h"
+#include "test-thread-mutexs_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_mutexs_adjust_callback__fails(void **state) {
+void test__f_thread_mutexs_destroy_callback__fails(void **state) {
f_thread_mutex_t data = f_thread_mutex_t_initialize;
f_thread_mutex_t data_array[] = { data };
will_return(__wrap_pthread_mutex_destroy, true);
will_return(__wrap_pthread_mutex_destroy, errnos[i]);
- const f_status_t status = f_thread_mutexs_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_mutexs_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_mutexs_adjust_callback__works(void **state) {
+void test__f_thread_mutexs_destroy_callback__works(void **state) {
f_thread_mutex_t data = f_thread_mutex_t_initialize;
f_thread_mutex_t data_array[] = { data };
{
will_return(__wrap_pthread_mutex_destroy, false);
- const f_status_t status = f_thread_mutexs_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_mutexs_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__mutexs_destroy_callback
+#define _TEST__F_thread__mutexs_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_mutexs_destroy_callback_()
+ */
+extern void test__f_thread_mutexs_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_destroy_callback_()
+ */
+extern void test__f_thread_mutexs_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__mutexs_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__mutexs_resize_callback
-#define _TEST__F_thread__mutexs_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_mutexs_resize_callback_()
- */
-extern void test__f_thread_mutexs_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_mutexs_resize_callback_()
- */
-extern void test__f_thread_mutexs_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__mutexs_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__onces_adjust_callback
-#define _TEST__F_thread__onces_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_onces_adjust_callback_()
- */
-extern void test__f_thread_onces_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_onces_adjust_callback_()
- */
-extern void test__f_thread_onces_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__onces_adjust_callback
#include "test-thread.h"
-#include "test-thread-onces_adjust_callback.h"
+#include "test-thread-onces_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_onces_adjust_callback__fails(void **state) {
+void test__f_thread_onces_delete_callback__fails(void **state) {
f_thread_once_t data = f_thread_once_t_initialize;
f_thread_once_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_onces_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_onces_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_onces_adjust_callback__works(void **state) {
+void test__f_thread_onces_delete_callback__works(void **state) {
f_thread_once_t data = f_thread_once_t_initialize;
f_thread_once_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_onces_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_onces_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__onces_delete_callback
+#define _TEST__F_thread__onces_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_onces_delete_callback_()
+ */
+extern void test__f_thread_onces_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_delete_callback_()
+ */
+extern void test__f_thread_onces_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__onces_delete_callback
#include "test-thread.h"
-#include "test-thread-onces_resize_callback.h"
+#include "test-thread-onces_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_onces_resize_callback__fails(void **state) {
+void test__f_thread_onces_destroy_callback__fails(void **state) {
f_thread_once_t data = f_thread_once_t_initialize;
f_thread_once_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_onces_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_onces_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_onces_resize_callback__works(void **state) {
+void test__f_thread_onces_destroy_callback__works(void **state) {
f_thread_once_t data = f_thread_once_t_initialize;
f_thread_once_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_onces_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_onces_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__onces_destroy_callback
+#define _TEST__F_thread__onces_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_onces_destroy_callback_()
+ */
+extern void test__f_thread_onces_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_destroy_callback_()
+ */
+extern void test__f_thread_onces_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__onces_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__onces_resize_callback
-#define _TEST__F_thread__onces_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_onces_resize_callback_()
- */
-extern void test__f_thread_onces_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_onces_resize_callback_()
- */
-extern void test__f_thread_onces_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__onces_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__semaphores_adjust_callback
-#define _TEST__F_thread__semaphores_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_semaphores_adjust_callback_()
- */
-extern void test__f_thread_semaphores_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_semaphores_adjust_callback_()
- */
-extern void test__f_thread_semaphores_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__semaphores_adjust_callback
#include "test-thread.h"
-#include "test-thread-semaphores_adjust_callback.h"
+#include "test-thread-semaphores_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_semaphores_adjust_callback__fails(void **state) {
+void test__f_thread_semaphores_delete_callback__fails(void **state) {
f_thread_semaphore_t data = f_thread_semaphore_t_initialize;
f_thread_semaphore_t data_array[] = { data };
will_return(__wrap_sem_destroy, true);
will_return(__wrap_sem_destroy, errnos[i]);
- const f_status_t status = f_thread_semaphores_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_semaphores_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_semaphores_adjust_callback__works(void **state) {
+void test__f_thread_semaphores_delete_callback__works(void **state) {
f_thread_semaphore_t data = f_thread_semaphore_t_initialize;
f_thread_semaphore_t data_array[] = { data };
{
will_return(__wrap_sem_destroy, false);
- const f_status_t status = f_thread_semaphores_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_semaphores_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__semaphores_delete_callback
+#define _TEST__F_thread__semaphores_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_semaphores_delete_callback_()
+ */
+extern void test__f_thread_semaphores_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_delete_callback_()
+ */
+extern void test__f_thread_semaphores_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__semaphores_delete_callback
#include "test-thread.h"
-#include "test-thread-semaphores_resize_callback.h"
+#include "test-thread-semaphores_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_semaphores_resize_callback__fails(void **state) {
+void test__f_thread_semaphores_destroy_callback__fails(void **state) {
f_thread_semaphore_t data = f_thread_semaphore_t_initialize;
f_thread_semaphore_t data_array[] = { data };
will_return(__wrap_sem_destroy, true);
will_return(__wrap_sem_destroy, errnos[i]);
- const f_status_t status = f_thread_semaphores_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_semaphores_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_semaphores_resize_callback__works(void **state) {
+void test__f_thread_semaphores_destroy_callback__works(void **state) {
f_thread_semaphore_t data = f_thread_semaphore_t_initialize;
f_thread_semaphore_t data_array[] = { data };
{
will_return(__wrap_sem_destroy, false);
- const f_status_t status = f_thread_semaphores_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_semaphores_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__semaphores_destroy_callback
+#define _TEST__F_thread__semaphores_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_semaphores_destroy_callback_()
+ */
+extern void test__f_thread_semaphores_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_destroy_callback_()
+ */
+extern void test__f_thread_semaphores_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__semaphores_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__semaphores_resize_callback
-#define _TEST__F_thread__semaphores_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_semaphores_resize_callback_()
- */
-extern void test__f_thread_semaphores_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_semaphores_resize_callback_()
- */
-extern void test__f_thread_semaphores_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__semaphores_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__sets_adjust_callback
-#define _TEST__F_thread__sets_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_sets_adjust_callback_()
- */
-extern void test__f_thread_sets_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_sets_adjust_callback_()
- */
-extern void test__f_thread_sets_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__sets_adjust_callback
#include "test-thread.h"
-#include "test-thread-sets_adjust_callback.h"
+#include "test-thread-sets_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_sets_adjust_callback__fails(void **state) {
+void test__f_thread_sets_delete_callback__fails(void **state) {
f_thread_set_t data = f_thread_set_t_initialize;
f_thread_set_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_sets_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_sets_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_sets_adjust_callback__works(void **state) {
+void test__f_thread_sets_delete_callback__works(void **state) {
f_thread_set_t data = f_thread_set_t_initialize;
f_thread_set_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_sets_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_sets_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__sets_delete_callback
+#define _TEST__F_thread__sets_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_sets_delete_callback_()
+ */
+extern void test__f_thread_sets_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_delete_callback_()
+ */
+extern void test__f_thread_sets_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__sets_delete_callback
#include "test-thread.h"
-#include "test-thread-sets_resize_callback.h"
+#include "test-thread-sets_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_sets_resize_callback__fails(void **state) {
+void test__f_thread_sets_destroy_callback__fails(void **state) {
f_thread_set_t data = f_thread_set_t_initialize;
f_thread_set_t data_array[] = { data };
will_return(__wrap_pthread_attr_destroy, true);
will_return(__wrap_pthread_attr_destroy, errnos[i]);
- const f_status_t status = f_thread_sets_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_sets_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_sets_resize_callback__works(void **state) {
+void test__f_thread_sets_destroy_callback__works(void **state) {
f_thread_set_t data = f_thread_set_t_initialize;
f_thread_set_t data_array[] = { data };
{
will_return(__wrap_pthread_attr_destroy, false);
- const f_status_t status = f_thread_sets_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_sets_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__sets_destroy_callback
+#define _TEST__F_thread__sets_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_sets_destroy_callback_()
+ */
+extern void test__f_thread_sets_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_destroy_callback_()
+ */
+extern void test__f_thread_sets_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__sets_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__sets_resize_callback
-#define _TEST__F_thread__sets_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_sets_resize_callback_()
- */
-extern void test__f_thread_sets_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_sets_resize_callback_()
- */
-extern void test__f_thread_sets_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__sets_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__spins_adjust_callback
-#define _TEST__F_thread__spins_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_spins_adjust_callback_()
- */
-extern void test__f_thread_spins_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_spins_adjust_callback_()
- */
-extern void test__f_thread_spins_adjust_callback__works(void **state);
-
-#endif // _TEST__F_thread__spins_adjust_callback
#include "test-thread.h"
-#include "test-thread-spins_adjust_callback.h"
+#include "test-thread-spins_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_spins_adjust_callback__fails(void **state) {
+void test__f_thread_spins_delete_callback__fails(void **state) {
f_thread_spin_t data = f_thread_spin_t_initialize;
f_thread_spin_t data_array[] = { data };
will_return(__wrap_pthread_spin_destroy, true);
will_return(__wrap_pthread_spin_destroy, errnos[i]);
- const f_status_t status = f_thread_spins_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_spins_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_spins_adjust_callback__works(void **state) {
+void test__f_thread_spins_delete_callback__works(void **state) {
f_thread_spin_t data = f_thread_spin_t_initialize;
f_thread_spin_t data_array[] = { data };
{
will_return(__wrap_pthread_spin_destroy, false);
- const f_status_t status = f_thread_spins_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_spins_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__spins_delete_callback
+#define _TEST__F_thread__spins_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_spins_delete_callback_()
+ */
+extern void test__f_thread_spins_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_delete_callback_()
+ */
+extern void test__f_thread_spins_delete_callback__works(void **state);
+
+#endif // _TEST__F_thread__spins_delete_callback
#include "test-thread.h"
-#include "test-thread-spins_resize_callback.h"
+#include "test-thread-spins_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_thread_spins_resize_callback__fails(void **state) {
+void test__f_thread_spins_destroy_callback__fails(void **state) {
f_thread_spin_t data = f_thread_spin_t_initialize;
f_thread_spin_t data_array[] = { data };
will_return(__wrap_pthread_spin_destroy, true);
will_return(__wrap_pthread_spin_destroy, errnos[i]);
- const f_status_t status = f_thread_spins_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_thread_spins_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, statuss[i]);
} // for
}
-void test__f_thread_spins_resize_callback__works(void **state) {
+void test__f_thread_spins_destroy_callback__works(void **state) {
f_thread_spin_t data = f_thread_spin_t_initialize;
f_thread_spin_t data_array[] = { data };
{
will_return(__wrap_pthread_spin_destroy, false);
- const f_status_t status = f_thread_spins_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_thread_spins_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_thread__spins_destroy_callback
+#define _TEST__F_thread__spins_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_thread_spins_destroy_callback_()
+ */
+extern void test__f_thread_spins_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_destroy_callback_()
+ */
+extern void test__f_thread_spins_destroy_callback__works(void **state);
+
+#endif // _TEST__F_thread__spins_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_thread__spins_resize_callback
-#define _TEST__F_thread__spins_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_thread_spins_resize_callback_()
- */
-extern void test__f_thread_spins_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_thread_spins_resize_callback_()
- */
-extern void test__f_thread_spins_resize_callback__works(void **state);
-
-#endif // _TEST__F_thread__spins_resize_callback
int main(void) {
const struct CMUnitTest tests[] = {
- cmocka_unit_test(test__f_thread_attributes_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_attributes_resize_callback__fails),
- cmocka_unit_test(test__f_thread_attributes_adjust_callback__works),
- cmocka_unit_test(test__f_thread_attributes_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_barriers_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_barriers_resize_callback__fails),
- cmocka_unit_test(test__f_thread_barriers_adjust_callback__works),
- cmocka_unit_test(test__f_thread_barriers_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_barrier_attributes_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_barrier_attributes_resize_callback__fails),
- cmocka_unit_test(test__f_thread_barrier_attributes_adjust_callback__works),
- cmocka_unit_test(test__f_thread_barrier_attributes_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_conditions_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_conditions_resize_callback__fails),
- cmocka_unit_test(test__f_thread_conditions_adjust_callback__works),
- cmocka_unit_test(test__f_thread_conditions_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_condition_attributes_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_condition_attributes_resize_callback__fails),
- cmocka_unit_test(test__f_thread_condition_attributes_adjust_callback__works),
- cmocka_unit_test(test__f_thread_condition_attributes_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_keys_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_keys_resize_callback__fails),
- cmocka_unit_test(test__f_thread_keys_adjust_callback__works),
- cmocka_unit_test(test__f_thread_keys_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_locks_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_locks_resize_callback__fails),
- cmocka_unit_test(test__f_thread_locks_adjust_callback__works),
- cmocka_unit_test(test__f_thread_locks_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_lock_attributes_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_lock_attributes_resize_callback__fails),
- cmocka_unit_test(test__f_thread_lock_attributes_adjust_callback__works),
- cmocka_unit_test(test__f_thread_lock_attributes_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_mutexs_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_mutexs_resize_callback__fails),
- cmocka_unit_test(test__f_thread_mutexs_adjust_callback__works),
- cmocka_unit_test(test__f_thread_mutexs_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_mutex_attributes_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_mutex_attributes_resize_callback__fails),
- cmocka_unit_test(test__f_thread_mutex_attributes_adjust_callback__works),
- cmocka_unit_test(test__f_thread_mutex_attributes_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_semaphores_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_semaphores_resize_callback__fails),
- cmocka_unit_test(test__f_thread_semaphores_adjust_callback__works),
- cmocka_unit_test(test__f_thread_semaphores_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_sets_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_sets_resize_callback__fails),
- cmocka_unit_test(test__f_thread_sets_adjust_callback__works),
- cmocka_unit_test(test__f_thread_sets_resize_callback__works),
-
- cmocka_unit_test(test__f_thread_spins_adjust_callback__fails),
- cmocka_unit_test(test__f_thread_spins_resize_callback__fails),
- cmocka_unit_test(test__f_thread_spins_adjust_callback__works),
- cmocka_unit_test(test__f_thread_spins_resize_callback__works),
+ cmocka_unit_test(test__f_thread_attributes_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_attributes_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_attributes_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_attributes_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_barriers_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_barriers_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_barriers_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_barriers_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_barrier_attributes_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_barrier_attributes_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_barrier_attributes_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_conditions_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_conditions_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_conditions_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_conditions_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_condition_attributes_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_condition_attributes_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_condition_attributes_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_keys_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_keys_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_keys_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_keys_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_locks_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_locks_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_locks_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_locks_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_lock_attributes_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_lock_attributes_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_lock_attributes_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_mutexs_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_mutexs_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_mutexs_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_mutexs_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_mutex_attributes_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_mutex_attributes_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_mutex_attributes_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_semaphores_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_semaphores_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_semaphores_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_semaphores_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_sets_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_sets_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_sets_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_sets_delete_callback__works),
+
+ cmocka_unit_test(test__f_thread_spins_destroy_callback__fails),
+ cmocka_unit_test(test__f_thread_spins_delete_callback__fails),
+ cmocka_unit_test(test__f_thread_spins_destroy_callback__works),
+ cmocka_unit_test(test__f_thread_spins_delete_callback__works),
cmocka_unit_test(test__f_thread_at_fork__fails),
cmocka_unit_test(test__f_thread_at_fork__works),
cmocka_unit_test(test__f_thread_spin_unlock__works),
#ifndef _di_level_0_parameter_checking_
- // f_thread_attributes_adjust_callback() doesn't use parameter checking.
- // f_thread_attributes_resize_callback() doesn't use parameter checking.
+ // f_thread_attributes_destroy_callback() doesn't use parameter checking.
+ // f_thread_attributes_delete_callback() doesn't use parameter checking.
- // f_thread_barriers_adjust_callback() doesn't use parameter checking.
- // f_thread_barriers_resize_callback() doesn't use parameter checking.
+ // f_thread_barriers_destroy_callback() doesn't use parameter checking.
+ // f_thread_barriers_delete_callback() doesn't use parameter checking.
- // f_thread_barrier_attributes_adjust_callback() doesn't use parameter checking.
- // f_thread_barrier_attributes_resize_callback() doesn't use parameter checking.
+ // f_thread_barrier_attributes_destroy_callback() doesn't use parameter checking.
+ // f_thread_barrier_attributes_delete_callback() doesn't use parameter checking.
- // f_thread_conditions_adjust_callback() doesn't use parameter checking.
- // f_thread_conditions_resize_callback() doesn't use parameter checking.
+ // f_thread_conditions_destroy_callback() doesn't use parameter checking.
+ // f_thread_conditions_delete_callback() doesn't use parameter checking.
- // f_thread_condition_attributes_adjust_callback() doesn't use parameter checking.
- // f_thread_condition_attributes_resize_callback() doesn't use parameter checking.
+ // f_thread_condition_attributes_destroy_callback() doesn't use parameter checking.
+ // f_thread_condition_attributes_delete_callback() doesn't use parameter checking.
- // f_thread_keys_adjust_callback() doesn't use parameter checking.
- // f_thread_keys_resize_callback() doesn't use parameter checking.
+ // f_thread_keys_destroy_callback() doesn't use parameter checking.
+ // f_thread_keys_delete_callback() doesn't use parameter checking.
- // f_thread_locks_adjust_callback() doesn't use parameter checking.
- // f_thread_locks_resize_callback() doesn't use parameter checking.
+ // f_thread_locks_destroy_callback() doesn't use parameter checking.
+ // f_thread_locks_delete_callback() doesn't use parameter checking.
- // f_thread_lock_attributes_adjust_callback() doesn't use parameter checking.
- // f_thread_lock_attributes_resize_callback() doesn't use parameter checking.
+ // f_thread_lock_attributes_destroy_callback() doesn't use parameter checking.
+ // f_thread_lock_attributes_delete_callback() doesn't use parameter checking.
- // f_thread_mutexs_adjust_callback() doesn't use parameter checking.
- // f_thread_mutexs_resize_callback() doesn't use parameter checking.
+ // f_thread_mutexs_destroy_callback() doesn't use parameter checking.
+ // f_thread_mutexs_delete_callback() doesn't use parameter checking.
- // f_thread_mutex_attributes_adjust_callback() doesn't use parameter checking.
- // f_thread_mutex_attributes_resize_callback() doesn't use parameter checking.
+ // f_thread_mutex_attributes_destroy_callback() doesn't use parameter checking.
+ // f_thread_mutex_attributes_delete_callback() doesn't use parameter checking.
- // f_thread_semaphores_adjust_callback() doesn't use parameter checking.
- // f_thread_semaphores_resize_callback() doesn't use parameter checking.
+ // f_thread_semaphores_destroy_callback() doesn't use parameter checking.
+ // f_thread_semaphores_delete_callback() doesn't use parameter checking.
- // f_thread_sets_adjust_callback() doesn't use parameter checking.
- // f_thread_sets_resize_callback() doesn't use parameter checking.
+ // f_thread_sets_destroy_callback() doesn't use parameter checking.
+ // f_thread_sets_delete_callback() doesn't use parameter checking.
- // f_thread_spins_adjust_callback() doesn't use parameter checking.
- // f_thread_spins_resize_callback() doesn't use parameter checking.
+ // f_thread_spins_destroy_callback() doesn't use parameter checking.
+ // f_thread_spins_delete_callback() doesn't use parameter checking.
cmocka_unit_test(test__f_thread_at_fork__parameter_checking),
#include "mock-thread.h"
// Test includes.
-#include "test-thread-attributes_adjust_callback.h"
-#include "test-thread-attributes_resize_callback.h"
-#include "test-thread-barriers_adjust_callback.h"
-#include "test-thread-barriers_resize_callback.h"
-#include "test-thread-barrier_attributes_adjust_callback.h"
-#include "test-thread-barrier_attributes_resize_callback.h"
-#include "test-thread-conditions_adjust_callback.h"
-#include "test-thread-conditions_resize_callback.h"
-#include "test-thread-condition_attributes_adjust_callback.h"
-#include "test-thread-condition_attributes_resize_callback.h"
-#include "test-thread-keys_adjust_callback.h"
-#include "test-thread-keys_resize_callback.h"
-#include "test-thread-locks_adjust_callback.h"
-#include "test-thread-locks_resize_callback.h"
-#include "test-thread-lock_attributes_adjust_callback.h"
-#include "test-thread-lock_attributes_resize_callback.h"
-#include "test-thread-mutexs_adjust_callback.h"
-#include "test-thread-mutexs_resize_callback.h"
-#include "test-thread-mutex_attributes_adjust_callback.h"
-#include "test-thread-mutex_attributes_resize_callback.h"
-#include "test-thread-semaphores_adjust_callback.h"
-#include "test-thread-semaphores_resize_callback.h"
-#include "test-thread-sets_adjust_callback.h"
-#include "test-thread-sets_resize_callback.h"
-#include "test-thread-spins_adjust_callback.h"
-#include "test-thread-spins_resize_callback.h"
+#include "test-thread-attributes_destroy_callback.h"
+#include "test-thread-attributes_delete_callback.h"
+#include "test-thread-barriers_destroy_callback.h"
+#include "test-thread-barriers_delete_callback.h"
+#include "test-thread-barrier_attributes_destroy_callback.h"
+#include "test-thread-barrier_attributes_delete_callback.h"
+#include "test-thread-conditions_destroy_callback.h"
+#include "test-thread-conditions_delete_callback.h"
+#include "test-thread-condition_attributes_destroy_callback.h"
+#include "test-thread-condition_attributes_delete_callback.h"
+#include "test-thread-keys_destroy_callback.h"
+#include "test-thread-keys_delete_callback.h"
+#include "test-thread-locks_destroy_callback.h"
+#include "test-thread-locks_delete_callback.h"
+#include "test-thread-lock_attributes_destroy_callback.h"
+#include "test-thread-lock_attributes_delete_callback.h"
+#include "test-thread-mutexs_destroy_callback.h"
+#include "test-thread-mutexs_delete_callback.h"
+#include "test-thread-mutex_attributes_destroy_callback.h"
+#include "test-thread-mutex_attributes_delete_callback.h"
+#include "test-thread-semaphores_destroy_callback.h"
+#include "test-thread-semaphores_delete_callback.h"
+#include "test-thread-sets_destroy_callback.h"
+#include "test-thread-sets_delete_callback.h"
+#include "test-thread-spins_destroy_callback.h"
+#include "test-thread-spins_delete_callback.h"
#include "test-thread-at_fork.h"
#include "test-thread-attribute_affinity_get.h"
extern "C" {
#endif
-#ifndef _di_f_cells_adjust_callback_
- f_status_t f_cells_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_cellss_delete_callback_
+ f_status_t f_cellss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_cells_t * const array = (f_cells_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_cells_adjust_callback_
+#endif // _di_f_cellss_delete_callback_
-#ifndef _di_f_cells_resize_callback_
- f_status_t f_cells_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_cellss_destroy_callback_
+ f_status_t f_cellss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_cells_t * const array = (f_cells_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_cells_resize_callback_
+#endif // _di_f_cellss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_cellss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_cellss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_cells_adjust_callback_
- extern f_status_t f_cells_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_cells_adjust_callback_
+#ifndef _di_f_cellss_delete_callback_
+ extern f_status_t f_cellss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_cellss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_cellss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_cellss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_cells_resize_callback_
- extern f_status_t f_cells_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_cells_resize_callback_
+#ifndef _di_f_cellss_destroy_callback_
+ extern f_status_t f_cellss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_cellss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_files_adjust_callback_
- f_status_t f_files_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_filess_delete_callback_
+ f_status_t f_filess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_files_t * const array = (f_files_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_files_adjust_callback_
+#endif // _di_f_filess_delete_callback_
-#ifndef _di_f_files_resize_callback_
- f_status_t f_files_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_filess_destroy_callback_
+ f_status_t f_filess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_files_t * const array = (f_files_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_files_resize_callback_
+#endif // _di_f_filess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_filess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_filess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_files_adjust_callback_
- extern f_status_t f_files_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_files_adjust_callback_
+#ifndef _di_f_filess_delete_callback_
+ extern f_status_t f_filess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_filess_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_filess_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_filess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_files_resize_callback_
- extern f_status_t f_files_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_files_resize_callback_
+#ifndef _di_f_filess_destroy_callback_
+ extern f_status_t f_filess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_filess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_fll_ids_adjust_callback_
- f_status_t f_fll_ids_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_fll_idss_delete_callback_
+ f_status_t f_fll_idss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_fll_ids_t * const array = (f_fll_ids_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_fll_ids_adjust_callback_
+#endif // _di_f_fll_idss_delete_callback_
-#ifndef _di_f_fll_ids_resize_callback_
- f_status_t f_fll_ids_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_fll_idss_destroy_callback_
+ f_status_t f_fll_idss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_fll_ids_t * const array = (f_fll_ids_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_fll_ids_resize_callback_
+#endif // _di_f_fll_idss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_fll_idss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_fll_ids_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_fll_ids_delete_callback_
+ extern f_status_t f_fll_ids_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fll_ids_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_fll_ids_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
* @see f_memory_array_adjust()
* @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_fll_ids_adjust_callback_
- extern f_status_t f_fll_ids_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_fll_ids_adjust_callback_
+#ifndef _di_f_fll_ids_destroy_callback_
+ extern f_status_t f_fll_ids_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fll_ids_destroy_callback_
/**
* A callback intended to be passed to f_memory_arrays_resize() for an f_fll_idss_t structure.
*
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
* This does not do parameter checking.
*
* @param start
* @see f_memory_array_resize()
* @see f_memory_arrays_resize()
*/
-#ifndef _di_f_fll_ids_resize_callback_
- extern f_status_t f_fll_ids_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_fll_ids_resize_callback_
+#ifndef _di_f_fll_idss_delete_callback_
+ extern f_status_t f_fll_idss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fll_idss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_fll_idss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_fll_idss_destroy_callback_
+ extern f_status_t f_fll_idss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_fll_idss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_int128s_adjust_callback_
- f_status_t f_int128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int128ss_delete_callback_
+ f_status_t f_int128ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int128s_t * const array = (f_int128s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int128s_adjust_callback_
+#endif // _di_f_int128ss_delete_callback_
-#ifndef _di_f_int128s_resize_callback_
- f_status_t f_int128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int128ss_destroy_callback_
+ f_status_t f_int128ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int128s_t * const array = (f_int128s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int128s_resize_callback_
+#endif // _di_f_int128ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_int128ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int128ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int128s_adjust_callback_
- extern f_status_t f_int128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int128s_adjust_callback_
+#ifndef _di_f_int128ss_delete_callback_
+ extern f_status_t f_int128ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int128ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_int128ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int128ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int128s_resize_callback_
- extern f_status_t f_int128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int128s_resize_callback_
+#ifndef _di_f_int128ss_destroy_callback_
+ extern f_status_t f_int128ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int128ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_int16s_adjust_callback_
- f_status_t f_int16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int16ss_delete_callback_
+ f_status_t f_int16ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int16s_t * const array = (f_int16s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int16s_adjust_callback_
+#endif // _di_f_int16ss_delete_callback_
-#ifndef _di_f_int16s_resize_callback_
- f_status_t f_int16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int16ss_destroy_callback_
+ f_status_t f_int16ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int16s_t * const array = (f_int16s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int16s_resize_callback_
+#endif // _di_f_int16ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_int16ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int16ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int16s_adjust_callback_
- extern f_status_t f_int16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int16s_adjust_callback_
+#ifndef _di_f_int16ss_delete_callback_
+ extern f_status_t f_int16ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int16ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_int16ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int16ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int16s_resize_callback_
- extern f_status_t f_int16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int16s_resize_callback_
+#ifndef _di_f_int16ss_destroy_callback_
+ extern f_status_t f_int16ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int16ss_destroy_callback_
+
#ifdef __cplusplus
} // extern "C"
#endif
extern "C" {
#endif
-#ifndef _di_f_int32s_adjust_callback_
- f_status_t f_int32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int32ss_delete_callback_
+ f_status_t f_int32ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int32s_t * const array = (f_int32s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int32s_adjust_callback_
+#endif // _di_f_int32ss_delete_callback_
-#ifndef _di_f_int32s_resize_callback_
- f_status_t f_int32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int32ss_destroy_callback_
+ f_status_t f_int32ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int32s_t * const array = (f_int32s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int32s_resize_callback_
+#endif // _di_f_int32ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_int32ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int32ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int32s_adjust_callback_
- extern f_status_t f_int32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int32s_adjust_callback_
+#ifndef _di_f_int32ss_delete_callback_
+ extern f_status_t f_int32ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int32ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_int32ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int32ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int32s_resize_callback_
- extern f_status_t f_int32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int32s_resize_callback_
+#ifndef _di_f_int32ss_destroy_callback_
+ extern f_status_t f_int32ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int32ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_int64s_adjust_callback_
- f_status_t f_int64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int64ss_delete_callback_
+ f_status_t f_int64ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int64s_t * const array = (f_int64s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int64s_adjust_callback_
+#endif // _di_f_int64ss_delete_callback_
-#ifndef _di_f_int64s_resize_callback_
- f_status_t f_int64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int64ss_destroy_callback_
+ f_status_t f_int64ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int64s_t * const array = (f_int64s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int64s_resize_callback_
+#endif // _di_f_int64ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_int64ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int64ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int64s_adjust_callback_
- extern f_status_t f_int64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int64s_adjust_callback_
+#ifndef _di_f_int64ss_delete_callback_
+ extern f_status_t f_int64ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int64ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_int64ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int64ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int64s_resize_callback_
- extern f_status_t f_int64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int64s_resize_callback_
+#ifndef _di_f_int64ss_destroy_callback_
+ extern f_status_t f_int64ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int64ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_int8s_adjust_callback_
- f_status_t f_int8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int8ss_delete_callback_
+ f_status_t f_int8ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int8s_t * const array = (f_int8s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int8s_adjust_callback_
+#endif // _di_f_int8ss_delete_callback_
-#ifndef _di_f_int8s_resize_callback_
- f_status_t f_int8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_int8ss_destroy_callback_
+ f_status_t f_int8ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_int8s_t * const array = (f_int8s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_int8s_resize_callback_
+#endif // _di_f_int8ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_int8ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int8ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int8s_adjust_callback_
- extern f_status_t f_int8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int8s_adjust_callback_
+#ifndef _di_f_int8ss_delete_callback_
+ extern f_status_t f_int8ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int8ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_int8ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int8ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int8s_resize_callback_
- extern f_status_t f_int8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_int8s_resize_callback_
+#ifndef _di_f_int8ss_destroy_callback_
+ extern f_status_t f_int8ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_int8ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_number_unsigneds_adjust_callback_
- f_status_t f_number_unsigneds_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_number_unsignedss_delete_callback_
+ f_status_t f_number_unsignedss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_number_unsigneds_t * const array = (f_number_unsigneds_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_number_unsigneds_adjust_callback_
+#endif // _di_f_number_unsignedss_delete_callback_
-#ifndef _di_f_number_unsigneds_resize_callback_
- f_status_t f_number_unsigneds_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_number_unsignedss_destroy_callback_
+ f_status_t f_number_unsignedss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_number_unsigneds_t * const array = (f_number_unsigneds_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_number_unsigneds_resize_callback_
+#endif // _di_f_number_unsignedss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_number_unsignedss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_number_unsignedss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_number_unsigneds_adjust_callback_
- extern f_status_t f_number_unsigneds_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_number_unsigneds_adjust_callback_
+#ifndef _di_f_number_unsignedss_delete_callback_
+ extern f_status_t f_number_unsignedss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_number_unsignedss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_number_unsignedss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_number_unsignedss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_number_unsigneds_resize_callback_
- extern f_status_t f_number_unsigneds_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_number_unsigneds_resize_callback_
+#ifndef _di_f_number_unsignedss_destroy_callback_
+ extern f_status_t f_number_unsignedss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_number_unsignedss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_polls_adjust_callback_
- f_status_t f_polls_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_pollss_delete_callback_
+ f_status_t f_pollss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_polls_t * const array = (f_polls_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_poll_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_poll_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_polls_adjust_callback_
+#endif // _di_f_pollss_delete_callback_
-#ifndef _di_f_polls_resize_callback_
- f_status_t f_polls_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_pollss_destroy_callback_
+ f_status_t f_pollss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_polls_t * const array = (f_polls_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_poll_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_poll_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_polls_resize_callback_
+#endif // _di_f_pollss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_pollss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_pollss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_polls_adjust_callback_
- extern f_status_t f_polls_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_polls_adjust_callback_
+#ifndef _di_f_pollss_delete_callback_
+ extern f_status_t f_pollss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_pollss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_pollss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_pollss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_polls_resize_callback_
- extern f_status_t f_polls_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_polls_resize_callback_
+#ifndef _di_f_pollss_destroy_callback_
+ extern f_status_t f_pollss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_pollss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_states_adjust_callback_
- f_status_t f_states_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_statess_delete_callback_
+ f_status_t f_statess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_states_t * const array = (f_states_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_state_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_state_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_states_adjust_callback_
+#endif // _di_f_statess_delete_callback_
-#ifndef _di_f_states_resize_callback_
- f_status_t f_states_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_statess_destroy_callback_
+ f_status_t f_statess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_states_t * const array = (f_states_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_state_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_state_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_states_resize_callback_
+#endif // _di_f_statess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_statess_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_statess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_states_adjust_callback_
- extern f_status_t f_states_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_states_adjust_callback_
+#ifndef _di_f_statess_delete_callback_
+ extern f_status_t f_statess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_statess_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_statess_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_statess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_states_resize_callback_
- extern f_status_t f_states_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_states_resize_callback_
+#ifndef _di_f_statess_destroy_callback_
+ extern f_status_t f_statess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_statess_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_statuss_adjust_callback_
- f_status_t f_statuss_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_statusss_delete_callback_
+ f_status_t f_statusss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_statuss_t * const array = (f_statuss_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_statuss_adjust_callback_
+#endif // _di_f_statusss_delete_callback_
-#ifndef _di_f_statuss_resize_callback_
- f_status_t f_statuss_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_statusss_destroy_callback_
+ f_status_t f_statusss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_statuss_t * const array = (f_statuss_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_status_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_statuss_resize_callback_
+#endif // _di_f_statusss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_statusss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_statusss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_statuss_adjust_callback_
- extern f_status_t f_statuss_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_statuss_adjust_callback_
+#ifndef _di_f_statusss_delete_callback_
+ extern f_status_t f_statusss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_statusss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_statusss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_statusss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_statuss_resize_callback_
- extern f_status_t f_statuss_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_statuss_resize_callback_
+#ifndef _di_f_statusss_destroy_callback_
+ extern f_status_t f_statusss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_statusss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_uint128s_adjust_callback_
- f_status_t f_uint128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint128ss_delete_callback_
+ f_status_t f_uint128ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint128s_t * const array = (f_uint128s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint128s_adjust_callback_
+#endif // _di_f_uint128ss_delete_callback_
-#ifndef _di_f_uint128s_resize_callback_
- f_status_t f_uint128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint128ss_destroy_callback_
+ f_status_t f_uint128ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint128s_t * const array = (f_uint128s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint128s_resize_callback_
+#endif // _di_f_uint128ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint128ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint128ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint128s_adjust_callback_
- extern f_status_t f_uint128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint128s_adjust_callback_
+#ifndef _di_f_uint128ss_delete_callback_
+ extern f_status_t f_uint128ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint128ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_uint128ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint128ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint128s_resize_callback_
- extern f_status_t f_uint128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint128s_resize_callback_
+#ifndef _di_f_uint128ss_destroy_callback_
+ extern f_status_t f_uint128ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint128ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_uint16s_adjust_callback_
- f_status_t f_uint16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint16ss_delete_callback_
+ f_status_t f_uint16ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint16s_t * const array = (f_uint16s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint16s_adjust_callback_
+#endif // _di_f_uint16ss_delete_callback_
-#ifndef _di_f_uint16s_resize_callback_
- f_status_t f_uint16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint16ss_destroy_callback_
+ f_status_t f_uint16ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint16s_t * const array = (f_uint16s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint16s_resize_callback_
+#endif // _di_f_uint16ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint16ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint16ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint16s_adjust_callback_
- extern f_status_t f_uint16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint16s_adjust_callback_
+#ifndef _di_f_uint16ss_delete_callback_
+ extern f_status_t f_uint16ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint16ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_uint16ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint16ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint16s_resize_callback_
- extern f_status_t f_uint16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint16s_resize_callback_
+#ifndef _di_f_uint16ss_destroy_callback_
+ extern f_status_t f_uint16ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint16ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_uint32s_adjust_callback_
- f_status_t f_uint32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint32ss_delete_callback_
+ f_status_t f_uint32ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint32s_t * const array = (f_uint32s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint32s_adjust_callback_
+#endif // _di_f_uint32ss_delete_callback_
-#ifndef _di_f_uint32s_resize_callback_
- f_status_t f_uint32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint32ss_destroy_callback_
+ f_status_t f_uint32ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint32s_t * const array = (f_uint32s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint32s_resize_callback_
+#endif // _di_f_uint32ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint32ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint32ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint32s_adjust_callback_
- extern f_status_t f_uint32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint32s_adjust_callback_
+#ifndef _di_f_uint32ss_delete_callback_
+ extern f_status_t f_uint32ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint32ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_uint32ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint32ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint32s_resize_callback_
- extern f_status_t f_uint32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint32s_resize_callback_
+#ifndef _di_f_uint32ss_destroy_callback_
+ extern f_status_t f_uint32ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint32ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_uint64s_adjust_callback_
- f_status_t f_uint64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint64ss_delete_callback_
+ f_status_t f_uint64ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint64s_t * const array = (f_uint64s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint64s_adjust_callback_
+#endif // _di_f_uint64ss_delete_callback_
-#ifndef _di_f_uint64s_resize_callback_
- f_status_t f_uint64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint64ss_destroy_callback_
+ f_status_t f_uint64ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint64s_t * const array = (f_uint64s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint64s_resize_callback_
+#endif // _di_f_uint64ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint64ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint64ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint64s_adjust_callback_
- extern f_status_t f_uint64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint64s_adjust_callback_
+#ifndef _di_f_uint64ss_delete_callback_
+ extern f_status_t f_uint64ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint64ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_uint64ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint64ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint64s_resize_callback_
- extern f_status_t f_uint64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint64s_resize_callback_
+#ifndef _di_f_uint64ss_destroy_callback_
+ extern f_status_t f_uint64ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint64ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_uint8s_adjust_callback_
- f_status_t f_uint8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint8ss_delete_callback_
+ f_status_t f_uint8ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint8s_t * const array = (f_uint8s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint8s_adjust_callback_
+#endif // _di_f_uint8ss_delete_callback_
-#ifndef _di_f_uint8s_resize_callback_
- f_status_t f_uint8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_uint8ss_destroy_callback_
+ f_status_t f_uint8ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
{
f_uint8s_t * const array = (f_uint8s_t *) void_array;
for (f_number_unsigned_t i = start; i < stop; ++i) {
- status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
- if (F_status_is_error(status)) return status;
+ if (array[i].size) {
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
} // for
}
return F_none;
}
-#endif // _di_f_uint8s_resize_callback_
+#endif // _di_f_uint8ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint8ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint8ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
*
- * @see f_memory_array_adjust()
- * @see f_memory_arrays_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint8s_adjust_callback_
- extern f_status_t f_uint8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint8s_adjust_callback_
+#ifndef _di_f_uint8ss_delete_callback_
+ extern f_status_t f_uint8ss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint8ss_delete_callback_
/**
- * A callback intended to be passed to f_memory_arrays_resize() for an f_uint8ss_t structure.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint8ss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
*
* This does not do parameter checking.
*
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
*
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint8s_resize_callback_
- extern f_status_t f_uint8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_uint8s_resize_callback_
+#ifndef _di_f_uint8ss_destroy_callback_
+ extern f_status_t f_uint8ss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_uint8ss_destroy_callback_
#ifdef __cplusplus
} // extern "C"
build_libraries -lc -lcmocka
build_libraries-individual -lf_memory -lf_type_array
-build_sources_program test-type_array-cells_adjust_callback.c test-type_array-cells_resize_callback.c
-build_sources_program test-type_array-files_adjust_callback.c test-type_array-files_resize_callback.c
-build_sources_program test-type_array-fll_ids_adjust_callback.c test-type_array-fll_ids_resize_callback.c
-build_sources_program test-type_array-int8s_adjust_callback.c test-type_array-int8s_resize_callback.c
-build_sources_program test-type_array-int16s_adjust_callback.c test-type_array-int16s_resize_callback.c
-build_sources_program test-type_array-int32s_adjust_callback.c test-type_array-int32s_resize_callback.c
-build_sources_program test-type_array-int64s_adjust_callback.c test-type_array-int64s_resize_callback.c
-build_sources_program test-type_array-int128s_adjust_callback.c test-type_array-int128s_resize_callback.c
-build_sources_program test-type_array-number_unsigneds_adjust_callback.c test-type_array-number_unsigneds_resize_callback.c
-build_sources_program test-type_array-polls_adjust_callback.c test-type_array-polls_resize_callback.c
-build_sources_program test-type_array-states_adjust_callback.c test-type_array-states_resize_callback.c
-build_sources_program test-type_array-statuss_adjust_callback.c test-type_array-statuss_resize_callback.c
-build_sources_program test-type_array-uint8s_adjust_callback.c test-type_array-uint8s_resize_callback.c
-build_sources_program test-type_array-uint16s_adjust_callback.c test-type_array-uint16s_resize_callback.c
-build_sources_program test-type_array-uint32s_adjust_callback.c test-type_array-uint32s_resize_callback.c
-build_sources_program test-type_array-uint64s_adjust_callback.c test-type_array-uint64s_resize_callback.c
-build_sources_program test-type_array-uint128s_adjust_callback.c test-type_array-uint128s_resize_callback.c
+build_sources_program test-type_array-cells_destroy_callback.c test-type_array-cells_delete_callback.c
+build_sources_program test-type_array-files_destroy_callback.c test-type_array-files_delete_callback.c
+build_sources_program test-type_array-fll_ids_destroy_callback.c test-type_array-fll_ids_delete_callback.c
+build_sources_program test-type_array-int8s_destroy_callback.c test-type_array-int8s_delete_callback.c
+build_sources_program test-type_array-int16s_destroy_callback.c test-type_array-int16s_delete_callback.c
+build_sources_program test-type_array-int32s_destroy_callback.c test-type_array-int32s_delete_callback.c
+build_sources_program test-type_array-int64s_destroy_callback.c test-type_array-int64s_delete_callback.c
+build_sources_program test-type_array-int128s_destroy_callback.c test-type_array-int128s_delete_callback.c
+build_sources_program test-type_array-number_unsigneds_destroy_callback.c test-type_array-number_unsigneds_delete_callback.c
+build_sources_program test-type_array-polls_destroy_callback.c test-type_array-polls_delete_callback.c
+build_sources_program test-type_array-states_destroy_callback.c test-type_array-states_delete_callback.c
+build_sources_program test-type_array-statuss_destroy_callback.c test-type_array-statuss_delete_callback.c
+build_sources_program test-type_array-uint8s_destroy_callback.c test-type_array-uint8s_delete_callback.c
+build_sources_program test-type_array-uint16s_destroy_callback.c test-type_array-uint16s_delete_callback.c
+build_sources_program test-type_array-uint32s_destroy_callback.c test-type_array-uint32s_delete_callback.c
+build_sources_program test-type_array-uint64s_destroy_callback.c test-type_array-uint64s_delete_callback.c
+build_sources_program test-type_array-uint128s_destroy_callback.c test-type_array-uint128s_delete_callback.c
build_sources_program test-type_array.c
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__cells_adjust_callback
-#define _TEST__F_type_array__cells_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_cells_adjust_callback()
- */
-extern void test__f_type_array_cells_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_adjust_callback()
- */
-extern void test__f_type_array_cells_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__cells_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-cells_resize_callback.h"
+#include "test-type_array-cells_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_cells_resize_callback__fails(void **state) {
+void test__f_type_array_cells_delete_callback__fails(void **state) {
f_cell_t data = f_cell_t_initialize;
f_cell_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_cells_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_cells_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_cells_resize_callback__works(void **state) {
+void test__f_type_array_cells_delete_callback__works(void **state) {
f_cell_t data = f_cell_t_initialize;
f_cell_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_cells_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_cells_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cells_delete_callback
+#define _TEST__F_type_array__cells_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cells_delete_callback()
+ */
+extern void test__f_type_array_cells_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cells_delete_callback()
+ */
+extern void test__f_type_array_cells_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cells_delete_callback
#include "test-type_array.h"
-#include "test-type_array-cells_adjust_callback.h"
+#include "test-type_array-cells_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_cells_adjust_callback__fails(void **state) {
+void test__f_type_array_cells_destroy_callback__fails(void **state) {
f_cell_t data = f_cell_t_initialize;
f_cell_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_cells_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_cells_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_cells_adjust_callback__works(void **state) {
+void test__f_type_array_cells_destroy_callback__works(void **state) {
f_cell_t data = f_cell_t_initialize;
f_cell_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_cells_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_cells_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cells_destroy_callback
+#define _TEST__F_type_array__cells_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cells_destroy_callback()
+ */
+extern void test__f_type_array_cells_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cells_destroy_callback()
+ */
+extern void test__f_type_array_cells_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cells_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__cells_resize_callback
-#define _TEST__F_type_array__cells_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_cells_resize_callback()
- */
-extern void test__f_type_array_cells_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_resize_callback()
- */
-extern void test__f_type_array_cells_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__cells_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__files_adjust_callback
-#define _TEST__F_type_array__files_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_files_adjust_callback()
- */
-extern void test__f_type_array_files_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_adjust_callback()
- */
-extern void test__f_type_array_files_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__files_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-files_resize_callback.h"
+#include "test-type_array-files_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_files_resize_callback__fails(void **state) {
+void test__f_type_array_files_delete_callback__fails(void **state) {
f_file_t data = f_file_t_initialize;
f_file_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_files_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_files_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_files_resize_callback__works(void **state) {
+void test__f_type_array_files_delete_callback__works(void **state) {
f_file_t data = f_file_t_initialize;
f_file_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_files_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_files_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__files_delete_callback
+#define _TEST__F_type_array__files_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_files_delete_callback()
+ */
+extern void test__f_type_array_files_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_files_delete_callback()
+ */
+extern void test__f_type_array_files_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__files_delete_callback
#include "test-type_array.h"
-#include "test-type_array-files_adjust_callback.h"
+#include "test-type_array-files_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_files_adjust_callback__fails(void **state) {
+void test__f_type_array_files_destroy_callback__fails(void **state) {
f_file_t data = f_file_t_initialize;
f_file_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_files_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_files_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_files_adjust_callback__works(void **state) {
+void test__f_type_array_files_destroy_callback__works(void **state) {
f_file_t data = f_file_t_initialize;
f_file_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_files_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_files_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__files_destroy_callback
+#define _TEST__F_type_array__files_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_files_destroy_callback()
+ */
+extern void test__f_type_array_files_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_files_destroy_callback()
+ */
+extern void test__f_type_array_files_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__files_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__files_resize_callback
-#define _TEST__F_type_array__files_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_files_resize_callback()
- */
-extern void test__f_type_array_files_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_resize_callback()
- */
-extern void test__f_type_array_files_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__files_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__fll_ids_adjust_callback
-#define _TEST__F_type_array__fll_ids_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_fll_ids_adjust_callback()
- */
-extern void test__f_type_array_fll_ids_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_adjust_callback()
- */
-extern void test__f_type_array_fll_ids_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-fll_ids_resize_callback.h"
+#include "test-type_array-fll_ids_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_fll_ids_resize_callback__fails(void **state) {
+void test__f_type_array_fll_ids_delete_callback__fails(void **state) {
f_fll_id_t data = f_fll_id_t_initialize;
f_fll_id_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_fll_ids_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_fll_ids_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_fll_ids_resize_callback__works(void **state) {
+void test__f_type_array_fll_ids_delete_callback__works(void **state) {
f_fll_id_t data = f_fll_id_t_initialize;
f_fll_id_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_fll_ids_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_fll_ids_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_ids_delete_callback
+#define _TEST__F_type_array__fll_ids_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_ids_delete_callback()
+ */
+extern void test__f_type_array_fll_ids_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_ids_delete_callback()
+ */
+extern void test__f_type_array_fll_ids_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_ids_delete_callback
#include "test-type_array.h"
-#include "test-type_array-fll_ids_adjust_callback.h"
+#include "test-type_array-fll_ids_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_fll_ids_adjust_callback__fails(void **state) {
+void test__f_type_array_fll_ids_destroy_callback__fails(void **state) {
f_fll_id_t data = f_fll_id_t_initialize;
f_fll_id_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_fll_ids_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_fll_ids_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_fll_ids_adjust_callback__works(void **state) {
+void test__f_type_array_fll_ids_destroy_callback__works(void **state) {
f_fll_id_t data = f_fll_id_t_initialize;
f_fll_id_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_fll_ids_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_fll_ids_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_ids_destroy_callback
+#define _TEST__F_type_array__fll_ids_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_ids_destroy_callback()
+ */
+extern void test__f_type_array_fll_ids_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_ids_destroy_callback()
+ */
+extern void test__f_type_array_fll_ids_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_ids_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__fll_ids_resize_callback
-#define _TEST__F_type_array__fll_ids_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_fll_ids_resize_callback()
- */
-extern void test__f_type_array_fll_ids_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_resize_callback()
- */
-extern void test__f_type_array_fll_ids_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int128s_adjust_callback
-#define _TEST__F_type_array__int128s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int128s_adjust_callback()
- */
-extern void test__f_type_array_int128s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_adjust_callback()
- */
-extern void test__f_type_array_int128s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-int128s_resize_callback.h"
+#include "test-type_array-int128s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int128s_resize_callback__fails(void **state) {
+void test__f_type_array_int128s_delete_callback__fails(void **state) {
f_int128_t data = 0;
f_int128_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_int128s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int128s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int128s_resize_callback__works(void **state) {
+void test__f_type_array_int128s_delete_callback__works(void **state) {
f_int128_t data = 0;
f_int128_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_int128s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int128s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128s_delete_callback
+#define _TEST__F_type_array__int128s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128s_delete_callback()
+ */
+extern void test__f_type_array_int128s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128s_delete_callback()
+ */
+extern void test__f_type_array_int128s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-int128s_adjust_callback.h"
+#include "test-type_array-int128s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int128s_adjust_callback__fails(void **state) {
+void test__f_type_array_int128s_destroy_callback__fails(void **state) {
f_int128_t data = 0;
f_int128_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_int128s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int128s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int128s_adjust_callback__works(void **state) {
+void test__f_type_array_int128s_destroy_callback__works(void **state) {
f_int128_t data = 0;
f_int128_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_int128s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int128s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128s_destroy_callback
+#define _TEST__F_type_array__int128s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128s_destroy_callback()
+ */
+extern void test__f_type_array_int128s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128s_destroy_callback()
+ */
+extern void test__f_type_array_int128s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int128s_resize_callback
-#define _TEST__F_type_array__int128s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int128s_resize_callback()
- */
-extern void test__f_type_array_int128s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_resize_callback()
- */
-extern void test__f_type_array_int128s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int16s_adjust_callback
-#define _TEST__F_type_array__int16s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int16s_adjust_callback()
- */
-extern void test__f_type_array_int16s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_adjust_callback()
- */
-extern void test__f_type_array_int16s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-int16s_resize_callback.h"
+#include "test-type_array-int16s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int16s_resize_callback__fails(void **state) {
+void test__f_type_array_int16s_delete_callback__fails(void **state) {
int16_t data = 0;
int16_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_int16s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int16s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int16s_resize_callback__works(void **state) {
+void test__f_type_array_int16s_delete_callback__works(void **state) {
int16_t data = 0;
int16_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_int16s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int16s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16s_delete_callback
+#define _TEST__F_type_array__int16s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16s_delete_callback()
+ */
+extern void test__f_type_array_int16s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16s_delete_callback()
+ */
+extern void test__f_type_array_int16s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-int16s_adjust_callback.h"
+#include "test-type_array-int16s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int16s_adjust_callback__fails(void **state) {
+void test__f_type_array_int16s_destroy_callback__fails(void **state) {
int16_t data = 0;
int16_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_int16s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int16s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int16s_adjust_callback__works(void **state) {
+void test__f_type_array_int16s_destroy_callback__works(void **state) {
int16_t data = 0;
int16_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_int16s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int16s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16s_destroy_callback
+#define _TEST__F_type_array__int16s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16s_destroy_callback()
+ */
+extern void test__f_type_array_int16s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16s_destroy_callback()
+ */
+extern void test__f_type_array_int16s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int16s_resize_callback
-#define _TEST__F_type_array__int16s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int16s_resize_callback()
- */
-extern void test__f_type_array_int16s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_resize_callback()
- */
-extern void test__f_type_array_int16s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int32s_adjust_callback
-#define _TEST__F_type_array__int32s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int32s_adjust_callback()
- */
-extern void test__f_type_array_int32s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_adjust_callback()
- */
-extern void test__f_type_array_int32s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-int32s_resize_callback.h"
+#include "test-type_array-int32s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int32s_resize_callback__fails(void **state) {
+void test__f_type_array_int32s_delete_callback__fails(void **state) {
int32_t data = 0;
int32_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_int32s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int32s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int32s_resize_callback__works(void **state) {
+void test__f_type_array_int32s_delete_callback__works(void **state) {
int32_t data = 0;
int32_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_int32s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int32s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32s_delete_callback
+#define _TEST__F_type_array__int32s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32s_delete_callback()
+ */
+extern void test__f_type_array_int32s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32s_delete_callback()
+ */
+extern void test__f_type_array_int32s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-int32s_adjust_callback.h"
+#include "test-type_array-int32s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int32s_adjust_callback__fails(void **state) {
+void test__f_type_array_int32s_destroy_callback__fails(void **state) {
int32_t data = 0;
int32_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_int32s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int32s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int32s_adjust_callback__works(void **state) {
+void test__f_type_array_int32s_destroy_callback__works(void **state) {
int32_t data = 0;
int32_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_int32s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int32s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32s_destroy_callback
+#define _TEST__F_type_array__int32s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32s_destroy_callback()
+ */
+extern void test__f_type_array_int32s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32s_destroy_callback()
+ */
+extern void test__f_type_array_int32s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int32s_resize_callback
-#define _TEST__F_type_array__int32s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int32s_resize_callback()
- */
-extern void test__f_type_array_int32s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_resize_callback()
- */
-extern void test__f_type_array_int32s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int64s_adjust_callback
-#define _TEST__F_type_array__int64s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int64s_adjust_callback()
- */
-extern void test__f_type_array_int64s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_adjust_callback()
- */
-extern void test__f_type_array_int64s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-int64s_resize_callback.h"
+#include "test-type_array-int64s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int64s_resize_callback__fails(void **state) {
+void test__f_type_array_int64s_delete_callback__fails(void **state) {
int64_t data = 0;
int64_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_int64s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int64s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int64s_resize_callback__works(void **state) {
+void test__f_type_array_int64s_delete_callback__works(void **state) {
int64_t data = 0;
int64_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_int64s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int64s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64s_delete_callback
+#define _TEST__F_type_array__int64s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64s_delete_callback()
+ */
+extern void test__f_type_array_int64s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64s_delete_callback()
+ */
+extern void test__f_type_array_int64s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-int64s_adjust_callback.h"
+#include "test-type_array-int64s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int64s_adjust_callback__fails(void **state) {
+void test__f_type_array_int64s_destroy_callback__fails(void **state) {
int64_t data = 0;
int64_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_int64s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int64s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int64s_adjust_callback__works(void **state) {
+void test__f_type_array_int64s_destroy_callback__works(void **state) {
int64_t data = 0;
int64_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_int64s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int64s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64s_destroy_callback
+#define _TEST__F_type_array__int64s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64s_destroy_callback()
+ */
+extern void test__f_type_array_int64s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64s_destroy_callback()
+ */
+extern void test__f_type_array_int64s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int64s_resize_callback
-#define _TEST__F_type_array__int64s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int64s_resize_callback()
- */
-extern void test__f_type_array_int64s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_resize_callback()
- */
-extern void test__f_type_array_int64s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int8s_adjust_callback
-#define _TEST__F_type_array__int8s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int8s_adjust_callback()
- */
-extern void test__f_type_array_int8s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_adjust_callback()
- */
-extern void test__f_type_array_int8s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-int8s_resize_callback.h"
+#include "test-type_array-int8s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int8s_resize_callback__fails(void **state) {
+void test__f_type_array_int8s_delete_callback__fails(void **state) {
int8_t data = 0;
int8_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_int8s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int8s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int8s_resize_callback__works(void **state) {
+void test__f_type_array_int8s_delete_callback__works(void **state) {
int8_t data = 0;
int8_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_int8s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int8s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8s_delete_callback
+#define _TEST__F_type_array__int8s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8s_delete_callback()
+ */
+extern void test__f_type_array_int8s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8s_delete_callback()
+ */
+extern void test__f_type_array_int8s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-int8s_adjust_callback.h"
+#include "test-type_array-int8s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_int8s_adjust_callback__fails(void **state) {
+void test__f_type_array_int8s_destroy_callback__fails(void **state) {
int8_t data = 0;
int8_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_int8s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_int8s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_int8s_adjust_callback__works(void **state) {
+void test__f_type_array_int8s_destroy_callback__works(void **state) {
int8_t data = 0;
int8_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_int8s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_int8s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8s_destroy_callback
+#define _TEST__F_type_array__int8s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8s_destroy_callback()
+ */
+extern void test__f_type_array_int8s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8s_destroy_callback()
+ */
+extern void test__f_type_array_int8s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int8s_resize_callback
-#define _TEST__F_type_array__int8s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int8s_resize_callback()
- */
-extern void test__f_type_array_int8s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_resize_callback()
- */
-extern void test__f_type_array_int8s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__number_unsigneds_adjust_callback
-#define _TEST__F_type_array__number_unsigneds_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_number_unsigneds_adjust_callback()
- */
-extern void test__f_type_array_number_unsigneds_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_adjust_callback()
- */
-extern void test__f_type_array_number_unsigneds_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_resize_callback.h"
+#include "test-type_array-number_unsigneds_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_number_unsigneds_resize_callback__fails(void **state) {
+void test__f_type_array_number_unsigneds_delete_callback__fails(void **state) {
f_number_unsigned_t data = f_number_unsigned_t_initialize;
f_number_unsigned_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_number_unsigneds_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_number_unsigneds_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_number_unsigneds_resize_callback__works(void **state) {
+void test__f_type_array_number_unsigneds_delete_callback__works(void **state) {
f_number_unsigned_t data = f_number_unsigned_t_initialize;
f_number_unsigned_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_number_unsigneds_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_number_unsigneds_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__number_unsigneds_delete_callback
+#define _TEST__F_type_array__number_unsigneds_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsigneds_delete_callback()
+ */
+extern void test__f_type_array_number_unsigneds_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsigneds_delete_callback()
+ */
+extern void test__f_type_array_number_unsigneds_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsigneds_delete_callback
#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_adjust_callback.h"
+#include "test-type_array-number_unsigneds_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_number_unsigneds_adjust_callback__fails(void **state) {
+void test__f_type_array_number_unsigneds_destroy_callback__fails(void **state) {
f_number_unsigned_t data = f_number_unsigned_t_initialize;
f_number_unsigned_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_number_unsigneds_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_number_unsigneds_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_number_unsigneds_adjust_callback__works(void **state) {
+void test__f_type_array_number_unsigneds_destroy_callback__works(void **state) {
f_number_unsigned_t data = f_number_unsigned_t_initialize;
f_number_unsigned_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_number_unsigneds_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_number_unsigneds_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__number_unsigneds_destroy_callback
+#define _TEST__F_type_array__number_unsigneds_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsigneds_destroy_callback()
+ */
+extern void test__f_type_array_number_unsigneds_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsigneds_destroy_callback()
+ */
+extern void test__f_type_array_number_unsigneds_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsigneds_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__number_unsigneds_resize_callback
-#define _TEST__F_type_array__number_unsigneds_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_number_unsigneds_resize_callback()
- */
-extern void test__f_type_array_number_unsigneds_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_resize_callback()
- */
-extern void test__f_type_array_number_unsigneds_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__polls_adjust_callback
-#define _TEST__F_type_array__polls_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_polls_adjust_callback()
- */
-extern void test__f_type_array_polls_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_adjust_callback()
- */
-extern void test__f_type_array_polls_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__polls_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-polls_resize_callback.h"
+#include "test-type_array-polls_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_polls_resize_callback__fails(void **state) {
+void test__f_type_array_polls_delete_callback__fails(void **state) {
f_poll_t data = f_poll_t_initialize;
f_poll_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_polls_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_polls_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_polls_resize_callback__works(void **state) {
+void test__f_type_array_polls_delete_callback__works(void **state) {
f_poll_t data = f_poll_t_initialize;
f_poll_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_polls_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_polls_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__polls_delete_callback
+#define _TEST__F_type_array__polls_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_polls_delete_callback()
+ */
+extern void test__f_type_array_polls_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_polls_delete_callback()
+ */
+extern void test__f_type_array_polls_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__polls_delete_callback
#include "test-type_array.h"
-#include "test-type_array-polls_adjust_callback.h"
+#include "test-type_array-polls_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_polls_adjust_callback__fails(void **state) {
+void test__f_type_array_polls_destroy_callback__fails(void **state) {
f_poll_t data = f_poll_t_initialize;
f_poll_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_polls_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_polls_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_polls_adjust_callback__works(void **state) {
+void test__f_type_array_polls_destroy_callback__works(void **state) {
f_poll_t data = f_poll_t_initialize;
f_poll_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_polls_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_polls_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__polls_destroy_callback
+#define _TEST__F_type_array__polls_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_polls_destroy_callback()
+ */
+extern void test__f_type_array_polls_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_polls_destroy_callback()
+ */
+extern void test__f_type_array_polls_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__polls_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__polls_resize_callback
-#define _TEST__F_type_array__polls_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_polls_resize_callback()
- */
-extern void test__f_type_array_polls_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_resize_callback()
- */
-extern void test__f_type_array_polls_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__polls_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__states_adjust_callback
-#define _TEST__F_type_array__states_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_states_adjust_callback()
- */
-extern void test__f_type_array_states_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_adjust_callback()
- */
-extern void test__f_type_array_states_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__states_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-states_resize_callback.h"
+#include "test-type_array-states_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_states_resize_callback__fails(void **state) {
+void test__f_type_array_states_delete_callback__fails(void **state) {
f_state_t data = f_state_t_initialize;
f_state_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_states_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_states_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_states_resize_callback__works(void **state) {
+void test__f_type_array_states_delete_callback__works(void **state) {
f_state_t data = f_state_t_initialize;
f_state_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_states_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_states_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__states_delete_callback
+#define _TEST__F_type_array__states_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_states_delete_callback()
+ */
+extern void test__f_type_array_states_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_states_delete_callback()
+ */
+extern void test__f_type_array_states_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__states_delete_callback
#include "test-type_array.h"
-#include "test-type_array-states_adjust_callback.h"
+#include "test-type_array-states_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_states_adjust_callback__fails(void **state) {
+void test__f_type_array_states_destroy_callback__fails(void **state) {
f_state_t data = f_state_t_initialize;
f_state_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_states_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_states_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_states_adjust_callback__works(void **state) {
+void test__f_type_array_states_destroy_callback__works(void **state) {
f_state_t data = f_state_t_initialize;
f_state_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_states_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_states_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__states_destroy_callback
+#define _TEST__F_type_array__states_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_states_destroy_callback()
+ */
+extern void test__f_type_array_states_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_states_destroy_callback()
+ */
+extern void test__f_type_array_states_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__states_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__states_resize_callback
-#define _TEST__F_type_array__states_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_states_resize_callback()
- */
-extern void test__f_type_array_states_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_resize_callback()
- */
-extern void test__f_type_array_states_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__states_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__statuss_adjust_callback
-#define _TEST__F_type_array__statuss_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_statuss_adjust_callback()
- */
-extern void test__f_type_array_statuss_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_adjust_callback()
- */
-extern void test__f_type_array_statuss_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-statuss_resize_callback.h"
+#include "test-type_array-statuss_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_statuss_resize_callback__fails(void **state) {
+void test__f_type_array_statuss_delete_callback__fails(void **state) {
f_status_t data = f_status_t_initialize;
f_status_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_statuss_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_statuss_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_statuss_resize_callback__works(void **state) {
+void test__f_type_array_statuss_delete_callback__works(void **state) {
f_status_t data = f_status_t_initialize;
f_status_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_statuss_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_statuss_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statuss_delete_callback
+#define _TEST__F_type_array__statuss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statuss_delete_callback()
+ */
+extern void test__f_type_array_statuss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statuss_delete_callback()
+ */
+extern void test__f_type_array_statuss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statuss_delete_callback
#include "test-type_array.h"
-#include "test-type_array-statuss_adjust_callback.h"
+#include "test-type_array-statuss_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_statuss_adjust_callback__fails(void **state) {
+void test__f_type_array_statuss_destroy_callback__fails(void **state) {
f_status_t data = f_status_t_initialize;
f_status_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_statuss_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_statuss_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_statuss_adjust_callback__works(void **state) {
+void test__f_type_array_statuss_destroy_callback__works(void **state) {
f_status_t data = f_status_t_initialize;
f_status_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_statuss_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_statuss_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statuss_destroy_callback
+#define _TEST__F_type_array__statuss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statuss_destroy_callback()
+ */
+extern void test__f_type_array_statuss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statuss_destroy_callback()
+ */
+extern void test__f_type_array_statuss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statuss_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__statuss_resize_callback
-#define _TEST__F_type_array__statuss_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_statuss_resize_callback()
- */
-extern void test__f_type_array_statuss_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_resize_callback()
- */
-extern void test__f_type_array_statuss_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint128s_adjust_callback
-#define _TEST__F_type_array__uint128s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint128s_adjust_callback()
- */
-extern void test__f_type_array_uint128s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_adjust_callback()
- */
-extern void test__f_type_array_uint128s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-uint128s_resize_callback.h"
+#include "test-type_array-uint128s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint128s_resize_callback__fails(void **state) {
+void test__f_type_array_uint128s_delete_callback__fails(void **state) {
f_uint128_t data = 0;
f_uint128_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_uint128s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint128s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint128s_resize_callback__works(void **state) {
+void test__f_type_array_uint128s_delete_callback__works(void **state) {
f_uint128_t data = 0;
f_uint128_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_uint128s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint128s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128s_delete_callback
+#define _TEST__F_type_array__uint128s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128s_delete_callback()
+ */
+extern void test__f_type_array_uint128s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128s_delete_callback()
+ */
+extern void test__f_type_array_uint128s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-uint128s_adjust_callback.h"
+#include "test-type_array-uint128s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint128s_adjust_callback__fails(void **state) {
+void test__f_type_array_uint128s_destroy_callback__fails(void **state) {
f_uint128_t data = 0;
f_uint128_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_uint128s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint128s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint128s_adjust_callback__works(void **state) {
+void test__f_type_array_uint128s_destroy_callback__works(void **state) {
f_uint128_t data = 0;
f_uint128_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_uint128s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint128s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128s_destroy_callback
+#define _TEST__F_type_array__uint128s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128s_destroy_callback()
+ */
+extern void test__f_type_array_uint128s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128s_destroy_callback()
+ */
+extern void test__f_type_array_uint128s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint128s_resize_callback
-#define _TEST__F_type_array__uint128s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint128s_resize_callback()
- */
-extern void test__f_type_array_uint128s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_resize_callback()
- */
-extern void test__f_type_array_uint128s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint16s_adjust_callback
-#define _TEST__F_type_array__uint16s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint16s_adjust_callback()
- */
-extern void test__f_type_array_uint16s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_adjust_callback()
- */
-extern void test__f_type_array_uint16s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-uint16s_resize_callback.h"
+#include "test-type_array-uint16s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint16s_resize_callback__fails(void **state) {
+void test__f_type_array_uint16s_delete_callback__fails(void **state) {
uint16_t data = 0;
uint16_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_uint16s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint16s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint16s_resize_callback__works(void **state) {
+void test__f_type_array_uint16s_delete_callback__works(void **state) {
uint16_t data = 0;
uint16_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_uint16s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint16s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16s_delete_callback
+#define _TEST__F_type_array__uint16s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16s_delete_callback()
+ */
+extern void test__f_type_array_uint16s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16s_delete_callback()
+ */
+extern void test__f_type_array_uint16s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-uint16s_adjust_callback.h"
+#include "test-type_array-uint16s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint16s_adjust_callback__fails(void **state) {
+void test__f_type_array_uint16s_destroy_callback__fails(void **state) {
uint16_t data = 0;
uint16_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_uint16s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint16s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint16s_adjust_callback__works(void **state) {
+void test__f_type_array_uint16s_destroy_callback__works(void **state) {
uint16_t data = 0;
uint16_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_uint16s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint16s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16s_destroy_callback
+#define _TEST__F_type_array__uint16s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16s_destroy_callback()
+ */
+extern void test__f_type_array_uint16s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16s_destroy_callback()
+ */
+extern void test__f_type_array_uint16s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint16s_resize_callback
-#define _TEST__F_type_array__uint16s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint16s_resize_callback()
- */
-extern void test__f_type_array_uint16s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_resize_callback()
- */
-extern void test__f_type_array_uint16s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint32s_adjust_callback
-#define _TEST__F_type_array__uint32s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint32s_adjust_callback()
- */
-extern void test__f_type_array_uint32s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_adjust_callback()
- */
-extern void test__f_type_array_uint32s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-uint32s_resize_callback.h"
+#include "test-type_array-uint32s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint32s_resize_callback__fails(void **state) {
+void test__f_type_array_uint32s_delete_callback__fails(void **state) {
uint32_t data = 0;
uint32_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_uint32s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint32s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint32s_resize_callback__works(void **state) {
+void test__f_type_array_uint32s_delete_callback__works(void **state) {
uint32_t data = 0;
uint32_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_uint32s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint32s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32s_delete_callback
+#define _TEST__F_type_array__uint32s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32s_delete_callback()
+ */
+extern void test__f_type_array_uint32s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32s_delete_callback()
+ */
+extern void test__f_type_array_uint32s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-uint32s_adjust_callback.h"
+#include "test-type_array-uint32s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint32s_adjust_callback__fails(void **state) {
+void test__f_type_array_uint32s_destroy_callback__fails(void **state) {
uint32_t data = 0;
uint32_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_uint32s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint32s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint32s_adjust_callback__works(void **state) {
+void test__f_type_array_uint32s_destroy_callback__works(void **state) {
uint32_t data = 0;
uint32_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_uint32s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint32s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32s_destroy_callback
+#define _TEST__F_type_array__uint32s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32s_destroy_callback()
+ */
+extern void test__f_type_array_uint32s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32s_destroy_callback()
+ */
+extern void test__f_type_array_uint32s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint32s_resize_callback
-#define _TEST__F_type_array__uint32s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint32s_resize_callback()
- */
-extern void test__f_type_array_uint32s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_resize_callback()
- */
-extern void test__f_type_array_uint32s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint64s_adjust_callback
-#define _TEST__F_type_array__uint64s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint64s_adjust_callback()
- */
-extern void test__f_type_array_uint64s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_adjust_callback()
- */
-extern void test__f_type_array_uint64s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-uint64s_resize_callback.h"
+#include "test-type_array-uint64s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint64s_resize_callback__fails(void **state) {
+void test__f_type_array_uint64s_delete_callback__fails(void **state) {
uint64_t data = 0;
uint64_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_uint64s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint64s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint64s_resize_callback__works(void **state) {
+void test__f_type_array_uint64s_delete_callback__works(void **state) {
uint64_t data = 0;
uint64_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_uint64s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint64s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64s_delete_callback
+#define _TEST__F_type_array__uint64s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64s_delete_callback()
+ */
+extern void test__f_type_array_uint64s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64s_delete_callback()
+ */
+extern void test__f_type_array_uint64s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-uint64s_adjust_callback.h"
+#include "test-type_array-uint64s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint64s_adjust_callback__fails(void **state) {
+void test__f_type_array_uint64s_destroy_callback__fails(void **state) {
uint64_t data = 0;
uint64_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_uint64s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint64s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint64s_adjust_callback__works(void **state) {
+void test__f_type_array_uint64s_destroy_callback__works(void **state) {
uint64_t data = 0;
uint64_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_uint64s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint64s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64s_destroy_callback
+#define _TEST__F_type_array__uint64s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64s_destroy_callback()
+ */
+extern void test__f_type_array_uint64s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64s_destroy_callback()
+ */
+extern void test__f_type_array_uint64s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint64s_resize_callback
-#define _TEST__F_type_array__uint64s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint64s_resize_callback()
- */
-extern void test__f_type_array_uint64s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_resize_callback()
- */
-extern void test__f_type_array_uint64s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_resize_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint8s_adjust_callback
-#define _TEST__F_type_array__uint8s_adjust_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint8s_adjust_callback()
- */
-extern void test__f_type_array_uint8s_adjust_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_adjust_callback()
- */
-extern void test__f_type_array_uint8s_adjust_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_adjust_callback
#include "test-type_array.h"
-#include "test-type_array-uint8s_resize_callback.h"
+#include "test-type_array-uint8s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint8s_resize_callback__fails(void **state) {
+void test__f_type_array_uint8s_delete_callback__fails(void **state) {
uint8_t data = 0;
uint8_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
- const f_status_t status = f_uint8s_resize_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint8s_delete_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint8s_resize_callback__works(void **state) {
+void test__f_type_array_uint8s_delete_callback__works(void **state) {
uint8_t data = 0;
uint8_t data_array[] = { data };
will_return(__wrap_f_memory_array_resize, false);
will_return(__wrap_f_memory_array_resize, F_none);
- const f_status_t status = f_uint8s_resize_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint8s_delete_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8s_delete_callback
+#define _TEST__F_type_array__uint8s_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8s_delete_callback()
+ */
+extern void test__f_type_array_uint8s_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8s_delete_callback()
+ */
+extern void test__f_type_array_uint8s_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8s_delete_callback
#include "test-type_array.h"
-#include "test-type_array-uint8s_adjust_callback.h"
+#include "test-type_array-uint8s_destroy_callback.h"
#ifdef __cplusplus
extern "C" {
#endif
-void test__f_type_array_uint8s_adjust_callback__fails(void **state) {
+void test__f_type_array_uint8s_destroy_callback__fails(void **state) {
uint8_t data = 0;
uint8_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
- const f_status_t status = f_uint8s_adjust_callback(0, 1, (void *) datass_array);
+ const f_status_t status = f_uint8s_destroy_callback(0, 1, (void *) datass_array);
assert_int_equal(status, F_status_set_error(F_failure));
}
}
-void test__f_type_array_uint8s_adjust_callback__works(void **state) {
+void test__f_type_array_uint8s_destroy_callback__works(void **state) {
uint8_t data = 0;
uint8_t data_array[] = { data };
will_return(__wrap_f_memory_array_adjust, false);
will_return(__wrap_f_memory_array_adjust, F_none);
- const f_status_t status = f_uint8s_adjust_callback(0, length, (void *) datass_array);
+ const f_status_t status = f_uint8s_destroy_callback(0, length, (void *) datass_array);
assert_int_equal(status, F_none);
}
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8s_destroy_callback
+#define _TEST__F_type_array__uint8s_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8s_destroy_callback()
+ */
+extern void test__f_type_array_uint8s_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8s_destroy_callback()
+ */
+extern void test__f_type_array_uint8s_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8s_destroy_callback
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint8s_resize_callback
-#define _TEST__F_type_array__uint8s_resize_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint8s_resize_callback()
- */
-extern void test__f_type_array_uint8s_resize_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_resize_callback()
- */
-extern void test__f_type_array_uint8s_resize_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_resize_callback
int main(void) {
const struct CMUnitTest tests[] = {
- cmocka_unit_test(test__f_type_array_cells_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_cells_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_cells_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_cells_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_files_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_files_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_files_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_files_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_fll_ids_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_fll_ids_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_fll_ids_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_fll_ids_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_int8s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_int8s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_int8s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_int8s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_int16s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_int16s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_int16s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_int16s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_int32s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_int32s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_int32s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_int32s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_int64s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_int64s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_int64s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_int64s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_int128s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_int128s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_int128s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_int128s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_number_unsigneds_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_number_unsigneds_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_polls_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_polls_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_polls_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_polls_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_states_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_states_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_states_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_states_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_statuss_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_statuss_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_statuss_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_statuss_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_uint8s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_uint8s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint8s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint8s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_uint16s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_uint16s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint16s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint16s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_uint32s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_uint32s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint32s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint32s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_uint64s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_uint64s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint64s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint64s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_uint128s_adjust_callback__fails),
- cmocka_unit_test(test__f_type_array_uint128s_resize_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint128s_destroy_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint128s_delete_callback__fails),
- cmocka_unit_test(test__f_type_array_cells_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_cells_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_cells_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_cells_delete_callback__works),
- cmocka_unit_test(test__f_type_array_files_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_files_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_files_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_files_delete_callback__works),
- cmocka_unit_test(test__f_type_array_fll_ids_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_fll_ids_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_fll_ids_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_fll_ids_delete_callback__works),
- cmocka_unit_test(test__f_type_array_int8s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_int8s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_int8s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_int8s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_int16s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_int16s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_int16s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_int16s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_int32s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_int32s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_int32s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_int32s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_int64s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_int64s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_int64s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_int64s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_int128s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_int128s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_int128s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_int128s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_delete_callback__works),
- cmocka_unit_test(test__f_type_array_polls_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_polls_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_polls_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_polls_delete_callback__works),
- cmocka_unit_test(test__f_type_array_states_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_states_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_states_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_states_delete_callback__works),
- cmocka_unit_test(test__f_type_array_statuss_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_statuss_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_statuss_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_statuss_delete_callback__works),
- cmocka_unit_test(test__f_type_array_uint8s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_uint8s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_uint8s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_uint8s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_uint16s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_uint16s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_uint16s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_uint16s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_uint32s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_uint32s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_uint32s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_uint32s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_uint64s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_uint64s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_uint64s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_uint64s_delete_callback__works),
- cmocka_unit_test(test__f_type_array_uint128s_adjust_callback__works),
- cmocka_unit_test(test__f_type_array_uint128s_resize_callback__works),
+ cmocka_unit_test(test__f_type_array_uint128s_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_uint128s_delete_callback__works),
#ifndef _di_level_0_parameter_checking_
- // f_cells_adjust_callback() doesn't use parameter checking.
- // f_cells_resize_callback() doesn't use parameter checking.
+ // f_cells_destroy_callback() doesn't use parameter checking.
+ // f_cells_delete_callback() doesn't use parameter checking.
- // f_files_adjust_callback() doesn't use parameter checking.
- // f_files_resize_callback() doesn't use parameter checking.
+ // f_files_destroy_callback() doesn't use parameter checking.
+ // f_files_delete_callback() doesn't use parameter checking.
- // f_fll_ids_adjust_callback() doesn't use parameter checking.
- // f_fll_ids_resize_callback() doesn't use parameter checking.
+ // f_fll_ids_destroy_callback() doesn't use parameter checking.
+ // f_fll_ids_delete_callback() doesn't use parameter checking.
- // f_int8s_adjust_callback() doesn't use parameter checking.
- // f_int8s_resize_callback() doesn't use parameter checking.
+ // f_int8s_destroy_callback() doesn't use parameter checking.
+ // f_int8s_delete_callback() doesn't use parameter checking.
- // f_int16s_adjust_callback() doesn't use parameter checking.
- // f_int16s_resize_callback() doesn't use parameter checking.
+ // f_int16s_destroy_callback() doesn't use parameter checking.
+ // f_int16s_delete_callback() doesn't use parameter checking.
- // f_int32s_adjust_callback() doesn't use parameter checking.
- // f_int32s_resize_callback() doesn't use parameter checking.
+ // f_int32s_destroy_callback() doesn't use parameter checking.
+ // f_int32s_delete_callback() doesn't use parameter checking.
- // f_int64s_adjust_callback() doesn't use parameter checking.
- // f_int64s_resize_callback() doesn't use parameter checking.
+ // f_int64s_destroy_callback() doesn't use parameter checking.
+ // f_int64s_delete_callback() doesn't use parameter checking.
- // f_int128s_adjust_callback() doesn't use parameter checking.
- // f_int128s_resize_callback() doesn't use parameter checking.
+ // f_int128s_destroy_callback() doesn't use parameter checking.
+ // f_int128s_delete_callback() doesn't use parameter checking.
- // f_number_unsigneds_adjust_callback() doesn't use parameter checking.
- // f_number_unsigneds_resize_callback() doesn't use parameter checking.
+ // f_number_unsigneds_destroy_callback() doesn't use parameter checking.
+ // f_number_unsigneds_delete_callback() doesn't use parameter checking.
- // f_polls_adjust_callback() doesn't use parameter checking.
- // f_polls_resize_callback() doesn't use parameter checking.
+ // f_polls_destroy_callback() doesn't use parameter checking.
+ // f_polls_delete_callback() doesn't use parameter checking.
- // f_states_adjust_callback() doesn't use parameter checking.
- // f_states_resize_callback() doesn't use parameter checking.
+ // f_states_destroy_callback() doesn't use parameter checking.
+ // f_states_delete_callback() doesn't use parameter checking.
- // f_statuss_adjust_callback() doesn't use parameter checking.
- // f_statuss_resize_callback() doesn't use parameter checking.
+ // f_statuss_destroy_callback() doesn't use parameter checking.
+ // f_statuss_delete_callback() doesn't use parameter checking.
- // f_uint8s_adjust_callback() doesn't use parameter checking.
- // f_uint8s_resize_callback() doesn't use parameter checking.
+ // f_uint8s_destroy_callback() doesn't use parameter checking.
+ // f_uint8s_delete_callback() doesn't use parameter checking.
- // f_uint16s_adjust_callback() doesn't use parameter checking.
- // f_uint16s_resize_callback() doesn't use parameter checking.
+ // f_uint16s_destroy_callback() doesn't use parameter checking.
+ // f_uint16s_delete_callback() doesn't use parameter checking.
- // f_uint32s_adjust_callback() doesn't use parameter checking.
- // f_uint32s_resize_callback() doesn't use parameter checking.
+ // f_uint32s_destroy_callback() doesn't use parameter checking.
+ // f_uint32s_delete_callback() doesn't use parameter checking.
- // f_uint64s_adjust_callback() doesn't use parameter checking.
- // f_uint64s_resize_callback() doesn't use parameter checking.
+ // f_uint64s_destroy_callback() doesn't use parameter checking.
+ // f_uint64s_delete_callback() doesn't use parameter checking.
- // f_uint128s_adjust_callback() doesn't use parameter checking.
- // f_uint128s_resize_callback() doesn't use parameter checking.
+ // f_uint128s_destroy_callback() doesn't use parameter checking.
+ // f_uint128s_delete_callback() doesn't use parameter checking.
#endif // _di_level_0_parameter_checking_
};
#include <fll/level_0/type_array_file.h>
// Test includes.
-#include "test-type_array-cells_adjust_callback.h"
-#include "test-type_array-cells_resize_callback.h"
-#include "test-type_array-files_adjust_callback.h"
-#include "test-type_array-files_resize_callback.h"
-#include "test-type_array-fll_ids_adjust_callback.h"
-#include "test-type_array-fll_ids_resize_callback.h"
-#include "test-type_array-int8s_adjust_callback.h"
-#include "test-type_array-int8s_resize_callback.h"
-#include "test-type_array-int16s_adjust_callback.h"
-#include "test-type_array-int16s_resize_callback.h"
-#include "test-type_array-int32s_adjust_callback.h"
-#include "test-type_array-int32s_resize_callback.h"
-#include "test-type_array-int64s_adjust_callback.h"
-#include "test-type_array-int64s_resize_callback.h"
-#include "test-type_array-int128s_adjust_callback.h"
-#include "test-type_array-int128s_resize_callback.h"
-#include "test-type_array-number_unsigneds_adjust_callback.h"
-#include "test-type_array-number_unsigneds_resize_callback.h"
-#include "test-type_array-polls_adjust_callback.h"
-#include "test-type_array-polls_resize_callback.h"
-#include "test-type_array-states_adjust_callback.h"
-#include "test-type_array-states_resize_callback.h"
-#include "test-type_array-statuss_adjust_callback.h"
-#include "test-type_array-statuss_resize_callback.h"
-#include "test-type_array-uint8s_adjust_callback.h"
-#include "test-type_array-uint8s_resize_callback.h"
-#include "test-type_array-uint16s_adjust_callback.h"
-#include "test-type_array-uint16s_resize_callback.h"
-#include "test-type_array-uint32s_adjust_callback.h"
-#include "test-type_array-uint32s_resize_callback.h"
-#include "test-type_array-uint64s_adjust_callback.h"
-#include "test-type_array-uint64s_resize_callback.h"
-#include "test-type_array-uint128s_adjust_callback.h"
-#include "test-type_array-uint128s_resize_callback.h"
+#include "test-type_array-cells_destroy_callback.h"
+#include "test-type_array-cells_delete_callback.h"
+#include "test-type_array-files_destroy_callback.h"
+#include "test-type_array-files_delete_callback.h"
+#include "test-type_array-fll_ids_destroy_callback.h"
+#include "test-type_array-fll_ids_delete_callback.h"
+#include "test-type_array-int8s_destroy_callback.h"
+#include "test-type_array-int8s_delete_callback.h"
+#include "test-type_array-int16s_destroy_callback.h"
+#include "test-type_array-int16s_delete_callback.h"
+#include "test-type_array-int32s_destroy_callback.h"
+#include "test-type_array-int32s_delete_callback.h"
+#include "test-type_array-int64s_destroy_callback.h"
+#include "test-type_array-int64s_delete_callback.h"
+#include "test-type_array-int128s_destroy_callback.h"
+#include "test-type_array-int128s_delete_callback.h"
+#include "test-type_array-number_unsigneds_destroy_callback.h"
+#include "test-type_array-number_unsigneds_delete_callback.h"
+#include "test-type_array-polls_destroy_callback.h"
+#include "test-type_array-polls_delete_callback.h"
+#include "test-type_array-states_destroy_callback.h"
+#include "test-type_array-states_delete_callback.h"
+#include "test-type_array-statuss_destroy_callback.h"
+#include "test-type_array-statuss_delete_callback.h"
+#include "test-type_array-uint8s_destroy_callback.h"
+#include "test-type_array-uint8s_delete_callback.h"
+#include "test-type_array-uint16s_destroy_callback.h"
+#include "test-type_array-uint16s_delete_callback.h"
+#include "test-type_array-uint32s_destroy_callback.h"
+#include "test-type_array-uint32s_delete_callback.h"
+#include "test-type_array-uint64s_destroy_callback.h"
+#include "test-type_array-uint64s_delete_callback.h"
+#include "test-type_array-uint128s_destroy_callback.h"
+#include "test-type_array-uint128s_delete_callback.h"
#ifdef __cplusplus
extern "C" {
if (state->status == F_data_not) return;
if (state->status == F_none_eos || state->status == F_none_stop) return;
- state->status = f_fss_nest_increase(state->step_small, found);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_nest_t), (void **) &found->depth, &found->used, &found->size);
if (F_status_is_error(state->status)) return;
f_number_unsigneds_t positions_start = f_number_unsigneds_t_initialize;
}
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
- state->status = f_fss_nest_increase(state->step_small, found);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_nest_t), (void **) &found->depth, &found->used, &found->size);
if (F_status_is_error(state->status)) break;
if (found->depth[depth].used == found->depth[depth].size) {
- state->status = f_fss_items_increase(state->step_small, &found->depth[depth]);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_item_t), (void **) &found->depth[depth].array, &found->depth[depth].used, &found->depth[depth].size);
if (F_status_is_error(state->status)) break;
}
* Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_fss_is_space().
- * Errors (with error bit) from: f_fss_nest_increase().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_string_ranges_increase().
* @see f_memory_array_increase()
* @see f_memory_array_increase_by()
* @see f_fss_is_space()
- * @see f_fss_nest_increase()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* @see f_string_ranges_increase()
bool found_data = F_false;
if (!nest->used) {
- state->status = f_fss_nest_resize(state->step_small, nest);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_nest_t), (void **) &nest->depth, &nest->used, &nest->size);
if (F_status_is_error(state->status)) return;
}
else {
do {
do {
- state->status = f_fss_items_resize(state->step_small, &nest->depth[0]);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_item_t), (void **) &nest->depth[0].array, &nest->depth[0].used, &nest->depth[0].size);
if (F_status_is_error(state->status)) return;
nest->depth[nest->used].used = 0;
"f_file_touch",
"f_file_write",
"f_fss_apply_delimit",
- "f_fss_nameds_resize",
"f_memory_array_increase",
"f_memory_array_increase_by",
+ "f_memory_array_resize",
"f_path_change",
"f_path_current",
"f_path_directory_cleanup",
fake_f_f_file_touch_e,
fake_f_f_file_write_e,
fake_f_f_fss_apply_delimit_e,
- fake_f_f_fss_nameds_resize_e,
fake_f_f_memory_array_increase_e,
fake_f_f_memory_array_increase_by_e,
+ fake_f_f_memory_array_resize_e,
fake_f_f_path_change_e,
fake_f_f_path_current_e,
fake_f_f_path_directory_cleanup_e,
f_string_dynamics_resize(0, &data_make->path.stack);
- f_fss_nameds_resize(0, &data_make->fakefile);
+ f_memory_arrays_resize(0, sizeof(f_fss_named_t), (void **) &data_make->fakefile.array, &data_make->fakefile.used, &data_make->fakefile.size, &f_fss_nameds_delete_callback);
}
#endif // _di_fake_make_data_delete_
f_fss_set_t settings = f_fss_set_t_initialize;
- if (list_objects.used > data_make->fakefile.size) {
- data_make->main->setting.state.status = f_fss_nameds_resize(list_objects.used, &data_make->fakefile);
- }
+ data_make->fakefile.used = 0;
+
+ data_make->main->setting.state.status = f_memory_array_increase_by(list_objects.used, sizeof(f_fss_named_t), (void **) &data_make->fakefile.array, &data_make->fakefile.used, &data_make->fakefile.size);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_fss_nameds_resize));
+ fake_print_error(&data_make->main->program.error, macro_fake_f(f_memory_array_resize));
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
f_string_ranges_resize(0, &list_objects);
f_string_rangess_resize(0, &list_contents);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size);
if (F_status_is_error(data_make->main->setting.state.status)) {
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
return;
}
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, function_name);
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
return;
}
} // for
if (F_status_is_error(data_make->main->setting.state.status)) {
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
return;
}
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
return;
}
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append));
}
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
return;
}
fake_make_load_fakefile_setting_define_and_parameter(data_make, &settings);
- f_fss_set_resize(0, &settings);
+ f_fss_set_delete(&settings);
}
data_make->main->setting.state.status = F_none;
void fake_make_load_fakefile_setting_define_and_parameter(fake_make_data_t * const data_make, f_fss_set_t * const settings) {
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !settings) return;
-;
+
f_string_map_multis_t define = f_string_map_multis_t_initialize;
// Load the fakefile "settings" as if they are build "settings".
}
if (main->setting.quotes_content.used < main->setting.contents.used) {
- f_memory_arrays_resize(main->setting.contents.used, sizeof(f_uint8s_t), (void **) &main->setting.quotes_content.array, &main->setting.quotes_content.used, &main->setting.quotes_content.size, &f_uint8s_resize_callback);
+ f_memory_arrays_resize(main->setting.contents.used, sizeof(f_uint8s_t), (void **) &main->setting.quotes_content.array, &main->setting.quotes_content.used, &main->setting.quotes_content.size, &f_uint8ss_delete_callback);
if (F_status_is_error(main->setting.state.status)) return;
for (i = main->setting.quotes_content.used; i < main->setting.contents.used; ++i) {
f_string_ranges_resize(0, &setting->comments);
f_string_rangess_resize(0, &setting->contents);
- f_fss_nest_resize(0, &setting->nest);
+ f_fss_nest_delete(&setting->nest);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_object.array, &setting->delimits_object.used, &setting->delimits_object.size);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_content.array, &setting->delimits_content.used, &setting->delimits_content.size);
f_memory_array_resize(0, sizeof(uint8_t), (void **) &setting->quotes_object.array, &setting->quotes_object.used, &setting->quotes_object.size);
- f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &setting->quotes_content.array, &setting->quotes_content.used, &setting->quotes_content.size, &f_uint8s_resize_callback);
+ f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &setting->quotes_content.array, &setting->quotes_content.used, &setting->quotes_content.size, &f_uint8ss_delete_callback);
return F_none;
}