]> Kevux Git Server - fll/commitdiff
Progress: Continue re-designing of the memory logic also removing *_append() and...
authorKevin Day <thekevinday@gmail.com>
Sun, 13 Aug 2023 22:11:13 +0000 (17:11 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 15 Aug 2023 05:02:09 +0000 (00:02 -0500)
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.

485 files changed:
build/level_0/settings
build/monolithic/settings
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
level_0/f_account/c/account/accounts.c
level_0/f_account/c/account/accounts.h
level_0/f_account/data/build/settings
level_0/f_account/data/build/settings-mocks
level_0/f_account/data/build/settings-tests
level_0/f_account/tests/unit/c/mock-account.c
level_0/f_account/tests/unit/c/mock-account.h
level_0/f_account/tests/unit/c/test-account-s_adjust_callback.c [deleted file]
level_0/f_account/tests/unit/c/test-account-s_adjust_callback.h [deleted file]
level_0/f_account/tests/unit/c/test-account-s_append.c [deleted file]
level_0/f_account/tests/unit/c/test-account-s_append.h [deleted file]
level_0/f_account/tests/unit/c/test-account-s_append_all.c [deleted file]
level_0/f_account/tests/unit/c/test-account-s_append_all.h [deleted file]
level_0/f_account/tests/unit/c/test-account-s_delete_callback.c [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-s_delete_callback.h [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-s_destroy_callback.c [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-s_destroy_callback.h [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-s_resize_callback.h [deleted file]
level_0/f_account/tests/unit/c/test-account-ss_append.c [deleted file]
level_0/f_account/tests/unit/c/test-account-ss_append.h [deleted file]
level_0/f_account/tests/unit/c/test-account-ss_append_all.c [deleted file]
level_0/f_account/tests/unit/c/test-account-ss_append_all.h [deleted file]
level_0/f_account/tests/unit/c/test-account-ss_delete_callback.c [moved from level_0/f_account/tests/unit/c/test-account-s_resize_callback.c with 59% similarity]
level_0/f_account/tests/unit/c/test-account-ss_delete_callback.h [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.c [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.h [new file with mode: 0644]
level_0/f_account/tests/unit/c/test-account.c
level_0/f_account/tests/unit/c/test-account.h
level_0/f_directory/c/directory.h
level_0/f_directory/c/directory/listing.c [new file with mode: 0644]
level_0/f_directory/c/directory/listing.h [new file with mode: 0644]
level_0/f_directory/c/directory/private-type.c [deleted file]
level_0/f_directory/c/directory/private-type.h [deleted file]
level_0/f_directory/c/directory/recurse_do.c [new file with mode: 0644]
level_0/f_directory/c/directory/recurse_do.h [new file with mode: 0644]
level_0/f_directory/c/directory/status.c [new file with mode: 0644]
level_0/f_directory/c/directory/status.h [new file with mode: 0644]
level_0/f_directory/c/directory/type.c [deleted file]
level_0/f_directory/c/directory/type.h [deleted file]
level_0/f_directory/data/build/settings
level_0/f_directory/data/build/settings-mocks
level_0/f_directory/data/build/settings-tests
level_0/f_directory/tests/unit/c/mock-directory.c
level_0/f_directory/tests/unit/c/mock-directory.h
level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory.c
level_0/f_directory/tests/unit/c/test-directory.h
level_0/f_fss/c/fss/item.c
level_0/f_fss/c/fss/item.h
level_0/f_fss/c/fss/named.c
level_0/f_fss/c/fss/named.h
level_0/f_fss/c/fss/nest.c
level_0/f_fss/c/fss/nest.h
level_0/f_fss/c/fss/private-named.c
level_0/f_fss/c/fss/private-set_quote.c
level_0/f_fss/c/fss/set.c
level_0/f_fss/c/fss/set.h
level_0/f_fss/c/fss/set_quote.c
level_0/f_fss/c/fss/set_quote.h
level_0/f_fss/c/fss/simple_packet.c
level_0/f_fss/c/fss/simple_packet.h
level_0/f_fss/data/build/settings
level_0/f_fss/data/build/settings-mocks
level_0/f_fss/data/build/settings-tests
level_0/f_fss/tests/unit/c/test-fss-items_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-items_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-items_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-named_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nameds_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nest_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-nests_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-set_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-sets_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.c [deleted file]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.h [deleted file]
level_0/f_fss/tests/unit/c/test-fss.c
level_0/f_fss/tests/unit/c/test-fss.h
level_0/f_iki/c/iki/data.c
level_0/f_iki/c/iki/data.h
level_0/f_iki/data/build/settings-tests
level_0/f_iki/tests/unit/c/test-iki-datas_adjust_callback.h [deleted file]
level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.c [moved from level_0/f_iki/tests/unit/c/test-iki-datas_resize_callback.c with 84% similarity]
level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.c [moved from level_0/f_iki/tests/unit/c/test-iki-datas_adjust_callback.c with 80% similarity]
level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_resize_callback.h [deleted file]
level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c
level_0/f_iki/tests/unit/c/test-iki.c
level_0/f_iki/tests/unit/c/test-iki.h
level_0/f_memory/c/memory/arrays.h
level_0/f_memory/c/memory/arrayss.c [new file with mode: 0644]
level_0/f_memory/c/memory/arrayss.h [new file with mode: 0644]
level_0/f_memory/data/build/settings
level_0/f_memory/data/build/settings-tests
level_0/f_memory/tests/unit/c/test-memory.c
level_0/f_memory/tests/unit/c/test-memory.h
level_0/f_thread/c/thread/attribute.c
level_0/f_thread/c/thread/attribute.h
level_0/f_thread/c/thread/barrier.c
level_0/f_thread/c/thread/barrier.h
level_0/f_thread/c/thread/barrier_attribute.c
level_0/f_thread/c/thread/barrier_attribute.h
level_0/f_thread/c/thread/condition.c
level_0/f_thread/c/thread/condition.h
level_0/f_thread/c/thread/condition_attribute.c
level_0/f_thread/c/thread/condition_attribute.h
level_0/f_thread/c/thread/key.c
level_0/f_thread/c/thread/key.h
level_0/f_thread/c/thread/lock.c
level_0/f_thread/c/thread/lock.h
level_0/f_thread/c/thread/lock_attribute.c
level_0/f_thread/c/thread/lock_attribute.h
level_0/f_thread/c/thread/mutex.c
level_0/f_thread/c/thread/mutex.h
level_0/f_thread/c/thread/mutex_attribute.c
level_0/f_thread/c/thread/mutex_attribute.h
level_0/f_thread/c/thread/semaphore.c
level_0/f_thread/c/thread/semaphore.h
level_0/f_thread/c/thread/set.c
level_0/f_thread/c/thread/set.h
level_0/f_thread/c/thread/spin.c
level_0/f_thread/c/thread/spin.h
level_0/f_thread/data/build/settings-tests
level_0/f_thread/tests/unit/c/test-thread-attributes_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-attributes_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-attributes_adjust_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-attributes_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-attributes_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-attributes_resize_callback.c with 73% similarity]
level_0/f_thread/tests/unit/c/test-thread-attributes_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-attributes_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_adjust_callback.c with 80% similarity]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_resize_callback.c with 73% similarity]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-barriers_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-barriers_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-barriers_resize_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-barriers_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-barriers_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-barriers_adjust_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-barriers_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-barriers_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-condition_attributes_adjust_callback.c with 76% similarity]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-condition_attributes_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-condition_attributes_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-conditions_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-conditions_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-conditions_adjust_callback.c with 80% similarity]
level_0/f_thread/tests/unit/c/test-thread-conditions_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-conditions_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-conditions_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-conditions_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-conditions_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-keys_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-keys_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-keys_adjust_callback.c with 77% similarity]
level_0/f_thread/tests/unit/c/test-thread-keys_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-keys_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-keys_resize_callback.c with 73% similarity]
level_0/f_thread/tests/unit/c/test-thread-keys_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-keys_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-lock_attributes_resize_callback.c with 80% similarity]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-lock_attributes_adjust_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-lock_attributes_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-locks_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-locks_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-locks_adjust_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-locks_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-locks_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-locks_resize_callback.c with 75% similarity]
level_0/f_thread/tests/unit/c/test-thread-locks_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-locks_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_adjust_callback.c with 80% similarity]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-mutexs_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-mutexs_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-mutexs_resize_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-mutexs_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-mutexs_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-mutexs_adjust_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-mutexs_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-mutexs_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-onces_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-onces_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-onces_adjust_callback.c with 78% similarity]
level_0/f_thread/tests/unit/c/test-thread-onces_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-onces_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-onces_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-onces_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-onces_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-semaphores_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-semaphores_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-semaphores_adjust_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-semaphores_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-semaphores_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-semaphores_resize_callback.c with 73% similarity]
level_0/f_thread/tests/unit/c/test-thread-semaphores_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-semaphores_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-sets_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-sets_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-sets_adjust_callback.c with 78% similarity]
level_0/f_thread/tests/unit/c/test-thread-sets_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-sets_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-sets_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-sets_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-sets_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-spins_adjust_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread-spins_delete_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-spins_adjust_callback.c with 79% similarity]
level_0/f_thread/tests/unit/c/test-thread-spins_delete_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-spins_destroy_callback.c [moved from level_0/f_thread/tests/unit/c/test-thread-spins_resize_callback.c with 74% similarity]
level_0/f_thread/tests/unit/c/test-thread-spins_destroy_callback.h [new file with mode: 0644]
level_0/f_thread/tests/unit/c/test-thread-spins_resize_callback.h [deleted file]
level_0/f_thread/tests/unit/c/test-thread.c
level_0/f_thread/tests/unit/c/test-thread.h
level_0/f_type_array/c/type_array/cell.c
level_0/f_type_array/c/type_array/cell.h
level_0/f_type_array/c/type_array/file.c
level_0/f_type_array/c/type_array/file.h
level_0/f_type_array/c/type_array/fll_id.c
level_0/f_type_array/c/type_array/fll_id.h
level_0/f_type_array/c/type_array/int128.c
level_0/f_type_array/c/type_array/int128.h
level_0/f_type_array/c/type_array/int16.c
level_0/f_type_array/c/type_array/int16.h
level_0/f_type_array/c/type_array/int32.c
level_0/f_type_array/c/type_array/int32.h
level_0/f_type_array/c/type_array/int64.c
level_0/f_type_array/c/type_array/int64.h
level_0/f_type_array/c/type_array/int8.c
level_0/f_type_array/c/type_array/int8.h
level_0/f_type_array/c/type_array/number_unsigned.c
level_0/f_type_array/c/type_array/number_unsigned.h
level_0/f_type_array/c/type_array/poll.c
level_0/f_type_array/c/type_array/poll.h
level_0/f_type_array/c/type_array/state.c
level_0/f_type_array/c/type_array/state.h
level_0/f_type_array/c/type_array/status.c
level_0/f_type_array/c/type_array/status.h
level_0/f_type_array/c/type_array/uint128.c
level_0/f_type_array/c/type_array/uint128.h
level_0/f_type_array/c/type_array/uint16.c
level_0/f_type_array/c/type_array/uint16.h
level_0/f_type_array/c/type_array/uint32.c
level_0/f_type_array/c/type_array/uint32.h
level_0/f_type_array/c/type_array/uint64.c
level_0/f_type_array/c/type_array/uint64.h
level_0/f_type_array/c/type_array/uint8.c
level_0/f_type_array/c/type_array/uint8.h
level_0/f_type_array/data/build/settings-tests
level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-cells_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cells_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-files_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-files_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-files_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-files_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_resize_callback.c with 77% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-polls_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-polls_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-polls_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-polls_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-states_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-states_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-states_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-states_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust_callback.c with 70% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize_callback.c with 75% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize_callback.c with 74% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.c [moved from level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust_callback.c with 69% similarity]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array.c
level_0/f_type_array/tests/unit/c/test-type_array.h
level_1/fl_fss/c/fss/embedded_list.c
level_1/fl_fss/c/fss/embedded_list.h
level_2/fll_fss/c/fss/embedded_list.c
level_3/fake/c/main/common/print.c
level_3/fake/c/main/common/print.h
level_3/fake/c/main/common/type.c
level_3/fake/c/main/make/load_fakefile.c
level_3/fss_read/c/main/common.c
level_3/fss_read/c/main/common/type.c

index 84b32ef23eeba47d462020d62eb06ff2147a9bcb..84bba3718c0a862aa49d859cf02827d622a3826f 100644 (file)
@@ -33,19 +33,19 @@ build_language c
 
 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
@@ -100,7 +100,7 @@ build_sources_headers compare.h compare/utf.h
 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
index dff44ad5a0bd005bd57dfbba47e7940da83f5916..769d8ecff480120922c46bb560e4d8d4b8d7799c 100644 (file)
@@ -33,19 +33,19 @@ build_language c
 
 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
@@ -121,7 +121,7 @@ build_sources_headers level_0/compare.h level_0/compare/utf.h
 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
index 508d8359edfc1ee78199dd6f4ac4c2c6d3ee20a6..bb5bd8f86e35a28e6a41b4d7390de2f7eead9945 100644 (file)
 #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_
@@ -74,8 +70,8 @@
 #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_
index 634877bd865c884156eeeeb1bcdecd9ae29f8d5a..f8dc5704648728d47f652f4206ef68b200237ac6 100644 (file)
@@ -31,19 +31,18 @@ build_language c
 
 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
index 6946d40f551e4771be290fc6bb99a8db7f9b5a7e..07eebacc2fbbbcece9f470cb02687202b144031d 100644 (file)
@@ -1,6 +1,5 @@
 #include "../account.h"
 #include "accounts.h"
-#include "private-accounts.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -12,20 +11,22 @@ 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;
   }
@@ -37,177 +38,170 @@ extern "C" {
       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"
index b67e90698cc857ba8839d65550929aa92dfa0f23..7dea123865d564922966ce206f91748dc4e790c2 100644 (file)
@@ -55,7 +55,9 @@ 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.
  *
@@ -72,66 +74,47 @@ extern "C" {
  *
  *   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
@@ -148,61 +131,44 @@ extern "C" {
  *   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"
index 6e14db10741f6b460d683ef01006089ab886c0ed..d8ab74b7a0aab6ebdc1523832ea59c41b4a79e21 100644 (file)
@@ -32,7 +32,7 @@ build_language 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
 
index 5f917a332f95d824fe5f847bdfe8ec698eede68f..470120abbebfd3dcba62b6c249a747842ca2f6cc 100644 (file)
@@ -30,7 +30,8 @@ build_language 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 ../../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
 
@@ -61,6 +62,8 @@ flags-coverage --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
 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
index d752945222ade61a4b99ce444582ec288de6aa47..0f9c8773a7d067b6d5222880b56defb89565bf1b 100644 (file)
@@ -26,8 +26,7 @@ build_libraries -lc -lcmocka
 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
index 00add2fbf7e02af5adcc058264dfa640746c9746..81cf5a57a7802454a25c50bbb394c0f2861474fd 100644 (file)
@@ -5,6 +5,41 @@ extern "C" {
 #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) {
 
index 76c04124587aa3b02ebce86d871ef9e0dc11bf29..529f2291dc5ca7df8c388d158a9df76593ea644d 100644 (file)
@@ -29,10 +29,15 @@ extern "C" {
 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);
 
diff --git a/level_0/f_account/tests/unit/c/test-account-s_adjust_callback.c b/level_0/f_account/tests/unit/c/test-account-s_adjust_callback.c
deleted file mode 100644 (file)
index 37bcc5a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_adjust_callback.h b/level_0/f_account/tests/unit/c/test-account-s_adjust_callback.h
deleted file mode 100644 (file)
index 98039dd..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_append.c b/level_0/f_account/tests/unit/c/test-account-s_append.c
deleted file mode 100644 (file)
index bb5b43b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_append.h b/level_0/f_account/tests/unit/c/test-account-s_append.h
deleted file mode 100644 (file)
index 1811817..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_append_all.c b/level_0/f_account/tests/unit/c/test-account-s_append_all.c
deleted file mode 100644 (file)
index fa7e1f6..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_append_all.h b/level_0/f_account/tests/unit/c/test-account-s_append_all.h
deleted file mode 100644 (file)
index 43ef5fa..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_delete_callback.c b/level_0/f_account/tests/unit/c/test-account-s_delete_callback.c
new file mode 100644 (file)
index 0000000..5eedd3d
--- /dev/null
@@ -0,0 +1,137 @@
+#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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_delete_callback.h b/level_0/f_account/tests/unit/c/test-account-s_delete_callback.h
new file mode 100644 (file)
index 0000000..b909978
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_destroy_callback.c b/level_0/f_account/tests/unit/c/test-account-s_destroy_callback.c
new file mode 100644 (file)
index 0000000..fcf7d40
--- /dev/null
@@ -0,0 +1,137 @@
+#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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_destroy_callback.h b/level_0/f_account/tests/unit/c/test-account-s_destroy_callback.h
new file mode 100644 (file)
index 0000000..65f8a14
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-s_resize_callback.h b/level_0/f_account/tests/unit/c/test-account-s_resize_callback.h
deleted file mode 100644 (file)
index 3fe68d0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_append.c b/level_0/f_account/tests/unit/c/test-account-ss_append.c
deleted file mode 100644 (file)
index 66a1e1d..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_append.h b/level_0/f_account/tests/unit/c/test-account-ss_append.h
deleted file mode 100644 (file)
index ca626a4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_append_all.c b/level_0/f_account/tests/unit/c/test-account-ss_append_all.c
deleted file mode 100644 (file)
index e4e1cca..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-#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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_append_all.h b/level_0/f_account/tests/unit/c/test-account-ss_append_all.h
deleted file mode 100644 (file)
index 4074adb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
similarity index 59%
rename from level_0/f_account/tests/unit/c/test-account-s_resize_callback.c
rename to level_0/f_account/tests/unit/c/test-account-ss_delete_callback.c
index abcd32466e1e837f2ce4b06318ef05791aaaee2e..2042edab50e8914e3c174d51321837d71592b20a 100644 (file)
@@ -1,13 +1,14 @@
 #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 };
@@ -18,7 +19,7 @@ void test__f_accounts_resize_callback__fails(void **state) {
     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));
   }
@@ -30,7 +31,7 @@ void test__f_accounts_resize_callback__fails(void **state) {
     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));
   }
@@ -45,7 +46,7 @@ void test__f_accounts_resize_callback__fails(void **state) {
     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));
   }
@@ -63,7 +64,7 @@ void test__f_accounts_resize_callback__fails(void **state) {
     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));
   }
@@ -84,21 +85,10 @@ void test__f_accounts_resize_callback__fails(void **state) {
     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);
@@ -116,10 +106,55 @@ void test__f_accounts_resize_callback__works(void **state) {
     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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_delete_callback.h b/level_0/f_account/tests/unit/c/test-account-ss_delete_callback.h
new file mode 100644 (file)
index 0000000..791f6d0
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.c b/level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..1c398a9
--- /dev/null
@@ -0,0 +1,162 @@
+#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
diff --git a/level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.h b/level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..3728bd8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
index a6c2512df1d33a1430b6a2d2d982243a83b93f26..ed6bb9a7c685b5e3b0cb6b57bccdb3a77d86cba4 100644 (file)
@@ -43,22 +43,17 @@ int main(void) {
     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),
@@ -68,14 +63,11 @@ int main(void) {
       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_
   };
 
index d2689c0ea1b7a474b2f8512385f3a1cf4d63c651..e67a13799c91e6d324a18bb5ef32941fc4e0b5eb 100644 (file)
 #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" {
index 49be0c78666d774297db8148ee05d8f43b983f1f..3793cdcc40eba6a6937a995e4606b0a36c37f3c0 100644 (file)
@@ -38,7 +38,9 @@
 
 // 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" {
diff --git a/level_0/f_directory/c/directory/listing.c b/level_0/f_directory/c/directory/listing.c
new file mode 100644 (file)
index 0000000..f8772e0
--- /dev/null
@@ -0,0 +1,255 @@
+#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
diff --git a/level_0/f_directory/c/directory/listing.h b/level_0/f_directory/c/directory/listing.h
new file mode 100644 (file)
index 0000000..e9ffea4
--- /dev/null
@@ -0,0 +1,246 @@
+/**
+ * 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
diff --git a/level_0/f_directory/c/directory/private-type.c b/level_0/f_directory/c/directory/private-type.c
deleted file mode 100644 (file)
index 890c911..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#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
diff --git a/level_0/f_directory/c/directory/private-type.h b/level_0/f_directory/c/directory/private-type.h
deleted file mode 100644 (file)
index 251c379..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_directory/c/directory/recurse_do.c b/level_0/f_directory/c/directory/recurse_do.c
new file mode 100644 (file)
index 0000000..066bc7f
--- /dev/null
@@ -0,0 +1,317 @@
+#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
diff --git a/level_0/f_directory/c/directory/recurse_do.h b/level_0/f_directory/c/directory/recurse_do.h
new file mode 100644 (file)
index 0000000..c6e98d9
--- /dev/null
@@ -0,0 +1,309 @@
+/**
+ * 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
diff --git a/level_0/f_directory/c/directory/status.c b/level_0/f_directory/c/directory/status.c
new file mode 100644 (file)
index 0000000..5538fe5
--- /dev/null
@@ -0,0 +1,135 @@
+#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
diff --git a/level_0/f_directory/c/directory/status.h b/level_0/f_directory/c/directory/status.h
new file mode 100644 (file)
index 0000000..18e55ff
--- /dev/null
@@ -0,0 +1,183 @@
+/**
+ * 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
diff --git a/level_0/f_directory/c/directory/type.c b/level_0/f_directory/c/directory/type.c
deleted file mode 100644 (file)
index f3c7e68..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#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
diff --git a/level_0/f_directory/c/directory/type.h b/level_0/f_directory/c/directory/type.h
deleted file mode 100644 (file)
index bab9b52..0000000
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- * 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
index ba1a85adf5311996ee81356c3d6db030c2e7318f..d0d2d6ff020ac32e17802ac0376a595e3aed30e9 100644 (file)
@@ -32,9 +32,10 @@ build_language c
 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
index c5e1d90f380121174224e5172c829ee3266b4a54..5a72c3295479e660bade04a7b269ac0d2917592f 100644 (file)
@@ -30,9 +30,11 @@ build_language c
 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
@@ -61,6 +63,10 @@ flags-coverage --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
 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
index 5eca7497af3894d95531ee3d9295d6c7a4bd550c..a60e9ea64996242120957c66df8f2a4743d1082c 100644 (file)
@@ -25,7 +25,10 @@ build_language c
 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
index 9d0515cf8eb10d3fb5b94f1ae31d66a82905e41f..01efdd63c3f185e4ff49cb6137ba9fc6c92c1de6 100644 (file)
@@ -4,6 +4,76 @@
 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);
index e1fee5cb3fd336c4deb9fba78e47f4199f5690f3..15f15624293fb550cb3c68ffa4ed652a3b80b588 100644 (file)
@@ -28,6 +28,18 @@ extern "C" {
 
 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);
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.c
new file mode 100644 (file)
index 0000000..c9b5c57
--- /dev/null
@@ -0,0 +1,217 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.h
new file mode 100644 (file)
index 0000000..2ca4b6a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.c
new file mode 100644 (file)
index 0000000..007c43c
--- /dev/null
@@ -0,0 +1,217 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.h
new file mode 100644 (file)
index 0000000..fb67d02
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.c
new file mode 100644 (file)
index 0000000..1c34c95
--- /dev/null
@@ -0,0 +1,292 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_delete_callback.h
new file mode 100644 (file)
index 0000000..a1803c2
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.c
new file mode 100644 (file)
index 0000000..5dd9b4c
--- /dev/null
@@ -0,0 +1,292 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-recurse_dos_destroy_callback.h
new file mode 100644 (file)
index 0000000..23af902
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.c
new file mode 100644 (file)
index 0000000..f1a700a
--- /dev/null
@@ -0,0 +1,49 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-statuss_delete_callback.h
new file mode 100644 (file)
index 0000000..052dd29
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.c
new file mode 100644 (file)
index 0000000..f1fe76a
--- /dev/null
@@ -0,0 +1,49 @@
+#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
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-statuss_destroy_callback.h
new file mode 100644 (file)
index 0000000..4445430
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
index da29a283f034f412c0c567cf5b5e8371bf15b19e..f0aaaa9676626ec4f7931e91c756af473901e9e4 100644 (file)
@@ -68,6 +68,24 @@ int main(void) {
     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),
@@ -88,6 +106,8 @@ int main(void) {
       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_
index f5dc19ad40d8d394d928822d19cd0e5031de953c..196169f1767cafd9939ddf652d1ec6542c711787 100644 (file)
 #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
index 9d2e877351eea1667db335d7b43d4da1e689fdd6..b4b656121985a73054a2dbbbd1dafe52494d20d9 100644 (file)
 #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"
index d8ed2681845500b81b367588b4360995cff0791d..a1f397d15b650332f99220175d25ac7caab0b51d 100644 (file)
@@ -48,17 +48,6 @@ 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_
 
 /**
@@ -102,159 +91,157 @@ extern "C" {
 
   #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"
index 2f58715e52193cf2791cc513e7e5d520d8c3f1f8..c663e2b72bab25ab85fdc35ef855c96ebbc975c9 100644 (file)
 #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"
index 3fedc2b21957a30a9f8e8fb95b119bc4675c1d01..66cd709d0cea792114a25f4486a4437704ac38d2 100644 (file)
@@ -46,17 +46,6 @@ 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_
 
 /**
@@ -80,295 +69,182 @@ extern "C" {
   #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"
index a6decb29c82c30f14967f61f0d7e1b3efb755d5e..50b0ef6255b6a5f332e02d390cc50e26f64473e1 100644 (file)
 #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"
index 42ba73a9a74fbca75318678741c4c0a3d2b7d9a6..1e5cd0e788e24867f85aaa6248c30708d2283cee 100644 (file)
@@ -42,17 +42,6 @@ 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_
 
 /**
@@ -77,289 +66,159 @@ extern "C" {
   #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"
index 0380c1b845bac77fe60d429469f6a3e337a94c8f..3f6977d4d4ea658d47db332feb192cb7a4219ef8 100644 (file)
@@ -14,7 +14,7 @@ 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;
@@ -30,7 +30,7 @@ extern "C" {
     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;
index 3555bf47159acda7a6ca1cf3500bed43bb3e6408..1b477db596e2cecdbc8eb3e8929c9cb486d7c2f8 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
     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;
@@ -36,7 +36,7 @@ extern "C" {
     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;
@@ -60,7 +60,7 @@ extern "C" {
         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
     }
@@ -86,7 +86,7 @@ extern "C" {
         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
     }
index 18c4aafebe7bd5aa43226a286a18ca60e8978131..397ebc8ca6edd04b230c155cf2ba5e34f96351a1 100644 (file)
 #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"
index 394bf177c5c2feb622f6e80e5c9ea1af8cc06aad..44af1f79bd0d4d04248d44161a0a6af4348455e2 100644 (file)
@@ -39,17 +39,6 @@ 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_
 
 /**
@@ -73,366 +62,162 @@ extern "C" {
   #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"
index 655a69dcc1e14a8b856977f16f49e41501557303..d3cebc03644b2be90f2d6c395788acec930205dc 100644 (file)
 #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"
index ca6458cd265ea3f6301956bb231702eeb7ab1564..bc22eddc3a99a9f6c7fc24010618c8b35a914bde 100644 (file)
@@ -46,17 +46,6 @@ 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_
 
 /**
@@ -80,402 +69,198 @@ extern "C" {
   #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"
index 1ac32356dd9c0f06339b23e87599e855bd629e9e..0d016b34d2374e8d7f856f856501827c601108a3 100644 (file)
@@ -1,5 +1,4 @@
 #include "../fss.h"
-#include "private-simple_packet.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -21,6 +20,9 @@ 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_
@@ -77,387 +79,101 @@ extern "C" {
   }
 #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"
index 298635ec3ab2eb98d9472223a03be17dbc283032..0d25a4b427871640d37d487e618b02bce3474ebe 100644 (file)
@@ -90,16 +90,7 @@ 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_
 
 /**
@@ -123,16 +114,7 @@ extern "C" {
   #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.
@@ -183,16 +165,7 @@ extern "C" {
   #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_
 
 /**
@@ -216,16 +189,7 @@ extern "C" {
   #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_
 
 /**
@@ -239,7 +203,7 @@ extern "C" {
  *
  *   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()
  */
@@ -258,7 +222,7 @@ extern "C" {
  *
  *   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()
  */
@@ -289,790 +253,116 @@ extern "C" {
 #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"
index 1ca3d788de1153f81cca4de5570e956a33538891..64e5be8883cc7370c16367c8f5217efd59f7bba8 100644 (file)
@@ -32,7 +32,6 @@ build_libraries -lc
 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
 
index 5ceaed37f75cfc99a367cbbbf09625cfb8b8c970..d97f4defd931c7333ab8ae56b7a618512728a59e 100644 (file)
@@ -31,7 +31,6 @@ build_libraries -lc
 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
 
index fc55b4dcf5cb82501d5f4a756ae6a8487ed295a8..2ebed50d556408d7d1e0bb53c70d441bb81b5c9e 100644 (file)
@@ -27,16 +27,16 @@ build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_fss
 
 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
 
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-items_adjust.c
deleted file mode 100644 (file)
index eead9b2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-items_adjust.h
deleted file mode 100644 (file)
index 96909c4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.c
deleted file mode 100644 (file)
index c307ff4..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-items_decimate_by.h
deleted file mode 100644 (file)
index 69e88cf..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.c
deleted file mode 100644 (file)
index 58e09cd..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-items_decrease_by.h
deleted file mode 100644 (file)
index c351eab..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.c
new file mode 100644 (file)
index 0000000..7374955
--- /dev/null
@@ -0,0 +1,217 @@
+#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.h
new file mode 100644 (file)
index 0000000..1972635
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.c
new file mode 100644 (file)
index 0000000..39d03b9
--- /dev/null
@@ -0,0 +1,217 @@
+#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.h
new file mode 100644 (file)
index 0000000..637dc10
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_increase.c b/level_0/f_fss/tests/unit/c/test-fss-items_increase.c
deleted file mode 100644 (file)
index 234533f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_increase.h b/level_0/f_fss/tests/unit/c/test-fss-items_increase.h
deleted file mode 100644 (file)
index 4389a2e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-items_increase_by.c
deleted file mode 100644 (file)
index 4554d9a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-items_increase_by.h
deleted file mode 100644 (file)
index 81c58ad..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_resize.c b/level_0/f_fss/tests/unit/c/test-fss-items_resize.c
deleted file mode 100644 (file)
index 9a080d4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-items_resize.h b/level_0/f_fss/tests/unit/c/test-fss-items_resize.h
deleted file mode 100644 (file)
index 1a070f7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-named_adjust.c
deleted file mode 100644 (file)
index 9ed2957..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-named_adjust.h
deleted file mode 100644 (file)
index 3033e2f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.c
deleted file mode 100644 (file)
index 7da3d0e..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-named_decimate_by.h
deleted file mode 100644 (file)
index e5573c3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.c
deleted file mode 100644 (file)
index 1678c12..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-named_decrease_by.h
deleted file mode 100644 (file)
index 7c87f77..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_increase.c b/level_0/f_fss/tests/unit/c/test-fss-named_increase.c
deleted file mode 100644 (file)
index a018b2d..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_increase.h b/level_0/f_fss/tests/unit/c/test-fss-named_increase.h
deleted file mode 100644 (file)
index c6f6991..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-named_increase_by.c
deleted file mode 100644 (file)
index 1fa48db..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-named_increase_by.h
deleted file mode 100644 (file)
index 415b052..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_resize.c b/level_0/f_fss/tests/unit/c/test-fss-named_resize.c
deleted file mode 100644 (file)
index 3ce2f05..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_resize.h b/level_0/f_fss/tests/unit/c/test-fss-named_resize.h
deleted file mode 100644 (file)
index 57d6e8d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.c
deleted file mode 100644 (file)
index 38b7cbd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_adjust.h
deleted file mode 100644 (file)
index 4fd75ad..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.c
deleted file mode 100644 (file)
index 08ea159..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_decimate_by.h
deleted file mode 100644 (file)
index 8251be2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.c
deleted file mode 100644 (file)
index d7a70da..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_decrease_by.h
deleted file mode 100644 (file)
index 1e0c4a7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_increase.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_increase.c
deleted file mode 100644 (file)
index 4884436..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_increase.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_increase.h
deleted file mode 100644 (file)
index ab7791f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.c
deleted file mode 100644 (file)
index 594f3fe..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_increase_by.h
deleted file mode 100644 (file)
index c611dac..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_resize.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_resize.c
deleted file mode 100644 (file)
index cf94465..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_resize.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_resize.h
deleted file mode 100644 (file)
index 655848b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-nest_adjust.c
deleted file mode 100644 (file)
index 72aa9c6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-nest_adjust.h
deleted file mode 100644 (file)
index ca58cb3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.c
deleted file mode 100644 (file)
index 4cee05b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-nest_decimate_by.h
deleted file mode 100644 (file)
index cd8dec5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.c
deleted file mode 100644 (file)
index 716f37b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-nest_decrease_by.h
deleted file mode 100644 (file)
index 0ffc877..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_increase.c b/level_0/f_fss/tests/unit/c/test-fss-nest_increase.c
deleted file mode 100644 (file)
index 5ee8bd9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_increase.h b/level_0/f_fss/tests/unit/c/test-fss-nest_increase.h
deleted file mode 100644 (file)
index 635418d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.c
deleted file mode 100644 (file)
index 4d91ea8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-nest_increase_by.h
deleted file mode 100644 (file)
index 7d4c81f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_resize.c b/level_0/f_fss/tests/unit/c/test-fss-nest_resize.c
deleted file mode 100644 (file)
index 74588e2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_resize.h b/level_0/f_fss/tests/unit/c/test-fss-nest_resize.h
deleted file mode 100644 (file)
index be3fef2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-nests_adjust.c
deleted file mode 100644 (file)
index 8551b38..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-nests_adjust.h
deleted file mode 100644 (file)
index 46abfd8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.c
deleted file mode 100644 (file)
index e4373f4..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-nests_decimate_by.h
deleted file mode 100644 (file)
index f207021..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.c
deleted file mode 100644 (file)
index ac58df9..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-nests_decrease_by.h
deleted file mode 100644 (file)
index 34bf47b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_increase.c b/level_0/f_fss/tests/unit/c/test-fss-nests_increase.c
deleted file mode 100644 (file)
index 57bc815..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_increase.h b/level_0/f_fss/tests/unit/c/test-fss-nests_increase.h
deleted file mode 100644 (file)
index 0f8abb7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.c
deleted file mode 100644 (file)
index 22bf2f7..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-nests_increase_by.h
deleted file mode 100644 (file)
index 5f4a46a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_resize.c b/level_0/f_fss/tests/unit/c/test-fss-nests_resize.c
deleted file mode 100644 (file)
index ab8b5a1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_resize.h b/level_0/f_fss/tests/unit/c/test-fss-nests_resize.h
deleted file mode 100644 (file)
index 67151b3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-set_adjust.c
deleted file mode 100644 (file)
index a151fb2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-set_adjust.h
deleted file mode 100644 (file)
index 85dde7a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.c
deleted file mode 100644 (file)
index 632ce9f..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_decimate_by.h
deleted file mode 100644 (file)
index ab25e66..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.c
deleted file mode 100644 (file)
index b73f58e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_decrease_by.h
deleted file mode 100644 (file)
index a9e10f1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_increase.c b/level_0/f_fss/tests/unit/c/test-fss-set_increase.c
deleted file mode 100644 (file)
index ba33119..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_increase.h b/level_0/f_fss/tests/unit/c/test-fss-set_increase.h
deleted file mode 100644 (file)
index b504d47..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_increase_by.c
deleted file mode 100644 (file)
index 18b0d0f..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_increase_by.h
deleted file mode 100644 (file)
index 5d5bcf2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.c
deleted file mode 100644 (file)
index 9fef2d0..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_adjust.h
deleted file mode 100644 (file)
index 0c7700f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.c
deleted file mode 100644 (file)
index 1f863d9..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_decimate_by.h
deleted file mode 100644 (file)
index c7511e6..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.c
deleted file mode 100644 (file)
index cc5cbb1..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_decrease_by.h
deleted file mode 100644 (file)
index 7da63fa..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.c
deleted file mode 100644 (file)
index fed0b24..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase.h
deleted file mode 100644 (file)
index e5d1225..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.c
deleted file mode 100644 (file)
index 4cd5f70..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_increase_by.h
deleted file mode 100644 (file)
index e61a9b2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.c
deleted file mode 100644 (file)
index 5f99eb3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_resize.h
deleted file mode 100644 (file)
index 0b92284..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.c
deleted file mode 100644 (file)
index eda1ba6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_adjust.h
deleted file mode 100644 (file)
index a001fc5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.c
deleted file mode 100644 (file)
index 764892a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decimate_by.h
deleted file mode 100644 (file)
index 676ede6..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.c
deleted file mode 100644 (file)
index 3ba6e94..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_decrease_by.h
deleted file mode 100644 (file)
index 763ca1a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.c
deleted file mode 100644 (file)
index 7b94503..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase.h
deleted file mode 100644 (file)
index b8fa1b5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.c
deleted file mode 100644 (file)
index 16fd7a9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_increase_by.h
deleted file mode 100644 (file)
index 7081644..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.c
deleted file mode 100644 (file)
index 327f527..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_resize.h
deleted file mode 100644 (file)
index 0faaac6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_resize.c b/level_0/f_fss/tests/unit/c/test-fss-set_resize.c
deleted file mode 100644 (file)
index 94fb610..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_resize.h b/level_0/f_fss/tests/unit/c/test-fss-set_resize.h
deleted file mode 100644 (file)
index 868ae7d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-sets_adjust.c
deleted file mode 100644 (file)
index b6cc15b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-sets_adjust.h
deleted file mode 100644 (file)
index d45562b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.c
deleted file mode 100644 (file)
index 677df5e..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-sets_decimate_by.h
deleted file mode 100644 (file)
index 9c5f178..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.c
deleted file mode 100644 (file)
index 42ee4ed..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-sets_decrease_by.h
deleted file mode 100644 (file)
index 276100c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_increase.c b/level_0/f_fss/tests/unit/c/test-fss-sets_increase.c
deleted file mode 100644 (file)
index 8500388..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_increase.h b/level_0/f_fss/tests/unit/c/test-fss-sets_increase.h
deleted file mode 100644 (file)
index f7f21d4..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.c
deleted file mode 100644 (file)
index e6b8ca7..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-sets_increase_by.h
deleted file mode 100644 (file)
index 16a0fdd..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_resize.c b/level_0/f_fss/tests/unit/c/test-fss-sets_resize.c
deleted file mode 100644 (file)
index c0a2351..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_resize.h b/level_0/f_fss/tests/unit/c/test-fss-sets_resize.h
deleted file mode 100644 (file)
index c31abe0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.c
deleted file mode 100644 (file)
index 1c6e876..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_adjust.h
deleted file mode 100644 (file)
index 82c3ee0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.c
deleted file mode 100644 (file)
index e057b15..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decimate_by.h
deleted file mode 100644 (file)
index adda67e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.c
deleted file mode 100644 (file)
index 7e64850..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_decrease_by.h
deleted file mode 100644 (file)
index dcc9acf..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.c
deleted file mode 100644 (file)
index 119f1f8..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase.h
deleted file mode 100644 (file)
index c2f8e03..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.c
deleted file mode 100644 (file)
index 82d4da6..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_increase_by.h
deleted file mode 100644 (file)
index 0398704..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.c
deleted file mode 100644 (file)
index 74c7833..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_ranges_resize.h
deleted file mode 100644 (file)
index 9de1e1c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
index 96f28171befffc6d9a3f82f3e969e50064143d6f..5d7132517356eab5dc4504121f958105e8a49d85 100644 (file)
@@ -45,56 +45,6 @@ int main(void) {
     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),
@@ -109,76 +59,6 @@ int main(void) {
       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_
   };
 
index 4943df7a354e52ecb1f62316e43104d78844a043..d676ed1441f2345b2f0dafd7ede7b35c3394a913 100644 (file)
 #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"
 
index ee8df0a60d2fdcf3f9966918e12c4d6ca08b43ba..d4d98acc422e0820c5f632b121d4afd2b05a0e76 100644 (file)
@@ -12,17 +12,19 @@ extern "C" {
       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;
   }
@@ -34,48 +36,23 @@ extern "C" {
       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) {
@@ -132,32 +109,59 @@ extern "C" {
   }
 #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) {
@@ -204,6 +208,78 @@ extern "C" {
   }
 #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
index d99891b2320f35a14a5291829733b290612fd755..d53cf47f462d442d8fe2550039edd47d12e68a51 100644 (file)
@@ -59,33 +59,6 @@ extern "C" {
 #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
@@ -138,7 +111,9 @@ extern "C" {
 #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.
  *
@@ -160,9 +135,38 @@ extern "C" {
  * @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.
@@ -216,6 +220,64 @@ extern "C" {
   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
index ad630d2934d9e6ac2dd96e67a08128d45453796e..b964202f19560eb2bfafff616442ca40d828a5be 100644 (file)
@@ -26,7 +26,7 @@ build_libraries -lc -lcmocka
 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
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_adjust_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datas_adjust_callback.h
deleted file mode 100644 (file)
index ac7c857..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 84%
rename from level_0/f_iki/tests/unit/c/test-iki-datas_resize_callback.c
rename to level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.c
index 5cf14592696634b27275f3d7e7331086edfa88ce..3b6c6ca674667f93d6833847d24a3985fa1a265b 100644 (file)
@@ -1,11 +1,11 @@
 #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;
 
@@ -18,7 +18,7 @@ void test__f_iki_datas_resize_callback__fails(void **state) {
     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));
   }
@@ -30,7 +30,7 @@ void test__f_iki_datas_resize_callback__fails(void **state) {
     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));
   }
@@ -45,7 +45,7 @@ void test__f_iki_datas_resize_callback__fails(void **state) {
     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));
   }
@@ -63,13 +63,13 @@ void test__f_iki_datas_resize_callback__fails(void **state) {
     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;
 
@@ -92,7 +92,7 @@ void test__f_iki_datas_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.h
new file mode 100644 (file)
index 0000000..d32621a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 80%
rename from level_0/f_iki/tests/unit/c/test-iki-datas_adjust_callback.c
rename to level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.c
index 69bce9b0f6592baf172bbc4609fff199e4b92bae..10a86d8fbce7b57c68b1940ca0b71e994e7643e7 100644 (file)
@@ -1,11 +1,11 @@
 #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;
 
@@ -18,7 +18,7 @@ void test__f_iki_datas_adjust_callback__fails(void **state) {
     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));
   }
@@ -30,7 +30,7 @@ void test__f_iki_datas_adjust_callback__fails(void **state) {
     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));
   }
@@ -45,7 +45,7 @@ void test__f_iki_datas_adjust_callback__fails(void **state) {
     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));
   }
@@ -63,13 +63,13 @@ void test__f_iki_datas_adjust_callback__fails(void **state) {
     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;
 
@@ -92,7 +92,7 @@ void test__f_iki_datas_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.h
new file mode 100644 (file)
index 0000000..bb5bef5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_resize_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datas_resize_callback.h
deleted file mode 100644 (file)
index 1d846bb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
index 1dca0c5f2d6305934a4f7c0dfca561791d57f9aa..c051c8cb0c3c5f3dccdb7375e66b7f9cb3b9bff8 100644 (file)
@@ -14,7 +14,7 @@ void test__f_iki_datass_append_all__works(void **state) {
   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);
@@ -147,7 +147,7 @@ void test__f_iki_datass_append_all__returns_data_not(void **state) {
   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);
index 3c120263a3eda97c531c911176fe0cebd69d940e..03c0615f4d0526a863140ba7d99da8d04045ac83 100644 (file)
@@ -29,11 +29,11 @@ int main(void) {
     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),
@@ -63,8 +63,8 @@ int main(void) {
       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),
index b1a7267fe76da87c088f2f3ea21e1ec9b3d1b645..92827c510d67be47ce0fa7395ae75a08fbdbb72b 100644 (file)
 // 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"
index cd4a546b5d610d086504bb350e0cb39b9826b410..c9c41e9c3688b9261897d819e663afaf685ae92f 100644 (file)
@@ -39,6 +39,7 @@ extern "C" {
  * @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.
  *
@@ -84,6 +85,7 @@ extern "C" {
  * @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.
  *
diff --git a/level_0/f_memory/c/memory/arrayss.c b/level_0/f_memory/c/memory/arrayss.c
new file mode 100644 (file)
index 0000000..3a433d8
--- /dev/null
@@ -0,0 +1,52 @@
+#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
diff --git a/level_0/f_memory/c/memory/arrayss.h b/level_0/f_memory/c/memory/arrayss.h
new file mode 100644 (file)
index 0000000..3007929
--- /dev/null
@@ -0,0 +1,115 @@
+/**
+ * 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
index df7c0545e554d247cb0915e105f6b0afdf77da96..d65c672523788a3028bd138fbd2084e0205602f1 100644 (file)
@@ -31,10 +31,10 @@ build_language c
 
 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
index 21779e52558dcd42992a5b2743f5d250c58e49b9..acc6a10b7a8bfba6807b7f157a5c09956277920e 100644 (file)
@@ -26,6 +26,7 @@ build_libraries-individual -lf_memory
 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
index 8636a840f86f1d0bbc93417116326a1734ebccc3..5cc8878a477b406db32f0d129ff7567bb73606b1 100644 (file)
@@ -44,6 +44,9 @@ int main(void) {
     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),
@@ -62,6 +65,9 @@ int main(void) {
     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),
@@ -80,6 +86,9 @@ int main(void) {
 
       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_
   };
 
index 9958b7336fef49c1fd5ec6c5b151984217f51d61..443d946c577d857e2bc370be2ef84b65cb049635 100644 (file)
@@ -34,6 +34,8 @@
 #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"
@@ -67,6 +69,17 @@ typedef struct {
 #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
index e368a3cd137d24a83ced3a4bf2e8ba414f7251f1..a1d1f3391ae980dce19ee4af4b6d6dd7e755d2c9 100644 (file)
@@ -5,35 +5,83 @@
 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"
index 1bdad1790251ac00a56d04089444217905eaf176..28169debd8ada3bc68869be82f09d46fa1aeffde 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index 6c8d4620de1528e80d820d6b0f9513531e02a0ec..3e5b3fae8f762b08d9b778747f0f41fb3d14f144 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index 5db9f56ecb2fc0c6d73cb3c83c56284a7f79d632..1968f0e3007b38da3643992e652417475eb99da2 100644 (file)
@@ -52,7 +52,38 @@ 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.
  *
@@ -74,13 +105,15 @@ extern "C" {
  * @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
@@ -101,9 +134,38 @@ extern "C" {
  * @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"
index d6312552a898e669d8b0227ef291159b4906e8df..5af0bae30728d52d29de9107b0e451790ebe4ed5 100644 (file)
@@ -5,35 +5,83 @@
 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"
index ae74d7ed0e0e6bba10b97a4457d2d709dea876fc..c2fb6d91f84f4cba6149c60a225144377c5f3806 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index fe9da2bf92a5aa97ff9009dde94026b13d443466..7292b67568f2aded4df8c477da32083e3fa0c269 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index e90dc457fa4b84d08aa49d3342dff155e97105c4..c9c5b49976115c2dbc6bea5326fa749059fc8295 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index 266b2ebd1aa6228351f35518e96c741ba87240d8..991462fe1e0bda526623b1e3eeaf73a55c198297 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index 9b3afcfbbab85cd85dda8dabdb5d8c259cec0d38..8e647e6562cbf27e903ba64178d3f474724da27b 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index 087277aab065c8b54dfd5431f4e2f2e259710c95..4451547fe22b27bf8c40e3e600f75f8f1484766a 100644 (file)
@@ -5,41 +5,95 @@
 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"
index 2f5d41b342f6a33aee9ed0e47c5f706759d4e919..6969a2e75f24d0cd360aaab8b0bf1a35f0021cc2 100644 (file)
@@ -52,7 +52,38 @@ 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.
  *
@@ -74,13 +105,15 @@ extern "C" {
  * @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
@@ -101,9 +134,38 @@ extern "C" {
  * @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"
index 84d6fc5ae810889e6386a2222242fb4d743d1f9b..2448f96867c7a837524a7780f0bf1141660a0647 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index 15019042976a4549134443e9835df171055522da..32fd47f5bc759797951de1688cfee75276dcae7f 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index ddd1e7fc515f9814d03bd1e90aebb91f0e18a5d0..32ec4557de90c8fb96fc0d586901abce099f1b5e 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index 3566a3be498c703b0b747912a826b61d9c135d62..1d4ad1406c6947f6a8cfd1c58788779ae1b70be9 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index d3154d079fb424539c354d4d9ea6bae30f20afd5..c8611cde961a3e86931cd790c617c51b516f9877 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index 57d203d5453954a05da98f2c612418a6bdd6fbc1..a33747cc9840accbb31d9074908b0a990dda5a91 100644 (file)
@@ -55,7 +55,38 @@ 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.
  *
@@ -77,13 +108,15 @@ extern "C" {
  * @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
@@ -104,9 +137,38 @@ extern "C" {
  * @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"
index f7dd39f637e3b1696e7cee16e5ef0a5c63ffb962..4f8be39290a080bf687c2a472b1281c4cbac7fc8 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index dd24c0481ff3872384a05dbfd3aa201584b756c6..d977396e5bd47690f8381c6ca21e338bac78ccee 100644 (file)
@@ -53,7 +53,38 @@ 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.
  *
@@ -75,13 +106,15 @@ extern "C" {
  * @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
@@ -102,9 +135,38 @@ extern "C" {
  * @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"
index 9e21eae9003a6dcb079bbc2b733289eb1815cf1e..4ab2444a34b0cffcd8d606fe1df076947b68089c 100644 (file)
@@ -5,35 +5,84 @@
 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
index b439014560108cd716dcef1152ccbc2e4927d987..6887063138b3dc8dd760e8cee1a2f15b6db88918 100644 (file)
@@ -54,7 +54,38 @@ extern "C" {
 #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.
  *
@@ -76,13 +107,15 @@ extern "C" {
  * @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
@@ -103,9 +136,38 @@ extern "C" {
  * @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"
index 182049b70f3e8e81253e7569081102f51429b013..93d63897beefa5047789dbf5d1016bbfa2a4fbc8 100644 (file)
@@ -5,35 +5,83 @@
 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"
index 5eb8fa4bb7967a0190469b4089b67f64893d02eb..7397ed8516948f0b745ea7e73344c1f7a121142f 100644 (file)
@@ -64,7 +64,38 @@ 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.
  *
@@ -86,13 +117,15 @@ extern "C" {
  * @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
@@ -113,9 +146,38 @@ extern "C" {
  * @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"
index 030d1df3b53460b265738bec4c41fef61647acad..e93524b4b75d9b0bd9c84bb84605c148463a009c 100644 (file)
@@ -5,16 +5,16 @@
 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);
@@ -27,18 +27,18 @@ extern "C" {
 
     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);
@@ -51,7 +51,73 @@ extern "C" {
 
     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"
index be235b4d0abf2c966bcc4009cd2700cdd0e40581..c3aedb9ee64019d1fdd4d6597daf543d7884c413 100644 (file)
@@ -52,7 +52,38 @@ 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.
  *
@@ -74,13 +105,15 @@ extern "C" {
  * @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
@@ -101,9 +134,38 @@ extern "C" {
  * @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"
index 7d6fe4cdc1b47256366bd0c48136d9d1d190e877..ae8a292a5b86d229d65990dd703f8016a9965682 100644 (file)
@@ -25,19 +25,19 @@ build_language 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-attributes_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-attributes_adjust_callback.h
deleted file mode 100644 (file)
index ba2b2c9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-attributes_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-attributes_delete_callback.c
index 00c61574134087dedeb257740957e47386ae7ab4..f45963834eade58f16d5df68adfbb062e0c12439 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_attributes_adjust_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_attributes_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-attributes_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-attributes_delete_callback.h
new file mode 100644 (file)
index 0000000..bf3c8b8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 73%
rename from level_0/f_thread/tests/unit/c/test-thread-attributes_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-attributes_destroy_callback.c
index 17c4c59bb2d551c2aecf98d624ce5684901ce9e1..926936ca54c928106cdde912553b50f6ed68ccf6 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_attributes_resize_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_attributes_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-attributes_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-attributes_destroy_callback.h
new file mode 100644 (file)
index 0000000..41a3bff
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-attributes_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-attributes_resize_callback.h
deleted file mode 100644 (file)
index b7e9d73..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_adjust_callback.h
deleted file mode 100644 (file)
index b8a7b13..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 80%
rename from level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_delete_callback.c
index 1265c660742b83bf6758d9fb71f19f0dadc9643e..2a96a15d8ea4f6489fedcb7ea9190d48157e1936 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_barrier_attributes_adjust_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_barrier_attributes_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_delete_callback.h
new file mode 100644 (file)
index 0000000..29dc3b0
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 73%
rename from level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_destroy_callback.c
index 8472f8c2683618782f82c6e486623f4a0031aef2..6782da8dd23a349d18d1ee7101bc9db938b84550 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_barrier_attributes_resize_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_barrier_attributes_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_destroy_callback.h
new file mode 100644 (file)
index 0000000..d61d276
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barrier_attributes_resize_callback.h
deleted file mode 100644 (file)
index 5b636f8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barriers_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barriers_adjust_callback.h
deleted file mode 100644 (file)
index b17f657..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-barriers_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-barriers_delete_callback.c
index 1bb278af1ce96f22416e1fca32e23b585b797022..90c048d28946f47417d484ffb0e4afcf1d1ba6f6 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -28,13 +28,13 @@ void test__f_thread_barriers_resize_callback__fails(void **state) {
     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 };
@@ -45,7 +45,7 @@ void test__f_thread_barriers_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barriers_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barriers_delete_callback.h
new file mode 100644 (file)
index 0000000..0074342
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-barriers_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-barriers_destroy_callback.c
index 1712b0d002711032371e82527c5f34fd03fe24f4..0a212a5c305b143e74b80acd627bac3d616f68ba 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_barriers_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_barriers_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barriers_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barriers_destroy_callback.h
new file mode 100644 (file)
index 0000000..7806f49
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-barriers_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-barriers_resize_callback.h
deleted file mode 100644 (file)
index 3f62b4b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_adjust_callback.h
deleted file mode 100644 (file)
index 181edfb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 76%
rename from level_0/f_thread/tests/unit/c/test-thread-condition_attributes_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-condition_attributes_delete_callback.c
index f7c00d502e6fa0cf6489c7c671c4320ac0347570..8c9d2601024873bbb6f84e77c20e4d575da91735 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_condition_attributes_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_condition_attributes_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_delete_callback.h
new file mode 100644 (file)
index 0000000..0ce22d4
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-condition_attributes_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-condition_attributes_destroy_callback.c
index 87e174c7f91f109848a2beafd6cca4b6a5b6ab81..624da172c4a881d9675bf835fd4dd4239e477f2f 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_condition_attributes_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_condition_attributes_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_destroy_callback.h
new file mode 100644 (file)
index 0000000..5a4369b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-condition_attributes_resize_callback.h
deleted file mode 100644 (file)
index dd63a80..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-conditions_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-conditions_adjust_callback.h
deleted file mode 100644 (file)
index dfa578e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 80%
rename from level_0/f_thread/tests/unit/c/test-thread-conditions_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-conditions_delete_callback.c
index 9876422df7d8d3f98da225d68bcb0953c9105863..62a56a11999d7719a679a7aaa1e47be319233028 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_conditions_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_conditions_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-conditions_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-conditions_delete_callback.h
new file mode 100644 (file)
index 0000000..e781f52
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-conditions_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-conditions_destroy_callback.c
index ad6d92f4df3bcd38e9975422cd2583c7f3b611a2..6c7a2ada0de46954df0745a2749e43c7661be0a8 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_conditions_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_conditions_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-conditions_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-conditions_destroy_callback.h
new file mode 100644 (file)
index 0000000..c53ba87
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-conditions_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-conditions_resize_callback.h
deleted file mode 100644 (file)
index 61b23fa..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-keys_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-keys_adjust_callback.h
deleted file mode 100644 (file)
index f9c1984..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 77%
rename from level_0/f_thread/tests/unit/c/test-thread-keys_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-keys_delete_callback.c
index d84bf352ba62ec94d62cc77a6b33af6343b1a4a6..f046325910d040c2a1743b7311ab6d5e76c6b2ff 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -26,13 +26,13 @@ void test__f_thread_keys_adjust_callback__fails(void **state) {
 
     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 };
@@ -43,7 +43,7 @@ void test__f_thread_keys_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-keys_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-keys_delete_callback.h
new file mode 100644 (file)
index 0000000..edc641f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 73%
rename from level_0/f_thread/tests/unit/c/test-thread-keys_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-keys_destroy_callback.c
index 6e8464426fa738fde407e3cf82718df04f362915..b4740b1c67c27002ab3b7f9672fb66a5dd7e9e51 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -26,13 +26,13 @@ void test__f_thread_keys_resize_callback__fails(void **state) {
 
     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 };
@@ -43,7 +43,7 @@ void test__f_thread_keys_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-keys_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-keys_destroy_callback.h
new file mode 100644 (file)
index 0000000..177e906
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-keys_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-keys_resize_callback.h
deleted file mode 100644 (file)
index 142f33b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_adjust_callback.h
deleted file mode 100644 (file)
index 40d1b9a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 80%
rename from level_0/f_thread/tests/unit/c/test-thread-lock_attributes_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-lock_attributes_delete_callback.c
index 37dc6bd0b571ced86118e2f9e4d159972ad7b2b1..ddfe6dc1dd2c3c261fe540f6aef14bbe65f11eb0 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_lock_attributes_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_lock_attributes_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_delete_callback.h
new file mode 100644 (file)
index 0000000..74daae5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-lock_attributes_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-lock_attributes_destroy_callback.c
index 83be29a76843dea8c8b94f6c68dc790b0b8b662e..cdfc8a1cadb8c6c86ffa7b343376f32f40281054 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_lock_attributes_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_lock_attributes_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_destroy_callback.h
new file mode 100644 (file)
index 0000000..84a3036
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-lock_attributes_resize_callback.h
deleted file mode 100644 (file)
index 5854895..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-locks_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-locks_adjust_callback.h
deleted file mode 100644 (file)
index d3a3e48..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-locks_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-locks_delete_callback.c
index ae1d1cc51b4e36d26eb417464e03c121f465783e..7eee359f240764db220e3ced24a7c01fef34d11f 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_locks_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_locks_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-locks_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-locks_delete_callback.h
new file mode 100644 (file)
index 0000000..38691a8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 75%
rename from level_0/f_thread/tests/unit/c/test-thread-locks_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-locks_destroy_callback.c
index a036c91d71fc537b9d1363d8690767cd360e00b6..f2923b6dda50c97f7da5d3569758fdb4b9ef4206 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_locks_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_locks_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-locks_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-locks_destroy_callback.h
new file mode 100644 (file)
index 0000000..479078e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-locks_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-locks_resize_callback.h
deleted file mode 100644 (file)
index bd5bd5f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_adjust_callback.h
deleted file mode 100644 (file)
index d9f9a2d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 80%
rename from level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_delete_callback.c
index 8600d9bb5dffa0db2fb804970bd63ccc50f98bcf..b0030ee90d6ca4683fc66659b4d14689235fd435 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_mutex_attributes_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_mutex_attributes_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_delete_callback.h
new file mode 100644 (file)
index 0000000..8d5698a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_destroy_callback.c
index 4fe73e832771acc129a2b21331fbdc9fb7315f11..ea5de1076e821f9ca26d93984cb45453cc1e8de3 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_mutex_attributes_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_mutex_attributes_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_destroy_callback.h
new file mode 100644 (file)
index 0000000..dd4a1a3
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutex_attributes_resize_callback.h
deleted file mode 100644 (file)
index ac25fd1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutexs_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutexs_adjust_callback.h
deleted file mode 100644 (file)
index fcd4c45..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-mutexs_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-mutexs_delete_callback.c
index 5cf9357477df7ce91cd73b918ae6e1a756dce244..683a308661cb47428b9f117ea9251adc7af97f51 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_mutexs_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_mutexs_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutexs_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutexs_delete_callback.h
new file mode 100644 (file)
index 0000000..50d724f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-mutexs_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-mutexs_destroy_callback.c
index 4513def5455608d13d8d7a60a1a4b7f47a573983..bb688f0f0b2218b01e1c6116f8b3f8349d116adc 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_mutexs_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_mutexs_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutexs_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutexs_destroy_callback.h
new file mode 100644 (file)
index 0000000..7d1c3df
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-mutexs_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-mutexs_resize_callback.h
deleted file mode 100644 (file)
index 7a1bb26..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-onces_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-onces_adjust_callback.h
deleted file mode 100644 (file)
index fe51cd7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 78%
rename from level_0/f_thread/tests/unit/c/test-thread-onces_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-onces_delete_callback.c
index 10e99da2fed07c7b0d64e3e37253292eb8ca9222..06d1d7e8869c137a7e5dc239dd5d4b53b999c857 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_onces_adjust_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_onces_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-onces_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-onces_delete_callback.h
new file mode 100644 (file)
index 0000000..8f08b0e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-onces_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-onces_destroy_callback.c
index d2fea775084d5862dc855f12edcc78f15e6d27cf..82cf8db8a2a167b41cf13d6b69c2b4c7209b873d 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_onces_resize_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_onces_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-onces_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-onces_destroy_callback.h
new file mode 100644 (file)
index 0000000..6976595
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-onces_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-onces_resize_callback.h
deleted file mode 100644 (file)
index a9f7b3b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-semaphores_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-semaphores_adjust_callback.h
deleted file mode 100644 (file)
index 063653b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-semaphores_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-semaphores_delete_callback.c
index edbd177cc00d3de0ff6a1190ecdc48f78873585c..4d1929c24c90305d1a86bae489a682cc59a0fe65 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_semaphores_adjust_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_semaphores_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-semaphores_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-semaphores_delete_callback.h
new file mode 100644 (file)
index 0000000..6022900
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 73%
rename from level_0/f_thread/tests/unit/c/test-thread-semaphores_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-semaphores_destroy_callback.c
index 5e32c3ec4ee841576ae4c094b658038fc4cb7c01..6f97be3d67c7c4ea733b2bfafe844f4ebf453060 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_semaphores_resize_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_semaphores_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-semaphores_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-semaphores_destroy_callback.h
new file mode 100644 (file)
index 0000000..f7fef6f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-semaphores_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-semaphores_resize_callback.h
deleted file mode 100644 (file)
index d8d12f3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-sets_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-sets_adjust_callback.h
deleted file mode 100644 (file)
index 6af7dff..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 78%
rename from level_0/f_thread/tests/unit/c/test-thread-sets_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-sets_delete_callback.c
index 7c117342520b5aac5c9d9102e08ba041ada8beb8..a3640cee6d99615b0c5772ac2ed05c055eab15db 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_sets_adjust_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_sets_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-sets_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-sets_delete_callback.h
new file mode 100644 (file)
index 0000000..5281cf7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-sets_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-sets_destroy_callback.c
index efe84c1a7123a8eec4f60e470e6b519d06443523..c4bd5823165ec3477771ee132edfb45b6bcb7639 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -27,13 +27,13 @@ void test__f_thread_sets_resize_callback__fails(void **state) {
     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 };
@@ -44,7 +44,7 @@ void test__f_thread_sets_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-sets_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-sets_destroy_callback.h
new file mode 100644 (file)
index 0000000..0277c0a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-sets_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-sets_resize_callback.h
deleted file mode 100644 (file)
index 44f0d39..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-spins_adjust_callback.h b/level_0/f_thread/tests/unit/c/test-thread-spins_adjust_callback.h
deleted file mode 100644 (file)
index 5c41d2b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 79%
rename from level_0/f_thread/tests/unit/c/test-thread-spins_adjust_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-spins_delete_callback.c
index aca7456ce37e2248c7d8b7d12406f9b215dee36e..1cc2272ef0c93e6fdea8ea6d9f27a3c5ff0c9dc0 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_spins_adjust_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_spins_adjust_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-spins_delete_callback.h b/level_0/f_thread/tests/unit/c/test-thread-spins_delete_callback.h
new file mode 100644 (file)
index 0000000..e3823fb
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 74%
rename from level_0/f_thread/tests/unit/c/test-thread-spins_resize_callback.c
rename to level_0/f_thread/tests/unit/c/test-thread-spins_destroy_callback.c
index 321515f4534448043c1334d8463a1c5394f7e7b1..54617d25c73768d464eebf1f4e88698514678663 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -29,13 +29,13 @@ void test__f_thread_spins_resize_callback__fails(void **state) {
     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 };
@@ -46,7 +46,7 @@ void test__f_thread_spins_resize_callback__works(void **state) {
   {
     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);
   }
diff --git a/level_0/f_thread/tests/unit/c/test-thread-spins_destroy_callback.h b/level_0/f_thread/tests/unit/c/test-thread-spins_destroy_callback.h
new file mode 100644 (file)
index 0000000..e4c23d7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_thread/tests/unit/c/test-thread-spins_resize_callback.h b/level_0/f_thread/tests/unit/c/test-thread-spins_resize_callback.h
deleted file mode 100644 (file)
index 4876ff4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
index c7a85190b04991fdd2ffe3825e19861b5721d629..6b26d537e9443115d2c74ad88c238b22840d6089 100644 (file)
@@ -19,70 +19,70 @@ int setdown(void **state) {
 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),
@@ -407,44 +407,44 @@ int main(void) {
     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),
 
index ed1702551ee096d4ef90246f011f7667d127e0ec..31dfedc239198b0ab2e6c7393148191e310a7412 100644 (file)
 #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"
index b3752ef79700108cdfc9e5082208c1948ba12f82..d9e222f3d8fdb817bd923801f049a47230b3899d 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 5c4b5e1c89eca157ec0cd6bdb62db92745955fbc..9de564f4127ab33aeba4fc44c4500377e71d4966 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 39a1d9e3b11ed6817ecc04b54ebc3787c5dd3a7f..3fb764a3e0de4308b89b9d7d542584d2f014aa96 100644 (file)
@@ -6,8 +6,8 @@
 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;
@@ -15,17 +15,19 @@ extern "C" {
 
       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;
@@ -33,14 +35,16 @@ extern "C" {
 
       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"
index 4c18383854f169a174bca0a72609020a4db9201a..adc23e09f5b02a96f69d4a6fef2b96fb4d9edb21 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index d19777ae0b0a06aec243189c907fcea2805c27ca..48cc08d262d4d56efc6d1776ac27cd67f731ec20 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 35b85b39f46da0c194e5d779ddb1a0d9093d2366..e2148367e41ba3f8668f4db65743e6ae81b265a0 100644 (file)
@@ -17,7 +17,38 @@ 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.
  *
@@ -39,13 +70,15 @@ extern "C" {
  * @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
@@ -66,9 +99,38 @@ extern "C" {
  * @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"
index 9dcaa40843a414298fd46df01cd3f2cb79273bfa..8613c17e90aa6ebb1437fbd62d69ad5d0b7b09f3 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index a2a714d6ef2203da9b33e4649cac5dd84f326c8e..16767dbcb8b50b0642ee7aece762a18104680b65 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 224c8a0ebb7505d7d2d87f2b7f57a8345ab50219..9f0ba942ba09ad67c45a12c92d91a5de16deb874 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index cb6a90b36dd80b817a40bc02a131212d615962d1..9d9c4b8ef69589a14b185441bbb76030a91b733f 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,15 @@ extern "C" {
  *
  *   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
index bdbd6ae4f49ffd6f638aa4e31245387bd377a1e9..a0f405262178073646c2e056c761b05d90ce6f37 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 0fb6de60f44e93136b9612b99c252e2df005cbee..d6cd64211df0eec6e3496e1775ca9a571d5692c1 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 2cb85ddb747995367ac98ce0a31f079d77bb489f..dddd46b9efd2842605395b8bd0782223bfd4337b 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 6cb81c04d41362143cb204ef086c15095b50154f..d8ba3c118b983d8051f545b1e26b63e63113788c 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 44f1479a5ba3682148abe2d6b13d1271b261afbf..ea70902725246da3f7d0adc7eb43bee092f51e37 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 6478f18dae8bc8ee00469282f308c5aee305cbec..bfffb0f14317fbea63da0f9dbd4e608af27aa23f 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 80207ee09575db128e2a2fee2e26d720a74ca62e..913a6df6075a13561193c6269d86ed0d76f91c80 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index b480f3702f8b36a4a04bbc7bea50cac83f6f19a9..167f1bb2f28de7cf1ab7f80f4bc79c4b4388707b 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 356bdd16fbd4731ab1b773e265882101669746d3..f00ae9bcbe8b4b944ae7aae060b23b4a910cdad4 100644 (file)
@@ -6,8 +6,8 @@
 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;
@@ -15,17 +15,19 @@ extern "C" {
 
       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;
@@ -33,14 +35,16 @@ extern "C" {
 
       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"
index cf65de3b8b9267645263d926b5d217e479941c38..4a3c315423c001717ad758956860d62e608b67e7 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 238116bd15dcd7736228d8d207c70af09a9961c8..374351e4d010197e55e19828dc6baaa3a1f554ca 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 9bde006b03143a8d2056e495e09a4a9601f4d09d..ab30f586d3a6ff875b208929c4346dc987a0fff4 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index eb5ad0d5e438b8b374086c730dc2e546e22172d9..48415a8597e000dc819471d61a3ae47fd4426c78 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 8f4ab6a59e1827dc97c2c19e4f50534dae8da79f..b6aa5d79f454648efe69aaf15b32b3e5a355ef09 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 3aa63bbc1e3962ee8394f17450040bd5b67ee2fc..01905ed199b16eb6dfdb57e45fb901fad71697d5 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index f3c9a0d31db5b4923284befbe65bdbd386776561..8fa67d314f9337e419b0dcc90dee59fea60b7ee5 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 47752754fc5d4fd1365f08903e6679ae75ca4563..8f16900bf4ae753c0403152da9a4115924aa19b3 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index b8f952e295e98b1d1ec55027c9d9fa1524e1fb85..8b83bd41177cc1d50146f8cf71b28417d448aca3 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 4a76c453b29639c509b78ebea17370b4b9d8583c..1b374945f65acc6af5126f33d2adf5f947a3916b 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index 59f889d68511fcac61517ade73b919c9e1ccdffc..79749e83c2066335fc018c67dcce7fb70325c81b 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index d3ca2943fe8678fec299dbdfa43b0ed57ccc0e80..d0774ed45ab498cf7f7e1bf36385fdc67e7c45a3 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index e3fcfebfff9d711c573350a88fe98db9da880de5..0d002c7e8ab4db847f9aa863915c86bd7a6a380c 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index c10f751eb569b97cec8794e1aba38cc4ea46ab26..aa62619a93b25fa31e569c9b0787ed614101b83c 100644 (file)
@@ -5,8 +5,8 @@
 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;
@@ -14,17 +14,19 @@ extern "C" {
 
       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;
@@ -32,14 +34,16 @@ extern "C" {
 
       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"
index c786cf785dbb41a28c3c0f665e073393389dcf14..1bb09d99d01bf0d3f425cff76467f9fa6bc08a2d 100644 (file)
@@ -17,7 +17,9 @@ 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.
  *
@@ -34,17 +36,19 @@ extern "C" {
  *
  *   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.
  *
@@ -61,14 +65,14 @@ extern "C" {
  *
  *   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"
index 6fb52f64e520b722dc669e8e09a6bf56226ea63a..0518496748e72db0df12e1f1abca76d8c3037305 100644 (file)
@@ -23,23 +23,23 @@ build_language 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
 
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust_callback.h
deleted file mode 100644 (file)
index d3dc8c5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-cells_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.c
index 7aec37892fa4142c98b1e8b6b0e6b3180a4b059e..46fe10985f3a90228051b16d19e1e35bc48930d2 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_cells_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_cells_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h
new file mode 100644 (file)
index 0000000..e514b54
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.c
index 31906b2da787e6f24ee20c60a7447885d7127a51..706d5bd96e2cfb2eb5004544bd0397be507e06ec 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_cells_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_cells_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h
new file mode 100644 (file)
index 0000000..9eb8873
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_resize_callback.h
deleted file mode 100644 (file)
index 5af9d45..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_adjust_callback.h
deleted file mode 100644 (file)
index b24b752..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-files_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.c
index 948bb23f9ca25b70d1ed783bc1473a1899082e8b..6ba192727fd8f1aabcc6aafd86e0c96acb2e327b 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_files_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_files_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h
new file mode 100644 (file)
index 0000000..f9e6903
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-files_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.c
index 4031df969591e0c87227d2a2a7d0300ed1691234..3af9fc14446933a57906643b48e565f965637642 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_files_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_files_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h
new file mode 100644 (file)
index 0000000..7f74897
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_resize_callback.h
deleted file mode 100644 (file)
index 489a774..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust_callback.h
deleted file mode 100644 (file)
index 66c6167..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.c
index 6f22b4ebf5ebbca621639685c570f7c214a86471..b9dfa83540acb9d08144045647c9addf446ad530 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_fll_ids_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_fll_ids_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h
new file mode 100644 (file)
index 0000000..472a906
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.c
index 1e38a59e239dc34ae82da15da45529f5a1a33ebf..2691c791f3530a129b0b34f1cae0159eeb43e0b3 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_fll_ids_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_fll_ids_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h
new file mode 100644 (file)
index 0000000..cd90c41
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize_callback.h
deleted file mode 100644 (file)
index 3495e97..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust_callback.h
deleted file mode 100644 (file)
index 97145c8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.c
index 12d2f3fe02401f0a6c7a24bed9d4d568423cadcb..94f141f3a5356e3e4da4226eb8993a6d108d2249 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int128s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int128s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h
new file mode 100644 (file)
index 0000000..3273acb
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.c
index efb1bc228e3da03aaa6460d135424faced2e63fa..474a889e47db8ccf899e7e08aa1b0c8ae0e8c394 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int128s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int128s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h
new file mode 100644 (file)
index 0000000..4db2028
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize_callback.h
deleted file mode 100644 (file)
index 7c82197..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust_callback.h
deleted file mode 100644 (file)
index 6cb44f1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.c
index 691fa64d4b4853ca49ba801aa2cf31712da646a3..7a70378fa7652fc44e023ebfbb5951f823adbf58 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int16s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int16s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h
new file mode 100644 (file)
index 0000000..91ccdaf
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.c
index f881270d62ad33bb1e71ac9aeede2389a2a86154..8016baf00355f41399c9e78102ed67ade38123dd 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int16s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int16s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h
new file mode 100644 (file)
index 0000000..068ccd7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize_callback.h
deleted file mode 100644 (file)
index 680e5cd..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust_callback.h
deleted file mode 100644 (file)
index c865057..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.c
index 914ffddb5ae05b66c2a80967c5eb00951fbe8eb6..37e627f9e4dd49945251226fa9e2057232daf381 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int32s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int32s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h
new file mode 100644 (file)
index 0000000..ac1c8de
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.c
index 884fcb4f4999c4452da93c5dcbec576c851c8075..fa081459dec26ad138cb77df9537966c321095c9 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int32s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int32s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h
new file mode 100644 (file)
index 0000000..212ae69
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize_callback.h
deleted file mode 100644 (file)
index bc3d95b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust_callback.h
deleted file mode 100644 (file)
index ee70802..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.c
index 3d78bee74714a5e403025a71d097303f632c1da8..312aff3a5e4bf20ade7456579941e7b364a27a7d 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int64s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int64s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h
new file mode 100644 (file)
index 0000000..4f06ff8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.c
index 4506963e8f9492550b5f928d725dc3d0b1f39509..631ea63354dab9e47a40f9b1150c2b076a520781 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int64s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int64s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h
new file mode 100644 (file)
index 0000000..998e037
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize_callback.h
deleted file mode 100644 (file)
index cbc99f3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust_callback.h
deleted file mode 100644 (file)
index 50e09dc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.c
index 94284758279b3260adb122f5b9ba6a2f0b47c2c6..cd1e85bf3ad7d49cb12097fcfeb5846acc40227b 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int8s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int8s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h
new file mode 100644 (file)
index 0000000..30adf90
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.c
index 41924823681e3763ea8ed6d2a2daa1a28a17cde8..8339593df430c599694588af552539a2f6db9491 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_int8s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_int8s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h
new file mode 100644 (file)
index 0000000..2074caa
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize_callback.h
deleted file mode 100644 (file)
index 509e951..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_adjust_callback.h
deleted file mode 100644 (file)
index f6bb187..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 77%
rename from level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.c
index edf3164d0ff231b9758c513b5297ece44a247ee6..cf55a24bafa50c8c225fc9c62062a12c4a1d4b8b 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_number_unsigneds_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_number_unsigneds_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h
new file mode 100644 (file)
index 0000000..0e6c3b5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.c
index d0ae02e537666dc8f5e6ab629de672b074b0ac80..ad5477041d98d86eb42a29ac40328e32df32b1a5 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_number_unsigneds_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_number_unsigneds_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h
new file mode 100644 (file)
index 0000000..ae6810b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_resize_callback.h
deleted file mode 100644 (file)
index 49bda45..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_adjust_callback.h
deleted file mode 100644 (file)
index 998643a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-polls_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.c
index 8962386cf3ffffb0a5836b542a98a1bd3405a350..ed6b410e1134aab591fc6988b9213a2bdf1d1fc5 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_polls_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_polls_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h
new file mode 100644 (file)
index 0000000..d6b9562
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-polls_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.c
index 714739141d888ca86cf93ceaf93a9ac80563a23a..1241c675bdb4eaf8e162917ce6273ebd5b44e70c 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_polls_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_polls_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h
new file mode 100644 (file)
index 0000000..4a25b2f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_resize_callback.h
deleted file mode 100644 (file)
index 92d064b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_adjust_callback.h
deleted file mode 100644 (file)
index 2b77be3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-states_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.c
index 5e8ff10cd19ef783f526e8116f65c196688bb01a..9aa63dbe8c863ce993e30102c10c5ababf59e97a 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_states_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_states_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h
new file mode 100644 (file)
index 0000000..24855a6
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-states_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.c
index d58efaa57d4ff6a0cce31badf9abe2bd97b1f696..ca8a1b758e0df8954dde5fadc64c8cc372bc9494 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_states_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_states_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h
new file mode 100644 (file)
index 0000000..1533ebe
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_resize_callback.h
deleted file mode 100644 (file)
index 7bead77..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust_callback.h
deleted file mode 100644 (file)
index 8f00dc9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.c
index e7de32f30c2f2d00bbf9e8ec3bdde93f7b5b38f4..6f943d0353f609300000ba5ca0cc4c590c4bcc44 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_statuss_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_statuss_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h
new file mode 100644 (file)
index 0000000..4ba1f6e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 70%
rename from level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.c
index 535d8422067103f969090b1ef1437f40520128e4..5696778bbf72ce5feecc4f094266772b52e42037 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_statuss_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_statuss_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h
new file mode 100644 (file)
index 0000000..26cb0ac
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize_callback.h
deleted file mode 100644 (file)
index 52ae5fc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust_callback.h
deleted file mode 100644 (file)
index c1e04c3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 75%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.c
index 15c3b0112c3d8d83564228346c24e6de3b30b4ca..233f3e59b5f9e7c1698a9314fe2a7e48aa118bfc 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint128s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint128s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h
new file mode 100644 (file)
index 0000000..ae8a66d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.c
index 005f732f28fd40f281d091729db68e4cdf79dcda..e88b5995a0810e7f722105300a8c2730b9e87fb2 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint128s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint128s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h
new file mode 100644 (file)
index 0000000..6176824
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize_callback.h
deleted file mode 100644 (file)
index 84e6dac..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust_callback.h
deleted file mode 100644 (file)
index 322b477..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.c
index f8d3f0cf50556cdab16e3a70cb33e6e630ede83d..89d2db54790e3ef500bbcb087c28c1f7bf6ad374 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint16s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint16s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h
new file mode 100644 (file)
index 0000000..48bc3f6
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.c
index c4f9ef3503e3f626759bec98911351c6eaaed987..34853f7ed21b5b1fcbaae035631dc551f457cb3b 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint16s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint16s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h
new file mode 100644 (file)
index 0000000..bfac51f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize_callback.h
deleted file mode 100644 (file)
index 7b6c332..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust_callback.h
deleted file mode 100644 (file)
index 17a024c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.c
index 02f0a6762c9c9eb174d7af55f1796a78ca9f8022..034f1eb762a535aef92200c5891557daae9f9897 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint32s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint32s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h
new file mode 100644 (file)
index 0000000..045dd27
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.c
index 466a72636f017478ec4b06f3504d50f0f4016062..d11bd915891dd06fd08d9a788a0addaea9aa5966 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint32s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint32s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h
new file mode 100644 (file)
index 0000000..764f231
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize_callback.h
deleted file mode 100644 (file)
index 45782c0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust_callback.h
deleted file mode 100644 (file)
index ddde900..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.c
index 9adaeb485f5a91a54e79d5e9be03559ced948739..ee0f5ebbea15da985272d41546aadbd9c09e33c2 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint64s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint64s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h
new file mode 100644 (file)
index 0000000..d5570bb
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.c
index c40b2a3a0fec822f1bd0640aecdd54d6072e023c..9f80d3f63c911cc126efd2dd7271e5562603f31a 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint64s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint64s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h
new file mode 100644 (file)
index 0000000..856868a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize_callback.h
deleted file mode 100644 (file)
index c4487db..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust_callback.h
deleted file mode 100644 (file)
index e04c034..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
similarity index 74%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.c
index 747c8df21572c3b19958b7a00abd098bb6534d91..597ee2488ef2405935d74eac70c1efdf9ed35fd9 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint8s_resize_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint8s_resize_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h
new file mode 100644 (file)
index 0000000..8105795
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
similarity index 69%
rename from level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust_callback.c
rename to level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.c
index 8485915cc22ab30797a59709ad2be864dfa714b5..49b4cf7fbcb9621a82d4cbf5a9daf8400571f9a3 100644 (file)
@@ -1,11 +1,11 @@
 #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 };
@@ -16,13 +16,13 @@ void test__f_type_array_uint8s_adjust_callback__fails(void **state) {
     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 };
@@ -34,7 +34,7 @@ void test__f_type_array_uint8s_adjust_callback__works(void **state) {
     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);
   }
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h
new file mode 100644 (file)
index 0000000..5478875
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * 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
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize_callback.h
deleted file mode 100644 (file)
index e53c13e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
index 2d357ffaacc58b823eeab4f1edc511841fb6a69e..7d973c9606dffc96121960a6dc4f613c695628c6 100644 (file)
@@ -17,159 +17,159 @@ int setdown(void **state) {
 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_
   };
 
index c39bec7e263de9f9c4ed3bfe3628f4212d553410..9acc4dd6e1cdaa16c2fdb32530ff69cf631d1c96 100644 (file)
 #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" {
index 114cf9c2c861e39c8f060125cc34bc84b9da518c..228e2f53b61fc5afb18834e3c14587ccf6b51b6c 100644 (file)
@@ -22,7 +22,7 @@ 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;
@@ -588,11 +588,11 @@ extern "C" {
         }
 
         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;
           }
 
index 430325813c2392e85ed61c39977b648a06c73e15..09d711f46eaec3c1a95c758eb1dfa66bf925eced 100644 (file)
@@ -81,7 +81,6 @@ extern "C" {
  *     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().
@@ -90,7 +89,6 @@ extern "C" {
  * @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()
index b95675182a8aa2b8d6ecf72d82895deca761b101..109df415874f346ba616d2be8a71452c87874bcd 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
     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 {
@@ -30,7 +30,7 @@ extern "C" {
 
     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;
index 1556a05a58cab3067d7e845e22148d3df26151c1..8c0c9133b027cb32255abebefc997b75a368ddec 100644 (file)
@@ -47,9 +47,9 @@ extern "C" {
     "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",
index 5b7565bdf6d6e628e431a2095f7b9d1cbaccee9e..2002323536d799c9e444b6cae6a6f610a69d8d7b 100644 (file)
@@ -80,9 +80,9 @@ extern "C" {
     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,
index c7114c965b0af9b6b8a0094f4d173ed938ca82e0..bfad29fa3dabebcc332c7219872ba8428db6de1b 100644 (file)
@@ -256,7 +256,7 @@ extern "C" {
 
     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_
 
index b6f36e1b065256d030b55ca6729707867dbcf075..3d8655946399cb70d2666c66a696bfb7989f7ef2 100644 (file)
@@ -76,14 +76,14 @@ extern "C" {
 
       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);
@@ -175,7 +175,7 @@ extern "C" {
       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;
       }
@@ -206,7 +206,7 @@ extern "C" {
         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;
         }
@@ -245,7 +245,7 @@ extern "C" {
         } // for
 
         if (F_status_is_error(data_make->main->setting.state.status)) {
-          f_fss_set_resize(0, &settings);
+          f_fss_set_delete(&settings);
 
           return;
         }
@@ -260,7 +260,7 @@ extern "C" {
       }
 
       if (F_status_is_error(data_make->main->setting.state.status)) {
-        f_fss_set_resize(0, &settings);
+        f_fss_set_delete(&settings);
 
         return;
       }
@@ -283,14 +283,14 @@ extern "C" {
           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;
@@ -345,7 +345,7 @@ extern "C" {
   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".
index 3bc5669c5e2fa5fecfad827150ae8d613e5d07cc..560b2fbe34ca3a0ca75014dd4c8b22830354d5cc 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
     }
 
     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) {
index fbe4cea3334798f9cd7f55ec7727ab73a219c17b..df851a1e9a1b8ba504aa1f688ce7a6bddacae6bb 100644 (file)
@@ -81,13 +81,13 @@ extern "C" {
     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;
   }