]> Kevux Git Server - fll/commitdiff
Progress: Continue re-designing of the memory logic, focusing on unit tests for recen...
authorKevin Day <thekevinday@gmail.com>
Sun, 27 Aug 2023 01:36:18 +0000 (20:36 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 27 Aug 2023 01:36:18 +0000 (20:36 -0500)
This adds some test files that I did a git add on but forgot to do the git commit with.
Update many of the unit tests and fix any mistakes discovered.

462 files changed:
build/level_0/settings
build/monolithic/settings
build/stand_alone/byte_dump.settings
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
build/stand_alone/firewall.settings
build/stand_alone/utf8.settings
level_0/f_console/c/console.c
level_0/f_console/c/console.h
level_0/f_console/tests/unit/c/test-console-environment_process.c
level_0/f_environment/tests/unit/c/test-environment-get_all.c
level_0/f_file/tests/unit/c/test-file-read.c
level_0/f_file/tests/unit/c/test-file-read_block.c
level_0/f_file/tests/unit/c/test-file-read_until.c
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-item.c [deleted file]
level_0/f_fss/c/fss/private-item.h [deleted file]
level_0/f_fss/c/fss/private-named.c [deleted file]
level_0/f_fss/c/fss/private-named.h [deleted file]
level_0/f_fss/c/fss/private-nest.c [deleted file]
level_0/f_fss/c/fss/private-nest.h [deleted file]
level_0/f_fss/c/fss/private-set.c [deleted file]
level_0/f_fss/c/fss/private-set.h [deleted file]
level_0/f_fss/c/fss/private-set_quote.c [deleted file]
level_0/f_fss/c/fss/private-set_quote.h [deleted file]
level_0/f_fss/c/fss/private-simple_packet.c [deleted file]
level_0/f_fss/c/fss/private-simple_packet.h [deleted file]
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-mocks
level_0/f_fss/data/build/settings-tests
level_0/f_fss/tests/unit/c/mock-fss.c
level_0/f_fss/tests/unit/c/mock-fss.h
level_0/f_fss/tests/unit/c/test-fss-item_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-item_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-item_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-item_destroy.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-named_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-named_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-named_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-named_destroy.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-nest_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nest_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nest_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nest_destroy.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-set_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_destroy.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.h [new file with mode: 0644]
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.c
level_0/f_iki/c/iki/data.c
level_0/f_iki/c/iki/data.h
level_0/f_iki/data/build/settings-mocks
level_0/f_iki/tests/unit/c/mock-iki.c
level_0/f_iki/tests/unit/c/mock-iki.h
level_0/f_iki/tests/unit/c/test-iki-datas_append.c
level_0/f_iki/tests/unit/c/test-iki-datas_append_all.c
level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.c
level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.c
level_0/f_iki/tests/unit/c/test-iki-datass_append.c
level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c
level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.c
level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.c
level_0/f_limit/tests/unit/c/test-limit.c
level_0/f_path/tests/unit/c/test-path.c
level_0/f_serialize/c/serialize.c
level_0/f_serialize/c/serialize.h
level_0/f_serialize/tests/unit/c/test-serialize-from_simple_range.c
level_0/f_string/c/private-string.c
level_0/f_string/c/string/dynamics.c
level_0/f_string/c/string/dynamicss.c
level_0/f_string/c/string/map_multis.c
level_0/f_string/c/string/map_multis.h
level_0/f_string/c/string/map_multiss.c
level_0/f_string/c/string/map_multiss.h
level_0/f_string/c/string/maps.c
level_0/f_string/c/string/maps.h
level_0/f_string/c/string/mapss.c
level_0/f_string/c/string/mapss.h
level_0/f_string/c/string/private-dynamics.c [deleted file]
level_0/f_string/c/string/private-dynamics.h [deleted file]
level_0/f_string/c/string/private-map_multis.c [deleted file]
level_0/f_string/c/string/private-map_multis.h [deleted file]
level_0/f_string/c/string/private-map_multiss.c [deleted file]
level_0/f_string/c/string/private-map_multiss.h [deleted file]
level_0/f_string/c/string/private-maps.c [deleted file]
level_0/f_string/c/string/private-maps.h [deleted file]
level_0/f_string/c/string/private-mapss.c [deleted file]
level_0/f_string/c/string/private-mapss.h [deleted file]
level_0/f_string/c/string/private-quantityss.c [deleted file]
level_0/f_string/c/string/private-quantityss.h [deleted file]
level_0/f_string/c/string/private-ranges.c [deleted file]
level_0/f_string/c/string/private-ranges.h [deleted file]
level_0/f_string/c/string/private-rangess.c [deleted file]
level_0/f_string/c/string/private-rangess.h [deleted file]
level_0/f_string/c/string/private-triples.c [deleted file]
level_0/f_string/c/string/private-triples.h [deleted file]
level_0/f_string/c/string/private-tripless.c [deleted file]
level_0/f_string/c/string/private-tripless.h [deleted file]
level_0/f_string/c/string/quantitys.c
level_0/f_string/c/string/quantitys.h
level_0/f_string/c/string/quantityss.c
level_0/f_string/c/string/quantityss.h
level_0/f_string/c/string/range.c
level_0/f_string/c/string/ranges.c
level_0/f_string/c/string/ranges.h
level_0/f_string/c/string/rangess.c
level_0/f_string/c/string/rangess.h
level_0/f_string/c/string/triples.c
level_0/f_string/c/string/triples.h
level_0/f_string/c/string/tripless.c
level_0/f_string/c/string/tripless.h
level_0/f_string/data/build/settings
level_0/f_string/data/build/settings-mocks [new file with mode: 0644]
level_0/f_string/data/build/settings-tests
level_0/f_string/data/build/testfile
level_0/f_string/tests/unit/c/mock-string.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/mock-string.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-append.h
level_0/f_string/tests/unit/c/test-string-append_assure.h
level_0/f_string/tests/unit/c/test-string-append_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-append_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_append.h
level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.h
level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_mash.h
level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_mish.h
level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_prepend.h
level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.h
level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.h
level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.h
level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.h
level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.h
level_0/f_string/tests/unit/c/test-string-dynamic_terminate.h
level_0/f_string/tests/unit/c/test-string-dynamic_terminate_after.h
level_0/f_string/tests/unit/c/test-string-dynamics_append.h
level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h
level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_append.h
level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h
level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_append.h
level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c
level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h
level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multis_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_append.c
level_0/f_string/tests/unit/c/test-string-map_multiss_append.h
level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c
level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h
level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-map_multiss_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_append.h
level_0/f_string/tests/unit/c/test-string-maps_append_all.c
level_0/f_string/tests/unit/c/test-string-maps_append_all.h
level_0/f_string/tests/unit/c/test-string-maps_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-maps_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_append.c
level_0/f_string/tests/unit/c/test-string-mapss_append.h
level_0/f_string/tests/unit/c/test-string-mapss_append_all.c
level_0/f_string/tests/unit/c/test-string-mapss_append_all.h
level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-mapss_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-mash.h
level_0/f_string/tests/unit/c/test-string-mash_nulless.h
level_0/f_string/tests/unit/c/test-string-mish.h
level_0/f_string/tests/unit/c/test-string-mish_nulless.h
level_0/f_string/tests/unit/c/test-string-prepend.h
level_0/f_string/tests/unit/c/test-string-prepend_assure.h
level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.h
level_0/f_string/tests/unit/c/test-string-prepend_nulless.h
level_0/f_string/tests/unit/c/test-string-quantitys_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_append.h
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h
level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_append.c
level_0/f_string/tests/unit/c/test-string-quantityss_append.h
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h
level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_append.h
level_0/f_string/tests/unit/c/test-string-ranges_append_all.c
level_0/f_string/tests/unit/c/test-string-ranges_append_all.h
level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-ranges_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_append.c
level_0/f_string/tests/unit/c/test-string-rangess_append.h
level_0/f_string/tests/unit/c/test-string-rangess_append_all.c
level_0/f_string/tests/unit/c/test-string-rangess_append_all.h
level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-rangess_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-seek_line.h
level_0/f_string/tests/unit/c/test-string-seek_line_to.h
level_0/f_string/tests/unit/c/test-string-seek_to.h
level_0/f_string/tests/unit/c/test-string-triples_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_append.h
level_0/f_string/tests/unit/c/test-string-triples_append_all.c
level_0/f_string/tests/unit/c/test-string-triples_append_all.h
level_0/f_string/tests/unit/c/test-string-triples_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-triples_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_adjust.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_adjust.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_append.c
level_0/f_string/tests/unit/c/test-string-tripless_append.h
level_0/f_string/tests/unit/c/test-string-tripless_append_all.c
level_0/f_string/tests/unit/c/test-string-tripless_append_all.h
level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_increase.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_increase.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_increase_by.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_increase_by.h [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_resize.c [deleted file]
level_0/f_string/tests/unit/c/test-string-tripless_resize.h [deleted file]
level_0/f_string/tests/unit/c/test-string.c
level_0/f_string/tests/unit/c/test-string.h
level_1/fl_environment/c/environment.c
level_1/fl_environment/c/environment.h
level_1/fl_fss/c/fss/basic.c
level_1/fl_fss/c/fss/basic.h
level_1/fl_fss/c/fss/basic_list.c
level_1/fl_fss/c/fss/basic_list.h
level_1/fl_fss/c/fss/embedded_list.c
level_1/fl_fss/c/fss/embedded_list.h
level_1/fl_fss/c/fss/extended.c
level_1/fl_fss/c/fss/extended.h
level_1/fl_fss/c/fss/extended_list.c
level_1/fl_fss/c/fss/extended_list.h
level_2/fll_fss/c/fss.c
level_2/fll_fss/c/fss/basic.c
level_2/fll_fss/c/fss/basic.h
level_2/fll_fss/c/fss/basic_list.c
level_2/fll_fss/c/fss/basic_list.h
level_2/fll_fss/c/fss/embedded_list.h
level_2/fll_fss/c/fss/extended.c
level_2/fll_fss/c/fss/extended.h
level_2/fll_fss/c/fss/extended_list.c
level_2/fll_fss/c/fss/extended_list.h
level_2/fll_fss/c/fss/payload.c
level_2/fll_fss/c/fss/payload.h
level_3/control/c/main/common.c
level_3/control/c/main/common/type.c
level_3/control/c/main/common/type.h
level_3/controller/c/common/private-cache.c
level_3/controller/c/common/private-cache.h
level_3/controller/c/common/private-rule.c
level_3/controller/c/common/private-setting.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/entry/private-entry.h
level_3/controller/c/rule/private-rule.c
level_3/controller/c/rule/private-rule.h
level_3/fake/c/main/build/load.c
level_3/fake/c/main/common.c
level_3/fake/c/main/common.h
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/fake/c/main/make/load_fakefile.h
level_3/fake/c/main/make/operate_process_type.c
level_3/fake/c/main/make/operate_process_type.h
level_3/firewall/c/private-firewall.c
level_3/fss_read/c/main/common/print.c
level_3/fss_read/c/main/common/print.h
level_3/fss_read/c/main/common/type.c
level_3/fss_read/c/main/common/type.h
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common/print.c
level_3/fss_write/c/main/common/print.h
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/payload/fss_write.c
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common.h
level_3/iki_read/c/main/common/print.c
level_3/iki_read/c/main/common/print.h
level_3/iki_read/c/main/common/type.c

index fc8e5430c0b6f9d3af4f99e6643b2e5a512faba0..203deb93f802a48378cf173d02c8344cf27bb3a7 100644 (file)
@@ -62,12 +62,6 @@ build_sources_library socket.c socket/address.c socket/socket.c
 build_sources_library status_string.c
 build_sources_library string.c
 build_sources_library private-string.c string/common.c
-build_sources_library string/private-dynamics.c
-build_sources_library string/private-maps.c string/private-mapss.c
-build_sources_library string/private-map_multis.c string/private-map_multiss.c
-build_sources_library string/private-quantitys.c string/private-quantityss.c
-build_sources_library string/private-ranges.c string/private-rangess.c
-build_sources_library string/private-triples.c string/private-tripless.c
 build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
 build_sources_library string/map.c string/maps.c string/mapss.c
 build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
@@ -86,8 +80,8 @@ build_sources_library utf/map_multi.c utf/map_multis.c utf/map_multiss.c
 build_sources_library utf/static.c utf/statics.c utf/staticss.c
 build_sources_library utf/string.c utf/triple.c utf/triples.c utf/tripless.c
 build_sources_library utf/private-dynamic.c utf/private-dynamics.c utf/private-dynamicss.c
-build_sources_library utf/private-maps.c utf/private-mapss.c
 build_sources_library utf/private-map_multis.c utf/private-map_multiss.c
+build_sources_library utf/private-maps.c utf/private-mapss.c
 build_sources_library utf/private-string.c
 build_sources_library utf/private-triples.c utf/private-tripless.c
 
index 61998460094d335b1878e96256abc8752dc28cac..1e191313b25622700c6d77aafa524848d1d2937f 100644 (file)
@@ -62,12 +62,6 @@ build_sources_library level_0/socket.c level_0/socket/address.c level_0/socket/s
 build_sources_library level_0/status_string.c
 build_sources_library level_0/string.c
 build_sources_library level_0/private-string.c level_0/string/common.c
-build_sources_library level_0/string/private-dynamics.c
-build_sources_library level_0/string/private-maps.c level_0/string/private-mapss.c
-build_sources_library level_0/string/private-map_multis.c level_0/string/private-map_multiss.c
-build_sources_library level_0/string/private-quantitys.c level_0/string/private-quantityss.c
-build_sources_library level_0/string/private-ranges.c level_0/string/private-rangess.c
-build_sources_library level_0/string/private-triples.c level_0/string/private-tripless.c
 build_sources_library level_0/string/dynamic.c level_0/string/dynamics.c level_0/string/dynamicss.c
 build_sources_library level_0/string/map.c level_0/string/maps.c level_0/string/mapss.c
 build_sources_library level_0/string/map_multi.c level_0/string/map_multis.c level_0/string/map_multiss.c
index 962ba913088d93210b4f688eaab00b59ae814e70..320f7d108fb49e1781be554f8c754df037c2fa85 100644 (file)
@@ -31,7 +31,7 @@ build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/leve
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.cfll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
 build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/map_multi.c fll/level_0/utf/static.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-map.c fll/level_0/utf/private-map_multi.c fll/level_0/utf/private-triple.c fll/level_0/utf/private-string.c
index dc358ba33f85fe0d9394e37553c47072181ea251..779efdeb9e1b8b380af0e476710f8932cb1985dd 100644 (file)
 //#define _di_f_string_empty_s_
 //#define _di_f_string_eol_s_
 //#define _di_f_string_format_s_
-#define _di_f_string_map_multis_adjust_
 #define _di_f_string_map_multis_append_
 #define _di_f_string_map_multis_append_all_
-#define _di_f_string_map_multis_decimate_by_
-#define _di_f_string_map_multis_decrease_by_
-//#define _di_f_string_map_multis_increase_
-#define _di_f_string_map_multis_increase_by_
-//#define _di_f_string_map_multis_resize_
-#define _di_f_string_map_multiss_adjust_
+//#define _di_f_string_map_multis_delete_callback_
+#define _di_f_string_map_multis_destroy_callback_
 #define _di_f_string_map_multiss_append_
 #define _di_f_string_map_multiss_append_all_
-#define _di_f_string_map_multiss_decimate_by_
-#define _di_f_string_map_multiss_decrease_by_
-#define _di_f_string_map_multiss_increase_
-#define _di_f_string_map_multiss_increase_by_
-#define _di_f_string_map_multiss_resize_
+#define _di_f_string_map_multiss_delete_callback_
+#define _di_f_string_map_multiss_destroy_callback_
 #define _di_f_string_map_multiss_t_
 //#define _di_f_string_map_multis_t_
 //#define _di_f_string_map_multi_t_
-#define _di_f_string_maps_adjust_
 //#define _di_f_string_maps_append_
 #define _di_f_string_maps_append_all_
-#define _di_f_string_maps_decimate_by_
-#define _di_f_string_maps_decrease_by_
-//#define _di_f_string_maps_increase_
-//#define _di_f_string_maps_increase_by_
-//#define _di_f_string_maps_resize_
-#define _di_f_string_mapss_adjust_
+//#define _di_f_string_maps_delete_callback_
+#define _di_f_string_maps_destroy_callback_
 #define _di_f_string_mapss_append_
 #define _di_f_string_mapss_append_all_
-#define _di_f_string_mapss_decimate_by_
-#define _di_f_string_mapss_decrease_by_
-#define _di_f_string_mapss_increase_
-#define _di_f_string_mapss_increase_by_
-#define _di_f_string_mapss_resize_
+#define _di_f_string_mapss_delete_callback_
+#define _di_f_string_mapss_destroy_callback_
 #define _di_f_string_mapss_t_
 //#define _di_f_string_maps_t_
 //#define _di_f_string_map_t_
 #define _di_f_string_prepend_assure_
 #define _di_f_string_prepend_assure_nulless_
 #define _di_f_string_prepend_nulless_
-#define _di_f_string_quantitys_adjust_
 #define _di_f_string_quantitys_append_
 #define _di_f_string_quantitys_append_all_
-#define _di_f_string_quantitys_decimate_by_
-#define _di_f_string_quantitys_decrease_by_
-#define _di_f_string_quantitys_increase_
-#define _di_f_string_quantitys_increase_by_
-#define _di_f_string_quantitys_resize_
-#define _di_f_string_quantityss_adjust_
 #define _di_f_string_quantityss_append_
 #define _di_f_string_quantityss_append_all_
-#define _di_f_string_quantityss_decimate_by_
-#define _di_f_string_quantityss_decrease_by_
-#define _di_f_string_quantityss_increase_
-#define _di_f_string_quantityss_increase_by_
-#define _di_f_string_quantityss_resize_
+#define _di_f_string_quantityss_delete_callback_
+#define _di_f_string_quantityss_destroy_callback_
 #define _di_f_string_quantityss_t_
 #define _di_f_string_quantitys_t_
 #define _di_f_string_quantity_t_
 #define _di_f_string_range_empty_c_
-#define _di_f_string_ranges_adjust_
 #define _di_f_string_ranges_append_
 #define _di_f_string_ranges_append_all_
-#define _di_f_string_ranges_decimate_by_
-#define _di_f_string_ranges_decrease_by_
-//#define _di_f_string_ranges_increase_
-#define _di_f_string_ranges_increase_by_
-//#define _di_f_string_ranges_resize_
-#define _di_f_string_rangess_adjust_
 #define _di_f_string_rangess_append_
 #define _di_f_string_rangess_append_all_
-#define _di_f_string_rangess_decimate_by_
-#define _di_f_string_rangess_decrease_by_
-//#define _di_f_string_rangess_increase_
-#define _di_f_string_rangess_increase_by_
-//#define _di_f_string_rangess_resize_
+//#define _di_f_string_rangess_delete_callback_
+#define _di_f_string_rangess_destroy_callback_
 //#define _di_f_string_rangess_t_
 //#define _di_f_string_ranges_t_
 //#define _di_f_string_range_t_
 //#define _di_f_string_statics_t_
 //#define _di_f_string_static_t_
 //#define _di_f_string_t_
-#define _di_f_string_triples_adjust_
 #define _di_f_string_triples_append_
 #define _di_f_string_triples_append_all_
-#define _di_f_string_triples_decimate_by_
-#define _di_f_string_triples_decrease_by_
-#define _di_f_string_triples_increase_
-#define _di_f_string_triples_increase_by_
-#define _di_f_string_triples_resize_
+#define _di_f_string_triples_delete_callback_
+#define _di_f_string_triples_destroy_callback_
 #define _di_f_string_tripless_adjust_
 #define _di_f_string_tripless_append_
 #define _di_f_string_tripless_append_all_
-#define _di_f_string_tripless_decimate_by_
-#define _di_f_string_tripless_decrease_by_
-#define _di_f_string_tripless_increase_
-#define _di_f_string_tripless_increase_by_
-#define _di_f_string_tripless_resize_
+#define _di_f_string_tripless_delete_callback_
+#define _di_f_string_tripless_destroy_callback_
 #define _di_f_string_tripless_t_
 #define _di_f_string_triples_t_
 #define _di_f_string_triple_t_
index bb225e2ec6fc274e2badd340670e89c1f67ae794..abbcbb1c4d3bfdee2b14df4aab305a9ee86f6dc3 100644 (file)
@@ -54,7 +54,7 @@ build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/private-rip.c fll/level_0/rip/private-utf.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
 build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
index f8122715764c5c9d994d4a8a2a51122894d60d3a..ae4f259473b3b789cc9b1a1de4f3928b9e87ecdc 100644 (file)
@@ -40,7 +40,7 @@ build_sources_program fll/level_0/path.c fll/level_0/private-path.c fll/level_0/
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
 build_sources_program fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
 build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
index 00ce1511009d3da7e8aafc3f5500c1de3cd13766..8a0175e9484c13cc498d9aea9a0d720d2d2e5af9 100644 (file)
@@ -31,7 +31,7 @@ build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/leve
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
 build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
index 1858f1ce5a3b7c375e4354e5cbe39c40bce3c84d..141426ce854fe1cb6f6b8b2ffb5ad7a696c3c71d 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
     if (!total) return F_data_not;
 
     {
-      const f_status_t status = f_string_maps_increase_by(total, environment);
+      const f_status_t status = f_memory_array_increase_by(total, sizeof(f_string_map_t), (void **) &environment->array, &environment->used, &environment->size);
       if (F_status_is_error(status)) return status;
     }
 
index 11d0b3c2f05a2cc1ea382db63e4207c42b787adb..4aed088427b5b5ff97f32fca2018431b6a10ded8 100644 (file)
@@ -44,9 +44,9 @@ extern "C" {
  *   F_okay on success.
  *   F_data_not if the arguments.envp pointer is NULL or there are no environment variables in arguments.envp.
  *
- *   Errors (with error bit) from: f_string_maps_increase_by().
+ *   Errors (with error bit) from: f_memory_array_increase_by().
  *
- * @see f_string_maps_increase_by()
+ * @see f_memory_array_increase_by()
  */
 #ifndef _di_f_console_environment_process_
   extern f_status_t f_console_environment_process(const f_console_arguments_t arguments, f_string_maps_t * const environment);
index 8a6f8417b45d0785ef2b79ad2f6062cdbf4cb682..c103ce9551b6bcca28dd15708266f9375915bcab 100644 (file)
@@ -23,7 +23,7 @@ void test__f_console_environment_process__data_not(void **state) {
       assert_int_equal(status, F_data_not);
     }
 
-    f_string_maps_resize(0, &maps);
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &maps.array, &maps.used, &maps.size, &f_string_maps_delete_callback);
   } // for
 }
 
@@ -112,7 +112,7 @@ void test__f_console_environment_process__works(void **state) {
     } // for
   }
 
-  f_string_maps_resize(0, &maps);
+  f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &maps.array, &maps.used, &maps.size, &f_string_maps_delete_callback);
 }
 
 #ifdef __cplusplus
index 32cfff30617291920d39aa2e570c13340651634e..d469f1210ba5f6ea0ec409e8300024f95567010e 100644 (file)
@@ -34,7 +34,7 @@ void test__f_environment_get_all__works(void **state) {
     assert_string_equal(environment.array[0].value.string, value.string);
   }
 
-  f_string_maps_resize(0, &environment);
+  f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &environment.array, &environment.used, &environment.size, &f_string_maps_delete_callback);
 }
 
 #ifdef __cplusplus
index 9b8e433a48e71264ac53bda5213558c659a2f11e..dedac9c19b6cd06b92b089f05e50671f9329691d 100644 (file)
@@ -122,7 +122,7 @@ void test__f_file_read__works(void **state) {
     const f_status_t status = f_file_read(file, &buffer);
 
     // Ensure string ends in NULL so that assert_string_equal() can be used.
-    f_string_dynamic_increase_by(1, &buffer);
+    f_memory_array_increase_by(1, sizeof(f_char_t), (void **) &buffer.string, &buffer.used, &buffer.size);
     buffer.string[buffer.used] = 0;
 
     assert_int_equal(status, F_okay_eof);
index 49fbe93f4eb61363c7c165e6badbcbeac65bd937..1d397ed84ec094c0524a52c69202d2a8d1afc65e 100644 (file)
@@ -112,7 +112,7 @@ void test__f_file_read_block__works(void **state) {
     const f_status_t status = f_file_read_block(file, &buffer);
 
     // Ensure string ends in NULL so that assert_string_equal() can be used.
-    f_string_dynamic_increase_by(1, &buffer);
+    f_memory_array_increase_by(1, sizeof(f_char_t), (void **) &buffer.string, &buffer.used, &buffer.size);
     buffer.string[buffer.used] = 0;
 
     assert_int_equal(status, F_okay);
index 6d721409ed8553da4f46d6ccf954990239f83264..5a4a01b6a03b48fb26001b4fc1b80b3cc71c99c3 100644 (file)
@@ -117,7 +117,7 @@ void test__f_file_read_until__works(void **state) {
     const f_status_t status = f_file_read_until(file, 6, &buffer);
 
     // Ensure string ends in NULL so that assert_string_equal() can be used.
-    f_string_dynamic_increase_by(1, &buffer);
+    f_memory_array_increase_by(1, sizeof(f_char_t), (void **) &buffer.string, &buffer.used, &buffer.size);
     buffer.string[buffer.used] = 0;
 
     assert_int_equal(status, F_okay_stop);
@@ -141,7 +141,7 @@ void test__f_file_read_until__works(void **state) {
     const f_status_t status = f_file_read_until(file, 6, &buffer);
 
     // Ensure string ends in NULL so that assert_string_equal() can be used.
-    f_string_dynamic_increase_by(1, &buffer);
+    f_memory_array_increase_by(1, sizeof(f_char_t), (void **) &buffer.string, &buffer.used, &buffer.size);
     buffer.string[buffer.used] = 0;
 
     assert_int_equal(status, F_okay_eof);
index 39acd56ef9426eabadb37590e8602c9745784005..a0f11498500ac1faef83bff41bef2d830c0fe270 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
       if (!item) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return f_string_ranges_resize(0, &item->content);
+    return f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &item->content.array, &item->content.used, &item->content.size);
   }
 #endif // _di_f_fss_item_delete_
 
@@ -20,7 +20,7 @@ extern "C" {
       if (!item) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return f_string_ranges_adjust(0, &item->content);
+    return f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &item->content.array, &item->content.used, &item->content.size);
   }
 #endif // _di_f_fss_item_destroy_
 
@@ -33,7 +33,7 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_resize(0, &array[i].content);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].content.array, &array[i].content.used, &array[i].content.size);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -51,7 +51,7 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_adjust(0, &array[i].content);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].content.array, &array[i].content.used, &array[i].content.size);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -72,7 +72,7 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &array[i].array[j].content);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].content.array, &array[i].array[j].content.used, &array[i].array[j].content.size);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -99,7 +99,7 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].content);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].content.array, &array[i].array[j].content.used, &array[i].array[j].content.size);
           if (F_status_is_error(status)) return status;
         } // for
 
index c80cebf0fd03627d9dff9e644e11f1554bde57e4..c3ccb51dad9738058fc8682ff47a7d280d0db88a 100644 (file)
@@ -126,9 +126,9 @@ extern "C" {
  *
  *   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_memory_array_resize().
  *
- * @see f_string_ranges_resize()
+ * @see f_memory_array_resize()
  */
 #ifndef _di_f_fss_item_delete_
   extern f_status_t f_fss_item_delete(f_fss_item_t * const item);
@@ -145,9 +145,9 @@ extern "C" {
  *
  *   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_memory_array_adjust().
  *
- * @see f_string_ranges_adjust()
+ * @see f_memory_array_adjust()
  */
 #ifndef _di_f_fss_item_destroy_
   extern f_status_t f_fss_item_destroy(f_fss_item_t * const item);
@@ -173,9 +173,9 @@ extern "C" {
  *
  *   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_memory_array_resize().
  *
- * @see f_string_ranges_resize()
+ * @see f_memory_array_resize()
  */
 #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);
@@ -201,9 +201,9 @@ extern "C" {
  *
  *   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_memory_array_adjust().
  *
- * @see f_string_ranges_adjust()
+ * @see f_memory_array_adjust()
  */
 #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);
@@ -229,9 +229,9 @@ extern "C" {
  *
  *   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_memory_array_resize().
  *
- * @see f_string_ranges_resize()
+ * @see f_memory_array_resize()
  */
 #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);
@@ -257,9 +257,9 @@ extern "C" {
  *
  *   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_memory_array_adjust().
  *
- * @see f_string_ranges_adjust()
+ * @see f_memory_array_adjust()
  */
 #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);
index 21429142dad6fb819579b0a3080edf6364d330e0..57801bc6d5d46996bf8b7abb69ba5eef287056a4 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_resize(0, &named->objects);
+      f_status_t status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &named->objects.array, &named->objects.used, &named->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_resize(0, &named->contents);
+      status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &named->contents.array, &named->contents.used, &named->contents.size, &f_string_rangess_delete_callback);
       if (F_status_is_error(status)) return status;
 
-      status = f_memory_arrays_resize(0, sizeof(uint8_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8ss_delete_callback);
+      status = f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8ss_delete_callback);
       if (F_status_is_error(status)) return status;
     }
 
@@ -32,13 +32,13 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_adjust(0, &named->objects);
+      f_status_t status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &named->objects.array, &named->objects.used, &named->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_adjust(0, &named->contents);
+      status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &named->contents.array, &named->contents.used, &named->contents.size, &f_string_rangess_destroy_callback);
       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);
+      status = f_memory_arrays_adjust(0, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8ss_destroy_callback);
       if (F_status_is_error(status)) return status;
     }
 
@@ -55,13 +55,13 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_resize(0, &array[i].objects);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_resize(0, &array[i].contents);
+        status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_delete_callback);
         if (F_status_is_error(status)) return status;
 
-        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);
+        status = f_memory_arrays_resize(0, sizeof(f_uint8s_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
     }
@@ -79,13 +79,13 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_adjust(0, &array[i].objects);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_adjust(0, &array[i].contents);
+        status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_destroy_callback);
         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);
+        status = f_memory_arrays_adjust(0, sizeof(f_uint8s_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
     }
@@ -106,13 +106,13 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &array[i].array[j].objects);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_resize(0, &array[i].array[j].contents);
+          status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_delete_callback);
           if (F_status_is_error(status)) return status;
 
-          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);
+          status = f_memory_arrays_resize(0, sizeof(f_uint8s_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
 
@@ -139,13 +139,13 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+          status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_destroy_callback);
           if (F_status_is_error(status)) return status;
 
-          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);
+          status = f_memory_arrays_adjust(0, sizeof(f_uint8s_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
 
index 41bab47c07dcf611c6b4ee9e075221b9a2a6c765..d048b1380501990c354bb24bcb00afb6fba4a3b6 100644 (file)
@@ -40,6 +40,7 @@ extern "C" {
   #define f_fss_named_t_initialize { f_string_range_t_initialize, f_string_ranges_t_initialize, f_string_rangess_t_initialize, f_uint8ss_t_initialize }
 
   #define macro_f_fss_named_t_initialize_1(name, objects, contents, quotess) macro_f_number_unsigneds_t_initialize_1(name, objects, contents, quotess)
+  #define macro_f_fss_named_t_initialize_2(name) macro_f_number_unsigneds_t_initialize_1(name, f_string_ranges_t_initialize, f_string_rangess_t_initialize, f_uint8ss_t_initialize)
 
   #define macro_f_fss_named_t_clear(named) \
     macro_f_string_range_t_clear(named.name) \
@@ -107,12 +108,10 @@ extern "C" {
  *
  *   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().
+ *   Errors (with error bit) from: f_memory_array_resize().
  *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_array_resize()
  * @see f_memory_arrays_resize()
  */
 #ifndef _di_f_fss_named_delete_
@@ -130,12 +129,10 @@ extern "C" {
  *
  *   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_adjust().
  *   Errors (with error bit) from: f_memory_arrays_adjust().
  *
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
+ * @see f_memory_array_adjust()
  * @see f_memory_arrays_adjust()
  */
 #ifndef _di_f_fss_named_destroy_
@@ -162,12 +159,10 @@ extern "C" {
  *
  *   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().
+ *   Errors (with error bit) from: f_memory_array_resize().
  *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
  * @see f_memory_arrays_resize()
  */
 #ifndef _di_f_fss_nameds_delete_callback_
@@ -194,12 +189,10 @@ extern "C" {
  *
  *   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_adjust().
  *   Errors (with error bit) from: f_memory_arrays_adjust().
  *
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
+ * @see f_memory_array_adjust()
  * @see f_memory_arrays_adjust()
  */
 #ifndef _di_f_fss_nameds_destroy_callback_
@@ -226,12 +219,10 @@ extern "C" {
  *
  *   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().
+ *   Errors (with error bit) from: f_memory_array_resize().
  *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_array_resize()
  * @see f_memory_arrays_resize()
  */
 #ifndef _di_f_fss_namedss_delete_callback_
@@ -258,12 +249,10 @@ extern "C" {
  *
  *   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_adjust().
  *   Errors (with error bit) from: f_memory_arrays_adjust().
  *
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
+ * @see f_memory_array_adjust()
  * @see f_memory_arrays_adjust()
  */
 #ifndef _di_f_fss_namedss_destroy_callback_
index f41ae0cfd271b2f9259542f2708bdcbe637f944d..c0acd1d13f8693efbd0b490df269526b8aa48f41 100644 (file)
@@ -18,7 +18,7 @@ extern "C" {
 
         for (j = 0; j < nest->depth[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &nest->depth[i].array[j].content);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &nest->depth[i].array[j].content.array, &nest->depth[i].array[j].content.used, &nest->depth[i].array[j].content.size);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -47,7 +47,7 @@ extern "C" {
 
         for (j = 0; j < nest->depth[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &nest->depth[i].array[j].content);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &nest->depth[i].array[j].content.array, &nest->depth[i].array[j].content.used, &nest->depth[i].array[j].content.size);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -77,7 +77,7 @@ extern "C" {
 
           for (k = 0; k < array[i].depth[j].size; ++k) {
 
-            status = f_string_ranges_resize(0, &array[i].depth[j].array[k].content);
+            status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].depth[j].array[k].content.array, &array[i].depth[j].array[k].content.used, &array[i].depth[j].array[k].content.size);
             if (F_status_is_error(status)) return status;
           } // for
 
@@ -113,7 +113,7 @@ extern "C" {
 
           for (k = 0; k < array[i].depth[j].size; ++k) {
 
-            status = f_string_ranges_adjust(0, &array[i].depth[j].array[k].content);
+            status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].depth[j].array[k].content.array, &array[i].depth[j].array[k].content.used, &array[i].depth[j].array[k].content.size);
             if (F_status_is_error(status)) return status;
           } // for
 
@@ -152,7 +152,7 @@ extern "C" {
 
             for (l = 0; l < array[i].array[j].depth[k].size; ++l) {
 
-              status = f_string_ranges_resize(0, &array[i].array[j].depth[k].array[l].content);
+              status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].depth[k].array[l].content.array, &array[i].array[j].depth[k].array[l].content.used, &array[i].array[j].depth[k].array[l].content.size);
               if (F_status_is_error(status)) return status;
             } // for
 
@@ -197,7 +197,7 @@ extern "C" {
 
             for (l = 0; l < array[i].array[j].depth[k].size; ++l) {
 
-              status = f_string_ranges_adjust(0, &array[i].array[j].depth[k].array[l].content);
+              status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].depth[k].array[l].content.array, &array[i].array[j].depth[k].array[l].content.used, &array[i].array[j].depth[k].array[l].content.size);
               if (F_status_is_error(status)) return status;
             } // for
 
index b04567e16e884f34246c239cb32918f79dee6757..05e1a3845eebd28f12c08fd44aa793ad4fd9b504 100644 (file)
@@ -103,9 +103,9 @@ extern "C" {
  *
  *   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_memory_array_resize().
  *
- * @see f_string_ranges_resize()
+ * @see f_memory_array_resize()
  */
 #ifndef _di_f_fss_nest_delete_
   extern f_status_t f_fss_nest_delete(f_fss_nest_t * const nest);
@@ -122,11 +122,9 @@ 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_ranges_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
  *
- * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
+ * @see f_memory_array_adjust()
  */
 #ifndef _di_f_fss_nest_destroy_
   extern f_status_t f_fss_nest_destroy(f_fss_nest_t * const nest);
diff --git a/level_0/f_fss/c/fss/private-item.c b/level_0/f_fss/c/fss/private-item.c
deleted file mode 100644 (file)
index 6437f6a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "../fss.h"
-#include "private-item.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) || !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-  f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < items->size; ++i) {
-
-      status = f_string_ranges_adjust(0, &items->array[i].content);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_fss_item_t), (void **) &items->array, &items->used, &items->size);
-  }
-#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) || !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-
-#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_resize_) || !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-  f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < items->size; ++i) {
-
-      status = f_string_ranges_resize(0, &items->array[i].content);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_fss_item_t), (void **) &items->array, &items->used, &items->size);
-  }
-#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_resize_) || !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-item.h b/level_0/f_fss/c/fss/private-item.h
deleted file mode 100644 (file)
index ffb2e5c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_item_h
-#define _PRIVATE_F_fss_item_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 items
- *   The items 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_fss_items_adjust()
- * @see f_fss_items_decimate_by()
- * @see f_fss_nest_adjust()
- * @see f_fss_nest_decimate_by()
- */
-#if !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) || !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-  extern f_status_t private_f_fss_items_adjust(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_items_adjust_) || !defined(_di_f_fss_items_decimate_by_) || !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_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 items
- *   The items 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_fss_items_decrease_by()
- * @see f_fss_items_resize()
- * @see f_fss_nest_decrease_by()
- * @see f_fss_nest_resize()
- */
-#if !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_resize_) || !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-  extern f_status_t private_f_fss_items_resize(const f_number_unsigned_t length, f_fss_items_t * const items) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_resize_) || !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_item_h
diff --git a/level_0/f_fss/c/fss/private-named.c b/level_0/f_fss/c/fss/private-named.c
deleted file mode 100644 (file)
index 2b6dbc3..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "../fss.h"
-#include "private-named.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-  f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) {
-
-    f_status_t status = f_string_ranges_adjust(length, &named->objects);
-    if (F_status_is_error(status)) return status;
-
-    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_delete_callback);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_named_increase_) || !defined(_di_f_fss_named_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-  f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) {
-
-    f_status_t status = f_string_ranges_resize(length, &named->objects);
-    if (F_status_is_error(status)) return status;
-
-    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_delete_callback);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_named_increase_) || !defined(_di_f_fss_named_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-  f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
-
-        status = private_f_fss_named_adjust(0, &nameds->array[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_named_t), (void **) &nameds->array, &nameds->used, &nameds->size);
-  }
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_resize_)
-  f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nameds->size; ++i) {
-
-        status = private_f_fss_named_resize(0, &nameds->array[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_named_t), (void **) &nameds->array, &nameds->used, &nameds->size);
-  }
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-named.h b/level_0/f_fss/c/fss/private-named.h
deleted file mode 100644 (file)
index 3f8e4fc..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_named_h
-#define _PRIVATE_F_fss_named_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 named
- *   The named to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   Errors (with error bit) from: f_memory_arrays_adjust().
- *   Errors (with error bit) from: macro_f_string_ranges_t_adjust().
- *   Errors (with error bit) from: macro_f_string_rangess_t_adjust().
- *
- * @see f_memory_arrays_adjust()
- * @see macro_f_string_ranges_t_adjust()
- * @see macro_f_string_rangess_t_adjust()
- *
- * @see f_fss_nameds_adjust()
- * @see f_fss_nameds_decimate_by()
- */
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-  extern f_status_t private_f_fss_named_adjust(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_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 named
- *   The named to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   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_arrays_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- *
- * @see f_fss_nameds_decrease_by()
- * @see f_fss_nameds_resize()
- */
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_resize_)
-  extern f_status_t private_f_fss_named_resize(const f_number_unsigned_t length, f_fss_named_t * const named) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param nameds
- *   The nameds 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_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_adjust()
- * @see f_memory_arrays_adjust()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- *
- * @see f_fss_nameds_adjust()
- * @see f_fss_nameds_decimate_by()
- */
-#if !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_decimate_by_)
-  extern f_status_t private_f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_adjust_) || !defined(_di_f_fss_nameds_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 nameds
- *   The nameds 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_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()
- *
- * @see f_fss_nameds_decrease_by()
- * @see f_fss_nameds_increase()
- * @see f_fss_nameds_increase_by()
- * @see f_fss_nameds_resize()
- */
-#if !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_named_increase_) || !defined(_di_f_fss_named_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-  extern f_status_t private_f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_named_increase_) || !defined(_di_f_fss_named_increase_by_) || !defined(_di_f_fss_nameds_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_named_h
diff --git a/level_0/f_fss/c/fss/private-nest.c b/level_0/f_fss/c/fss/private-nest.c
deleted file mode 100644 (file)
index 4b42204..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#include "../fss.h"
-#include "private-item.h"
-#include "private-nest.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-  f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nest->size; ++i) {
-
-        status = private_f_fss_items_adjust(0, &nest->depth[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_items_t), (void **) &nest->depth, &nest->used, &nest->size);
-  }
-#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-
-#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-  f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nest->size; ++i) {
-
-        status = private_f_fss_items_resize(0, &nest->depth[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_items_t), (void **) &nest->depth, &nest->used, &nest->size);
-  }
-#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-
-#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
-  f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t *nests) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nests->size; ++i) {
-
-        status = private_f_fss_nest_adjust(0, &nests->array[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_nest_t), (void **) &nests->array, &nests->used, &nests->size);
-  }
-#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
-
-#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-  f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < nests->size; ++i) {
-
-        status = private_f_fss_nest_resize(0, &nests->array[i]);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_nest_t), (void **) &nests->array, &nests->used, &nests->size);
-  }
-#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-nest.h b/level_0/f_fss/c/fss/private-nest.h
deleted file mode 100644 (file)
index 1d2e7da..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_nest_h
-#define _PRIVATE_F_fss_nest_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 nest
- *   The nest 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_fss_nests_adjust()
- * @see f_fss_nests_decimate_by()
- */
-#if !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_decimate_by_)
-  extern f_status_t private_f_fss_nest_adjust(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nest_adjust_) || !defined(_di_f_fss_nest_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 nest
- *   The nest 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_fss_nests_decrease_by()
- * @see f_fss_nests_resize()
- */
-#if !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-  extern f_status_t private_f_fss_nest_resize(const f_number_unsigned_t length, f_fss_nest_t * const nest) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param nests
- *   The nests 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_fss_nests_adjust()
- * @see f_fss_nests_decimate_by()
- */
-#if !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_decimate_by_)
-  extern f_status_t private_f_fss_nests_adjust(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nests_adjust_) || !defined(_di_f_fss_nests_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 nests
- *   The nests 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_fss_nests_decrease_by()
- * @see f_fss_nests_increase()
- * @see f_fss_nests_increase_by()
- * @see f_fss_nests_resize()
- */
-#if !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-  extern f_status_t private_f_fss_nests_resize(const f_number_unsigned_t length, f_fss_nests_t * const nests) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_nests_decrease_by_) || !defined(_di_f_fss_nests_increase_) || !defined(_di_f_fss_nests_increase_by_) || !defined(_di_f_fss_nests_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_nest_h
diff --git a/level_0/f_fss/c/fss/private-set.c b/level_0/f_fss/c/fss/private-set.c
deleted file mode 100644 (file)
index 3c443a0..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "../fss.h"
-#include "private-set.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
-  f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) {
-
-    f_status_t status = f_string_ranges_adjust(length, &set->objects);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_rangess_adjust(length, &set->contents);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
-
-#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-  f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t *set) {
-
-    f_status_t status = f_string_ranges_resize(length, &set->objects);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_rangess_resize(length, &set->contents);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-
-#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
-  f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < sets->size; ++i) {
-
-        status = f_string_ranges_adjust(0, &sets->array[i].objects);
-        if (F_status_is_error(status)) return status;
-
-        status = f_string_rangess_adjust(0, &sets->array[i].contents);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_set_t), (void **) &sets->array, &sets->used, &sets->size);
-  }
-#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
-
-#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_resize_)
-  f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < sets->size; ++i) {
-
-        status = f_string_ranges_resize(0, &sets->array[i].objects);
-        if (F_status_is_error(status)) return status;
-
-        status = f_string_rangess_resize(0, &sets->array[i].contents);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_set_t), (void **) &sets->array, &sets->used, &sets->size);
-  }
-#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-set.h b/level_0/f_fss/c/fss/private-set.h
deleted file mode 100644 (file)
index 808c5ad..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_set_h
-#define _PRIVATE_F_fss_set_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 set
- *   The set to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   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()
- *
- * @see f_fss_set_adjust()
- * @see f_fss_set_decimate_by()
- */
-#if !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_decimate_by_)
-  extern f_status_t private_f_fss_set_adjust(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_adjust_) || !defined(_di_f_fss_set_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 set
- *   The set to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   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()()
- *
- * @see f_fss_set_decrease_by()
- * @see f_fss_set_increase()
- * @see f_fss_set_increase_by()
- * @see f_fss_set_resize()
- */
-#if !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-  extern f_status_t private_f_fss_set_resize(const f_number_unsigned_t length, f_fss_set_t * const set) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_decrease_by_) || !defined(_di_f_fss_set_increase_) || !defined(_di_f_fss_set_increase_by_) || !defined(_di_f_fss_set_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param sets
- *   The sets 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_ranges_adjust().
- *   Errors (with error bit) from: f_string_rangess_adjust().
- *
- * @see f_memory_array_adjust()
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
- *
- * @see f_fss_sets_adjust()
- * @see f_fss_sets_decimate_by()
- */
-#if !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_decimate_by_)
-  extern f_status_t private_f_fss_sets_adjust(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_sets_adjust_) || !defined(_di_f_fss_sets_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 sets
- *   The sets 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_ranges_resize().
- *   Errors (with error bit) from: f_string_rangess_resize().
- *
- * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
- *
- * @see f_fss_sets_decrease_by()
- * @see f_fss_sets_resize()
- */
-#if !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_resize_)
-  extern f_status_t private_f_fss_sets_resize(const f_number_unsigned_t length, f_fss_sets_t * const sets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_set_h
diff --git a/level_0/f_fss/c/fss/private-set_quote.c b/level_0/f_fss/c/fss/private-set_quote.c
deleted file mode 100644 (file)
index 3d6e54b..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "../fss.h"
-#include "private-set_quote.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
-  f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
-
-    f_status_t status = f_string_ranges_adjust(length, &set_quote->objects);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_rangess_adjust(length, &set_quote->contents);
-    if (F_status_is_error(status)) return status;
-
-    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_delete_callback);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
-
-#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-  f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) {
-
-    f_status_t status = f_string_ranges_resize(length, &set_quote->objects);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_rangess_resize(length, &set_quote->contents);
-    if (F_status_is_error(status)) return status;
-
-    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_delete_callback);
-    if (F_status_is_error(status)) return status;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-
-#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
-  f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
-
-        status = f_string_ranges_adjust(0, &set_quotes->array[i].objects);
-        if (F_status_is_error(status)) return status;
-
-        status = f_string_rangess_adjust(0, &set_quotes->array[i].contents);
-        if (F_status_is_error(status)) return status;
-
-        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_delete_callback);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_set_quote_t), (void **) &set_quotes->array, &set_quotes->used, &set_quotes->size);
-  }
-#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
-
-#if !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_resize_)
-  f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < set_quotes->size; ++i) {
-
-        status = f_string_ranges_resize(0, &set_quotes->array[i].objects);
-        if (F_status_is_error(status)) return status;
-
-        status = f_string_rangess_resize(0, &set_quotes->array[i].contents);
-        if (F_status_is_error(status)) return status;
-
-        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_delete_callback);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_set_quote_t), (void **) &set_quotes->array, &set_quotes->used, &set_quotes->size);
-  }
-#endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-set_quote.h b/level_0/f_fss/c/fss/private-set_quote.h
deleted file mode 100644 (file)
index 15fb877..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_set_quote_h
-#define _PRIVATE_F_fss_set_quote_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 set_quote
- *   The set_quote to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   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_adjust().
- *   Errors (with error bit) from: f_string_rangess_adjust().
- *
- * @see f_memory_array_resize()
- * @see f_memory_arrays_resize()
- * @see f_string_ranges_adjust()
- * @see f_string_rangess_adjust()
- *
- * @see f_fss_set_quote_adjust()
- * @see f_fss_set_quote_decimate_by()
- */
-#if !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_decimate_by_)
-  extern f_status_t private_f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quote_adjust_) || !defined(_di_f_fss_set_quote_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 set_quote
- *   The set_quote to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   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()
- *
- * @see f_fss_set_quote_decrease_by()
- * @see f_fss_set_quote_resize()
- */
-#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_resize_)
-  extern f_status_t private_f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param set_quotes
- *   The set_quotes 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_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_fss_set_quotes_decrease_by()
- * @see f_fss_set_quotes_adjust()
- * @see f_memory_adjust()
- */
-#if !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_decimate_by_)
-  extern f_status_t private_f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quotes_adjust_) || !defined(_di_f_fss_set_quotes_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 set_quotes
- *   The set_quotes 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_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_fss_set_quotes_decrease_by()
- * @see f_fss_set_quotes_increase()
- * @see f_fss_set_quotes_increase_by()
- * @see f_fss_set_quotes_resize()
- * @see f_memory_resize()
- */
-#if !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-  extern f_status_t private_f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_set_quote_decrease_by_) || !defined(_di_f_fss_set_quote_increase_) || !defined(_di_f_fss_set_quote_increase_by_) || !defined(_di_f_fss_set_quote_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_set_quote_h
diff --git a/level_0/f_fss/c/fss/private-simple_packet.c b/level_0/f_fss/c/fss/private-simple_packet.c
deleted file mode 100644 (file)
index 1fa9913..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#include "../fss.h"
-#include "private-simple_packet.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_rangess_append_)
-  extern f_status_t private_f_fss_simple_packet_ranges_append(const f_fss_simple_packet_range_t source, f_fss_simple_packet_ranges_t *destination) {
-
-    const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fss_simple_packet_range_t), (void **) &destination->array, &destination->used, &destination->size);
-    if (F_status_is_error(status)) return status;
-
-    destination->array[destination->used++] = source;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_rangess_append_)
-
-#if !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_ranges_append_all_) || !defined(_di_f_fss_simple_packet_rangess_append_all_)
-  extern f_status_t private_f_fss_simple_packet_ranges_append_all(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_ranges_t *destination) {
-
-    {
-      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fss_simple_packet_range_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->array[destination->used++] = source.array[i];
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_ranges_append_all_) || !defined(_di_f_fss_simple_packet_rangess_append_all_)
-
-#if !defined(_di_f_fss_simple_packet_rangess_adjust_) || !defined(_di_f_fss_simple_packet_rangess_decimate_by_)
-  f_status_t private_f_fss_simple_packet_rangess_adjust(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < rangess->size; ++i) {
-
-        status = f_memory_array_adjust(0, sizeof(f_fss_simple_packet_range_t), (void **) &rangess->array[i].array, &rangess->array[i].used, &rangess->array[i].size);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_simple_packet_ranges_t), (void **) &rangess->array, &rangess->used, &rangess->size);
-  }
-#endif // !defined(_di_f_fss_simple_packet_rangess_adjust_) || !defined(_di_f_fss_simple_packet_rangess_decimate_by_)
-
-#if !defined(_di_f_fss_simple_packet_rangess_decrease_by_) || !defined(_di_f_fss_simple_packet_rangess_resize_)
-  f_status_t private_f_fss_simple_packet_rangess_resize(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < rangess->size; ++i) {
-
-        status = f_memory_array_resize(0, sizeof(f_fss_simple_packet_range_t), (void **) &rangess->array[i].array, &rangess->array[i].used, &rangess->array[i].size);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_simple_packet_ranges_t), (void **) &rangess->array, &rangess->used, &rangess->size);
-  }
-#endif // !defined(_di_f_fss_simple_packet_rangess_decrease_by_) || !defined(_di_f_fss_simple_packet_rangess_resize_)
-
-#if !defined(_di_f_fss_simple_packets_adjust_) || !defined(_di_f_fss_simple_packets_decimate_by_)
-  f_status_t private_f_fss_simple_packets_adjust(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < packets->size; ++i) {
-
-        status = f_string_dynamic_adjust(0, &packets->array[i].payload);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
-  }
-#endif // !defined(_di_f_fss_simple_packets_adjust_) || !defined(_di_f_fss_simple_packets_decimate_by_)
-
-#if !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packetss_append_)
-  extern f_status_t private_f_fss_simple_packets_append(const f_fss_simple_packet_t source, f_fss_simple_packets_t *destination) {
-
-    const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fss_simple_packet_t), (void **) &destination->array, &destination->used, &destination->size);
-    if (F_status_is_error(status)) return status;
-
-    destination->array[destination->used++] = source;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packetss_append_)
-
-#if !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packets_append_all_) || !defined(_di_f_fss_simple_packetss_append_all_)
-  extern f_status_t private_f_fss_simple_packets_append_all(const f_fss_simple_packets_t source, f_fss_simple_packets_t *destination) {
-
-    {
-      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fss_simple_packet_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->array[destination->used++] = source.array[i];
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packets_append_all_) || !defined(_di_f_fss_simple_packetss_append_all_)
-
-#if !defined(_di_f_fss_simple_packets_decrease_by_) || !defined(_di_f_fss_simple_packets_resize_)
-  f_status_t private_f_fss_simple_packets_resize(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < packets->size; ++i) {
-
-        status = f_memory_array(0, sizeof(f_char_t), (void **) &packets->array[i].payload.string, &packets->array[i].payload.used, &packets->array[i].payload.size);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_simple_packet_t), (void **) &packets->array, &packets->used, &packets->size);
-  }
-#endif // !defined(_di_f_fss_simple_packets_decrease_by_) || !defined(_di_f_fss_simple_packets_resize_)
-
-#if !defined(_di_f_fss_simple_packetss_adjust_) || !defined(_di_f_fss_simple_packetss_decimate_by_)
-  f_status_t private_f_fss_simple_packetss_adjust(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < packetss->size; ++i) {
-
-        status = f_memory_array_adjust(0, sizeof(f_fss_simple_packet_t), (void **) &packetss->array[i].array, &packetss->array[i].used, &packetss->array[i].size);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_fss_simple_packets_t), (void **) &packetss->array, &packetss->used, &packetss->size);
-  }
-#endif // !defined(_di_f_fss_simple_packetss_adjust_) || !defined(_di_f_fss_simple_packetss_decimate_by_)
-
-#if !defined(_di_f_fss_simple_packetss_decrease_by_) || !defined(_di_f_fss_simple_packetss_resize_)
-  f_status_t private_f_fss_simple_packetss_resize(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) {
-
-    {
-      f_status_t status = F_okay;
-
-      for (f_number_unsigned_t i = length; i < packetss->size; ++i) {
-
-        status = f_memory_array_resize(0, sizeof(f_fss_simple_packet_t), (void **) &packetss->array[i].array, &packetss->array[i].used, &packetss->array[i].size);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_fss_simple_packets_t), (void **) &packetss->array, &packetss->used, &packetss->size);
-  }
-#endif // !defined(_di_f_fss_simple_packetss_decrease_by_) || !defined(_di_f_fss_simple_packetss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_fss/c/fss/private-simple_packet.h b/level_0/f_fss/c/fss/private-simple_packet.h
deleted file mode 100644 (file)
index c64619d..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: FSS
- * 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_fss_simple_packet_h
-#define _PRIVATE_F_fss_simple_packet_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the range array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source range to append.
- * @param destination
- *   The destination lengths the source is appended onto.
- *
- * @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()
- *
- * @see f_fss_simple_packet_ranges_append()
- * @see f_fss_simple_packet_rangess_append()
- */
-#if !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_rangess_append_)
-  extern f_status_t private_f_fss_simple_packet_ranges_append(const f_fss_simple_packet_range_t source, f_fss_simple_packet_ranges_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_rangess_append_)
-
-/**
- * Private implementation for appending the range array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source ranges to append.
- * @param destination
- *   The destination lengths the source is appended onto.
- *
- * @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()
- *
- * @see f_fss_simple_packet_ranges_append_all()
- * @see f_fss_simple_packet_rangess_append()
- * @see f_fss_simple_packet_rangess_append_all()
- */
-#if !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_ranges_append_all_) || !defined(_di_f_fss_simple_packet_rangess_append_all_)
-  extern f_status_t private_f_fss_simple_packet_ranges_append_all(const f_fss_simple_packet_ranges_t source, f_fss_simple_packet_ranges_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packet_ranges_append_) || !defined(_di_f_fss_simple_packet_ranges_append_all_) || !defined(_di_f_fss_simple_packet_rangess_append_all_)
-
-/**
- * Private implementation for resizing the rangess array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param rangess
- *   The rangess 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().
- *
- * @see f_memory_array_adjust()
- *
- * @see f_fss_simple_packet_rangess_decrease_by()
- * @see f_fss_simple_packet_rangess_adjust()
- */
-#if !defined(_di_f_fss_simple_packet_rangess_adjust_) || !defined(_di_f_fss_simple_packet_rangess_decimate_by_)
-  extern f_status_t private_f_fss_simple_packet_rangess_adjust(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packet_rangess_adjust_) || !defined(_di_f_fss_simple_packet_rangess_decimate_by_)
-
-/**
- * Private implementation for resizing the rangess array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @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()
- *
- * @see f_fss_simple_packet_rangess_decrease_by()
- * @see f_fss_simple_packet_rangess_resize()
- */
-#if !defined(_di_f_fss_simple_packet_rangess_decrease_by_) || !defined(_di_f_fss_simple_packet_rangess_resize_)
-  extern f_status_t private_f_fss_simple_packet_rangess_resize(const f_number_unsigned_t length, f_fss_simple_packet_rangess_t *rangess) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packet_rangess_decrease_by_) || !defined(_di_f_fss_simple_packet_rangess_resize_)
-
-/**
- * Private implementation for resizing the simple packet array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param packets
- *   The simple packet 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().
- *
- * @see f_memory_array_adjust()
- *
- * @see f_fss_simple_packets_decrease_by()
- * @see f_fss_simple_packets_adjust()
- */
-#if !defined(_di_f_fss_simple_packets_adjust_) || !defined(_di_f_fss_simple_packets_decimate_by_)
-  extern f_status_t private_f_fss_simple_packets_adjust(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packets_adjust_) || !defined(_di_f_fss_simple_packets_decimate_by_)
-
-/**
- * Private implementation for appending the simple packet array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source simple packet to append.
- * @param destination
- *   The destination lengths the source is appended onto.
- *
- * @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()
- *
- * @see f_fss_simple_packets_append()
- * @see f_fss_simple_packetss_append()
- */
-#if !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packetss_append_)
-  extern f_status_t private_f_fss_simple_packets_append(const f_fss_simple_packet_t source, f_fss_simple_packets_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packetss_append_)
-
-/**
- * Private implementation for appending the simple packet array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source simple packets to append.
- * @param destination
- *   The destination lengths the source is appended onto.
- *
- * @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()
- *
- * @see f_fss_simple_packets_append_all()
- * @see f_fss_simple_packetss_append()
- * @see f_fss_simple_packetss_append_all()
- */
-#if !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packets_append_all_) || !defined(_di_f_fss_simple_packetss_append_all_)
-  extern f_status_t private_f_fss_simple_packets_append_all(const f_fss_simple_packets_t source, f_fss_simple_packets_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packets_append_) || !defined(_di_f_fss_simple_packets_append_all_) || !defined(_di_f_fss_simple_packetss_append_all_)
-
-/**
- * Private implementation for resizing the simple packet array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @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().
- *
- * @see f_memory_array_resize()
- *
- * @see f_fss_simple_packets_decrease_by()
- * @see f_fss_simple_packets_resize()
- */
-#if !defined(_di_f_fss_simple_packets_decrease_by_) || !defined(_di_f_fss_simple_packets_resize_)
-  extern f_status_t private_f_fss_simple_packets_resize(const f_number_unsigned_t length, f_fss_simple_packets_t *packets) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packets_decrease_by_) || !defined(_di_f_fss_simple_packets_resize_)
-
-/**
- * Private implementation for resizing the simple packets array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param packetss
- *   The simple packets 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().
- *
- * @see f_memory_array_adjust()
- *
- * @see f_fss_simple_packetss_decrease_by()
- * @see f_fss_simple_packetss_adjust()
- */
-#if !defined(_di_f_fss_simple_packetss_adjust_) || !defined(_di_f_fss_simple_packetss_decimate_by_)
-  extern f_status_t private_f_fss_simple_packetss_adjust(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packetss_adjust_) || !defined(_di_f_fss_simple_packetss_decimate_by_)
-
-/**
- * Private implementation for resizing the simple packets array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @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_fss_simple_packetss_decrease_by()
- * @see f_fss_simple_packetss_resize()
- */
-#if !defined(_di_f_fss_simple_packetss_decrease_by_) || !defined(_di_f_fss_simple_packetss_resize_)
-  extern f_status_t private_f_fss_simple_packetss_resize(const f_number_unsigned_t length, f_fss_simple_packetss_t *packetss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fss_simple_packetss_decrease_by_) || !defined(_di_f_fss_simple_packetss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_fss_simple_packet_h
index 6a98008f3e411cfa4979a5430999088a3203ae10..7563c59e177503972d09aa0a0b0df79c2264a686 100644 (file)
@@ -11,10 +11,10 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_resize(0, &set->objects);
+      f_status_t status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &set->objects.array, &set->objects.used, &set->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_resize(0, &set->contents);
+      status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &set->contents.array, &set->contents.used, &set->contents.size, &f_string_rangess_delete_callback);
       if (F_status_is_error(status)) return status;
     }
 
@@ -29,10 +29,10 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_adjust(0, &set->objects);
+      f_status_t status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &set->objects.array, &set->objects.used, &set->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_adjust(0, &set->contents);
+      status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &set->contents.array, &set->contents.used, &set->contents.size, &f_string_rangess_destroy_callback);
       if (F_status_is_error(status)) return status;
     }
 
@@ -49,10 +49,10 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_resize(0, &array[i].objects);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_resize(0, &array[i].contents);
+        status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_delete_callback);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -70,10 +70,10 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_adjust(0, &array[i].objects);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_adjust(0, &array[i].contents);
+        status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_destroy_callback);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -94,10 +94,10 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &array[i].array[j].objects);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_resize(0, &array[i].array[j].contents);
+          status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_delete_callback);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -124,10 +124,10 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+          status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_destroy_callback);
           if (F_status_is_error(status)) return status;
         } // for
 
index f011e78e85c0faaa89a6f4c38bb243c24422f97c..fdd98ec1df44c6a8d677d94d22894ff6fa0cb5a4 100644 (file)
@@ -100,11 +100,11 @@ extern "C" {
  *
  *   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().
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  */
 #ifndef _di_f_fss_set_delete_
   extern f_status_t f_fss_set_delete(f_fss_set_t * const set);
@@ -121,11 +121,11 @@ extern "C" {
  *
  *   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_adjust().
+ *   Errors (with error bit) from: f_memory_arrays_adjust().
  *
- * @see f_string_ranges_adjust
- * @see f_string_rangess_adjust()()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
  */
 #ifndef _di_f_fss_set_destroy_
   extern f_status_t f_fss_set_destroy(f_fss_set_t * const set);
@@ -152,8 +152,10 @@ 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_arrays_resize().
  *
  * @see f_memory_array_resize()
+ * @see f_memory_arrays_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);
@@ -179,9 +181,11 @@ 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().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_memory_array_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  */
 #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);
@@ -208,8 +212,10 @@ 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_arrays_resize().
  *
  * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  */
 #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);
@@ -235,9 +241,11 @@ 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().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *
- * @see f_memory_array_adjust()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_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);
index f29a02a55534a7882a456e72c13423c9361d9dc7..6a75cd6b1933ce099b5e1803d89d7bac93087f21 100644 (file)
@@ -11,16 +11,16 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_resize(0, &set_quote->objects);
+      f_status_t status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &set_quote->objects.array, &set_quote->objects.used, &set_quote->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_resize(0, &set_quote->contents);
+      status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &set_quote->contents.array, &set_quote->contents.used, &set_quote->contents.size, &f_string_rangess_delete_callback);
       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;
 
-      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);
+      status = f_memory_arrays_resize(0, sizeof(f_uint8s_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;
     }
 
@@ -35,16 +35,16 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_adjust(0, &set_quote->objects);
+      f_status_t status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &set_quote->objects.array, &set_quote->objects.used, &set_quote->objects.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_rangess_adjust(0, &set_quote->contents);
+      status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &set_quote->contents.array, &set_quote->contents.used, &set_quote->contents.size, &f_string_rangess_destroy_callback);
       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);
+      status = f_memory_arrays_adjust(0, sizeof(f_uint8s_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;
     }
 
@@ -61,16 +61,16 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_resize(0, &array[i].objects);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_resize(0, &array[i].contents);
+        status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_delete_callback);
         if (F_status_is_error(status)) return status;
 
         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;
 
-        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);
+        status = f_memory_arrays_resize(0, sizeof(f_uint8s_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
     }
@@ -88,16 +88,16 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_adjust(0, &array[i].objects);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].objects.array, &array[i].objects.used, &array[i].objects.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_rangess_adjust(0, &array[i].contents);
+        status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].contents.array, &array[i].contents.used, &array[i].contents.size, &f_string_rangess_destroy_callback);
         if (F_status_is_error(status)) return status;
 
         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);
+        status = f_memory_arrays_adjust(0, sizeof(f_uint8s_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
     }
@@ -118,16 +118,16 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &array[i].array[j].objects);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_resize(0, &array[i].array[j].contents);
+          status = f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_delete_callback);
           if (F_status_is_error(status)) return status;
 
           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;
 
-          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);
+          status = f_memory_arrays_resize(0, sizeof(f_uint8s_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
 
@@ -154,21 +154,21 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].objects);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].objects.array, &array[i].array[j].objects.used, &array[i].array[j].objects.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_rangess_adjust(0, &array[i].array[j].contents);
+          status = f_memory_arrays_adjust(0, sizeof(f_string_ranges_t), (void **) &array[i].array[j].contents.array, &array[i].array[j].contents.used, &array[i].array[j].contents.size, &f_string_rangess_destroy_callback);
           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);
+          status = f_memory_arrays_adjust(0, sizeof(f_uint8s_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);
+          status = f_memory_array_adjust(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
index 697a8f5c475e69dfab317c5add3a3ea4ccb6a935..70093ef805ad1c2dcc04710b872ae7456005f5e6 100644 (file)
@@ -109,13 +109,9 @@ extern "C" {
  *
  *   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_delete_
   extern f_status_t f_fss_set_quote_delete(f_fss_set_quote_t * const set_quote);
@@ -134,13 +130,9 @@ extern "C" {
  *
  *   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_quote_destroy_
   extern f_status_t f_fss_set_quote_destroy(f_fss_set_quote_t * const set_quote);
@@ -168,13 +160,9 @@ extern "C" {
  *
  *   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_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);
@@ -202,13 +190,9 @@ extern "C" {
  *
  *   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_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);
@@ -236,13 +220,9 @@ extern "C" {
  *
  *   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_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);
@@ -270,13 +250,9 @@ extern "C" {
  *
  *   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_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);
index 50de7b0f808088879fd8705f21f3fa8b5544b28a..f76e60e28d8ec8263235aa1d24751faae95a23b3 100644 (file)
@@ -5,22 +5,32 @@ extern "C" {
 #endif
 
 #ifndef _di_f_fss_simple_packet_delete_
-  f_status_t f_fss_simple_packet_delete(f_fss_simple_packet_t * const packet) {
+  f_status_t f_fss_simple_packet_delete(f_fss_simple_packet_t * const simple_packet) {
     #ifndef _di_level_0_parameter_checking_
-      if (!packet) return F_status_set_error(F_parameter);
+      if (!simple_packet) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return f_memory_array_resize(0, sizeof(f_char_t), (void **) &packet->payload.string, &packet->payload.used, &packet->payload.size);
+    {
+      const f_status_t status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &simple_packet->payload.string, &simple_packet->payload.used, &simple_packet->payload.size);
+      if (F_status_is_error(status)) return status;
+    }
+
+    return F_okay;
   }
 #endif // _di_f_fss_simple_packet_delete_
 
 #ifndef _di_f_fss_simple_packet_destroy_
-  f_status_t f_fss_simple_packet_destroy(f_fss_simple_packet_t * const packet) {
+  f_status_t f_fss_simple_packet_destroy(f_fss_simple_packet_t * const simple_packet) {
     #ifndef _di_level_0_parameter_checking_
-      if (!packet) return F_status_set_error(F_parameter);
+      if (!simple_packet) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return f_memory_array_adjust(0, sizeof(f_char_t), (void **) &packet->payload.string, &packet->payload.used, &packet->payload.size);
+    {
+      const f_status_t status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &simple_packet->payload.string, &simple_packet->payload.used, &simple_packet->payload.size);
+      if (F_status_is_error(status)) return status;
+    }
+
+    return F_okay;
   }
 #endif // _di_f_fss_simple_packet_destroy_
 
index 33f6669db2f476cbbd50aae464537b9d3498e8aa..e1ef287a2588bf8568277b7cae66081f59587e8e 100644 (file)
@@ -193,10 +193,10 @@ extern "C" {
 #endif // _di_f_fss_simple_packet_rangess_t_
 
 /**
- * Delete a simple packet.
+ * Delete a FSS-000F (Simple Packet).
  *
- * @param packet
- *   The simple packet to delete.
+ * @param simple_packet
+ *   The FSS-000F (Simple Packet) to delete.
  *
  * @return
  *   F_okay on success.
@@ -204,18 +204,20 @@ 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_arrays_resize().
  *
  * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  */
 #ifndef _di_f_fss_simple_packet_delete_
-  extern f_status_t f_fss_simple_packet_delete(f_fss_simple_packet_t * const packet);
+  extern f_status_t f_fss_simple_packet_delete(f_fss_simple_packet_t * const simple_packet);
 #endif // _di_f_fss_simple_packet_delete_
 
 /**
- * Destroy a simple packet.
+ * Destroy a FSS-000F (Simple Packet).
  *
- * @param packet
- *   The simple packet to destroy.
+ * @param simple_packet
+ *   The FSS-000F (Simple Packet) to destroy.
  *
  * @return
  *   F_okay on success.
@@ -223,11 +225,13 @@ 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_arrays_adjust().
  *
  * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
  */
 #ifndef _di_f_fss_simple_packet_destroy_
-  extern f_status_t f_fss_simple_packet_destroy(f_fss_simple_packet_t * const packet);
+  extern f_status_t f_fss_simple_packet_destroy(f_fss_simple_packet_t * const simple_packet);
 #endif // _di_f_fss_simple_packet_destroy_
 
 /**
index f1ed649f7274b015b7d741e2e7f7f8a6b1d482e6..4c5a30a45692807ddb6bed5d0077c8fb6fd58d99 100644 (file)
@@ -30,7 +30,8 @@ build_language c
 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.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 ../../tests/unit/c/mock-fss.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
 
@@ -65,7 +66,3 @@ flags -Wl,--wrap=f_memory_array_adjust
 flags -Wl,--wrap=f_memory_array_resize
 flags -Wl,--wrap=f_memory_arrays_adjust
 flags -Wl,--wrap=f_memory_arrays_resize
-flags -Wl,--wrap=f_string_ranges_adjust
-flags -Wl,--wrap=f_string_ranges_resize
-flags -Wl,--wrap=f_string_rangess_adjust
-flags -Wl,--wrap=f_string_rangess_resize
index dd57ac0c8894dd3acc6c6929fb3784c6eba7ca6d..0ea8923daa9cb533672ba09d41ea1594a9c5161f 100644 (file)
@@ -26,13 +26,18 @@ build_libraries -lc -lcmocka
 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_destroy_callback.c test-fss-items_delete_callback.c test-fss-itemss_destroy_callback.c test-fss-itemss_delete_callback.c
-build_sources_program test-fss-nameds_destroy_callback.c test-fss-nameds_delete_callback.c test-fss-namedss_destroy_callback.c test-fss-namedss_delete_callback.c
-build_sources_program test-fss-nests_destroy_callback.c test-fss-nests_delete_callback.c test-fss-nestss_destroy_callback.c test-fss-nestss_delete_callback.c
-build_sources_program test-fss-sets_destroy_callback.c test-fss-sets_delete_callback.c test-fss-setss_destroy_callback.c test-fss-setss_delete_callback.c
-build_sources_program test-fss-set_quotes_destroy_callback.c test-fss-set_quotes_delete_callback.c test-fss-set_quotess_destroy_callback.c test-fss-set_quotess_delete_callback.c
-build_sources_program test-fss-simple_packets_destroy_callback.c test-fss-simple_packets_delete_callback.c test-fss-simple_packetss_destroy_callback.c test-fss-simple_packetss_delete_callback.c
+build_sources_program test-fss-item_delete.c test-fss-item_destroy.c
+build_sources_program test-fss-items_delete_callback.c test-fss-items_destroy_callback.c test-fss-itemss_delete_callback.c test-fss-itemss_destroy_callback.c
+build_sources_program test-fss-named_delete.c test-fss-named_destroy.c
+build_sources_program test-fss-nameds_delete_callback.c test-fss-nameds_destroy_callback.c test-fss-namedss_delete_callback.c test-fss-namedss_destroy_callback.c
+build_sources_program test-fss-nest_delete.c test-fss-nest_destroy.c
+build_sources_program test-fss-nests_delete_callback.c test-fss-nests_destroy_callback.c test-fss-nestss_delete_callback.c test-fss-nestss_destroy_callback.c
+build_sources_program test-fss-set_delete.c test-fss-set_destroy.c
+build_sources_program test-fss-sets_delete_callback.c test-fss-sets_destroy_callback.c test-fss-setss_delete_callback.c test-fss-setss_destroy_callback.c
+build_sources_program test-fss-set_quote_delete.c test-fss-set_quote_destroy.c
+build_sources_program test-fss-set_quotes_delete_callback.c test-fss-set_quotes_destroy_callback.c test-fss-set_quotess_delete_callback.c test-fss-set_quotess_destroy_callback.c
+build_sources_program test-fss-simple_packet_delete.c test-fss-simple_packet_destroy.c
+build_sources_program test-fss-simple_packets_delete_callback.c test-fss-simple_packets_destroy_callback.c test-fss-simple_packetss_delete_callback.c test-fss-simple_packetss_destroy_callback.c
 
 build_sources_program test-fss.c
 
index 7f1d864febb540c6ac764a57803d4bcc65fdf7d4..abcaaa50171c74d7dd232e7d3a6fffb99866e7ef 100644 (file)
@@ -75,74 +75,6 @@ f_status_t __wrap_f_memory_arrays_resize(const f_number_unsigned_t length, const
   return mock_type(f_status_t);
 }
 
-f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_ranges_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_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_ranges_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_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_rangess_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_rangess_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_rangess_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 029174b4b087430d9052786e66189078bccbf083..46ba69837c6d1c45899c77de15a5d47fbfad6f4d 100644 (file)
@@ -36,21 +36,11 @@ extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length,
 extern f_status_t __real_f_memory_arrays_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 (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
 extern f_status_t __real_f_memory_arrays_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 (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
 
-extern f_status_t __real_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __real_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __real_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __real_f_string_rangess_resize(const f_number_unsigned_t length, f_string_ranges_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_memory_arrays_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 (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
 extern f_status_t __wrap_f_memory_arrays_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 (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
 
-extern f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __wrap_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __wrap_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __wrap_f_string_rangess_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-
 //extern long __wrap_sysconf(int name);
 
 #ifdef __cplusplus
diff --git a/level_0/f_fss/tests/unit/c/test-fss-item_delete.c b/level_0/f_fss/tests/unit/c/test-fss-item_delete.c
new file mode 100644 (file)
index 0000000..4c310f4
--- /dev/null
@@ -0,0 +1,58 @@
+#include "test-fss.h"
+#include "test-fss-item_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_item_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+
+  {
+    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_fss_item_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_item_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_item_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_item_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+
+  {
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.content.array, &data.content.used, &data.content.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_item_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.content.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-item_delete.h b/level_0/f_fss/tests/unit/c/test-fss-item_delete.h
new file mode 100644 (file)
index 0000000..1a36aa6
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__item_delete
+#define _TEST__F_fss__item_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_item_delete()
+ */
+extern void test__f_fss_item_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_item_delete()
+ */
+extern void test__f_fss_item_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_item_delete()
+ */
+extern void test__f_fss_item_delete__works(void **state);
+
+#endif // _TEST__F_fss__item_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-item_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-item_destroy.c
new file mode 100644 (file)
index 0000000..5731daf
--- /dev/null
@@ -0,0 +1,58 @@
+#include "test-fss.h"
+#include "test-fss-item_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_item_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+
+  {
+    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_fss_item_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_item_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_item_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_item_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+
+  {
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.content.array, &data.content.used, &data.content.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_item_destroy(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.content.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-item_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-item_destroy.h
new file mode 100644 (file)
index 0000000..d1a5d48
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__item_destroy
+#define _TEST__F_fss__item_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_item_destroy()
+ */
+extern void test__f_fss_item_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_item_destroy()
+ */
+extern void test__f_fss_item_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_item_destroy()
+ */
+extern void test__f_fss_item_destroy__works(void **state);
+
+#endif // _TEST__F_fss__item_destroy
index 6424a546ef4ee64a39b449df4ec2fd392dd8d807..7d64b627d69f189fe5cff0b4936253e74fa2ea3c 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_items_delete_callback__fails(void **state) {
   f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datas_array);
 
@@ -28,22 +28,28 @@ void test__f_fss_items_delete_callback__fails(void **state) {
 void test__f_fss_items_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  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 datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_items_t datas = f_fss_items_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_item_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].content.array, &datas.array[0].content.used, &datas.array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_items_delete_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_fss_items_delete_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].content.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 24f8426412e1ac06ab265635f7af33a68c98a697..f77b19e2348676be56cef83a71133a71adcdcb24 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_items_destroy_callback__fails(void **state) {
   f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datas_array);
 
@@ -28,22 +28,28 @@ void test__f_fss_items_destroy_callback__fails(void **state) {
 void test__f_fss_items_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  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 datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_items_t datas = f_fss_items_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_item_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].content.array, &datas.array[0].content.used, &datas.array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_items_destroy_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_fss_items_destroy_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].content.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 9f747d7aab1888e3c778fd1441e97467d8b76e05..10fb65a3dd263ce00fbb9650f9482b075361e03f 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_itemss_delete_callback__fails(void **state) {
   f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_itemss_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,8 +25,8 @@ void test__f_fss_itemss_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -39,7 +39,7 @@ void test__f_fss_itemss_delete_callback__fails(void **state) {
 
 void test__f_fss_itemss_delete_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -53,7 +53,7 @@ void test__f_fss_itemss_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].content.array, &datass.array[0].array[0].content.used, &datass.array[0].array[0].content.size);
     assert_int_equal(status, F_okay);
   }
 
index d96264b9d7d306d93bd8d1bcffc97b4051097215..18e875cffbe0134dfa293914b471278d7188fb1c 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_itemss_destroy_callback__fails(void **state) {
   f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_itemss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,8 +25,8 @@ void test__f_fss_itemss_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -39,7 +39,7 @@ void test__f_fss_itemss_destroy_callback__fails(void **state) {
 
 void test__f_fss_itemss_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -47,13 +47,13 @@ void test__f_fss_itemss_destroy_callback__works(void **state) {
   f_fss_itemss_t datass = f_fss_itemss_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_items_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_items_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].content.array, &datass.array[0].array[0].content.used, &datass.array[0].array[0].content.size);
     assert_int_equal(status, F_okay);
   }
 
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_delete.c b/level_0/f_fss/tests/unit/c/test-fss-named_delete.c
new file mode 100644 (file)
index 0000000..f7fb371
--- /dev/null
@@ -0,0 +1,99 @@
+#include "test-fss.h"
+#include "test-fss-named_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+
+  {
+    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_fss_named_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_named_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_named_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_named_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_named_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_named_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &data.quotess.array, &data.quotess.used, &data.quotess.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.quotess.array[0].array, &data.quotess.array[0].used, &data.quotess.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_named_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+    assert_int_equal(data.quotess.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_delete.h b/level_0/f_fss/tests/unit/c/test-fss-named_delete.h
new file mode 100644 (file)
index 0000000..7c4dedf
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__named_delete
+#define _TEST__F_fss__named_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_named_delete()
+ */
+extern void test__f_fss_named_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_delete()
+ */
+extern void test__f_fss_named_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_delete()
+ */
+extern void test__f_fss_named_delete__works(void **state);
+
+#endif // _TEST__F_fss__named_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-named_destroy.c
new file mode 100644 (file)
index 0000000..acf4482
--- /dev/null
@@ -0,0 +1,99 @@
+#include "test-fss.h"
+#include "test-fss-named_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+
+  {
+    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_fss_named_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_named_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_named_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_named_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_named_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_named_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &data.quotess.array, &data.quotess.used, &data.quotess.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.quotess.array[0].array, &data.quotess.array[0].used, &data.quotess.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_named_destroy(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+    assert_int_equal(data.quotess.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-named_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-named_destroy.h
new file mode 100644 (file)
index 0000000..d8047df
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__named_destroy
+#define _TEST__F_fss__named_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_named_destroy()
+ */
+extern void test__f_fss_named_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_destroy()
+ */
+extern void test__f_fss_named_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_destroy()
+ */
+extern void test__f_fss_named_destroy__works(void **state);
+
+#endif // _TEST__F_fss__named_destroy
index 2e616c41e9f112255124b7dde2bc00fe15133202..e02d1e42ff788342a1fbe08616c5d6dee7ea8bc5 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_nameds_delete_callback__fails(void **state) {
   f_fss_nameds_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nameds_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_nameds_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nameds_delete_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_nameds_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_arrays_resize, true);
     will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
@@ -55,28 +55,42 @@ void test__f_fss_nameds_delete_callback__fails(void **state) {
 void test__f_fss_nameds_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_named_t data = f_fss_named_t_initialize;
-  f_fss_named_t data_array[] = { data };
-  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_nameds_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_nameds_t datas = f_fss_nameds_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_named_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_arrays_resize, false);
-    will_return(__wrap_f_memory_arrays_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datas.array[0].quotess.array, &datas.array[0].quotess.used, &datas.array[0].quotess.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].quotess.array[0].array, &datas.array[0].quotess.array[0].used, &datas.array[0].quotess.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_nameds_delete_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_fss_nameds_delete_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+    assert_int_equal(datas.array[0].quotess.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 1260630230345a914fa21c059f30e1df8ded4f8b..850d39b59cc3ee7da1b30ef474f38982e9b2d062 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_nameds_destroy_callback__fails(void **state) {
   f_fss_nameds_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nameds_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_nameds_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nameds_destroy_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_nameds_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_arrays_adjust, true);
     will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
@@ -55,28 +55,42 @@ void test__f_fss_nameds_destroy_callback__fails(void **state) {
 void test__f_fss_nameds_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_named_t data = f_fss_named_t_initialize;
-  f_fss_named_t data_array[] = { data };
-  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_nameds_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_nameds_t datas = f_fss_nameds_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_named_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_arrays_adjust, false);
-    will_return(__wrap_f_memory_arrays_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datas.array[0].quotess.array, &datas.array[0].quotess.used, &datas.array[0].quotess.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].quotess.array[0].array, &datas.array[0].quotess.array[0].used, &datas.array[0].quotess.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_nameds_destroy_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_fss_nameds_destroy_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+    assert_int_equal(datas.array[0].quotess.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index dbc7e732df940e524e30e4afe95186356aaef178..ae19edd24ac27f2400c74f26730f3df8d1ec15a9 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_namedss_delete_callback__fails(void **state) {
   f_fss_nameds_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_namedss_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_namedss_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_namedss_delete_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_namedss_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_arrays_resize, true);
     will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
@@ -54,7 +54,7 @@ void test__f_fss_namedss_delete_callback__fails(void **state) {
 
 void test__f_fss_namedss_delete_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -68,13 +68,13 @@ void test__f_fss_namedss_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_fss_named_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_arrays_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size, &f_uint8ss_delete_callback);
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size);
     assert_int_equal(status, F_okay);
 
     status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].quotess.array[0].array, &datass.array[0].array[0].quotess.array[0].used, &datass.array[0].array[0].quotess.array[0].size);
index 97bc9e258709ebd867eb4ba4ddf3f6916c6e5bd9..2cdfe6eee133dbff1f12aa8af90f26ede9d52e62 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_namedss_destroy_callback__fails(void **state) {
   f_fss_nameds_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_namedss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_namedss_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_namedss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_namedss_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_arrays_adjust, true);
     will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
@@ -54,7 +54,7 @@ void test__f_fss_namedss_destroy_callback__fails(void **state) {
 
 void test__f_fss_namedss_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -62,22 +62,22 @@ void test__f_fss_namedss_destroy_callback__works(void **state) {
   f_fss_namedss_t datass = f_fss_namedss_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_nameds_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nameds_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_named_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_named_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size, &f_uint8ss_delete_callback);
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].quotess.array[0].array, &datass.array[0].array[0].quotess.array[0].used, &datass.array[0].array[0].quotess.array[0].size);
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].quotess.array[0].array, &datass.array[0].array[0].quotess.array[0].used, &datass.array[0].array[0].quotess.array[0].size);
     assert_int_equal(status, F_okay);
   }
 
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_delete.c b/level_0/f_fss/tests/unit/c/test-fss-nest_delete.c
new file mode 100644 (file)
index 0000000..7b9c9f6
--- /dev/null
@@ -0,0 +1,80 @@
+#include "test-fss.h"
+#include "test-fss-nest_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 0, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 0, .size = 1 };
+
+  {
+    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_fss_nest_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_fss_nest_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nest_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_nest_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_nest_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_nest_t data = f_fss_nest_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_items_t), (void **) &data.depth, &data.used, &data.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &data.depth[0].array, &data.depth[0].used, &data.depth[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.depth[0].array[0].content.array, &data.depth[0].array[0].content.used, &data.depth[0].array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_nest_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_delete.h b/level_0/f_fss/tests/unit/c/test-fss-nest_delete.h
new file mode 100644 (file)
index 0000000..818c1c8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__nest_delete
+#define _TEST__F_fss__nest_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nest_delete()
+ */
+extern void test__f_fss_nest_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_delete()
+ */
+extern void test__f_fss_nest_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_delete()
+ */
+extern void test__f_fss_nest_delete__works(void **state);
+
+#endif // _TEST__F_fss__nest_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-nest_destroy.c
new file mode 100644 (file)
index 0000000..7546dac
--- /dev/null
@@ -0,0 +1,80 @@
+#include "test-fss.h"
+#include "test-fss-nest_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 0, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 0, .size = 1 };
+
+  {
+    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_fss_nest_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_fss_nest_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nest_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_nest_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_nest_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_nest_t data = f_fss_nest_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_items_t), (void **) &data.depth, &data.used, &data.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &data.depth[0].array, &data.depth[0].used, &data.depth[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.depth[0].array[0].content.array, &data.depth[0].array[0].content.used, &data.depth[0].array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_nest_destroy(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nest_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-nest_destroy.h
new file mode 100644 (file)
index 0000000..5e19caa
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__nest_destroy
+#define _TEST__F_fss__nest_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nest_destroy()
+ */
+extern void test__f_fss_nest_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_destroy()
+ */
+extern void test__f_fss_nest_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_destroy()
+ */
+extern void test__f_fss_nest_destroy__works(void **state);
+
+#endif // _TEST__F_fss__nest_destroy
index f4fdbb1bc0a324d6d4da56a72e9892fa75f85c0a..e607e09a44565902900e064a62e58776b179de6e 100644 (file)
@@ -18,8 +18,8 @@ void test__f_fss_nests_delete_callback__fails(void **state) {
   f_fss_nest_t data_array[] = { data };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nests_delete_callback(0, 1, (void *) data_array);
 
@@ -27,8 +27,8 @@ void test__f_fss_nests_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -39,8 +39,8 @@ void test__f_fss_nests_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
@@ -57,30 +57,34 @@ void test__f_fss_nests_delete_callback__fails(void **state) {
 void test__f_fss_nests_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_item_t item = f_fss_item_t_initialize;
-  f_fss_item_t item_array[] = { item };
-  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
-  f_fss_items_t items_array[] = { items };
-  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
-  f_fss_nest_t data_array[] = { data };
   const f_number_unsigned_t length = 1;
 
+  f_fss_nests_t datas = f_fss_nests_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nest_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_fss_items_t), (void **) &datas.array[0].depth, &datas.array[0].used, &datas.array[0].size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datas.array[0].depth[0].array, &datas.array[0].depth[0].used, &datas.array[0].depth[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].depth[0].array[0].content.array, &datas.array[0].depth[0].array[0].content.used, &datas.array[0].depth[0].array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_nests_delete_callback(0, length, (void *) data_array);
+  {
+    const f_status_t status = f_fss_nests_delete_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 2680bf36ee1fd238b9c782b344c593f8ca5e6fe3..abb2a20ec334072009b8c9e5ac7705c2594f3c62 100644 (file)
@@ -18,8 +18,8 @@ void test__f_fss_nests_destroy_callback__fails(void **state) {
   f_fss_nest_t data_array[] = { data };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nests_destroy_callback(0, 1, (void *) data_array);
 
@@ -27,8 +27,8 @@ void test__f_fss_nests_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -39,8 +39,8 @@ void test__f_fss_nests_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
@@ -57,30 +57,34 @@ void test__f_fss_nests_destroy_callback__fails(void **state) {
 void test__f_fss_nests_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_item_t item = f_fss_item_t_initialize;
-  f_fss_item_t item_array[] = { item };
-  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
-  f_fss_items_t items_array[] = { items };
-  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
-  f_fss_nest_t data_array[] = { data };
   const f_number_unsigned_t length = 1;
 
+  f_fss_nests_t datas = f_fss_nests_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nest_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_fss_items_t), (void **) &datas.array[0].depth, &datas.array[0].used, &datas.array[0].size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datas.array[0].depth[0].array, &datas.array[0].depth[0].used, &datas.array[0].depth[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].depth[0].array[0].content.array, &datas.array[0].depth[0].array[0].content.used, &datas.array[0].depth[0].array[0].content.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_fss_nests_destroy_callback(0, length, (void *) data_array);
+  {
+    const f_status_t status = f_fss_nests_destroy_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 5afadb33c8fc26345164957a403b5f477c618933..00cc2c85ec1b481f5234a5eea57814297767cef5 100644 (file)
@@ -20,8 +20,8 @@ void test__f_fss_nestss_delete_callback__fails(void **state) {
   f_fss_nests_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nestss_delete_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_fss_nestss_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -43,7 +43,7 @@ void test__f_fss_nestss_delete_callback__fails(void **state) {
 
 void test__f_fss_nestss_delete_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -63,7 +63,7 @@ void test__f_fss_nestss_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array[0].depth[0].array, &datass.array[0].array[0].depth[0].used, &datass.array[0].array[0].depth[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].depth[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].depth[0].array[0].content.array, &datass.array[0].array[0].depth[0].array[0].content.used, &datass.array[0].array[0].depth[0].array[0].content.size);
     assert_int_equal(status, F_okay);
   }
 
index c15faa1216fd0d7a4a0ee49d24d162d88a09bc2a..a697364b171e566899ffd545b0777e96d7f87c43 100644 (file)
@@ -20,8 +20,8 @@ void test__f_fss_nestss_destroy_callback__fails(void **state) {
   f_fss_nests_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_nestss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_fss_nestss_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -43,7 +43,7 @@ void test__f_fss_nestss_destroy_callback__fails(void **state) {
 
 void test__f_fss_nestss_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -51,19 +51,19 @@ void test__f_fss_nestss_destroy_callback__works(void **state) {
   f_fss_nestss_t datass = f_fss_nestss_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_nests_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nests_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_nest_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_nest_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_items_t), (void **) &datass.array[0].array[0].depth, &datass.array[0].array[0].used, &datass.array[0].array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_items_t), (void **) &datass.array[0].array[0].depth, &datass.array[0].array[0].used, &datass.array[0].array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array[0].depth[0].array, &datass.array[0].array[0].depth[0].used, &datass.array[0].array[0].depth[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array[0].depth[0].array, &datass.array[0].array[0].depth[0].used, &datass.array[0].array[0].depth[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].depth[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].depth[0].array[0].content.array, &datass.array[0].array[0].depth[0].array[0].content.used, &datass.array[0].array[0].depth[0].array[0].content.size);
     assert_int_equal(status, F_okay);
   }
 
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_delete.c b/level_0/f_fss/tests/unit/c/test-fss-set_delete.c
new file mode 100644 (file)
index 0000000..4551fb9
--- /dev/null
@@ -0,0 +1,65 @@
+#include "test-fss.h"
+#include "test-fss-set_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+
+  {
+    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_fss_set_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_set_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_set_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_set_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_delete.h b/level_0/f_fss/tests/unit/c/test-fss-set_delete.h
new file mode 100644 (file)
index 0000000..cf28f2a
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__set_delete
+#define _TEST__F_fss__set_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_delete()
+ */
+extern void test__f_fss_set_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_delete()
+ */
+extern void test__f_fss_set_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_delete()
+ */
+extern void test__f_fss_set_delete__works(void **state);
+
+#endif // _TEST__F_fss__set_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-set_destroy.c
new file mode 100644 (file)
index 0000000..ac81e29
--- /dev/null
@@ -0,0 +1,65 @@
+#include "test-fss.h"
+#include "test-fss-set_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+
+  {
+    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_fss_set_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_set_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_set_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_set_destroy(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-set_destroy.h
new file mode 100644 (file)
index 0000000..7d1018c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__set_destroy
+#define _TEST__F_fss__set_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_destroy()
+ */
+extern void test__f_fss_set_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_destroy()
+ */
+extern void test__f_fss_set_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_destroy()
+ */
+extern void test__f_fss_set_destroy__works(void **state);
+
+#endif // _TEST__F_fss__set_destroy
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.c
new file mode 100644 (file)
index 0000000..6499923
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-fss.h"
+#include "test-fss-set_quote_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+  {
+    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_fss_set_quote_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quote_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_set_quote_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_set_quote_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.objects_quote.array, &data.objects_quote.used, &data.objects_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &data.contents_quote.array, &data.contents_quote.used, &data.contents_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.contents_quote.array[0].array, &data.contents_quote.array[0].used, &data.contents_quote.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_set_quote_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+    assert_int_equal(data.objects_quote.size, 0);
+    assert_int_equal(data.contents_quote.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_delete.h
new file mode 100644 (file)
index 0000000..7debcd8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__set_quote_delete
+#define _TEST__F_fss__set_quote_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quote_delete()
+ */
+extern void test__f_fss_set_quote_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_delete()
+ */
+extern void test__f_fss_set_quote_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_delete()
+ */
+extern void test__f_fss_set_quote_delete__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.c
new file mode 100644 (file)
index 0000000..837833e
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-fss.h"
+#include "test-fss-set_quote_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+  {
+    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_fss_set_quote_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quote_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_set_quote_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_set_quote_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &data.objects.array, &data.objects.used, &data.objects.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &data.contents.array, &data.contents.used, &data.contents.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &data.contents.array[0].array, &data.contents.array[0].used, &data.contents.array[0].size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.objects_quote.array, &data.objects_quote.used, &data.objects_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &data.contents_quote.array, &data.contents_quote.used, &data.contents_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &data.contents_quote.array[0].array, &data.contents_quote.array[0].used, &data.contents_quote.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_set_quote_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.objects.size, 0);
+    assert_int_equal(data.contents.size, 0);
+    assert_int_equal(data.objects_quote.size, 0);
+    assert_int_equal(data.contents_quote.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-set_quote_destroy.h
new file mode 100644 (file)
index 0000000..b04ceac
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__set_quote_destroy
+#define _TEST__F_fss__set_quote_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quote_destroy()
+ */
+extern void test__f_fss_set_quote_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_destroy()
+ */
+extern void test__f_fss_set_quote_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_destroy()
+ */
+extern void test__f_fss_set_quote_destroy__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_destroy
index e163617a05be14ebaf8b8249db6f4c2d419583a4..270952d9b070144538bae1d35382aad400bf7137 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_set_quotes_delete_callback__fails(void **state) {
   f_fss_set_quotes_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_set_quotes_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_set_quotes_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -52,11 +52,11 @@ void test__f_fss_set_quotes_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
@@ -73,31 +73,46 @@ void test__f_fss_set_quotes_delete_callback__fails(void **state) {
 void test__f_fss_set_quotes_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-  f_fss_set_quote_t data_array[] = { data };
-  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_set_quotes_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_set_quotes_t datas = f_fss_set_quotes_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_quote_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_arrays_resize, false);
-    will_return(__wrap_f_memory_arrays_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
+    assert_int_equal(status, F_okay);
 
-    const f_status_t status = f_fss_set_quotes_delete_callback(0, length, (void *) datas_array);
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].objects_quote.array, &datas.array[0].objects_quote.used, &datas.array[0].objects_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datas.array[0].contents_quote.array, &datas.array[0].contents_quote.used, &datas.array[0].contents_quote.size);
+    assert_int_equal(status, F_okay);
 
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].contents_quote.array[0].array, &datas.array[0].contents_quote.array[0].used, &datas.array[0].contents_quote.array[0].size);
     assert_int_equal(status, F_okay);
   }
+
+  {
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+    assert_int_equal(datas.array[0].objects_quote.size, 0);
+    assert_int_equal(datas.array[0].contents_quote.size, 0);
+  }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index ebc11f2dd864fece6e18002eb2699f20449d5bdc..2ebf3af7633a16be1a3b3e64454f3bd5465be8aa 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
   f_fss_set_quotes_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -52,11 +52,11 @@ void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
@@ -73,31 +73,46 @@ void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
 void test__f_fss_set_quotes_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
-  f_fss_set_quote_t data_array[] = { data };
-  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_set_quotes_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_set_quotes_t datas = f_fss_set_quotes_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_quote_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_arrays_adjust, false);
-    will_return(__wrap_f_memory_arrays_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
+    assert_int_equal(status, F_okay);
 
-    const f_status_t status = f_fss_set_quotes_destroy_callback(0, length, (void *) datas_array);
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].objects_quote.array, &datas.array[0].objects_quote.used, &datas.array[0].objects_quote.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datas.array[0].contents_quote.array, &datas.array[0].contents_quote.used, &datas.array[0].contents_quote.size);
+    assert_int_equal(status, F_okay);
 
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datas.array[0].contents_quote.array[0].array, &datas.array[0].contents_quote.array[0].used, &datas.array[0].contents_quote.array[0].size);
     assert_int_equal(status, F_okay);
   }
+
+  {
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+    assert_int_equal(datas.array[0].objects_quote.size, 0);
+    assert_int_equal(datas.array[0].contents_quote.size, 0);
+  }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index ba70a1272ab3a7f9529a4d0b9a6bc23c054d756c..64581157ac05077b87003b6ea496b6dcbb1118ca 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_set_quotess_delete_callback__fails(void **state) {
   f_fss_set_quotes_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_set_quotess_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_set_quotess_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -52,11 +52,11 @@ void test__f_fss_set_quotess_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
@@ -72,7 +72,7 @@ void test__f_fss_set_quotess_delete_callback__fails(void **state) {
 
 void test__f_fss_set_quotess_delete_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -86,16 +86,16 @@ void test__f_fss_set_quotess_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_fss_set_quote_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
 
     status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].objects_quote.array, &datass.array[0].array[0].objects_quote.used, &datass.array[0].array[0].objects_quote.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size, &f_uint8ss_destroy_callback);
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size);
     assert_int_equal(status, F_okay);
   }
 
index 2a92f1e6958b0b6480cdb171b073cb8e8c03ffc6..c41c208918e9476d62fb419076d81bf96127d746 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
   f_fss_set_quotes_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
 
@@ -37,11 +37,11 @@ void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -52,11 +52,11 @@ void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
@@ -72,7 +72,7 @@ void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
 
 void test__f_fss_set_quotess_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -80,22 +80,22 @@ void test__f_fss_set_quotess_destroy_callback__works(void **state) {
   f_fss_set_quotess_t datass = f_fss_set_quotess_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_set_quotes_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_quotes_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_set_quote_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_set_quote_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].objects_quote.array, &datass.array[0].array[0].objects_quote.used, &datass.array[0].array[0].objects_quote.size);
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].objects_quote.array, &datass.array[0].array[0].objects_quote.used, &datass.array[0].array[0].objects_quote.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size, &f_uint8ss_destroy_callback);
+    status = f_memory_array_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size);
     assert_int_equal(status, F_okay);
   }
 
index 444c6ecf5e82b062a05a68de0f5e314bf5a197f5..d1e980cb08070c9ea262d30b7fa3facae7577133 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_sets_delete_callback__fails(void **state) {
   f_fss_sets_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_sets_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_sets_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_sets_delete_callback(0, 1, (void *) datas_array);
 
@@ -40,25 +40,35 @@ void test__f_fss_sets_delete_callback__fails(void **state) {
 void test__f_fss_sets_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_set_t data = f_fss_set_t_initialize;
-  f_fss_set_t data_array[] = { data };
-  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_sets_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_sets_t datas = f_fss_sets_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, false);
-    will_return(__wrap_f_string_rangess_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    const f_status_t status = f_fss_sets_delete_callback(0, length, (void *) datas_array);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
     assert_int_equal(status, F_okay);
   }
+
+  {
+    const f_status_t status = f_fss_sets_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+  }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index a674d547c271ef7d04bd9aa08939797ed7f926ff..3714d05163b57d621aa74012c22f43a1f4e3f8e4 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_sets_destroy_callback__fails(void **state) {
   f_fss_sets_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_sets_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_sets_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_sets_destroy_callback(0, 1, (void *) datas_array);
 
@@ -40,25 +40,35 @@ void test__f_fss_sets_destroy_callback__fails(void **state) {
 void test__f_fss_sets_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_fss_set_t data = f_fss_set_t_initialize;
-  f_fss_set_t data_array[] = { data };
-  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_sets_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_fss_sets_t datas = f_fss_sets_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, false);
-    will_return(__wrap_f_string_rangess_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].objects.array, &datas.array[0].objects.used, &datas.array[0].objects.size);
+    assert_int_equal(status, F_okay);
 
-    const f_status_t status = f_fss_sets_destroy_callback(0, length, (void *) datas_array);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datas.array[0].contents.array, &datas.array[0].contents.used, &datas.array[0].contents.size);
+    assert_int_equal(status, F_okay);
 
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].contents.array[0].array, &datas.array[0].contents.array[0].used, &datas.array[0].contents.array[0].size);
     assert_int_equal(status, F_okay);
   }
+
+  {
+    const f_status_t status = f_fss_sets_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].objects.size, 0);
+    assert_int_equal(datas.array[0].contents.size, 0);
+  }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 07c81a6e0e2fa13f47c42f04a0193119d2d29498..d724826c4ad3eb2906f624c88369a644a50683e8 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_setss_delete_callback__fails(void **state) {
   f_fss_sets_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_setss_delete_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_setss_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_rangess_resize, true);
-    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_setss_delete_callback(0, 1, (void *) datas_array);
 
@@ -53,10 +53,10 @@ void test__f_fss_setss_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_fss_set_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
   }
 
index 1eaac5464165eeb4da41512d9888680f39d619e1..57ec057c378da26d28edccef1da59b3e3a91cdc9 100644 (file)
@@ -16,8 +16,8 @@ void test__f_fss_setss_destroy_callback__fails(void **state) {
   f_fss_sets_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_setss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -25,11 +25,11 @@ void test__f_fss_setss_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_rangess_adjust, true);
-    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_fss_setss_destroy_callback(0, 1, (void *) datas_array);
 
@@ -39,7 +39,7 @@ void test__f_fss_setss_destroy_callback__fails(void **state) {
 
 void test__f_fss_setss_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -47,16 +47,16 @@ void test__f_fss_setss_destroy_callback__works(void **state) {
   f_fss_setss_t datass = f_fss_setss_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_sets_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_sets_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_fss_set_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_fss_set_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].objects.array, &datass.array[0].array[0].objects.used, &datass.array[0].array[0].objects.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    status = f_memory_array_resize(1, sizeof(f_string_ranges_t), (void **) &datass.array[0].array[0].contents.array, &datass.array[0].array[0].contents.used, &datass.array[0].array[0].contents.size);
     assert_int_equal(status, F_okay);
   }
 
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.c
new file mode 100644 (file)
index 0000000..ce8cc93
--- /dev/null
@@ -0,0 +1,58 @@
+#include "test-fss.h"
+#include "test-fss-simple_packet_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_delete__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = f_fss_simple_packet_t_initialize;
+
+  {
+    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_fss_simple_packet_delete(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packet_delete__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_simple_packet_delete(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_simple_packet_delete__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_simple_packet_t data = f_fss_simple_packet_t_initialize;
+
+  {
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.payload, &data.payload.used, &data.payload.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_simple_packet_delete(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.payload.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_delete.h
new file mode 100644 (file)
index 0000000..638a4b1
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__simple_packet_delete
+#define _TEST__F_fss__simple_packet_delete
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packet_delete()
+ */
+extern void test__f_fss_simple_packet_delete__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_delete()
+ */
+extern void test__f_fss_simple_packet_delete__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_delete()
+ */
+extern void test__f_fss_simple_packet_delete__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_delete
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.c
new file mode 100644 (file)
index 0000000..54e39da
--- /dev/null
@@ -0,0 +1,58 @@
+#include "test-fss.h"
+#include "test-fss-simple_packet_destroy.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packet_destroy__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = f_fss_simple_packet_t_initialize;
+
+  {
+    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_fss_simple_packet_destroy(&data);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packet_destroy__parameter_checking(void **state) {
+
+  {
+    const f_status_t status = f_fss_simple_packet_destroy(0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_fss_simple_packet_destroy__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_simple_packet_t data = f_fss_simple_packet_t_initialize;
+
+  {
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.payload, &data.payload.used, &data.payload.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_fss_simple_packet_destroy(&data);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(data.payload.size, 0);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packet_destroy.h
new file mode 100644 (file)
index 0000000..65cce64
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__simple_packet_destroy
+#define _TEST__F_fss__simple_packet_destroy
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packet_destroy()
+ */
+extern void test__f_fss_simple_packet_destroy__fails(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_simple_packet_destroy()
+ */
+extern void test__f_fss_simple_packet_destroy__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packet_destroy()
+ */
+extern void test__f_fss_simple_packet_destroy__works(void **state);
+
+#endif // _TEST__F_fss__simple_packet_destroy
index 1af9f30a6d46140eeb925e178c1809faf44bc0f5..8f2de394f035be5fe6888c9044aac5a101c16d9b 100644 (file)
@@ -45,61 +45,85 @@ 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_item_delete__fails),
+    cmocka_unit_test(test__f_fss_item_destroy__fails),
     cmocka_unit_test(test__f_fss_items_delete_callback__fails),
     cmocka_unit_test(test__f_fss_items_destroy_callback__fails),
     cmocka_unit_test(test__f_fss_itemss_delete_callback__fails),
     cmocka_unit_test(test__f_fss_itemss_destroy_callback__fails),
 
+    cmocka_unit_test(test__f_fss_item_delete__works),
+    cmocka_unit_test(test__f_fss_item_destroy__works),
     cmocka_unit_test(test__f_fss_items_delete_callback__works),
     cmocka_unit_test(test__f_fss_items_destroy_callback__works),
     cmocka_unit_test(test__f_fss_itemss_delete_callback__works),
     cmocka_unit_test(test__f_fss_itemss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_fss_named_delete__fails),
+    cmocka_unit_test(test__f_fss_named_destroy__fails),
     cmocka_unit_test(test__f_fss_nameds_delete_callback__fails),
     cmocka_unit_test(test__f_fss_nameds_destroy_callback__fails),
     cmocka_unit_test(test__f_fss_namedss_delete_callback__fails),
     cmocka_unit_test(test__f_fss_namedss_destroy_callback__fails),
 
+    cmocka_unit_test(test__f_fss_named_delete__works),
+    cmocka_unit_test(test__f_fss_named_destroy__works),
     cmocka_unit_test(test__f_fss_nameds_delete_callback__works),
     cmocka_unit_test(test__f_fss_nameds_destroy_callback__works),
     cmocka_unit_test(test__f_fss_namedss_delete_callback__works),
     cmocka_unit_test(test__f_fss_namedss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_fss_nest_delete__fails),
+    cmocka_unit_test(test__f_fss_nest_destroy__fails),
     cmocka_unit_test(test__f_fss_nests_delete_callback__fails),
     cmocka_unit_test(test__f_fss_nests_destroy_callback__fails),
     cmocka_unit_test(test__f_fss_nestss_delete_callback__fails),
     cmocka_unit_test(test__f_fss_nestss_destroy_callback__fails),
 
+    cmocka_unit_test(test__f_fss_nest_delete__works),
+    cmocka_unit_test(test__f_fss_nest_destroy__works),
     cmocka_unit_test(test__f_fss_nests_delete_callback__works),
     cmocka_unit_test(test__f_fss_nests_destroy_callback__works),
     cmocka_unit_test(test__f_fss_nestss_delete_callback__works),
     cmocka_unit_test(test__f_fss_nestss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__fails),
-    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__fails),
-    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__fails),
-    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__fails),
-
-    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__works),
-    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__works),
-    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__works),
-    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__works),
-
+    cmocka_unit_test(test__f_fss_set_delete__fails),
+    cmocka_unit_test(test__f_fss_set_destroy__fails),
     cmocka_unit_test(test__f_fss_sets_delete_callback__fails),
     cmocka_unit_test(test__f_fss_sets_destroy_callback__fails),
     cmocka_unit_test(test__f_fss_setss_delete_callback__fails),
     cmocka_unit_test(test__f_fss_setss_destroy_callback__fails),
 
+    cmocka_unit_test(test__f_fss_set_delete__works),
+    cmocka_unit_test(test__f_fss_set_destroy__works),
     cmocka_unit_test(test__f_fss_sets_delete_callback__works),
     cmocka_unit_test(test__f_fss_sets_destroy_callback__works),
     cmocka_unit_test(test__f_fss_setss_delete_callback__works),
     cmocka_unit_test(test__f_fss_setss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_fss_set_quote_delete__fails),
+    cmocka_unit_test(test__f_fss_set_quote_destroy__fails),
+    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_set_quote_delete__works),
+    cmocka_unit_test(test__f_fss_set_quote_destroy__works),
+    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_simple_packet_delete__fails),
+    cmocka_unit_test(test__f_fss_simple_packet_destroy__fails),
     cmocka_unit_test(test__f_fss_simple_packets_delete_callback__fails),
     cmocka_unit_test(test__f_fss_simple_packets_destroy_callback__fails),
     cmocka_unit_test(test__f_fss_simple_packetss_delete_callback__fails),
     cmocka_unit_test(test__f_fss_simple_packetss_destroy_callback__fails),
 
+    cmocka_unit_test(test__f_fss_simple_packet_delete__works),
+    cmocka_unit_test(test__f_fss_simple_packet_destroy__works),
     cmocka_unit_test(test__f_fss_simple_packets_delete_callback__works),
     cmocka_unit_test(test__f_fss_simple_packets_destroy_callback__works),
     cmocka_unit_test(test__f_fss_simple_packetss_delete_callback__works),
@@ -120,6 +144,24 @@ int main(void) {
       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_item_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_item_destroy__parameter_checking),
+
+      cmocka_unit_test(test__f_fss_named_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_named_destroy__parameter_checking),
+
+      cmocka_unit_test(test__f_fss_named_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_named_destroy__parameter_checking),
+
+      cmocka_unit_test(test__f_fss_set_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_set_destroy__parameter_checking),
+
+      cmocka_unit_test(test__f_fss_set_quote_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_set_quote_destroy__parameter_checking),
+
+      cmocka_unit_test(test__f_fss_simple_packet_delete__parameter_checking),
+      cmocka_unit_test(test__f_fss_simple_packet_destroy__parameter_checking),
+
       // f_fss_items_delete_callback() doesn't use parameter checking.
       // f_fss_items_destroy_callback() doesn't use parameter checking.
       // f_fss_itemss_delete_callback() doesn't use parameter checking.
@@ -132,14 +174,14 @@ int main(void) {
       // f_fss_nests_destroy_callback() doesn't use parameter checking.
       // f_fss_nestss_delete_callback() doesn't use parameter checking.
       // f_fss_nestss_destroy_callback() doesn't use parameter checking.
-      // f_fss_set_quotes_delete_callback() doesn't use parameter checking.
-      // f_fss_set_quotes_destroy_callback() doesn't use parameter checking.
-      // f_fss_set_quotess_delete_callback() doesn't use parameter checking.
-      // f_fss_set_quotess_destroy_callback() doesn't use parameter checking.
       // f_fss_sets_delete_callback() doesn't use parameter checking.
       // f_fss_sets_destroy_callback() doesn't use parameter checking.
       // f_fss_setss_delete_callback() doesn't use parameter checking.
       // f_fss_setss_destroy_callback() doesn't use parameter checking.
+      // f_fss_set_quotes_delete_callback() doesn't use parameter checking.
+      // f_fss_set_quotes_destroy_callback() doesn't use parameter checking.
+      // f_fss_set_quotess_delete_callback() doesn't use parameter checking.
+      // f_fss_set_quotess_destroy_callback() doesn't use parameter checking.
       // f_fss_simple_packets_delete_callback() doesn't use parameter checking.
       // f_fss_simple_packets_destroy_callback() doesn't use parameter checking.
       // f_fss_simple_packetss_delete_callback() doesn't use parameter checking.
index 4e9eceb93233fad16d6d99f0f874efd2e71dfc62..304183c781a1e66a1011c6052ade6b7fd7466b71 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_destroy_callback.h"
+#include "test-fss-item_delete.h"
+#include "test-fss-item_destroy.h"
 #include "test-fss-items_delete_callback.h"
-#include "test-fss-itemss_destroy_callback.h"
+#include "test-fss-items_destroy_callback.h"
 #include "test-fss-itemss_delete_callback.h"
-#include "test-fss-nameds_destroy_callback.h"
+#include "test-fss-itemss_destroy_callback.h"
+#include "test-fss-named_delete.h"
+#include "test-fss-named_destroy.h"
 #include "test-fss-nameds_delete_callback.h"
-#include "test-fss-namedss_destroy_callback.h"
+#include "test-fss-nameds_destroy_callback.h"
 #include "test-fss-namedss_delete_callback.h"
-#include "test-fss-nests_destroy_callback.h"
+#include "test-fss-namedss_destroy_callback.h"
+#include "test-fss-nest_delete.h"
+#include "test-fss-nest_destroy.h"
 #include "test-fss-nests_delete_callback.h"
-#include "test-fss-nestss_destroy_callback.h"
+#include "test-fss-nests_destroy_callback.h"
 #include "test-fss-nestss_delete_callback.h"
+#include "test-fss-nestss_destroy_callback.h"
 #include "test-fss-seek_to_eol.h"
-#include "test-fss-set_quotes_destroy_callback.h"
-#include "test-fss-set_quotes_delete_callback.h"
-#include "test-fss-set_quotess_destroy_callback.h"
-#include "test-fss-set_quotess_delete_callback.h"
-#include "test-fss-sets_destroy_callback.h"
+#include "test-fss-set_delete.h"
+#include "test-fss-set_destroy.h"
 #include "test-fss-sets_delete_callback.h"
-#include "test-fss-setss_destroy_callback.h"
+#include "test-fss-sets_destroy_callback.h"
 #include "test-fss-setss_delete_callback.h"
-#include "test-fss-simple_packets_destroy_callback.h"
+#include "test-fss-setss_destroy_callback.h"
+#include "test-fss-set_quote_delete.h"
+#include "test-fss-set_quote_destroy.h"
+#include "test-fss-set_quotes_delete_callback.h"
+#include "test-fss-set_quotes_destroy_callback.h"
+#include "test-fss-set_quotess_delete_callback.h"
+#include "test-fss-set_quotess_destroy_callback.h"
+#include "test-fss-simple_packet_delete.h"
+#include "test-fss-simple_packet_destroy.h"
 #include "test-fss-simple_packets_delete_callback.h"
-#include "test-fss-simple_packetss_destroy_callback.h"
+#include "test-fss-simple_packets_destroy_callback.h"
 #include "test-fss-simple_packetss_delete_callback.h"
+#include "test-fss-simple_packetss_destroy_callback.h"
 #include "test-fss-skip_past_delimit.h"
 #include "test-fss-skip_past_space.h"
 
index af54c7460fbc9debe83eae50c9ceb3263a67530b..811847e4a95f6d8cf85dc09ea9345eb364edf06c 100644 (file)
@@ -322,13 +322,13 @@ extern "C" {
           }
 
           if (buffer->string[range->start] == quote) {
-            state->status = f_string_ranges_increase(state->step_small, &data->variable);
+            state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->variable.array, &data->variable.used, &data->variable.size);
             if (F_status_is_error(state->status)) break;
 
-            state->status = f_string_ranges_increase(state->step_small, &data->vocabulary);
+            state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->vocabulary.array, &data->vocabulary.used, &data->vocabulary.size);
             if (F_status_is_error(state->status)) break;
 
-            state->status = f_string_ranges_increase(state->step_small, &data->content);
+            state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->content.array, &data->content.used, &data->content.size);
             if (F_status_is_error(state->status)) break;
 
             data->variable.array[data->variable.used].start = found_vocabulary.start;
@@ -395,13 +395,13 @@ extern "C" {
 
                 // Valid content's ending quote is not delimited, save and return.
                 if (content_slash_total % 2 == 0) {
-                  state->status = f_string_ranges_increase(state->step_small, &data->variable);
+                  state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->variable.array, &data->variable.used, &data->variable.size);
                   if (F_status_is_error(state->status)) break;
 
-                  state->status = f_string_ranges_increase(state->step_small, &data->vocabulary);
+                  state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->vocabulary.array, &data->vocabulary.used, &data->vocabulary.size);
                   if (F_status_is_error(state->status)) break;
 
-                  state->status = f_string_ranges_increase(state->step_small, &data->content);
+                  state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &data->content.array, &data->content.used, &data->content.size);
                   if (F_status_is_error(state->status)) break;
 
                   data->variable.array[data->variable.used].start = found_vocabulary.start;
index 4f6d7cc10398d997f2065ae269c391327724aad6..41af6391f8182dc98e13bf69f7d58e17938449b6 100644 (file)
@@ -13,16 +13,16 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_resize(0, &data->content);
+      f_status_t status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &data->content.array, &data->content.used, &data->content.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);
+      status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &data->variable.array, &data->variable.used, &data->variable.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_ranges_resize(0, &data->vocabulary);
+      status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &data->vocabulary.array, &data->vocabulary.used, &data->vocabulary.size);
       if (F_status_is_error(status)) return status;
     }
 
@@ -37,16 +37,16 @@ extern "C" {
     #endif // _di_level_0_parameter_checking_
 
     {
-      f_status_t status = f_string_ranges_adjust(0, &data->content);
+      f_status_t status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &data->content.array, &data->content.used, &data->content.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, &data->variable);
+      status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &data->variable.array, &data->variable.used, &data->variable.size);
       if (F_status_is_error(status)) return status;
 
-      status = f_string_ranges_adjust(0, &data->vocabulary);
+      status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &data->vocabulary.array, &data->vocabulary.used, &data->vocabulary.size);
       if (F_status_is_error(status)) return status;
     }
 
@@ -118,16 +118,16 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_resize(0, &array[i].content);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].content.array, &array[i].content.used, &array[i].content.size);
         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);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].variable.array, &array[i].variable.used, &array[i].variable.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_ranges_resize(0, &array[i].vocabulary);
+        status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].vocabulary.array, &array[i].vocabulary.used, &array[i].vocabulary.size);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -145,16 +145,16 @@ extern "C" {
 
       for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-        status = f_string_ranges_adjust(0, &array[i].content);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].content.array, &array[i].content.used, &array[i].content.size);
         if (F_status_is_error(status)) return status;
 
         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_adjust(0, &array[i].variable);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].variable.array, &array[i].variable.used, &array[i].variable.size);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_ranges_adjust(0, &array[i].vocabulary);
+        status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].vocabulary.array, &array[i].vocabulary.used, &array[i].vocabulary.size);
         if (F_status_is_error(status)) return status;
       } // for
     }
@@ -171,11 +171,13 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_iki_datas_t), (void **) &destination->array, &destination->used, &destination->size);
-    if (F_status_is_error(status)) return status;
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_iki_datas_t), (void **) &destination->array, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
 
-    status = private_f_iki_datas_append_all(source, &destination->array[destination->used]);
-    if (F_status_is_error(status)) return status;
+      status = private_f_iki_datas_append_all(source, &destination->array[destination->used]);
+      if (F_status_is_error(status)) return status;
+    }
 
     ++destination->used;
 
@@ -191,18 +193,20 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_iki_datas_t), (void **) &destination->array, &destination->used, &destination->size);
-    if (F_status_is_error(status)) return status;
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_iki_datas_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) {
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      destination->array[destination->used].used = 0;
+        destination->array[destination->used].used = 0;
 
-      if (source.array[i].used) {
-        status = private_f_iki_datas_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+        if (source.array[i].used) {
+          status = private_f_iki_datas_append_all(source.array[i], &destination->array[destination->used]);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
     return F_okay;
   }
@@ -220,16 +224,16 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_resize(0, &array[i].array[j].content);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].content.array, &array[i].array[j].content.used, &array[i].array[j].content.size);
           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);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].variable.array, &array[i].array[j].variable.used, &array[i].array[j].variable.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_ranges_resize(0, &array[i].array[j].vocabulary);
+          status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &array[i].array[j].vocabulary.array, &array[i].array[j].vocabulary.used, &array[i].array[j].vocabulary.size);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -256,16 +260,16 @@ extern "C" {
 
         for (j = 0; j < array[i].size; ++j) {
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].content);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].content.array, &array[i].array[j].content.used, &array[i].array[j].content.size);
           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);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].variable.array, &array[i].array[j].variable.used, &array[i].array[j].variable.size);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_ranges_adjust(0, &array[i].array[j].vocabulary);
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array[j].vocabulary.array, &array[i].array[j].vocabulary.used, &array[i].array[j].vocabulary.size);
           if (F_status_is_error(status)) return status;
         } // for
 
index 1234792d5c60f2e16f25e438fbb4a4f56ed81f3f..51de8389448cca2bfec6612c3ed3d373c8fa2c0b 100644 (file)
@@ -28,10 +28,8 @@ 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_ranges_resize().
  *
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
  */
 #ifndef _di_f_iki_data_delete_
   extern f_status_t f_iki_data_delete(f_iki_data_t * const data);
@@ -49,10 +47,8 @@ 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_ranges_adjust().
  *
  * @see f_memory_array_adjust()
- * @see f_string_ranges_adjust()
  */
 #ifndef _di_f_iki_data_destroy_
   extern f_status_t f_iki_data_destroy(f_iki_data_t * const data);
@@ -184,11 +180,9 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_memory_array_increase().
  *   Errors (with error bit) from: f_memory_array_resize().
- *   Errors (with error bit) from: f_string_ranges_resize().
  *
  * @see f_memory_array_increase()
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
  */
 #ifndef _di_f_iki_datass_append_
   extern f_status_t f_iki_datass_append(const f_iki_datas_t source, f_iki_datass_t * const destination);
@@ -210,11 +204,9 @@ extern "C" {
  *
  *   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_string_ranges_resize().
  *
  * @see f_memory_array_increase_by()
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
  */
 #ifndef _di_f_iki_datass_append_all_
   extern f_status_t f_iki_datass_append_all(const f_iki_datass_t source, f_iki_datass_t * const destination);
@@ -243,7 +235,6 @@ extern "C" {
  *   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);
@@ -272,7 +263,6 @@ extern "C" {
  *   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);
index c6241fb7ebd2c00398726dcec598c8aaebf29fce..779a8275b297084fd5d82b9363a45f323085c0f0 100644 (file)
@@ -67,5 +67,3 @@ flags_library -fPIC
 # Inject mocks.
 flags -Wl,--wrap=f_memory_array_adjust
 flags -Wl,--wrap=f_memory_array_resize
-flags -Wl,--wrap=f_string_ranges_adjust
-flags -Wl,--wrap=f_string_ranges_resize
index 4ea9c7bc5f94e5add7f26a1ae6ff2de09875e531..f52433354e78171e55ab8d97e9e749475bea46f9 100644 (file)
@@ -41,40 +41,6 @@ f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const
   return mock_type(f_status_t);
 }
 
-f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_ranges_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_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-
-  if (mock_unwrap) {
-    return __real_f_string_ranges_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 51dcaa7a97156c3ed7bb29d4649339a3db67158f..9946ea25319bf3cfebcc3606ee5605d81dba4dfa 100644 (file)
@@ -35,15 +35,9 @@ 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 ** 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 ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 
-extern f_status_t __real_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __real_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-
 extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** 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 ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 
-extern f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-extern f_status_t __wrap_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 106d2b580221aeeceb7f21ad692aa928a3a4ce4e..7d399444089770e40e49537aff850eb52e4119e7 100644 (file)
@@ -14,7 +14,7 @@ void test__f_iki_datas_append__works(void **state) {
   {
     f_number_unsigned_t i = 1;
 
-    f_status_t status = f_string_ranges_resize(length, &source.content);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.content.array, &source.content.used, &source.content.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.content.size, length);
@@ -24,12 +24,12 @@ void test__f_iki_datas_append__works(void **state) {
     assert_int_equal(status, F_okay);
     assert_int_equal(source.delimits.size, length);
 
-    status = f_string_ranges_resize(length, &source.variable);
+    status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.variable.array, &source.variable.used, &source.variable.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.variable.size, length);
 
-    status = f_string_ranges_resize(length, &source.vocabulary);
+    status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.vocabulary.array, &source.vocabulary.used, &source.vocabulary.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.vocabulary.size, length);
index d8952f6990a1a6b0064bfc40c4e123e6851d26c0..3866f4c9b35ddd3512b7d24783272a71a432cc5d 100644 (file)
@@ -22,7 +22,7 @@ void test__f_iki_datas_append_all__works(void **state) {
 
     for (; j < 2; ++j) {
 
-      status = f_string_ranges_resize(length, &source.array[j].content);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].content.array, &source.array[j].content.used, &source.array[j].content.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].content.size, length);
@@ -32,12 +32,12 @@ void test__f_iki_datas_append_all__works(void **state) {
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].delimits.size, length);
 
-      status = f_string_ranges_resize(length, &source.array[j].variable);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].variable.array, &source.array[j].variable.used, &source.array[j].variable.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].variable.size, length);
 
-      status = f_string_ranges_resize(length, &source.array[j].vocabulary);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].vocabulary.array, &source.array[j].vocabulary.used, &source.array[j].vocabulary.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].vocabulary.size, length);
index 3701bcceb65fbfcafbca0c5be3b2b63f765764a9..89ba1fc74d35fed62b8a9c6227adf938cc83c72c 100644 (file)
@@ -20,8 +20,8 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
   f_iki_datas_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -41,14 +41,14 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
@@ -56,17 +56,17 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
@@ -77,35 +77,40 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
 void test__f_iki_datas_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_string_ranges_t content = f_string_ranges_t_initialize;
-  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
-  f_string_ranges_t variable = f_string_ranges_t_initialize;
-  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
-  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
-  f_iki_data_t data_array[] = { data };
-  f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_iki_datas_t datas = f_iki_datas_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    f_status_t status = f_memory_array_resize(1, sizeof(f_iki_data_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].content.array, &datas.array[0].content.used, &datas.array[0].content.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datas.array[0].delimits.array, &datas.array[0].delimits.used, &datas.array[0].delimits.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].variable.array, &datas.array[0].variable.used, &datas.array[0].variable.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].vocabulary.array, &datas.array[0].vocabulary.used, &datas.array[0].vocabulary.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_iki_datas_delete_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_iki_datas_delete_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].content.size, 0);
+    assert_int_equal(datas.array[0].delimits.size, 0);
+    assert_int_equal(datas.array[0].variable.size, 0);
+    assert_int_equal(datas.array[0].vocabulary.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index 485984f5ba4baf9b546fdb8e43519b47af2e7aac..fc7c4677d0b8253f34834505f676ee5e9b1c1328 100644 (file)
@@ -20,8 +20,8 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
   f_iki_datas_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -41,14 +41,14 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
@@ -56,17 +56,17 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
@@ -77,35 +77,40 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
 void test__f_iki_datas_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
+  mock_unwrap_f_memory = 1;
 
-  f_string_ranges_t content = f_string_ranges_t_initialize;
-  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
-  f_string_ranges_t variable = f_string_ranges_t_initialize;
-  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
-  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
-  f_iki_data_t data_array[] = { data };
-  f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
+  f_iki_datas_t datas = f_iki_datas_t_initialize;
+
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    f_status_t status = f_memory_array_resize(1, sizeof(f_iki_data_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].content.array, &datas.array[0].content.used, &datas.array[0].content.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datas.array[0].delimits.array, &datas.array[0].delimits.used, &datas.array[0].delimits.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].variable.array, &datas.array[0].variable.used, &datas.array[0].variable.size);
+    assert_int_equal(status, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datas.array[0].vocabulary.array, &datas.array[0].vocabulary.used, &datas.array[0].vocabulary.size);
+    assert_int_equal(status, F_okay);
+  }
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, length, (void *) datas_array);
+  {
+    const f_status_t status = f_iki_datas_destroy_callback(0, length, (void *) datas.array);
 
     assert_int_equal(status, F_okay);
+    assert_int_equal(datas.array[0].content.size, 0);
+    assert_int_equal(datas.array[0].delimits.size, 0);
+    assert_int_equal(datas.array[0].variable.size, 0);
+    assert_int_equal(datas.array[0].vocabulary.size, 0);
   }
+
+  free((void *) datas.array);
 }
 
 #ifdef __cplusplus
index e86473636d22a34037c676e7e6c7859574d246c7..f9ab654fb8b1948e19408070b4bd85b190ced56b 100644 (file)
@@ -22,7 +22,7 @@ void test__f_iki_datass_append__works(void **state) {
 
     for (f_number_unsigned_t j = 0; j < length_outer; ++j) {
 
-      status = f_string_ranges_resize(length, &source.array[j].content);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].content.array, &source.array[j].content.used, &source.array[j].content.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].content.size, length);
@@ -32,12 +32,12 @@ void test__f_iki_datass_append__works(void **state) {
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].delimits.size, length);
 
-      status = f_string_ranges_resize(length, &source.array[j].variable);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].variable.array, &source.array[j].variable.used, &source.array[j].variable.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].variable.size, length);
 
-      status = f_string_ranges_resize(length, &source.array[j].vocabulary);
+      status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[j].vocabulary.array, &source.array[j].vocabulary.used, &source.array[j].vocabulary.size);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[j].vocabulary.size, length);
index dab365a45b241165d61417572b3175b99c6a889a..7281c407de49010d1ec92b2d27763ca194713b16 100644 (file)
@@ -31,7 +31,7 @@ void test__f_iki_datass_append_all__works(void **state) {
 
       for (j = 0; j < length_inner; ++j) {
 
-        status = f_string_ranges_resize(length, &source.array[source.used].array[j].content);
+        status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[source.used].array[j].content.array, &source.array[source.used].array[j].content.used, &source.array[source.used].array[j].content.size);
 
         assert_int_equal(status, F_okay);
         assert_int_equal(source.array[source.used].array[j].content.size, length);
@@ -41,12 +41,12 @@ void test__f_iki_datass_append_all__works(void **state) {
         assert_int_equal(status, F_okay);
         assert_int_equal(source.array[source.used].array[j].delimits.size, length);
 
-        status = f_string_ranges_resize(length, &source.array[source.used].array[j].variable);
+        status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[source.used].array[j].variable.array, &source.array[source.used].array[j].variable.used, &source.array[source.used].array[j].variable.size);
 
         assert_int_equal(status, F_okay);
         assert_int_equal(source.array[source.used].array[j].variable.size, length);
 
-        status = f_string_ranges_resize(length, &source.array[source.used].array[j].vocabulary);
+        status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array[source.used].array[j].vocabulary.array, &source.array[source.used].array[j].vocabulary.used, &source.array[source.used].array[j].vocabulary.size);
 
         assert_int_equal(status, F_okay);
         assert_int_equal(source.array[source.used].array[j].vocabulary.size, length);
index 69accc7c12a56ac0fe1408718e1962c136d688ab..742631aa33ea2bd08c3fd090696d91e19fb6e582 100644 (file)
@@ -20,8 +20,8 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
   f_iki_datas_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -41,14 +41,14 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
 
@@ -56,17 +56,17 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, true);
-    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
 
@@ -74,17 +74,17 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, false);
     will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
-    will_return(__wrap_f_string_ranges_resize, false);
-    will_return(__wrap_f_string_ranges_resize, F_okay);
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
 
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
@@ -97,7 +97,7 @@ void test__f_iki_datass_delete_callback__fails(void **state) {
 
 void test__f_iki_datass_delete_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -111,16 +111,16 @@ void test__f_iki_datass_delete_callback__works(void **state) {
     status = f_memory_array_resize(1, sizeof(f_iki_data_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].content.array, &datass.array[0].array[0].content.used, &datass.array[0].array[0].content.size);
     assert_int_equal(status, F_okay);
 
     status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array[0].delimits.array, &datass.array[0].array[0].delimits.used, &datass.array[0].array[0].delimits.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].variable);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].variable.array, &datass.array[0].array[0].variable.used, &datass.array[0].array[0].variable.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_resize(1, &datass.array[0].array[0].vocabulary);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].vocabulary.array, &datass.array[0].array[0].vocabulary.used, &datass.array[0].array[0].vocabulary.size);
     assert_int_equal(status, F_okay);
   }
 
index a89d619f31b215a5b0d29a3d26a7d8be6bd64164..9e705ab066b058fde7f8a6bda58d790d926f788b 100644 (file)
@@ -20,8 +20,8 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
   f_iki_datas_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
 
@@ -29,8 +29,8 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -41,14 +41,14 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
 
@@ -56,17 +56,17 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, true);
-    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
     const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
 
@@ -74,17 +74,17 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
   }
 
   {
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, false);
     will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
-    will_return(__wrap_f_string_ranges_adjust, false);
-    will_return(__wrap_f_string_ranges_adjust, F_okay);
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
 
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
@@ -97,7 +97,7 @@ void test__f_iki_datass_destroy_callback__fails(void **state) {
 
 void test__f_iki_datass_destroy_callback__works(void **state) {
 
-  mock_unwrap = 1;
+  mock_unwrap = 0;
   mock_unwrap_f_memory = 1;
 
   const f_number_unsigned_t length = 1;
@@ -105,22 +105,22 @@ void test__f_iki_datass_destroy_callback__works(void **state) {
   f_iki_datass_t datass = f_iki_datass_t_initialize;
 
   {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_iki_datas_t), (void **) &datass.array, &datass.used, &datass.size);
+    f_status_t status = f_memory_array_resize(length, sizeof(f_iki_datas_t), (void **) &datass.array, &datass.used, &datass.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_iki_data_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    status = f_memory_array_resize(1, sizeof(f_iki_data_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].content);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].content.array, &datass.array[0].array[0].content.used, &datass.array[0].array[0].content.size);
     assert_int_equal(status, F_okay);
 
-    status = f_memory_array_adjust(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array[0].delimits.array, &datass.array[0].array[0].delimits.used, &datass.array[0].array[0].delimits.size);
+    status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array[0].delimits.array, &datass.array[0].array[0].delimits.used, &datass.array[0].array[0].delimits.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].variable);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].variable.array, &datass.array[0].array[0].variable.used, &datass.array[0].array[0].variable.size);
     assert_int_equal(status, F_okay);
 
-    status = f_string_ranges_adjust(1, &datass.array[0].array[0].vocabulary);
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array[0].vocabulary.array, &datass.array[0].array[0].vocabulary.used, &datass.array[0].array[0].vocabulary.size);
     assert_int_equal(status, F_okay);
   }
 
index 133613b1abcf821dbd98b94f86f2843e02888ae8..d51b731936227b2849b1e4b9654b8c5bca25a6b3 100644 (file)
@@ -22,14 +22,14 @@ int main(void) {
     cmocka_unit_test(test__f_limit_process__fails),
     cmocka_unit_test(test__f_limit_process__works),
 
-    cmocka_unit_test(test__f_limit_setss_destroy_callback__fails),
     cmocka_unit_test(test__f_limit_setss_delete_callback__fails),
+    cmocka_unit_test(test__f_limit_setss_destroy_callback__fails),
 
     cmocka_unit_test(test__f_limit_setss_delete_callback__works),
     cmocka_unit_test(test__f_limit_setss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_limit_valuess_destroy_callback__fails),
     cmocka_unit_test(test__f_limit_valuess_delete_callback__fails),
+    cmocka_unit_test(test__f_limit_valuess_destroy_callback__fails),
 
     cmocka_unit_test(test__f_limit_valuess_delete_callback__works),
     cmocka_unit_test(test__f_limit_valuess_destroy_callback__works),
@@ -37,11 +37,11 @@ int main(void) {
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_limit_process__parameter_checking),
 
-      // f_limit_setss_destroy_callback() doesn't use parameter checking.
       // f_limit_setss_delete_callback() doesn't use parameter checking.
+      // f_limit_setss_destroy_callback() doesn't use parameter checking.
 
-      // f_limit_valuess_destroy_callback() doesn't use parameter checking.
       // f_limit_valuess_delete_callback() doesn't use parameter checking.
+      // f_limit_valuess_destroy_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
   };
 
index d3d3540d9327f833c40f88eae189923d4089fed5..14e1d1bb26f4799b77950159e10f87e9c3b473c4 100644 (file)
@@ -25,7 +25,6 @@ int main(void) {
     cmocka_unit_test(test__f_path_change_at__fails),
     cmocka_unit_test(test__f_path_change_at__works),
 
-    // test__f_path_directory_cleanup__fails test isn't needed yet as f_string_dynamic_increase_by() aren't tested at this time.
     cmocka_unit_test(test__f_path_directory_cleanup__works),
 
     cmocka_unit_test(test__f_path_is__returns_false),
index 5259f627f929300eca697f809e7aa7a97ea887d7..c2cb699c7d792075eca957f0e9eee2dac2c44b46 100644 (file)
@@ -131,7 +131,7 @@ extern "C" {
       if (i + width > source.used) {
         total = i - start;
 
-        status = f_string_ranges_increase(F_memory_default_allocation_small_d, ranges);
+        status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
         if (F_status_is_error(status)) return status;
 
         if (total) {
@@ -149,7 +149,7 @@ extern "C" {
       if (source.string[i] == f_serialize_to_simple_splitter_s.string[0]) {
         total = i - start;
 
-        status = f_string_ranges_increase(F_memory_default_allocation_small_d, ranges);
+        status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
         if (F_status_is_error(status)) return status;
 
         if (total) {
@@ -165,7 +165,7 @@ extern "C" {
 
         // Handle case when splitter as at the end of the string, creating a new empty string.
         if (start == source.used) {
-          status = f_string_ranges_increase(F_memory_default_allocation_small_d, ranges);
+          status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
           if (F_status_is_error(status)) return status;
 
           ranges->array[ranges->used].start = 1;
@@ -180,7 +180,7 @@ extern "C" {
     if (start < source.used) {
       total = source.used - start;
 
-      status = f_string_ranges_increase(F_memory_default_allocation_small_d, ranges);
+      status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_range_t), (void **) &ranges->array, &ranges->used, &ranges->size);
       if (F_status_is_error(status)) return status;
 
       if (total) {
index 75f418a25eaf1c750e26a88258b4d7bd1a4ce3c5..71989c3d688e7ed581f0193dcb0ea16e7c1a1258 100644 (file)
@@ -121,9 +121,9 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_string_ranges_increase()
+ *   Errors (with error bit) from: f_memory_array_increase()
  *
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
  */
 #ifndef _di_f_serialize_from_simple_range_
   extern f_status_t f_serialize_from_simple_range(const f_string_static_t source, f_string_ranges_t * const ranges);
index 04315d7b9e87880a8120bdbcc4076ceb8dac5493..125a8b385488131968fdfcb8ffcc0d195eb90dd3 100644 (file)
@@ -28,7 +28,7 @@ void test__f_serialize_from_simple_range__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
   }
 
-  f_string_ranges_resize(0, &ranges);
+  free((void *) ranges.array);
 }
 
 void test__f_serialize_from_simple_range__works(void **state) {
@@ -98,7 +98,7 @@ void test__f_serialize_from_simple_range__works(void **state) {
     } // for
   }
 
-  f_string_ranges_resize(0, &ranges);
+  free((void *) ranges.array);
 }
 
 #ifdef __cplusplus
index d2fef9ed12a6f40aaac71d1560d9f6abbdbf2796..e1953b8db84c0feae1b4d31b79d9c7765772eaac 100644 (file)
@@ -26,45 +26,47 @@ extern "C" {
 
     if (destination->used >= F_string_t_size_d) return F_status_set_error(F_string_too_large);
 
-    f_status_t status = F_okay;
-    f_number_unsigned_t i = 0;
-    f_number_unsigned_t size = 0;
+    {
+      f_status_t status = F_okay;
+      f_number_unsigned_t i = 0;
+      f_number_unsigned_t size = 0;
 
-    // Count all of the NULLs and subtract them from the total size.
-    for (; i < length; ++i) {
-      if (source[i]) ++size;
-    } // for
+      // Count all of the NULLs and subtract them from the total size.
+      for (; i < length; ++i) {
+        if (source[i]) ++size;
+      } // for
 
-    if (size + 1 > F_string_t_size_d) return F_status_set_error(F_string_too_large);
+      if (size + 1 > F_string_t_size_d) return F_status_set_error(F_string_too_large);
 
-    status = f_memory_array_increase_by(size + 1, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size);
-    if (F_status_is_error(status)) return status;
+      status = f_memory_array_increase_by(size + 1, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
 
-    f_number_unsigned_t first = 0;
+      f_number_unsigned_t first = 0;
 
-    for (i = 0, size = 0; i < length; ++i) {
+      for (i = 0, size = 0; i < length; ++i) {
 
-      if (source[i]) continue;
+        if (source[i]) continue;
 
-      if (i && i > first) {
-        size = i - first;
+        if (i && i > first) {
+          size = i - first;
 
-        memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
-        destination->used += size;
-      }
+          memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
+          destination->used += size;
+        }
 
-      while (i + 1 < length && !source[i + 1]) {
-        ++i;
-      } // while
+        while (i + 1 < length && !source[i + 1]) {
+          ++i;
+        } // while
 
-      first = i + 1;
-    } // for
+        first = i + 1;
+      } // for
 
-    if (i > first) {
-      size = i - first;
+      if (i > first) {
+        size = i - first;
 
-      memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
-      destination->used += size;
+        memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
+        destination->used += size;
+      }
     }
 
     destination->string[destination->used] = 0;
index 6bcb579386515cc458ed039620075752248fc84e..ddc20dc319ec6f7a23713ca5161a173ca858e8ce 100644 (file)
@@ -1,6 +1,5 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-dynamics.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -14,7 +13,21 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    return private_f_string_dynamics_append(source, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &destination->array, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.used) {
+        status = private_f_string_append(source.string, source.used, &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    }
+
+    ++destination->used;
+
+    return F_okay;
   }
 #endif // _di_f_string_dynamics_append_
 
@@ -26,7 +39,22 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    return private_f_string_dynamics_append_all(source, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_dynamic_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_string_append(source.array[i].string, source.array[i].used, &destination->array[destination->used]);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
   }
 #endif // _di_f_string_dynamics_append_all_
 
index 870872b72d9d3f8d0ed8168fbefbcea0673bed14..0879d1a1ea4eb06035e1af849c68a37b316ed75b 100644 (file)
@@ -1,6 +1,5 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-dynamics.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -18,11 +17,22 @@ extern "C" {
       f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_dynamics_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
 
-      destination->array[destination->used].used = 0;
+      f_string_dynamics_t * const destination_inner = &destination->array[destination->used];
+      destination_inner->used = 0;
 
       if (source.used) {
-        status = private_f_string_dynamics_append_all(source, &destination->array[destination->used]);
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_dynamic_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
         if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t j = 0; j < source.used; ++j, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].used = 0;
+
+          if (source.array[j].used) {
+            status = private_f_string_append(source.array[j].string, source.array[j].used, &destination_inner->array[destination_inner->used]);
+            if (F_status_is_error(status)) return status;
+          }
+        } // for
       }
     }
 
@@ -49,8 +59,18 @@ extern "C" {
         destination->array[destination->used].used = 0;
 
         if (source.array[i].used) {
-          status = private_f_string_dynamics_append_all(source.array[i], &destination->array[destination->used]);
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_dynamic_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
           if (F_status_is_error(status)) return status;
+
+          for (f_number_unsigned_t j = 0; j < source.array[i].used; ++j, ++destination->array[destination->used].used) {
+
+            destination->array[destination->used].array[destination->array[destination->used].used].used = 0;
+
+            if (source.array[i].array[j].used) {
+              status = private_f_string_append(source.array[i].array[j].string, source.array[i].array[j].used, &destination->array[destination->used].array[destination->array[destination->used].used]);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
         }
       } // for
     }
index 37412a1976304b1ff8dea795ef77e5413f1d71b0..375faea04b1822739378d38f141765a4ef0b4664 100644 (file)
@@ -1,46 +1,44 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-dynamics.h"
-#include "private-map_multis.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_map_multis_adjust_
-  f_status_t f_string_map_multis_adjust(const f_number_unsigned_t length, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_map_multis_adjust(length, structure);
-  }
-#endif // _di_f_string_map_multis_adjust_
-
 #ifndef _di_f_string_map_multis_append_
   f_status_t f_string_map_multis_append(const f_string_map_multi_t source, f_string_map_multis_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_map_multis_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_map_multi_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].name.used = 0;
-    destination->array[destination->used].value.used = 0;
+      f_string_map_multi_t * const destination_inner = &destination->array[destination->used];
 
-    if (source.name.used) {
-      status = private_f_string_append(source.name.string, source.name.used, &destination->array[destination->used].name);
-      if (F_status_is_error(status)) return status;
-    }
+      destination_inner->name.used = 0;
+      destination_inner->value.used = 0;
 
-    if (source.value.used) {
-      status = private_f_string_dynamics_append_all(source.value, &destination->array[destination->used].value);
-      if (F_status_is_error(status)) return status;
+      if (source.name.used) {
+        status = private_f_string_append(source.name.string, source.name.used, &destination_inner->name);
+        if (F_status_is_error(status)) return status;
+      }
+
+      if (source.value.used) {
+        status = f_memory_array_increase_by(source.value.used, sizeof(f_string_dynamic_t), (void **) &destination_inner->value.array, &destination_inner->value.used, &destination_inner->value.size);
+        if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t j = 0; j < source.value.used; ++j, ++destination_inner->value.used) {
+
+          destination_inner->value.array[destination_inner->value.used].used = 0;
+
+          if (source.value.array[j].used) {
+            status = private_f_string_append(source.value.array[j].string, source.value.array[j].used, &destination_inner->value.array[destination_inner->value.used]);
+            if (F_status_is_error(status)) return status;
+          }
+        } // for
+      }
     }
 
     ++destination->used;
@@ -57,87 +55,108 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    return private_f_string_map_multis_append_all(source, destination);
-  }
-#endif // _di_f_string_map_multis_append_all_
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_map_multi_t), (void **) &destination->array, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_map_multis_decimate_by_
-  f_status_t f_string_map_multis_decimate_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+      f_string_map_multi_t * destination_inner = 0;
+      f_number_unsigned_t j = 0;
 
-    if (!amount) return F_data_not;
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-    return private_f_string_map_multis_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_map_multis_decimate_by_
+        destination_inner = &destination->array[destination->used];
+        destination_inner->name.used = 0;
+        destination_inner->value.used = 0;
 
-#ifndef _di_f_string_map_multis_decrease_by_
-  f_status_t f_string_map_multis_decrease_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+        if (source.array[i].name.used) {
+          status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination_inner->name);
+          if (F_status_is_error(status)) return status;
+        }
+
+        if (source.array[i].value.used) {
+          status = f_memory_array_increase_by(source.array[i].value.used, sizeof(f_string_dynamic_t), (void **) &destination_inner->value.array, &destination_inner->value.used, &destination_inner->value.size);
+          if (F_status_is_error(status)) return status;
+
+          for (j = 0; j < source.array[i].value.used; ++j, ++destination_inner->value.used) {
 
-    if (!amount) return F_data_not;
+            destination_inner->value.array[destination_inner->value.used].used = 0;
 
-    return private_f_string_map_multis_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+            if (source.array[i].value.array[j].used) {
+              status = private_f_string_append(source.array[i].value.array[j].string, source.array[i].value.array[j].used, &destination_inner->value.array[destination_inner->value.used]);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
+        }
+      } // for
+    }
+
+    return F_okay;
   }
-#endif // _di_f_string_map_multis_decrease_by_
+#endif // _di_f_string_map_multis_append_all_
 
-#ifndef _di_f_string_map_multis_increase_
-  f_status_t f_string_map_multis_increase(const f_number_unsigned_t step, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_map_multis_delete_callback_
+  f_status_t f_string_map_multis_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+    {
+      f_string_map_multi_t * const array = (f_string_map_multi_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->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;
-      }
+        if (array[i].name.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].name.string, &array[i].name.used, &array[i].name.size);
+          if (F_status_is_error(status)) return status;
+        }
+
+        if (array[i].value.size) {
+          for (j = 0; j < array[i].value.size; ++j) {
 
-      return private_f_string_map_multis_resize(length, structure);
+            status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].value.array[j].string, &array[i].value.array[j].used, &array[i].value.array[j].size);
+            if (F_status_is_error(status)) return status;
+          } // for
+
+          status = f_memory_array_resize(0, sizeof(f_string_dynamic_t), (void **) &array[i].value.array, &array[i].value.used, &array[i].value.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
+    return F_okay;
   }
-#endif // _di_f_string_map_multis_increase_
+#endif // _di_f_string_map_multis_delete_callback_
 
-#ifndef _di_f_string_map_multis_increase_by_
-  f_status_t f_string_map_multis_increase_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_map_multis_destroy_callback_
+  f_status_t f_string_map_multis_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_map_multi_t * const array = (f_string_map_multi_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-      const f_number_unsigned_t length = structure->used + amount;
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      if (length > structure->size) {
-        if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+        if (array[i].name.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].name.string, &array[i].name.used, &array[i].name.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-        return private_f_string_map_multis_resize(length, structure);
-      }
-    }
+        if (array[i].value.size) {
+          for (j = 0; j < array[i].value.size; ++j) {
 
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multis_increase_by_
+            status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].value.array[j].string, &array[i].value.array[j].used, &array[i].value.array[j].size);
+            if (F_status_is_error(status)) return status;
+          } // for
 
-#ifndef _di_f_string_map_multis_resize_
-  f_status_t f_string_map_multis_resize(const f_number_unsigned_t length, f_string_map_multis_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          status = f_memory_array_adjust(0, sizeof(f_string_dynamic_t), (void **) &array[i].value.array, &array[i].value.used, &array[i].value.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
-    return private_f_string_map_multis_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_map_multis_resize_
+#endif // _di_f_string_map_multis_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 5aafdb49e693b62fdfd2728951f28aa25987d8fd..09c6c8495d2f38e5c05ebb094934aa6d7dd45586 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_map_multis_t_
 
 /**
- * Resize the map_multis array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The map_multis array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_adjust_
-  extern f_status_t f_string_map_multis_adjust(const f_number_unsigned_t length, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_adjust_
-
-/**
  * Append a single source map_multi onto the destination.
  *
  * @param source
@@ -104,120 +85,60 @@ extern "C" {
 #endif // _di_f_string_map_multis_append_all_
 
 /**
- * Resize the map_multis array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_string_map_multis_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 structure
- *   The map_multis array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_map_multis_decimate_by_
-  extern f_status_t f_string_map_multis_decimate_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_decimate_by_
-
-/**
- * Resize the map_multis 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 structure
- *   The map_multis 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_decrease_by_
-  extern f_status_t f_string_map_multis_decrease_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_decrease_by_
-
-/**
- * Increase the size of the map_multis 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 structure
- *   The map_multis array to resize.
- *
- * @return
- *   F_okay 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_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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_map_multis_increase_
-  extern f_status_t f_string_map_multis_increase(const f_number_unsigned_t step, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_increase_
+#ifndef _di_f_string_map_multis_delete_callback_
+  extern f_status_t f_string_map_multis_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_map_multis_delete_callback_
 
 /**
- * Resize the map_multis array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_string_map_multis_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 structure
- *   The map_multis array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_increase_by_
-  extern f_status_t f_string_map_multis_increase_by(const f_number_unsigned_t amount, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_increase_by_
-
-/**
- * Resize the map_multis array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The map_multis 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_map_multis_resize_
-  extern f_status_t f_string_map_multis_resize(const f_number_unsigned_t length, f_string_map_multis_t * const structure);
-#endif // _di_f_string_map_multis_resize_
+#ifndef _di_f_string_map_multis_destroy_callback_
+  extern f_status_t f_string_map_multis_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_map_multis_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 3e740a8b7f840b72d3d71ba88a94d840f592be7b..448ceaea54a7fec5068b4b6c0a221376032d8561 100644 (file)
@@ -1,23 +1,10 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-dynamics.h"
-#include "private-map_multis.h"
-#include "private-map_multiss.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_map_multiss_adjust_
-  f_status_t f_string_map_multiss_adjust(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_map_multiss_adjust(length, structure);
-  }
-#endif // _di_f_string_map_multiss_adjust_
-
 #ifndef _di_f_string_map_multiss_append_
   f_status_t f_string_map_multiss_append(const f_string_map_multis_t source, f_string_map_multiss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
@@ -26,18 +13,49 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_map_multiss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_map_multis_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].used = 0;
+      f_string_map_multis_t * const destination_inner = &destination->array[destination->used];
 
-    if (source.used) {
-      status = private_f_string_map_multis_append_all(source, &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+      destination_inner->used = 0;
+
+      if (source.used) {
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_map_multi_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        if (F_status_is_error(status)) return status;
+
+        f_string_map_multi_t * destination_inner_deep = 0;
+        f_number_unsigned_t j = 0;
+
+        for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].name.used = 0;
+          destination_inner->array[destination_inner->used].value.used = 0;
+
+          if (source.array[i].name.used) {
+            status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination_inner->array[destination_inner->used].name);
+            if (F_status_is_error(status)) return status;
+          }
+
+          if (source.array[i].value.used) {
+            destination_inner_deep = &destination_inner->array[destination_inner->used];
+
+            status = f_memory_array_increase_by(source.array[i].value.used, sizeof(f_string_dynamic_t), (void **) &destination_inner_deep->value.array, &destination_inner_deep->value.used, &destination_inner_deep->value.size);
+            if (F_status_is_error(status)) return status;
+
+            for (j = 0; j < source.array[i].value.used; ++j, ++destination_inner_deep->value.used) {
+
+              destination_inner_deep->value.array[destination_inner_deep->value.used].used = 0;
+
+              if (source.array[i].value.array[j].used) {
+                status = private_f_string_append(source.array[i].value.array[j].string, source.array[i].value.array[j].used, &destination_inner_deep->value.array[destination_inner_deep->value.used]);
+                if (F_status_is_error(status)) return status;
+              }
+            } // for
+          }
+        } // for
+      }
     }
 
     ++destination->used;
@@ -54,104 +72,134 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_map_multiss_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_map_multis_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) {
+      f_number_unsigned_t j = 0;
+      f_number_unsigned_t k = 0;
+      f_string_map_multis_t * destination_inner = 0;
+      f_string_map_multi_t * destination_inner_deep = 0;
 
-      destination->array[destination->used].used = 0;
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      if (source.array[i].used) {
-        status = private_f_string_map_multis_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+        destination_inner = &destination->array[destination->used];
+        destination_inner->used = 0;
 
-    return F_okay;
-  }
-#endif // _di_f_string_map_multiss_append_all_
+        if (source.array[i].used) {
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_map_multi_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+          if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_map_multiss_decimate_by_
-  f_status_t f_string_map_multiss_decimate_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
 
-    if (!amount) return F_data_not;
+            destination_inner_deep = &destination_inner->array[destination_inner->used];
 
-    return private_f_string_map_multiss_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_map_multiss_decimate_by_
+            destination_inner_deep->name.used = 0;
+            destination_inner_deep->value.used = 0;
 
-#ifndef _di_f_string_map_multiss_decrease_by_
-  f_status_t f_string_map_multiss_decrease_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+            if (source.array[i].array[j].name.used) {
+              status = private_f_string_append(source.array[i].array[j].name.string, source.array[i].array[j].name.used, &destination_inner_deep->name);
+              if (F_status_is_error(status)) return status;
+            }
+
+            if (source.array[i].array[j].value.used) {
+              status = f_memory_array_increase_by(source.array[i].array[j].value.used, sizeof(f_string_dynamic_t), (void **) &destination_inner_deep->value.array, &destination_inner_deep->value.used, &destination_inner_deep->value.size);
+              if (F_status_is_error(status)) return status;
+
+              for (k = 0; k < source.array[i].array[j].value.used; ++k, ++destination_inner_deep->value.used) {
+
+                destination_inner_deep->value.array[destination_inner_deep->value.used].used = 0;
 
-    if (!amount) return F_data_not;
+                if (source.array[i].array[j].value.array[k].used) {
+                  status = private_f_string_append(source.array[i].array[j].value.array[k].string, source.array[i].array[j].value.array[k].used, &destination_inner_deep->value.array[destination_inner_deep->value.used]);
+                  if (F_status_is_error(status)) return status;
+                }
+              } // for
+            }
+          } // for
+        }
+      } // for
+    }
 
-    return private_f_string_map_multiss_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    return F_okay;
   }
-#endif // _di_f_string_map_multiss_decrease_by_
+#endif // _di_f_string_map_multiss_append_all_
 
-#ifndef _di_f_string_map_multiss_increase_
-  f_status_t f_string_map_multiss_increase(const f_number_unsigned_t step, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_map_multiss_delete_callback_
+  f_status_t f_string_map_multiss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+    {
+      f_string_map_multis_t * const array = (f_string_map_multis_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
+      f_number_unsigned_t k = 0;
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->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;
-      }
+        if (array[i].size) {
+          if (array[i].array[j].name.size) {
+            status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].name.string, &array[i].array[j].name.used, &array[i].array[j].name.size);
+            if (F_status_is_error(status)) return status;
+          }
+
+          if (array[i].array[j].value.size) {
+            for (k = 0; k < array[i].array[j].value.size; ++k) {
 
-      return private_f_string_map_multiss_resize(length, structure);
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].value.array[k].string, &array[i].array[j].value.array[k].used, &array[i].array[j].value.array[k].size);
+              if (F_status_is_error(status)) return status;
+            } // for
+
+            status = f_memory_array_resize(0, sizeof(f_string_dynamic_t), (void **) &array[i].array[j].value.array, &array[i].array[j].value.used, &array[i].array[j].value.size);
+            if (F_status_is_error(status)) return status;
+          }
+
+          status = f_memory_array_resize(0, sizeof(f_string_map_multi_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_okay;
   }
-#endif // _di_f_string_map_multiss_increase_
+#endif // _di_f_string_map_multiss_delete_callback_
 
-#ifndef _di_f_string_map_multiss_increase_by_
-  f_status_t f_string_map_multiss_increase_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_map_multiss_destroy_callback_
+  f_status_t f_string_map_multiss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_map_multis_t * const array = (f_string_map_multis_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
+      f_number_unsigned_t k = 0;
 
-      const f_number_unsigned_t length = structure->used + amount;
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      if (length > structure->size) {
-        if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+        if (array[i].size) {
+          if (array[i].array[j].name.size) {
+            status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].name.string, &array[i].array[j].name.used, &array[i].array[j].name.size);
+            if (F_status_is_error(status)) return status;
+          }
 
-        return private_f_string_map_multiss_resize(length, structure);
-      }
-    }
+          if (array[i].array[j].value.size) {
+            for (k = 0; k < array[i].array[j].value.size; ++k) {
 
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multiss_increase_by_
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].value.array[k].string, &array[i].array[j].value.array[k].used, &array[i].array[j].value.array[k].size);
+              if (F_status_is_error(status)) return status;
+            } // for
 
-#ifndef _di_f_string_map_multiss_resize_
-  f_status_t f_string_map_multiss_resize(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+            status = f_memory_array_adjust(0, sizeof(f_string_dynamic_t), (void **) &array[i].array[j].value.array, &array[i].array[j].value.used, &array[i].array[j].value.size);
+            if (F_status_is_error(status)) return status;
+          }
 
-    return private_f_string_map_multiss_resize(length, structure);
+          status = f_memory_array_adjust(0, sizeof(f_string_map_multi_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
   }
-#endif // _di_f_string_map_multiss_resize_
+#endif // _di_f_string_map_multiss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 58194c5a72cfea0dde409bbf1e63cdd134e3fc57..85ea400769627b233e700c674d5aea8eaeae603d 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_map_multiss_t_
 
 /**
- * Resize the map_multiss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The map_multiss array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multiss_adjust_
-  extern f_status_t f_string_map_multiss_adjust(const f_number_unsigned_t length, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_adjust_
-
-/**
  * Append a single source map_multis onto the destination.
  *
  * @param source
@@ -104,120 +85,60 @@ extern "C" {
 #endif // _di_f_string_map_multiss_append_all_
 
 /**
- * Resize the map_multiss array to a smaller size.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_map_multiss_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 structure
- *   The map_multiss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_map_multiss_decimate_by_
-  extern f_status_t f_string_map_multiss_decimate_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_decimate_by_
-
-/**
- * Resize the map_multiss 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 structure
- *   The map_multiss 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multiss_decrease_by_
-  extern f_status_t f_string_map_multiss_decrease_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_decrease_by_
-
-/**
- * Increase the size of the map_multiss 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 structure
- *   The map_multiss array to resize.
- *
- * @return
- *   F_okay 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_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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_map_multiss_increase_
-  extern f_status_t f_string_map_multiss_increase(const f_number_unsigned_t step, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_increase_
+#ifndef _di_f_string_map_multiss_delete_callback_
+  extern f_status_t f_string_map_multiss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_map_multiss_delete_callback_
 
 /**
- * Resize the map_multiss array to a larger size.
+ * A callback intended to be passed to f_memory_arrayss_adjust() for an f_string_map_multiss_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 structure
- *   The map_multiss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multiss_increase_by_
-  extern f_status_t f_string_map_multiss_increase_by(const f_number_unsigned_t amount, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_increase_by_
-
-/**
- * Resize the map_multiss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The map_multiss 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_map_multiss_resize_
-  extern f_status_t f_string_map_multiss_resize(const f_number_unsigned_t length, f_string_map_multiss_t * const structure);
-#endif // _di_f_string_map_multiss_resize_
+#ifndef _di_f_string_map_multiss_destroy_callback_
+  extern f_status_t f_string_map_multiss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_map_multiss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index edb9737a2d24092acb555725c290a9acfb216ab3..1f6faac5011307e8ba0703a7b291e9ab931e9d78 100644 (file)
@@ -1,45 +1,32 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-maps.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_maps_adjust_
-  f_status_t f_string_maps_adjust(const f_number_unsigned_t length, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_maps_adjust(length, structure);
-  }
-#endif // _di_f_string_maps_adjust_
-
 #ifndef _di_f_string_maps_append_
   f_status_t f_string_maps_append(const f_string_map_t source, f_string_maps_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_maps_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_map_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].name.used = 0;
-    destination->array[destination->used].value.used = 0;
+      destination->array[destination->used].name.used = 0;
+      destination->array[destination->used].value.used = 0;
 
-    if (source.name.used) {
-      status = private_f_string_append(source.name.string, source.name.used, &destination->array[destination->used].name);
-      if (F_status_is_error(status)) return status;
-    }
+      if (source.name.used) {
+        status = private_f_string_append(source.name.string, source.name.used, &destination->array[destination->used].name);
+        if (F_status_is_error(status)) return status;
+      }
 
-    if (source.value.used) {
-      status = private_f_string_append(source.value.string, source.value.used, &destination->array[destination->used].value);
-      if (F_status_is_error(status)) return status;
+      if (source.value.used) {
+        status = private_f_string_append(source.value.string, source.value.used, &destination->array[destination->used].value);
+        if (F_status_is_error(status)) return status;
+      }
     }
 
     ++destination->used;
@@ -56,87 +43,80 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    return private_f_string_maps_append_all(source, destination);
-  }
-#endif // _di_f_string_maps_append_all_
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_map_t), (void **) &destination->array, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_maps_decimate_by_
-  f_status_t f_string_maps_decimate_by(const f_number_unsigned_t amount, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-    if (!amount) return F_data_not;
+        destination->array[destination->used].name.used = 0;
+        destination->array[destination->used].value.used = 0;
 
-    return private_f_string_maps_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_maps_decimate_by_
+        if (source.array[i].name.used) {
+          status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
+          if (F_status_is_error(status)) return status;
+        }
 
-#ifndef _di_f_string_maps_decrease_by_
-  f_status_t f_string_maps_decrease_by(const f_number_unsigned_t amount, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) return F_data_not;
+        if (source.array[i].value.used) {
+          status = private_f_string_append(source.array[i].value.string, source.array[i].value.used, &destination->array[destination->used].value);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
-    return private_f_string_maps_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    return F_okay;
   }
-#endif // _di_f_string_maps_decrease_by_
+#endif // _di_f_string_maps_append_all_
 
-#ifndef _di_f_string_maps_increase_
-  f_status_t f_string_maps_increase(const f_number_unsigned_t step, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_maps_delete_callback_
+  f_status_t f_string_maps_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+    {
+      f_string_map_t * const array = (f_string_map_t *) void_array;
+      f_status_t status = F_okay;
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->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;
-      }
+        if (array[i].name.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].name.string, &array[i].name.used, &array[i].name.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-      return private_f_string_maps_resize(length, structure);
+        if (array[i].value.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].value.string, &array[i].value.used, &array[i].value.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
+    return F_okay;
   }
-#endif // _di_f_string_maps_increase_
+#endif // _di_f_string_maps_delete_callback_
 
-#ifndef _di_f_string_maps_increase_by_
-  f_status_t f_string_maps_increase_by(const f_number_unsigned_t amount, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_maps_destroy_callback_
+  f_status_t f_string_maps_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_map_t * const array = (f_string_map_t *) void_array;
+      f_status_t status = F_okay;
 
-      const f_number_unsigned_t length = structure->used + amount;
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      if (length > structure->size) {
-        if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+        if (array[i].name.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].name.string, &array[i].name.used, &array[i].name.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-        return private_f_string_maps_resize(length, structure);
-      }
+        if (array[i].value.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].value.string, &array[i].value.used, &array[i].value.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_maps_increase_by_
-
-#ifndef _di_f_string_maps_resize_
-  f_status_t f_string_maps_resize(const f_number_unsigned_t length, f_string_maps_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_maps_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_maps_resize_
+#endif // _di_f_string_maps_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 850c1c6ea8d4bda485183b32ce3e7e9d3ae365fa..eb238a6aa20fe7cb8356247cccfd0674999c8159 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_maps_t_
 
 /**
- * Resize the string maps array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string maps array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_maps_adjust_
-  extern f_status_t f_string_maps_adjust(const f_number_unsigned_t length, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_adjust_
-
-/**
  * Append a single source map onto the destination.
  *
  * @param source
@@ -104,120 +85,60 @@ extern "C" {
 #endif // _di_f_string_maps_append_all_
 
 /**
- * Resize the string maps array to a smaller size.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_string_maps_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 structure
- *   The string maps array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_maps_decimate_by_
-  extern f_status_t f_string_maps_decimate_by(const f_number_unsigned_t amount, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_decimate_by_
-
-/**
- * Resize the string maps 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 structure
- *   The string maps 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_maps_decrease_by_
-  extern f_status_t f_string_maps_decrease_by(const f_number_unsigned_t amount, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_decrease_by_
-
-/**
- * Increase the size of the string maps 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 structure
- *   The string maps array to resize.
- *
- * @return
- *   F_okay 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_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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_maps_increase_
-  extern f_status_t f_string_maps_increase(const f_number_unsigned_t step, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_increase_
+#ifndef _di_f_string_maps_delete_callback_
+  extern f_status_t f_string_maps_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_maps_delete_callback_
 
 /**
- * Resize the string maps array to a larger size.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_string_maps_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 structure
- *   The string maps array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_maps_increase_by_
-  extern f_status_t f_string_maps_increase_by(const f_number_unsigned_t amount, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_increase_by_
-
-/**
- * Resize the string maps array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string maps 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_maps_resize_
-  extern f_status_t f_string_maps_resize(const f_number_unsigned_t length, f_string_maps_t * const structure);
-#endif // _di_f_string_maps_resize_
+#ifndef _di_f_string_maps_destroy_callback_
+  extern f_status_t f_string_maps_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_maps_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 0b84da3b138d1c3553cd090569209b15bb9f297f..7454a9054bdf1612a795a7cf974273b04df14ee2 100644 (file)
@@ -1,22 +1,10 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-maps.h"
-#include "private-mapss.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_mapss_adjust_
-  f_status_t f_string_mapss_adjust(const f_number_unsigned_t length, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_mapss_adjust(length, structure);
-  }
-#endif // _di_f_string_mapss_adjust_
-
 #ifndef _di_f_string_mapss_append_
   f_status_t f_string_mapss_append(const f_string_maps_t source, f_string_mapss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
@@ -25,18 +13,34 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_mapss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_maps_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].used = 0;
+      f_string_maps_t * const destination_inner = &destination->array[destination->used];
 
-    if (source.used) {
-      status = private_f_string_maps_append_all(source, &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+      destination_inner->used = 0;
+
+      if (source.used) {
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_map_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].name.used = 0;
+          destination_inner->array[destination_inner->used].value.used = 0;
+
+          if (source.array[i].name.used) {
+            status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination_inner->array[destination_inner->used].name);
+            if (F_status_is_error(status)) return status;
+          }
+
+          if (source.array[i].value.used) {
+            status = private_f_string_append(source.array[i].value.string, source.array[i].value.used, &destination_inner->array[destination_inner->used].value);
+            if (F_status_is_error(status)) return status;
+          }
+        } // for
+      }
     }
 
     ++destination->used;
@@ -53,104 +57,112 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_mapss_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_maps_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) {
+      f_number_unsigned_t j = 0;
+      f_string_maps_t * destination_inner = 0;
 
-      destination->array[destination->used].used = 0;
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      if (source.array[i].used) {
-        status = private_f_string_maps_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_okay;
-  }
-#endif // _di_f_string_mapss_append_all_
+        destination_inner = &destination->array[destination->used];
+        destination_inner->used = 0;
 
-#ifndef _di_f_string_mapss_decimate_by_
-  f_status_t f_string_mapss_decimate_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+        if (source.array[i].used) {
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_map_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+          if (F_status_is_error(status)) return status;
 
-    if (!amount) return F_data_not;
+          for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
 
-    return private_f_string_mapss_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_mapss_decimate_by_
+            destination_inner->array[destination_inner->used].name.used = 0;
+            destination_inner->array[destination_inner->used].value.used = 0;
 
-#ifndef _di_f_string_mapss_decrease_by_
-  f_status_t f_string_mapss_decrease_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+            if (source.array[i].array[j].name.used) {
+              status = private_f_string_append(source.array[i].array[j].name.string, source.array[i].array[j].name.used, &destination_inner->array[destination_inner->used].name);
+              if (F_status_is_error(status)) return status;
+            }
 
-    if (!amount) return F_data_not;
+            if (source.array[i].array[j].value.used) {
+              status = private_f_string_append(source.array[i].array[j].value.string, source.array[i].array[j].value.used, &destination_inner->array[destination_inner->used].value);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
+        }
+      } // for
+    }
 
-    return private_f_string_mapss_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    return F_okay;
   }
-#endif // _di_f_string_mapss_decrease_by_
+#endif // _di_f_string_mapss_append_all_
 
-#ifndef _di_f_string_mapss_increase_
-  f_status_t f_string_mapss_increase(const f_number_unsigned_t step, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_mapss_delete_callback_
+  f_status_t f_string_mapss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+    {
+      f_string_maps_t * const array = (f_string_maps_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->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;
-      }
+        if (array[i].size) {
+          for (j = 0; j < array[i].size; ++j) {
+
+            if (array[i].array[j].name.size) {
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].name.string, &array[i].array[j].name.used, &array[i].array[j].name.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-      return private_f_string_mapss_resize(length, structure);
+            if (array[i].array[j].value.size) {
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].value.string, &array[i].array[j].value.used, &array[i].array[j].value.size);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
+
+          status = f_memory_array_resize(0, sizeof(f_char_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_okay;
   }
-#endif // _di_f_string_mapss_increase_
+#endif // _di_f_string_mapss_delete_callback_
 
-#ifndef _di_f_string_mapss_increase_by_
-  f_status_t f_string_mapss_increase_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_mapss_destroy_callback_
+  f_status_t f_string_mapss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_maps_t * const array = (f_string_maps_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-      const f_number_unsigned_t length = structure->used + amount;
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      if (length > structure->size) {
-        if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+        if (array[i].size) {
+          for (j = 0; j < array[i].size; ++j) {
 
-        return private_f_string_mapss_resize(length, structure);
-      }
-    }
+            if (array[i].array[j].name.size) {
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].name.string, &array[i].array[j].name.used, &array[i].array[j].name.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_mapss_increase_by_
+            if (array[i].array[j].value.size) {
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].value.string, &array[i].array[j].value.used, &array[i].array[j].value.size);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
 
-#ifndef _di_f_string_mapss_resize_
-  f_status_t f_string_mapss_resize(const f_number_unsigned_t length, f_string_mapss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
-    return private_f_string_mapss_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_mapss_resize_
+#endif // _di_f_string_mapss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 0da2ff34fdcf7d291f857cdafcc1060687558391..b30f5d178fcec02b849ee4a62545074ad1c86c2b 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_mapss_t_
 
 /**
- * Resize the string mapss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string mapss array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_mapss_adjust_
-  extern f_status_t f_string_mapss_adjust(const f_number_unsigned_t length, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_adjust_
-
-/**
  * Append a single source maps onto the destination.
  *
  * @param source
@@ -104,121 +85,60 @@ extern "C" {
 #endif // _di_f_string_mapss_append_all_
 
 /**
- * Resize the string mapss array to a smaller size.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_mapss_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 structure
- *   The string mapss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_mapss_decimate_by_
-  extern f_status_t f_string_mapss_decimate_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_decimate_by_
-
-/**
- * Resize the string mapss 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 structure
- *   The string mapss 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_okay 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_memory_resize().
- */
-#ifndef _di_f_string_mapss_decrease_by_
-  extern f_status_t f_string_mapss_decrease_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_decrease_by_
-
-/**
- * Increase the size of the string mapss 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 structure
- *   The string mapss array to resize.
- *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size) (or step is 0).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_mapss_increase_
-  extern f_status_t f_string_mapss_increase(const f_number_unsigned_t step, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_increase_
+#ifndef _di_f_string_mapss_delete_callback_
+  extern f_status_t f_string_mapss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_mapss_delete_callback_
 
 /**
- * Resize the string mapss array to a larger size.
+ * A callback intended to be passed to f_memory_arrayss_adjust() for an f_string_mapss_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 structure
- *   The string mapss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_mapss_increase_by_
-  extern f_status_t f_string_mapss_increase_by(const f_number_unsigned_t amount, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_increase_by_
-
-/**
- * Resize the string mapss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string mapss 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_mapss_resize_
-  extern f_status_t f_string_mapss_resize(const f_number_unsigned_t length, f_string_mapss_t * const structure);
-#endif // _di_f_string_mapss_resize_
+#ifndef _di_f_string_mapss_destroy_callback_
+  extern f_status_t f_string_mapss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_mapss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
diff --git a/level_0/f_string/c/string/private-dynamics.c b/level_0/f_string/c/string/private-dynamics.c
deleted file mode 100644 (file)
index 32a601c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-dynamics.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-  f_status_t private_f_string_dynamics_append(const f_string_dynamic_t source, f_string_dynamics_t * const destination) {
-
-    {
-      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_dynamic_t), (void **) &destination->array, &destination->used, &destination->size);
-      if (F_status_is_error(status)) return status;
-
-      destination->array[destination->used].used = 0;
-
-      if (source.used) {
-        status = private_f_string_append(source.string, source.used, &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    }
-
-    ++destination->used;
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-
-#if !defined(_di_f_string_dynamics_append_all_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-  f_status_t private_f_string_dynamics_append_all(const f_string_dynamics_t source, f_string_dynamics_t * const destination) {
-
-    {
-      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_dynamic_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_string_append(source.array[i].string, source.array[i].used, &destination->array[destination->used]);
-          if (F_status_is_error(status)) return status;
-        }
-      } // for
-    }
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_dynamics_append_all_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-dynamics.h b/level_0/f_string/c/string/private-dynamics.h
deleted file mode 100644 (file)
index 0897a7a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_dynamics_h
-#define _PRIVATE_F_string_dynamics_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source string to append.
- * @param destination
- *   The destination dynamics the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_dynamics_append()
- * @see f_string_map_multis_append()
- * @see f_string_map_multis_append_all()
- */
-#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-  extern f_status_t private_f_string_dynamics_append(const f_string_dynamic_t source, f_string_dynamics_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source strings to append.
- * @param destination
- *   The destination dynamics the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_dynamics_append_all()
- * @see f_string_map_multis_append()
- * @see f_string_map_multis_append_all()
- */
-#if  !defined(_di_f_string_dynamics_append_all_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-  extern f_status_t private_f_string_dynamics_append_all(const f_string_dynamics_t source, f_string_dynamics_t * const destination) F_attribute_visibility_internal_d;
-#endif //  !defined(_di_f_string_dynamics_append_all_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_dynamics_h
diff --git a/level_0/f_string/c/string/private-map_multis.c b/level_0/f_string/c/string/private-map_multis.c
deleted file mode 100644 (file)
index 4b62478..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-dynamics.h"
-#include "private-map_multis.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
-  f_status_t private_f_string_map_multis_adjust(const f_number_unsigned_t length, f_string_map_multis_t * const structure) {
-
-    {
-      f_status_t status = F_okay;
-      f_number_unsigned_t j = 0;
-
-      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-        status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &structure->array[i].name.string, &structure->array[i].name.used, &structure->array[i].name.size);
-        if (F_status_is_error(status)) return status;
-
-        for (j = 0; j < structure->array[i].value.size; ++j) {
-
-          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &structure->array[i].value.array[j].string, &structure->array[i].value.array[j].used, &structure->array[i].value.array[j].size);
-          if (F_status_is_error(status)) return status;
-        } // for
-
-        status = f_memory_arrays_adjust(0, sizeof(f_string_dynamic_t), (void **) &structure->array[i].value.array, &structure->array[i].value.used, &structure->array[i].value.size, &f_string_dynamics_destroy_callback);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_adjust(length, sizeof(f_string_map_multi_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
-
-#if !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_)
-  f_status_t private_f_string_map_multis_append_all(const f_string_map_multis_t source, f_string_map_multis_t * const destination) {
-
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_map_multis_resize(destination->used + source.used, destination);
-      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].name.used = 0;
-      destination->array[destination->used].value.used = 0;
-
-      if (source.array[i].name.used) {
-        status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
-        if (F_status_is_error(status)) return status;
-      }
-
-      if (source.array[i].value.used) {
-        status = private_f_string_dynamics_append_all(source.array[i].value, &destination->array[destination->used].value);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_)
-
-#if !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_resize_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-  f_status_t private_f_string_map_multis_resize(const f_number_unsigned_t length, f_string_map_multis_t * const structure) {
-
-    {
-      f_status_t status = F_okay;
-      f_number_unsigned_t j = 0;
-
-      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-        status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &structure->array[i].name.string, &structure->array[i].name.used, &structure->array[i].name.size);
-        if (F_status_is_error(status)) return status;
-
-        for (j = 0; j < structure->array[i].value.size; ++j) {
-
-          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &structure->array[i].value.array[j].string, &structure->array[i].value.array[j].used, &structure->array[i].value.array[j].size);
-          if (F_status_is_error(status)) return status;
-        } // for
-
-        status = f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &structure->array[i].value.array, &structure->array[i].value.used, &structure->array[i].value.size, &f_string_dynamics_delete_callback);
-        if (F_status_is_error(status)) return status;
-      } // for
-    }
-
-    return f_memory_array_resize(length, sizeof(f_string_map_multi_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_resize_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-map_multis.h b/level_0/f_string/c/string/private-map_multis.h
deleted file mode 100644 (file)
index fea1b7c..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_map_multis_h
-#define _PRIVATE_F_string_map_multis_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 map_multis
- *   The map_multis to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- *
- * @see f_string_map_multis_adjust()
- */
-#if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
-  extern f_status_t private_f_string_map_multis_adjust(const f_number_unsigned_t length, f_string_map_multis_t * const map_multis) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source destination to append.
- * @param destination
- *   The destination map_multis the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_map_multis_append_all()
- * @see f_string_map_multiss_append()
- * @see f_string_map_multiss_append_all()
- */
-#if !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_)
-  extern f_status_t private_f_string_map_multis_append_all(const f_string_map_multis_t source, f_string_map_multis_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param map_multis
- *   The map_multis to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_map_multis_append()
- * @see f_string_map_multis_append_all()
- * @see f_string_map_multis_decrease_by()
- * @see f_string_map_multis_increase()
- * @see f_string_map_multis_increase_by()
- * @see f_string_map_multis_resize()
- * @see f_string_map_multiss_append()
- * @see f_string_map_multiss_append_all()
- * @see f_string_map_multiss_decrease_by()
- * @see f_string_map_multiss_increase()
- * @see f_string_map_multiss_increase_by()
- */
-#if !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_resize_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-  extern f_status_t private_f_string_map_multis_resize(const f_number_unsigned_t length, f_string_map_multis_t * const map_multis) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_) || !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_resize_) || !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_map_multis_h
diff --git a/level_0/f_string/c/string/private-map_multiss.c b/level_0/f_string/c/string/private-map_multiss.c
deleted file mode 100644 (file)
index 0526453..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-dynamics.h"
-#include "private-map_multis.h"
-#include "private-map_multiss.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_map_multiss_adjust_) || !defined(_di_f_string_map_multiss_decimate_by_)
-  f_status_t private_f_string_map_multiss_adjust(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_map_multis_adjust(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_map_multis_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_map_multiss_adjust_) || !defined(_di_f_string_map_multiss_decimate_by_)
-
-#if !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-  f_status_t private_f_string_map_multiss_resize(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_map_multis_resize(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_map_multis_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-map_multiss.h b/level_0/f_string/c/string/private-map_multiss.h
deleted file mode 100644 (file)
index 02756ac..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_map_multiss_h
-#define _PRIVATE_F_string_map_multiss_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 structure
- *   The map_multiss to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- *
- * @see f_string_map_multiss_adjust()
- */
-#if !defined(_di_f_string_map_multiss_adjust_) || !defined(_di_f_string_map_multiss_decimate_by_)
-  extern f_status_t private_f_string_map_multiss_adjust(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multiss_adjust_) || !defined(_di_f_string_map_multiss_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 structure
- *   The map_multiss to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_map_multiss_decrease_by()
- * @see f_string_map_multiss_increase()
- * @see f_string_map_multiss_increase_by()
- */
-#if !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-  extern f_status_t private_f_string_map_multiss_resize(const f_number_unsigned_t length, f_string_map_multiss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_map_multiss_h
diff --git a/level_0/f_string/c/string/private-maps.c b/level_0/f_string/c/string/private-maps.c
deleted file mode 100644 (file)
index 5e1fb3d..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-maps.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-  f_status_t private_f_string_maps_adjust(const f_number_unsigned_t length, f_string_maps_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &structure->array[i].name.string, &structure->array[i].name.used, &structure->array[i].name.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &structure->array[i].value.string, &structure->array[i].value.used, &structure->array[i].value.size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_map_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-
-#if !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_)
-  f_status_t private_f_string_maps_append_all(const f_string_maps_t source, f_string_maps_t * const destination) {
-
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_maps_resize(destination->used + source.used, destination);
-      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].name.used = 0;
-      destination->array[destination->used].value.used = 0;
-
-      if (source.array[i].name.used) {
-        status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
-        if (F_status_is_error(status)) return status;
-      }
-
-      if (source.array[i].value.used) {
-        status = private_f_string_append(source.array[i].value.string, source.array[i].value.used, &destination->array[destination->used].value);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_)
-
-#if !defined(_di_f_string_maps_append_) || !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_resize_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-  f_status_t private_f_string_maps_resize(const f_number_unsigned_t length, f_string_maps_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &structure->array[i].name.string, &structure->array[i].name.used, &structure->array[i].name.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &structure->array[i].value.string, &structure->array[i].value.used, &structure->array[i].value.size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_map_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_maps_append_) || !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_resize_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-maps.h b/level_0/f_string/c/string/private-maps.h
deleted file mode 100644 (file)
index af64c7f..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_maps_h
-#define _PRIVATE_F_string_maps_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 structure
- *   The maps to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- *
- * @see f_string_maps_adjust()
- */
-#if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-  extern f_status_t private_f_string_maps_adjust(const f_number_unsigned_t length, f_string_maps_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source destination to append.
- * @param destination
- *   The destination maps the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_maps_append_all()
- * @see f_string_mapss_append()
- * @see f_string_mapss_append_all()
- */
-#if !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_)
-  extern f_status_t private_f_string_maps_append_all(const f_string_maps_t source, f_string_maps_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The maps to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_maps_append()
- * @see f_string_maps_append_all()
- * @see f_string_maps_decrease_by()
- * @see f_string_maps_increase()
- * @see f_string_maps_increase_by()
- * @see f_string_maps_resize()
- * @see f_string_mapss_append()
- * @see f_string_mapss_append_all()
- * @see f_string_mapss_decrease_by()
- * @see f_string_mapss_increase()
- * @see f_string_mapss_increase_by()
- */
-#if !defined(_di_f_string_maps_append_) || !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_resize_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-  extern f_status_t private_f_string_maps_resize(const f_number_unsigned_t length, f_string_maps_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_maps_append_) || !defined(_di_f_string_maps_append_all_) || !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_resize_) || !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_maps_h
diff --git a/level_0/f_string/c/string/private-mapss.c b/level_0/f_string/c/string/private-mapss.c
deleted file mode 100644 (file)
index aee11fd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-maps.h"
-#include "private-mapss.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_decimate_by_)
-  f_status_t private_f_string_mapss_adjust(const f_number_unsigned_t length, f_string_mapss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_maps_adjust(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_maps_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_decimate_by_)
-
-#if !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-  f_status_t private_f_string_mapss_resize(const f_number_unsigned_t length, f_string_mapss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_maps_resize(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_maps_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-mapss.h b/level_0/f_string/c/string/private-mapss.h
deleted file mode 100644 (file)
index 7e6618d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_mapss_h
-#define _PRIVATE_F_string_mapss_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 structure
- *   The structure to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- *
- * @see f_string_mapss_adjust()
- */
-#if !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_decimate_by_)
-  extern f_status_t private_f_string_mapss_adjust(const f_number_unsigned_t length, f_string_mapss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_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 structure
- *   The structure to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_mapss_decrease_by()
- * @see f_string_mapss_increase()
- * @see f_string_mapss_increase_by()
- */
-#if !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-  extern f_status_t private_f_string_mapss_resize(const f_number_unsigned_t length, f_string_mapss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_mapss_h
diff --git a/level_0/f_string/c/string/private-quantityss.c b/level_0/f_string/c/string/private-quantityss.c
deleted file mode 100644 (file)
index 7e29f4b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-quantitys.h"
-#include "private-quantityss.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
-  f_status_t private_f_string_quantityss_adjust(const f_number_unsigned_t length, f_string_quantityss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_adjust(length, sizeof(f_string_quantitys_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_quantitys_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
-
-#if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_)
-  f_status_t private_f_string_quantityss_resize(const f_number_unsigned_t length, f_string_quantityss_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_resize(0, sizeof(f_string_quantity_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_quantitys_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-quantityss.h b/level_0/f_string/c/string/private-quantityss.h
deleted file mode 100644 (file)
index db2b5c8..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_quantityss_h
-#define _PRIVATE_F_string_quantityss_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 structure
- *   The structure to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- *
- * @see f_string_quantityss_adjust()
- */
-#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
-  extern f_status_t private_f_string_quantityss_adjust(const f_number_unsigned_t length, f_string_quantityss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_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 structure
- *   The structure to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- *
- * @see f_string_quantityss_decrease_by()
- * @see f_string_quantityss_increase()
- * @see f_string_quantityss_increase_by()
- */
-#if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_)
-  extern f_status_t private_f_string_quantityss_resize(const f_number_unsigned_t length, f_string_quantityss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_quantityss_h
diff --git a/level_0/f_string/c/string/private-ranges.c b/level_0/f_string/c/string/private-ranges.c
deleted file mode 100644 (file)
index bd0dc34..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-ranges.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_)
-  f_status_t private_f_string_ranges_append_all(const f_string_ranges_t source, f_string_ranges_t * const destination) {
-
-    if (destination->used + source.used > destination->size) {
-      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_range_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->array[destination->used].start = source.array[i].start;
-      destination->array[destination->used++].stop = source.array[i].stop;
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-ranges.h b/level_0/f_string/c/string/private-ranges.h
deleted file mode 100644 (file)
index 998c344..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_ranges_h
-#define _PRIVATE_F_string_ranges_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source ranges to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_ranges_append_all()
- * @see f_string_rangess_append()
- * @see f_string_rangess_append_all()
- */
-#if !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_)
-  extern f_status_t private_f_string_ranges_append_all(const f_string_ranges_t source, f_string_ranges_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_ranges_h
diff --git a/level_0/f_string/c/string/private-rangess.c b/level_0/f_string/c/string/private-rangess.c
deleted file mode 100644 (file)
index f066079..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-ranges.h"
-#include "private-rangess.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
-  f_status_t private_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_rangess_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_ranges_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
-
-#if !defined(_di_f_string_ranges_append_) || !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_resize_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_)
-  f_status_t private_f_string_rangess_resize(const f_number_unsigned_t length, f_string_rangess_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_ranges_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_ranges_append_) || !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_resize_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-rangess.h b/level_0/f_string/c/string/private-rangess.h
deleted file mode 100644 (file)
index 212dedd..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_rangess_h
-#define _PRIVATE_F_string_rangess_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 structure
- *   The structure to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- * @see f_string_rangess_adjust()
- */
-#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
-  extern f_status_t private_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_rangess_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_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 structure
- *   The structure to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_rangess_append()
- * @see f_string_rangess_append_all()
- * @see f_string_rangess_decrease_by()
- * @see f_string_rangess_increase()
- * @see f_string_rangess_increase_by()
- */
-#if !defined(_di_f_string_ranges_append_) || !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_resize_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_)
-  extern f_status_t private_f_string_rangess_resize(const f_number_unsigned_t length, f_string_rangess_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_ranges_append_) || !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_resize_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_rangess_h
diff --git a/level_0/f_string/c/string/private-triples.c b/level_0/f_string/c/string/private-triples.c
deleted file mode 100644 (file)
index 4abf778..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-triples.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-  f_status_t private_f_string_triples_adjust(const f_number_unsigned_t length, f_string_triples_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_adjust(0, sizeof(f_string_triple_t), (void **) &structure->array[i].a.string, &structure->array[i].a.used, &structure->array[i].a.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_adjust(0, sizeof(f_string_triple_t), (void **) &structure->array[i].b.string, &structure->array[i].b.used, &structure->array[i].b.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_adjust(0, sizeof(f_string_triple_t), (void **) &structure->array[i].c.string, &structure->array[i].c.used, &structure->array[i].c.size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_triple_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-
-#if !defined(_di_f_string_triples_append_all_) || !defined(_di_f_string_tripless_append_) || !defined(_di_f_string_tripless_append_all_)
-  f_status_t private_f_string_triples_append_all(const f_string_triples_t source, f_string_triples_t * const destination) {
-
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_triples_resize(destination->used + source.used, destination);
-      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].a.used = 0;
-      destination->array[destination->used].b.used = 0;
-      destination->array[destination->used].c.used = 0;
-
-      if (source.array[i].a.used) {
-        status = private_f_string_append(source.array[i].a.string, source.array[i].a.used, &destination->array[destination->used].a);
-        if (F_status_is_error(status)) return status;
-      }
-
-      if (source.array[i].b.used) {
-        status = private_f_string_append(source.array[i].b.string, source.array[i].b.used, &destination->array[destination->used].b);
-        if (F_status_is_error(status)) return status;
-      }
-
-      if (source.array[i].c.used) {
-        status = private_f_string_append(source.array[i].c.string, source.array[i].c.used, &destination->array[destination->used].c);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_okay;
-  }
-#endif // !defined(_di_f_string_triples_append_all_) || !defined(_di_f_string_tripless_append_) || !defined(_di_f_string_tripless_append_all_)
-
-#if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_)
-  f_status_t private_f_string_triples_resize(const f_number_unsigned_t length, f_string_triples_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = f_memory_array_resize(0, sizeof(f_string_triple_t), (void **) &structure->array[i].a.string, &structure->array[i].a.used, &structure->array[i].a.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_resize(0, sizeof(f_string_triple_t), (void **) &structure->array[i].b.string, &structure->array[i].b.used, &structure->array[i].b.size);
-      if (F_status_is_error(status)) return status;
-
-      status = f_memory_array_resize(0, sizeof(f_string_triple_t), (void **) &structure->array[i].c.string, &structure->array[i].c.used, &structure->array[i].c.size);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_triple_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-triples.h b/level_0/f_string/c/string/private-triples.h
deleted file mode 100644 (file)
index ba3d24b..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_triple_h
-#define _PRIVATE_F_string_triple_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 structure
- *   The triples to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- * @see f_string_triples_adjust()
- */
-#if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-  extern f_status_t private_f_string_triples_adjust(const f_number_unsigned_t length, f_string_triples_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source destination to append.
- * @param destination
- *   The destination triples the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_triples_append_all()
- * @see f_string_tripless_append()
- * @see f_string_tripless_append_all()
- */
-#if !defined(_di_f_string_triples_append_all_) || !defined(_di_f_string_tripless_append_) || !defined(_di_f_string_tripless_append_all_)
-  extern f_status_t private_f_string_triples_append_all(const f_string_triples_t source, f_string_triples_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_triples_append_all_) || !defined(_di_f_string_tripless_append_) || !defined(_di_f_string_tripless_append_all_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The triples to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_triples_decrease_by()
- * @see f_string_triples_increase()
- * @see f_string_triples_increase_by()
- */
-#if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_)
-  extern f_status_t private_f_string_triples_resize(const f_number_unsigned_t length, f_string_triples_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The tripless to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- * @see f_string_tripless_adjust()
- */
-#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-  extern f_status_t private_f_string_tripless_adjust(const f_number_unsigned_t length, f_string_tripless_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_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 structure
- *   The tripless to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_tripless_decrease_by()
- * @see f_string_tripless_increase()
- * @see f_string_tripless_increase_by()
- */
-#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-  extern f_status_t private_f_string_tripless_resize(const f_number_unsigned_t length, f_string_tripless_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_triple_h
diff --git a/level_0/f_string/c/string/private-tripless.c b/level_0/f_string/c/string/private-tripless.c
deleted file mode 100644 (file)
index f000ac2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-#include "private-triples.h"
-#include "private-tripless.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-  f_status_t private_f_string_tripless_adjust(const f_number_unsigned_t length, f_string_tripless_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_triples_adjust(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_string_triples_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-
-#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-  f_status_t private_f_string_tripless_resize(const f_number_unsigned_t length, f_string_tripless_t * const structure) {
-
-    f_status_t status = F_okay;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_string_triples_resize(0, &structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_string_triples_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/private-tripless.h b/level_0/f_string/c/string/private-tripless.h
deleted file mode 100644 (file)
index 11c16cd..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * 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_string_tripless_h
-#define _PRIVATE_F_string_tripless_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 structure
- *   The tripless to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- * @see f_string_tripless_adjust()
- */
-#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-  extern f_status_t private_f_string_tripless_adjust(const f_number_unsigned_t length, f_string_tripless_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_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 structure
- *   The tripless to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_tripless_decrease_by()
- * @see f_string_tripless_increase()
- * @see f_string_tripless_increase_by()
- */
-#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-  extern f_status_t private_f_string_tripless_resize(const f_number_unsigned_t length, f_string_tripless_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_tripless_h
index 584884244a0dcc1561505185abaa2e2fef2d7ec9..134e1027277d0b0732997d035daebcf0e51f29f0 100644 (file)
@@ -1,28 +1,17 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-quantitys.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_quantitys_adjust_
-  f_status_t f_string_quantitys_adjust(const f_number_unsigned_t length, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_adjust(length, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_quantitys_adjust_
-
 #ifndef _di_f_string_quantitys_append_
   f_status_t f_string_quantitys_append(const f_string_quantity_t source, f_string_quantitys_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 (destination->used + 1 > destination->size) {
+    {
       const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
     }
@@ -42,60 +31,20 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    return private_f_string_quantitys_append_all(source, destination);
-  }
-#endif // _di_f_string_quantitys_append_all_
-
-#ifndef _di_f_string_quantitys_decimate_by_
-  f_status_t f_string_quantitys_decimate_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_decimate_by(amount, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_quantitys_decimate_by_
-
-#ifndef _di_f_string_quantitys_decrease_by_
-  f_status_t f_string_quantitys_decrease_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-
-    return f_memory_array_decrease_by(amount, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_quantitys_decrease_by_
-
-#ifndef _di_f_string_quantitys_increase_
-  f_status_t f_string_quantitys_increase(const f_number_unsigned_t step, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_increase(step, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_quantitys_increase_
-
-#ifndef _di_f_string_quantitys_increase_by_
-  f_status_t f_string_quantitys_increase_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+    {
+      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
+      if (F_status_is_error(status)) return status;
+    }
 
-    return f_memory_array_increase_by(amount, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_quantitys_increase_by_
+    for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-#ifndef _di_f_string_quantitys_resize_
-  f_status_t f_string_quantitys_resize(const f_number_unsigned_t length, f_string_quantitys_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+      destination->array[destination->used].start = source.array[i].start;
+      destination->array[destination->used].total = source.array[i].total;
+    } // for
 
-    return f_memory_array_resize(length, sizeof(f_string_quantity_t), (void **) &structure->array, &structure->used, &structure->size);
+    return F_okay;
   }
-#endif // _di_f_string_quantitys_resize_
+#endif // _di_f_string_quantitys_append_all_
 
 #ifdef __cplusplus
 } // extern "C"
index 88744afaa64b2d012d490c1f6bce4ea23b9e917e..74ed1f6a0959fc663da7b6f9101a116606b6326b 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_quantitys_t_
 
 /**
- * Resize the string quantitys array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string quantitys array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_adjust_
-  extern f_status_t f_string_quantitys_adjust(const f_number_unsigned_t length, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_adjust_
-
-/**
  * Append the single source quantity onto the destination.
  *
  * @param source
@@ -102,120 +83,6 @@ extern "C" {
   extern f_status_t f_string_quantitys_append_all(const f_string_quantitys_t source, f_string_quantitys_t * const destination);
 #endif // _di_f_string_quantitys_append_all_
 
-/**
- * Resize the string quantitys 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 structure
- *   The string quantitys array to resize.
- *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_quantitys_decimate_by_
-  extern f_status_t f_string_quantitys_decimate_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_decimate_by_
-
-/**
- * Resize the string quantitys 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 structure
- *   The string quantitys array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_decrease_by_
-  extern f_status_t f_string_quantitys_decrease_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_decrease_by_
-
-/**
- * Increase the size of the string quantitys 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 structure
- *   The string quantitys array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_increase_
-  extern f_status_t f_string_quantitys_increase(const f_number_unsigned_t step, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_increase_
-
-/**
- * Resize the string quantitys 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 structure
- *   The string quantitys array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_increase_by_
-  extern f_status_t f_string_quantitys_increase_by(const f_number_unsigned_t amount, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_increase_by_
-
-/**
- * Resize the string quantitys array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string quantitys array to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_resize_
-  extern f_status_t f_string_quantitys_resize(const f_number_unsigned_t length, f_string_quantitys_t * const structure);
-#endif // _di_f_string_quantitys_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 3761a2726f6cc195bba6423f00d9a88a8fe223fb..3346cdf877a1b57530808fa1b7e39a4f2243d60e 100644 (file)
@@ -1,22 +1,10 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-quantitys.h"
-#include "private-quantityss.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_quantityss_adjust_
-  f_status_t f_string_quantityss_adjust(const f_number_unsigned_t length, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_quantityss_adjust(length, structure);
-  }
-#endif // _di_f_string_quantityss_adjust_
-
 #ifndef _di_f_string_quantityss_append_
   f_status_t f_string_quantityss_append(const f_string_quantitys_t source, f_string_quantityss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
@@ -25,18 +13,23 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_quantityss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_quantitys_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].used = 0;
+      f_string_quantitys_t * const destination_inner = &destination->array[destination->used];
+      destination_inner->used = 0;
 
-    if (source.used) {
-      status = private_f_string_quantitys_append_all(source, &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+      if (source.used) {
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_quantity_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].start = source.array[i].start;
+          destination_inner->array[destination_inner->used].total = source.array[i].total;
+        } // for
+      }
     }
 
     ++destination->used;
@@ -53,105 +46,74 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_quantityss_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_quantitys_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_string_quantitys_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+      f_string_quantitys_t * destination_inner = 0;
+      f_number_unsigned_t j = 0;
 
-    return F_okay;
-  }
-#endif // _di_f_string_quantityss_append_all_
-
-#ifndef _di_f_string_quantityss_decimate_by_
-  f_status_t f_string_quantityss_decimate_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-    if (!amount) return F_data_not;
+        destination_inner = &destination->array[destination->used];
+        destination_inner->used = 0;
 
-    return private_f_string_quantityss_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_quantityss_decimate_by_
+        if (source.array[i].used) {
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_quantity_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
+          if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_quantityss_decrease_by_
-  f_status_t f_string_quantityss_decrease_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
 
-    if (!amount) return F_data_not;
+            destination_inner->array[destination_inner->used].start = source.array[i].array[j].start;
+            destination_inner->array[destination_inner->used].total = source.array[i].array[j].total;
+          } // for
+        }
+      } // for
+    }
 
-    return private_f_string_quantityss_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    return F_okay;
   }
-#endif // _di_f_string_quantityss_decrease_by_
-
-#ifndef _di_f_string_quantityss_increase_
-  f_status_t f_string_quantityss_increase(const f_number_unsigned_t step, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#endif // _di_f_string_quantityss_append_all_
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+#ifndef _di_f_string_quantityss_delete_callback_
+  f_status_t f_string_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_quantitys_t * const array = (f_string_quantitys_t *) void_array;
+      f_status_t status = F_okay;
 
-        length = F_number_t_size_unsigned_d;
-      }
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      return private_f_string_quantityss_resize(length, structure);
+        if (array[i].size) {
+          status = f_memory_array_resize(0, sizeof(f_string_quantity_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_okay;
   }
-#endif // _di_f_string_quantityss_increase_
+#endif // _di_f_string_quantityss_delete_callback_
 
-#ifndef _di_f_string_quantityss_increase_by_
-  f_status_t f_string_quantityss_increase_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_string_quantityss_destroy_callback_
+  f_status_t f_string_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-      const f_number_unsigned_t length = structure->used + amount;
+    {
+      f_string_quantitys_t * const array = (f_string_quantitys_t *) void_array;
+      f_status_t status = F_okay;
 
-      if (length > structure->size) {
-        if (length > 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) {
 
-        return private_f_string_quantityss_resize(length, structure);
-      }
+        if (array[i].size) {
+          status = f_memory_array_adjust(0, sizeof(f_string_quantity_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_quantityss_increase_by_
-
-#ifndef _di_f_string_quantityss_resize_
-  f_status_t f_string_quantityss_resize(const f_number_unsigned_t length, f_string_quantityss_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_quantityss_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_quantityss_resize_
-
+#endif // _di_f_string_quantityss_destroy_callback_
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 55f574c9123b2eab8e782da861de2fafe5ac2737..7e3810ceced46555592874462bdd7508ecadfaa6 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_quantityss_t_
 
 /**
- * Resize the string quantityss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string quantityss array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantityss_adjust_
-  extern f_status_t f_string_quantityss_adjust(const f_number_unsigned_t length, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_adjust_
-
-/**
  * Append the single source quantitys onto the destination.
  *
  * @param source
@@ -103,120 +84,60 @@ extern "C" {
 #endif // _di_f_string_quantityss_append_all_
 
 /**
- * Resize the string quantityss array to a smaller size.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_quantityss_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 structure
- *   The string quantityss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_quantityss_decimate_by_
-  extern f_status_t f_string_quantityss_decimate_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_decimate_by_
-
-/**
- * Resize the string quantityss 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 structure
- *   The string quantityss 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantityss_decrease_by_
-  extern f_status_t f_string_quantityss_decrease_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_decrease_by_
-
-/**
- * Increase the size of the string quantityss 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 structure
- *   The string quantityss array to resize.
- *
- * @return
- *   F_okay 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_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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_quantityss_increase_
-  extern f_status_t f_string_quantityss_increase(const f_number_unsigned_t step, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_increase_
+#ifndef _di_f_string_quantityss_delete_callback_
+  extern f_status_t f_string_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_quantityss_delete_callback_
 
 /**
- * Resize the string quantityss array to a larger size.
+ * A callback intended to be passed to f_memory_arrayss_adjust() for an f_string_quantityss_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 structure
- *   The string quantityss array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantityss_increase_by_
-  extern f_status_t f_string_quantityss_increase_by(const f_number_unsigned_t amount, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_increase_by_
-
-/**
- * Resize the string quantityss array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string quantityss 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_quantityss_resize_
-  extern f_status_t f_string_quantityss_resize(const f_number_unsigned_t length, f_string_quantityss_t * const structure);
-#endif // _di_f_string_quantityss_resize_
+#ifndef _di_f_string_quantityss_destroy_callback_
+  extern f_status_t f_string_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_quantityss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 9763e26dff2510b0a4a4ee08a5a654505e3a84fc..37d48a14bf325e26325921e72f0cf0b3b0d8f282 100644 (file)
@@ -1,6 +1,5 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-ranges.h"
 
 #ifdef __cplusplus
 extern "C" {
index 875740e44ab3cc044f84483f1b34550f7fb887d2..38f9fef7d69416710c161097269be5f2a1fdc924 100644 (file)
@@ -1,21 +1,10 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-ranges.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_ranges_adjust_
-  f_status_t f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_adjust(length, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_adjust_
-
 #ifndef _di_f_string_ranges_append_
   f_status_t f_string_ranges_append(const f_string_range_t source, f_string_ranges_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
@@ -57,58 +46,6 @@ extern "C" {
   }
 #endif // _di_f_string_ranges_append_all_
 
-#ifndef _di_f_string_ranges_decimate_by_
-  f_status_t f_string_ranges_decimate_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) return F_data_not;
-
-    return f_memory_array_decimate_by(amount, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_decimate_by_
-
-#ifndef _di_f_string_ranges_decrease_by_
-  f_status_t f_string_ranges_decrease_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_decrease_by(amount, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_decrease_by_
-
-#ifndef _di_f_string_ranges_increase_
-  f_status_t f_string_ranges_increase(const f_number_unsigned_t step, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_increase(step, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_increase_
-
-#ifndef _di_f_string_ranges_increase_by_
-  f_status_t f_string_ranges_increase_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_increase_by(amount, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_increase_by_
-
-#ifndef _di_f_string_ranges_resize_
-  f_status_t f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // _di_f_string_ranges_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 31aec5fa79b866ada40759c5c75143e06937f001..65ccfcc92f718852fe432cfb24084324a9e0c93b 100644 (file)
@@ -44,24 +44,6 @@ extern "C" {
 #endif // _di_f_string_ranges_t_
 
 /**
- * Resize the string ranges array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string ranges array to resize.
- *
- * @return
- *   F_okay 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_string_ranges_adjust_
-  extern f_status_t f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_adjust_
-
-/**
  * Append the single source range onto the destination.
  *
  * @param source
@@ -101,123 +83,6 @@ extern "C" {
   extern f_status_t f_string_ranges_append_all(const f_string_ranges_t source, f_string_ranges_t * const destination);
 #endif // _di_f_string_ranges_append_all_
 
-/**
- * Resize the string 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 less than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param structure
- *   The string ranges array to resize.
- *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_ranges_decimate_by_
-  extern f_status_t f_string_ranges_decimate_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_decimate_by_
-
-/**
- * Resize the string 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 less than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param structure
- *   The string ranges array to resize.
- *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_ranges_decrease_by_
-  extern f_status_t f_string_ranges_decrease_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_decrease_by_
-
-/**
- * Increase the size of the string ranges 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 structure
- *   The string ranges array to resize.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * @return
- *   F_okay on success.
- *   F_array_too_large (with error bit) if the new array length is too large.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_ranges_increase_
-  extern f_status_t f_string_ranges_increase(const f_number_unsigned_t step, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_increase_
-
-/**
- * Resize the string 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 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 structure
- *   The string ranges array to resize.
- *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_ranges_increase_by_
-  extern f_status_t f_string_ranges_increase_by(const f_number_unsigned_t amount, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_increase_by_
-
-/**
- * Resize the string ranges array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string ranges array to adjust.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_ranges_resize_
-  extern f_status_t f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
-#endif // _di_f_string_ranges_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7f0a8fef0bfd298b49b001f1b1cfaf4b42ca1936..0f1ff8f6e6d46d866987f019eebba1fef6d084ca 100644 (file)
@@ -1,22 +1,10 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-ranges.h"
-#include "private-rangess.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_rangess_adjust_
-  f_status_t f_string_rangess_adjust(const f_number_unsigned_t length, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_rangess_adjust(length, structure);
-  }
-#endif // _di_f_string_rangess_adjust_
-
 #ifndef _di_f_string_rangess_append_
   f_status_t f_string_rangess_append(const f_string_ranges_t source, f_string_rangess_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
@@ -25,18 +13,23 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_rangess_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_ranges_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].used = 0;
+      f_string_ranges_t * const destination_inner = &destination->array[destination->used];
+      destination_inner->used = 0;
 
-    if (source.used) {
-      status = private_f_string_ranges_append_all(source, &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+      if (source.used) {
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_range_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].start = source.array[i].start;
+          destination_inner->array[destination_inner->used].stop = source.array[i].stop;
+        } // for
+      }
     }
 
     ++destination->used;
@@ -53,104 +46,74 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_rangess_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_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) {
+      f_string_ranges_t * destination_inner = 0;
+      f_number_unsigned_t j = 0;
 
-      destination->array[destination->used].used = 0;
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      if (source.array[i].used) {
-        status = private_f_string_ranges_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+        destination_inner = &destination->array[destination->used];
+        destination_inner->used = 0;
 
-    return F_okay;
-  }
-#endif // _di_f_string_rangess_append_all_
+        if (source.array[i].used) {
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_range_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
+          if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_rangess_decimate_by_
-  f_status_t f_string_rangess_decimate_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
 
-    if (!amount) return F_data_not;
-
-    return private_f_string_rangess_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_rangess_decimate_by_
-
-#ifndef _di_f_string_rangess_decrease_by_
-  f_status_t f_string_rangess_decrease_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) return F_data_not;
+            destination_inner->array[destination_inner->used].start = source.array[i].array[j].start;
+            destination_inner->array[destination_inner->used].stop = source.array[i].array[j].stop;
+          } // for
+        }
+      } // for
+    }
 
-    return private_f_string_rangess_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    return F_okay;
   }
-#endif // _di_f_string_rangess_decrease_by_
-
-#ifndef _di_f_string_rangess_increase_
-  f_status_t f_string_rangess_increase(const f_number_unsigned_t step, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#endif // _di_f_string_rangess_append_all_
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+#ifndef _di_f_string_rangess_delete_callback_
+  f_status_t f_string_rangess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_ranges_t * const array = (f_string_ranges_t *) void_array;
+      f_status_t status = F_okay;
 
-        length = F_number_t_size_unsigned_d;
-      }
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      return private_f_string_rangess_resize(length, structure);
+        if (array[i].size) {
+          status = f_memory_array_resize(0, sizeof(f_string_range_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_okay;
   }
-#endif // _di_f_string_rangess_increase_
-
-#ifndef _di_f_string_rangess_increase_by_
-  f_status_t f_string_rangess_increase_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#endif // _di_f_string_rangess_delete_callback_
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_string_rangess_destroy_callback_
+  f_status_t f_string_rangess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-      const f_number_unsigned_t length = structure->used + amount;
+    {
+      f_string_ranges_t * const array = (f_string_ranges_t *) void_array;
+      f_status_t status = F_okay;
 
-      if (length > structure->size) {
-        if (length > 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) {
 
-        return private_f_string_rangess_resize(length, structure);
-      }
+        if (array[i].size) {
+          status = f_memory_array_adjust(0, sizeof(f_string_range_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_rangess_increase_by_
-
-#ifndef _di_f_string_rangess_resize_
-  f_status_t f_string_rangess_resize(const f_number_unsigned_t length, f_string_rangess_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_rangess_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_rangess_resize_
+#endif // _di_f_string_rangess_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 5c30bf932df78c05d4fa0be364549ba38d104e5e..5de97e1976539c3842393dd106e045ded813414e 100644 (file)
@@ -44,25 +44,6 @@ extern "C" {
 #endif // _di_f_string_rangess_t_
 
 /**
- * Resize the string rangess array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string rangess array to resize.
- *
- * @return
- *   F_okay on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_rangess_adjust_
-  extern f_status_t f_string_rangess_adjust(const f_number_unsigned_t length, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_adjust_
-
-/**
  * Append the single source ranges onto the destination.
  *
  * @param source
@@ -103,121 +84,60 @@ extern "C" {
 #endif // _di_f_string_rangess_append_all_
 
 /**
- * Resize the string rangess array to a smaller size.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_rangess_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 structure
- *   The string rangess array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay 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_memory_resize().
- */
-#ifndef _di_f_string_rangess_decimate_by_
-  extern f_status_t f_string_rangess_decimate_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_decimate_by_
-
-/**
- * Resize the string 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 structure
- *   The string rangess 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_okay 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_memory_resize().
- */
-#ifndef _di_f_string_rangess_decrease_by_
-  extern f_status_t f_string_rangess_decrease_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_decrease_by_
-
-/**
- * Increase the size of the string rangess 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 structure
- *   The string rangess array to resize.
- *
- * @return
- *   F_okay 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_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_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_rangess_increase_
-  extern f_status_t f_string_rangess_increase(const f_number_unsigned_t step, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_increase_
+#ifndef _di_f_string_rangess_delete_callback_
+  extern f_status_t f_string_rangess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_rangess_delete_callback_
 
 /**
- * Resize the string rangess array to a larger size.
+ * A callback intended to be passed to f_memory_arrayss_adjust() for an f_string_rangess_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 structure
- *   The string rangess array to resize.
+ * This does not do parameter checking.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_rangess_increase_by_
-  extern f_status_t f_string_rangess_increase_by(const f_number_unsigned_t amount, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_increase_by_
-
-/**
- * Resize the string rangess array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string rangess 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_rangess_resize_
-  extern f_status_t f_string_rangess_resize(const f_number_unsigned_t length, f_string_rangess_t * const structure);
-#endif // _di_f_string_rangess_resize_
+#ifndef _di_f_string_rangess_destroy_callback_
+  extern f_status_t f_string_rangess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_rangess_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 9159d31651ea84cd47e4e0592dd405000a8be8cc..3b17dbc874b52115064795f4c9f1efe6b89eff4a 100644 (file)
@@ -1,51 +1,38 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-triples.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_triples_adjust_
-  f_status_t f_string_triples_adjust(const f_number_unsigned_t length, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_triples_adjust(length, structure);
-  }
-#endif // _di_f_string_triples_adjust_
-
 #ifndef _di_f_string_triples_append_
   f_status_t f_string_triples_append(const f_string_triple_t source, f_string_triples_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_triples_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_triple_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].a.used = 0;
-    destination->array[destination->used].b.used = 0;
-    destination->array[destination->used].c.used = 0;
+      destination->array[destination->used].a.used = 0;
+      destination->array[destination->used].b.used = 0;
+      destination->array[destination->used].c.used = 0;
 
-    if (source.a.used) {
-      status = private_f_string_append(source.a.string, source.a.used, &destination->array[destination->used].a);
-      if (F_status_is_error(status)) return status;
-    }
+      if (source.a.used) {
+        status = private_f_string_append(source.a.string, source.a.used, &destination->array[destination->used].a);
+        if (F_status_is_error(status)) return status;
+      }
 
-    if (source.b.used) {
-      status = private_f_string_append(source.b.string, source.b.used, &destination->array[destination->used].b);
-      if (F_status_is_error(status)) return status;
-    }
+      if (source.b.used) {
+        status = private_f_string_append(source.b.string, source.b.used, &destination->array[destination->used].b);
+        if (F_status_is_error(status)) return status;
+      }
 
-    if (source.c.used) {
-      status = private_f_string_append(source.c.string, source.c.used, &destination->array[destination->used].c);
-      if (F_status_is_error(status)) return status;
+      if (source.c.used) {
+        status = private_f_string_append(source.c.string, source.c.used, &destination->array[destination->used].c);
+        if (F_status_is_error(status)) return status;
+      }
     }
 
     ++destination->used;
@@ -62,116 +49,96 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_triples_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_triple_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) {
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      destination->array[destination->used].a.used = 0;
-      destination->array[destination->used].b.used = 0;
-      destination->array[destination->used].c.used = 0;
+        destination->array[destination->used].a.used = 0;
+        destination->array[destination->used].b.used = 0;
+        destination->array[destination->used].c.used = 0;
 
-      if (source.array[i].a.used) {
-        status = private_f_string_append(source.array[i].a.string, source.array[i].a.used, &destination->array[destination->used].a);
-        if (F_status_is_error(status)) return status;
-      }
+        if (source.array[i].a.used) {
+          status = private_f_string_append(source.array[i].a.string, source.array[i].a.used, &destination->array[destination->used].a);
+          if (F_status_is_error(status)) return status;
+        }
 
-      if (source.array[i].b.used) {
-        status = private_f_string_append(source.array[i].b.string, source.array[i].b.used, &destination->array[destination->used].b);
-        if (F_status_is_error(status)) return status;
-      }
+        if (source.array[i].b.used) {
+          status = private_f_string_append(source.array[i].b.string, source.array[i].b.used, &destination->array[destination->used].b);
+          if (F_status_is_error(status)) return status;
+        }
 
-      if (source.array[i].c.used) {
-        status = private_f_string_append(source.array[i].c.string, source.array[i].c.used, &destination->array[destination->used].c);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+        if (source.array[i].c.used) {
+          status = private_f_string_append(source.array[i].c.string, source.array[i].c.used, &destination->array[destination->used].c);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
     return F_okay;
   }
 #endif // _di_f_string_triples_append_all_
 
-#ifndef _di_f_string_triples_decimate_by_
-  f_status_t f_string_triples_decimate_by(const f_number_unsigned_t amount, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_triples_delete_callback_
+  f_status_t f_string_triples_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_string_triple_t * const array = (f_string_triple_t *) void_array;
+      f_status_t status = F_okay;
 
-    return private_f_string_triples_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_triples_decimate_by_
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-#ifndef _di_f_string_triples_decrease_by_
-  f_status_t f_string_triples_decrease_by(const f_number_unsigned_t amount, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) return F_data_not;
-
-    return private_f_string_triples_resize((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_triples_decrease_by_
-
-#ifndef _di_f_string_triples_increase_
-  f_status_t f_string_triples_increase(const f_number_unsigned_t step, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+        if (array[i].a.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].a.string, &array[i].a.used, &array[i].a.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + F_memory_default_allocation_small_d;
+        if (array[i].b.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].b.string, &array[i].b.used, &array[i].b.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
-        length = F_number_t_size_unsigned_d;
-      }
-
-      return private_f_string_triples_resize(length, structure);
+        if (array[i].c.size) {
+          status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].c.string, &array[i].c.used, &array[i].c.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
     }
 
-    return F_data_not;
+    return F_okay;
   }
-#endif // _di_f_string_triples_increase_
-
-#ifndef _di_f_string_triples_increase_by_
-  f_status_t f_string_triples_increase_by(const f_number_unsigned_t amount, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#endif // _di_f_string_triples_delete_callback_
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_string_triples_destroy_callback_
+  f_status_t f_string_triples_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-      const f_number_unsigned_t length = structure->used + amount;
+    {
+      f_string_triple_t * const array = (f_string_triple_t *) void_array;
+      f_status_t status = F_okay;
 
-      if (length > structure->size) {
-        if (length > 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) {
 
-        return private_f_string_triples_resize(length, structure);
-      }
-    }
+        if (array[i].a.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].a.string, &array[i].a.used, &array[i].a.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_triples_increase_by_
+        if (array[i].b.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].b.string, &array[i].b.used, &array[i].b.size);
+          if (F_status_is_error(status)) return status;
+        }
 
-#ifndef _di_f_string_triples_resize_
-  f_status_t f_string_triples_resize(const f_number_unsigned_t length, f_string_triples_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+        if (array[i].c.size) {
+          status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].c.string, &array[i].c.used, &array[i].c.size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
 
-    return private_f_string_triples_resize(length, structure);
+    return F_okay;
   }
-#endif // _di_f_string_triples_resize_
+#endif // _di_f_string_triples_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 5ec7e2c0fbd6b6a4c80821c80c6c739da7e55916..e3948c2fa0932e5a0e3d1ae4444b781d3d5208df 100644 (file)
@@ -44,24 +44,6 @@ extern "C" {
 #endif // _di_f_string_triples_t_
 
 /**
- * Resize the string triples array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string triples array to resize.
- *
- * @return
- *   F_okay 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_string_triples_adjust_
-  extern f_status_t f_string_triples_adjust(const f_number_unsigned_t length, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_adjust_
-
-/**
  * Append the single source triples onto the destination.
  *
  * @param source
@@ -104,121 +86,60 @@ extern "C" {
 #endif // _di_f_string_triples_append_all_
 
 /**
- * Resize the string triples 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 structure
- *   The string triples array to resize.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_string_triples_t structure.
  *
- * @return
- *   F_okay on success.
- *   F_data_not if amount is 0.
+ * This is only called when shrinking the array and generally should perform deallocations.
  *
- *   F_parameter (with error bit) if a parameter is invalid.
+ * This does not do parameter checking.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_triples_decimate_by_
-  extern f_status_t f_string_triples_decimate_by(const f_number_unsigned_t amount, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_decimate_by_
-
-/**
- * Resize the string triples 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 structure
- *   The string triples 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_okay 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_memory_resize().
- */
-#ifndef _di_f_string_triples_decrease_by_
-  extern f_status_t f_string_triples_decrease_by(const f_number_unsigned_t amount, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_decrease_by_
-
-/**
- * Increase the size of the string triples 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.
+ *   Errors (with error bit) from: f_memory_array_resize().
  *
- * @param step
- *   The allocation step to use.
- *   Must be greater than 0.
- * @param structure
- *   The string triples array to resize.
- *
- * @return
- *   F_okay 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_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_triples_increase_
-  extern f_status_t f_string_triples_increase(const f_number_unsigned_t step, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_increase_
+#ifndef _di_f_string_triples_delete_callback_
+  extern f_status_t f_string_triples_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_triples_delete_callback_
 
 /**
- * Resize the string triples 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_string_triples_t structure.
  *
- * @param amount
- *   A positive number representing how much to increase the size by.
- * @param structure
- *   The string triples array to resize.
+ * This is only called when shrinking the array and generally should perform deallocations.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ * This does not do parameter checking.
  *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_triples_increase_by_
-  extern f_status_t f_string_triples_increase_by(const f_number_unsigned_t amount, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_increase_by_
-
-/**
- * Resize the string triples array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string triples 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_triples_resize_
-  extern f_status_t f_string_triples_resize(const f_number_unsigned_t length, f_string_triples_t * const structure);
-#endif // _di_f_string_triples_resize_
+#ifndef _di_f_string_triples_destroy_callback_
+  extern f_status_t f_string_triples_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_triples_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index 8f2c9b5031a32c7c8f0a864a84e0cdca53ae7ece..e46d130bf4bef800f7c64792e2919caed43c81c7 100644 (file)
@@ -1,7 +1,5 @@
 #include "../string.h"
 #include "../private-string.h"
-#include "private-triples.h"
-#include "private-tripless.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -15,18 +13,39 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_tripless_resize(destination->used + F_memory_default_allocation_small_d, destination);
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_ranges_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
-    }
 
-    destination->array[destination->used].used = 0;
+      f_string_triples_t * const destination_inner = &destination->array[destination->used];
+      destination_inner->used = 0;
 
-    if (source.used) {
-      status = private_f_string_triples_append_all(source, &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+      if (source.used) {
+        status = f_memory_array_increase_by(source.used, sizeof(f_string_triple_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        if (F_status_is_error(status)) return status;
+
+        for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
+
+          destination_inner->array[destination_inner->used].a.used = 0;
+          destination_inner->array[destination_inner->used].b.used = 0;
+          destination_inner->array[destination_inner->used].c.used = 0;
+
+          if (source.array[i].a.used) {
+            status = private_f_string_append(source.array[i].a.string, source.array[i].a.used, &destination_inner->array[destination_inner->used].a);
+            if (F_status_is_error(status)) return status;
+          }
+
+          if (source.array[i].b.used) {
+            status = private_f_string_append(source.array[i].b.string, source.array[i].b.used, &destination_inner->array[destination_inner->used].b);
+            if (F_status_is_error(status)) return status;
+          }
+
+          if (source.array[i].c.used) {
+            status = private_f_string_append(source.array[i].c.string, source.array[i].c.used, &destination_inner->array[destination_inner->used].c);
+            if (F_status_is_error(status)) return status;
+          }
+        } // for
+      }
     }
 
     ++destination->used;
@@ -43,114 +62,128 @@ extern "C" {
 
     if (!source.used) return F_data_not;
 
-    f_status_t status = F_okay;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_tripless_resize(destination->used + source.used, destination);
+    {
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_triples_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) {
+      f_string_triples_t * destination_inner = 0;
+      f_number_unsigned_t j = 0;
 
-      destination->array[destination->used].used = 0;
+      for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      if (source.array[i].used) {
-        status = private_f_string_triples_append_all(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
+        destination_inner = &destination->array[destination->used];
+        destination_inner->used = 0;
 
-    return F_okay;
-  }
-#endif // _di_f_string_tripless_append_all_
+        if (source.array[i].used) {
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_triple_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+          if (F_status_is_error(status)) return status;
 
-#ifndef _di_f_string_tripless_adjust_
-  f_status_t f_string_tripless_adjust(const f_number_unsigned_t length, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+          for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
 
-    return private_f_string_tripless_adjust(length, structure);
-  }
-#endif // _di_f_string_tripless_adjust_
+            destination_inner->array[destination_inner->used].a.used = 0;
+            destination_inner->array[destination_inner->used].b.used = 0;
+            destination_inner->array[destination_inner->used].c.used = 0;
 
-#ifndef _di_f_string_tripless_decimate_by_
-  f_status_t f_string_tripless_decimate_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+            if (source.array[i].array[j].a.used) {
+              status = private_f_string_append(source.array[i].array[j].a.string, source.array[i].array[j].a.used, &destination_inner->array[destination_inner->used].a);
+              if (F_status_is_error(status)) return status;
+            }
 
-    if (!amount) return F_data_not;
+            if (source.array[i].array[j].b.used) {
+              status = private_f_string_append(source.array[i].array[j].b.string, source.array[i].array[j].b.used, &destination_inner->array[destination_inner->used].b);
+              if (F_status_is_error(status)) return status;
+            }
 
-    return private_f_string_tripless_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
+            if (source.array[i].array[j].c.used) {
+              status = private_f_string_append(source.array[i].array[j].c.string, source.array[i].array[j].c.used, &destination_inner->array[destination_inner->used].c);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
+        }
+      } // for
+    }
+
+    return F_okay;
   }
-#endif // _di_f_string_tripless_decimate_by_
+#endif // _di_f_string_tripless_append_all_
 
-#ifndef _di_f_string_tripless_decrease_by_
-  f_status_t f_string_tripless_decrease_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_tripless_delete_callback_
+  f_status_t f_string_tripless_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_string_triples_t * const array = (f_string_triples_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-    return private_f_string_tripless_resize((structure->size > amount) ? structure->size - amount : 0, structure);
-  }
-#endif // _di_f_string_tripless_decrease_by_
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-#ifndef _di_f_string_tripless_increase_
-  f_status_t f_string_tripless_increase(const f_number_unsigned_t step, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+        if (array[i].size) {
+          for (j = 0; j < array[i].size; ++j) {
 
-    if (step && structure->used + 1 > structure->size) {
-      f_number_unsigned_t length = structure->used + step;
+            if (array[i].array[j].a.size) {
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].a.string, &array[i].array[j].a.used, &array[i].array[j].a.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-      if (length > F_number_t_size_unsigned_d) {
-        if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+            if (array[i].array[j].b.size) {
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].b.string, &array[i].array[j].b.used, &array[i].array[j].b.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-        length = F_number_t_size_unsigned_d;
-      }
+            if (array[i].array[j].c.size) {
+              status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &array[i].array[j].c.string, &array[i].array[j].c.used, &array[i].array[j].c.size);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
 
-      return private_f_string_tripless_resize(length, structure);
+          status = f_memory_array_resize(0, sizeof(f_string_triple_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_okay;
   }
-#endif // _di_f_string_tripless_increase_
+#endif // _di_f_string_tripless_delete_callback_
 
-#ifndef _di_f_string_tripless_increase_by_
-  f_status_t f_string_tripless_increase_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_string_tripless_destroy_callback_
+  f_status_t f_string_tripless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
-    if (amount) {
-      if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+    {
+      f_string_triples_t * const array = (f_string_triples_t *) void_array;
+      f_status_t status = F_okay;
+      f_number_unsigned_t j = 0;
 
-      const f_number_unsigned_t length = structure->used + amount;
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
 
-      if (length > structure->size) {
-        if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+        if (array[i].size) {
+          for (j = 0; j < array[i].size; ++j) {
 
-        return private_f_string_tripless_resize(length, structure);
-      }
-    }
+            if (array[i].array[j].a.size) {
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].a.string, &array[i].array[j].a.used, &array[i].array[j].a.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-    return F_data_not;
-  }
-#endif // _di_f_string_tripless_increase_by_
+            if (array[i].array[j].b.size) {
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].b.string, &array[i].array[j].b.used, &array[i].array[j].b.size);
+              if (F_status_is_error(status)) return status;
+            }
 
-#ifndef _di_f_string_tripless_resize_
-  f_status_t f_string_tripless_resize(const f_number_unsigned_t length, f_string_tripless_t * const structure) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!structure) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
+            if (array[i].array[j].c.size) {
+              status = f_memory_array_adjust(0, sizeof(f_char_t), (void **) &array[i].array[j].c.string, &array[i].array[j].c.used, &array[i].array[j].c.size);
+              if (F_status_is_error(status)) return status;
+            }
+          } // for
 
-    return private_f_string_tripless_resize(length, structure);
+          status = f_memory_array_adjust(0, sizeof(f_string_triple_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
   }
-#endif // _di_f_string_tripless_resize_
+#endif // _di_f_string_tripless_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index d4f4ae112dede0a83fa3e6477308e0adbaf33d2b..0d7c5aaa28fa151f384859a9d222fadc0af03159 100644 (file)
@@ -44,24 +44,6 @@ extern "C" {
 #endif // _di_f_string_tripless_t_
 
 /**
- * Resize the string tripless array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string tripless array to resize.
- *
- * @return
- *   F_okay 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_string_tripless_adjust_
-  extern f_status_t f_string_tripless_adjust(const f_number_unsigned_t length, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_adjust_
-
-/**
  * Append the single source triples onto the destination.
  *
  * @param source
@@ -104,121 +86,60 @@ extern "C" {
 #endif // _di_f_string_tripless_append_all_
 
 /**
- * Resize the string tripless 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 structure
- *   The string tripless array to resize.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_tripless_t structure.
  *
- * @return
- *   F_okay on success.
- *   F_data_not if amount is 0.
+ * This is only called when shrinking the array and generally should perform deallocations.
  *
- *   F_parameter (with error bit) if a parameter is invalid.
+ * This does not do parameter checking.
  *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_tripless_decimate_by_
-  extern f_status_t f_string_tripless_decimate_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_decimate_by_
-
-/**
- * Resize the string tripless 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 structure
- *   The string tripless 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_okay 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_memory_resize().
- */
-#ifndef _di_f_string_tripless_decrease_by_
-  extern f_status_t f_string_tripless_decrease_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_decrease_by_
-
-/**
- * Increase the size of the string tripless 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.
+ *   Errors (with error bit) from: f_memory_array_resize().
  *
- * @param step
- *   The allocation step to use.
- *   Must be greater than 0.
- * @param structure
- *   The string tripless array to resize.
- *
- * @return
- *   F_okay 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_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
+ * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_tripless_increase_
-  extern f_status_t f_string_tripless_increase(const f_number_unsigned_t step, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_increase_
+#ifndef _di_f_string_tripless_delete_callback_
+  extern f_status_t f_string_tripless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_tripless_delete_callback_
 
 /**
- * Resize the string tripless 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_arrayss_adjust() for an f_string_tripless_t structure.
  *
- * @param amount
- *   A positive number representing how much to increase the size by.
- * @param structure
- *   The string tripless array to resize.
+ * This is only called when shrinking the array and generally should perform deallocations.
  *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ * This does not do parameter checking.
  *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_tripless_increase_by_
-  extern f_status_t f_string_tripless_increase_by(const f_number_unsigned_t amount, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_increase_by_
-
-/**
- * Resize the string tripless array.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The string tripless 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_okay on success.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_tripless_resize_
-  extern f_status_t f_string_tripless_resize(const f_number_unsigned_t length, f_string_tripless_t * const structure);
-#endif // _di_f_string_tripless_resize_
+#ifndef _di_f_string_tripless_destroy_callback_
+  extern f_status_t f_string_tripless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_string_tripless_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
index e80e4a74f47cab33814194b539fcdf9afedd3811..e7c69c141b3fc7b0b0ace00cdf64bd2889b50b6a 100644 (file)
@@ -34,12 +34,6 @@ build_libraries-individual -lf_memory
 
 build_sources_library string.c
 build_sources_library private-string.c string/common.c
-build_sources_library string/private-dynamics.c
-build_sources_library string/private-maps.c string/private-mapss.c
-build_sources_library string/private-map_multis.c string/private-map_multiss.c
-build_sources_library string/private-quantitys.c string/private-quantityss.c
-build_sources_library string/private-ranges.c string/private-rangess.c
-build_sources_library string/private-triples.c string/private-tripless.c
 build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
 build_sources_library string/map.c string/maps.c string/mapss.c
 build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
diff --git a/level_0/f_string/data/build/settings-mocks b/level_0/f_string/data/build/settings-mocks
new file mode 100644 (file)
index 0000000..9f7f236
--- /dev/null
@@ -0,0 +1,71 @@
+# fss-0001
+
+build_name f_string
+
+version_major 0
+version_minor 7
+version_micro 0
+version_file micro
+version_target minor
+
+modes individual clang test coverage
+modes_default individual test
+
+build_compiler gcc
+build_compiler-clang clang
+build_indexer ar
+build_indexer_arguments rcs
+build_language c
+
+build_libraries -lc
+build_libraries-individual -lf_memory
+
+build_sources_library string.c
+build_sources_library private-string.c string/common.c
+build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
+build_sources_library string/map.c string/maps.c string/mapss.c
+build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
+build_sources_library string/quantity.c string/quantitys.c string/quantityss.c
+build_sources_library string/range.c string/ranges.c string/rangess.c
+build_sources_library string/static.c string/statics.c string/staticss.c
+build_sources_library string/triple.c string/triples.c string/tripless.c
+build_sources_library ../../tests/unit/c/mock-string.c
+
+build_sources_headers string.h string/common.h
+build_sources_headers string/dynamic.h string/dynamics.h string/dynamicss.h
+build_sources_headers string/map.h string/maps.h string/mapss.h
+build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss.h
+build_sources_headers string/quantity.h string/quantitys.h string/quantityss.h
+build_sources_headers string/range.h string/ranges.h string/rangess.h
+build_sources_headers string/static.h string/statics.h string/staticss.h
+build_sources_headers string/triple.h string/triples.h string/tripless.h
+
+build_script yes
+build_shared yes
+build_static no
+
+path_headers fll/level_0
+path_library_script script
+path_library_shared shared
+path_library_static static
+
+has_path_standard yes
+preserve_path_headers yes
+
+search_exclusive yes
+search_shared yes
+search_static yes
+
+environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
+
+flags -O0 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-clang -Wno-logical-op-parentheses
+flags-test -fstack-protector -Wall
+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
index 3d6574f7cd52d745882678e8e8f43261649e6034..13885d5d8c8b2237426f606857c4f762f9abf7bf 100644 (file)
@@ -37,15 +37,24 @@ build_sources_program test-string-dynamic_prepend.c test-string-dynamic_prepend_
 build_sources_program test-string-dynamic_seek_line.c test-string-dynamic_seek_line_to.c test-string-dynamic_seek_to.c
 build_sources_program test-string-dynamic_terminate.c test-string-dynamic_terminate_after.c
 build_sources_program test-string-dynamics_append.c test-string-dynamics_append_all.c test-string-dynamicss_append.c test-string-dynamicss_append_all.c
-build_sources_program test-string-map_multis_adjust.c test-string-map_multis_append.c test-string-map_multis_append_all.c test-string-map_multis_decimate_by.c test-string-map_multis_decrease_by.c test-string-map_multis_increase.c test-string-map_multis_increase_by.c test-string-map_multis_resize.c test-string-map_multiss_adjust.c test-string-map_multiss_append.c test-string-map_multiss_append_all.c test-string-map_multiss_decimate_by.c test-string-map_multiss_decrease_by.c test-string-map_multiss_increase.c test-string-map_multiss_increase_by.c test-string-map_multiss_resize.c
-build_sources_program test-string-maps_adjust.c test-string-maps_append.c test-string-maps_append_all.c test-string-maps_decimate_by.c test-string-maps_decrease_by.c test-string-maps_increase.c test-string-maps_increase_by.c test-string-maps_resize.c test-string-mapss_adjust.c test-string-mapss_append.c test-string-mapss_append_all.c test-string-mapss_decimate_by.c test-string-mapss_decrease_by.c test-string-mapss_increase.c test-string-mapss_increase_by.c test-string-mapss_resize.c
+build_sources_program test-string-dynamicss_delete_callback.c test-string-dynamicss_destroy_callback.c
+build_sources_program test-string-map_multis_append.c test-string-map_multis_append_all.c test-string-map_multiss_append.c test-string-map_multiss_append_all.c
+build_sources_program test-string-map_multis_delete_callback.c test-string-map_multis_destroy_callback.c
+build_sources_program test-string-map_multiss_delete_callback.c test-string-map_multiss_destroy_callback.c
+build_sources_program test-string-maps_append.c test-string-maps_append_all.c test-string-mapss_append.c test-string-mapss_append_all.c
+build_sources_program test-string-maps_delete_callback.c test-string-maps_destroy_callback.c
+build_sources_program test-string-mapss_delete_callback.c test-string-mapss_destroy_callback.c
 build_sources_program test-string-mash.c test-string-mash_nulless.c
 build_sources_program test-string-mish.c test-string-mish_nulless.c
 build_sources_program test-string-prepend.c test-string-prepend_assure.c test-string-prepend_assure_nulless.c test-string-prepend_nulless.c
-build_sources_program test-string-quantitys_adjust.c test-string-quantitys_append.c test-string-quantitys_append_all.c test-string-quantitys_decimate_by.c test-string-quantitys_decrease_by.c test-string-quantitys_increase.c test-string-quantitys_increase_by.c test-string-quantitys_resize.c test-string-quantityss_adjust.c test-string-quantityss_append.c test-string-quantityss_append_all.c test-string-quantityss_decimate_by.c test-string-quantityss_decrease_by.c test-string-quantityss_increase.c test-string-quantityss_increase_by.c test-string-quantityss_resize.c
-build_sources_program test-string-ranges_adjust.c test-string-ranges_append.c test-string-ranges_append_all.c test-string-ranges_decimate_by.c test-string-ranges_decrease_by.c test-string-ranges_increase.c test-string-ranges_increase_by.c test-string-ranges_resize.c test-string-rangess_adjust.c test-string-rangess_append.c test-string-rangess_append_all.c test-string-rangess_decimate_by.c test-string-rangess_decrease_by.c test-string-rangess_increase.c test-string-rangess_increase_by.c test-string-rangess_resize.c
+build_sources_program test-string-quantitys_append.c test-string-quantitys_append_all.c test-string-quantityss_append.c test-string-quantityss_append_all.c
+build_sources_program test-string-quantityss_delete_callback.c test-string-quantityss_destroy_callback.c
+build_sources_program test-string-ranges_append.c test-string-ranges_append_all.c test-string-rangess_append.c test-string-rangess_append_all.c
+build_sources_program test-string-rangess_delete_callback.c test-string-rangess_destroy_callback.c
 build_sources_program test-string-seek_line.c test-string-seek_line_to.c test-string-seek_to.c
-build_sources_program test-string-triples_adjust.c test-string-triples_append.c test-string-triples_append_all.c test-string-triples_decimate_by.c test-string-triples_decrease_by.c test-string-triples_increase.c test-string-triples_increase_by.c test-string-triples_resize.c test-string-tripless_adjust.c test-string-tripless_append.c test-string-tripless_append_all.c test-string-tripless_decimate_by.c test-string-tripless_decrease_by.c test-string-tripless_increase.c test-string-tripless_increase_by.c test-string-tripless_resize.c
+build_sources_program test-string-triples_append.c test-string-triples_append_all.c test-string-tripless_append.c test-string-tripless_append_all.c
+build_sources_program test-string-triples_delete_callback.c test-string-triples_destroy_callback.c
+build_sources_program test-string-tripless_delete_callback.c test-string-tripless_destroy_callback.c
 build_sources_program test-string.c
 
 build_script no
index 6b6a307fc81a36065a737b247d01306a04948988..a8d02389512859fe37665ff38c0da6beb6bcdcf5 100644 (file)
@@ -18,7 +18,7 @@ settings:
   #define CMOCKA_XML_FILE ./out.xml
 
 main:
-  build settings individual test
+  build settings-mocks individual test
   build settings-tests individual test
 
   operate build_path
diff --git a/level_0/f_string/tests/unit/c/mock-string.c b/level_0/f_string/tests/unit/c/mock-string.c
new file mode 100644 (file)
index 0000000..288785d
--- /dev/null
@@ -0,0 +1,46 @@
+#include "mock-string.h"
+
+#ifdef __cplusplus
+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);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/mock-string.h b/level_0/f_string/tests/unit/c/mock-string.h
new file mode 100644 (file)
index 0000000..cb748dc
--- /dev/null
@@ -0,0 +1,44 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the string project.
+ */
+#ifndef _MOCK__string_h
+#define _MOCK__string_h
+
+// Libc includes.
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <stdint.h>
+
+// cmocka includes.
+#include <cmocka.h>
+
+// FLL-0 includes.
+#include <fll/level_0/string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+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 ** 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 ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
+extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** 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 ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _MOCK__string_h
index 7ddefebe3ebc351f122141a34f2018bf44289a88..2ee97dcde27418c307e6a5e8dcecf18f710895ec 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 59f7ba2cea21954a64aed4168b90ac930d1a1424..02d75afb1643e1d31c4255023791a8d6593b84e0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index f67ec6dbfbc887fffdcd449ad67eb043bf791346..8c72b30a85689a3ce320025a9ff92e14b6e197e7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index f508d0f21366ffe418e0713798e5dd64ef38166c..7d1bf2076aef9abf36a00bb02c4170ffbc4e20e8 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index a47e899a248e8d8c689cbf3634db5abb92b4f94e..a89a35e9c362c0b21bedd605798f86a2c94df71f 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index a108200b63dbf7deced2f2ece7ddbffe0242ad05..72d94577990d79bdadea0e86397038f0ac28679f 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 393fe465a95431819ebf4d15f4f72eb47c32f934..83a7097d65fde0736c3a771489d7935d4e7629b9 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 537726dd125433016293cc310e4f8860850c9908..5942a5f22e0c866dca5072a8f9a149719af15af2 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 74c543f82d0eeae4d25aefb415bb36f38471ed28..c92487d3d20e6fc555b3bdeaabb55d85fb9441ef 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 7801b02f6ec9a885dfc3047ab31be427928ab4bb..47440974fbf33ce0b074ea42431b812cbb2b6716 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 00c58ae18ebf287b60737713ca41f1203f633760..ba3ebde3963ed3b31fdc8b9736e83e7916653dbb 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index baf83dbdfe067022fce0ef3f546d601c43146aa2..f3745b074f384a80f8e21267ae931f6645b39fcf 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 80219f1e689e65574e8bd28f8d9eaef9070d2eaa..8bb8cdc36e1d955af371ef2b63243b875b1038e0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index fc7708b06ef3f6690233eeb58e7ec90471406d50..e8e6bf44364909ed6e58f63c2bdd236e2c104e81 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 337e00539f6cddb0d2f824ab23f41c5f7e6ccbe6..c46708cee4664222936b90332737e272ae91d442 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 9a0e2904e7d8e8b5781b2629609300c9fcaca311..ddd85fc7034138b4196ea2c2c44abec4dd39d8e6 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 63cea12adb90080eb803167654b1d38014b05c80..0629f3d98a3c2463cf5862dfb8ec44fd2b397571 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 5d50f226c95a988a22b7bd8e55aac3f349204396..838fd0508402b4cdc9e5a0f0798be3ff662862b2 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 8ff64556b244d992abcf5c6a757aa30cb69f20dd..5e27957192d581ff56f4448edff9a6261f8fd4a3 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 5b81dec21d30a0daf39c2e5149e57d1de5f73b04..29b02ec19f2fd7df0d1ab9e2f3a065b2e1574e2d 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index f5800d83e4ae1d52058f60353f2e0c5b087dc5f3..891ac07027907f4f5bd2a36c75e632422b1a8b94 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 4e7f623cdb38f53a5cebfed8e911f82d84048328..032c3b2d1ef72d08ec3162b8f4a94ee3b36e58ca 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 8940232711e1bd0d5ba92b1fd470c9b91e4b0b51..9139e1da04e9e63b8b4f13bce7d9c0b8bebb4942 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index abd6f1db1c9d1d6a38d580a3debc7cde1de01fe3..f857f4e9cde6e4a0bb5f0e9c9a0f7a7781d3c83e 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 39ed3f2987798b00f2a5e853682ecf51560e2b14..a27fc2a650566aaf5f9646c362b017a7b82d2636 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index e12c6462c2039fb390262ad918ac8fc3371a32f6..5014d376e8c3c58fe4b5d1eada833aacf2ccb2ba 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 893e656c411678277a0a5576cb945b8adc21040a..62d99d0b4e1b00a0f16db65777a3ce0c959a9094 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 13d2c12296715b1445d6cbab00c7cd2953da710b..f1f7d3a96cc0b811824c4c33d12baf3b3c596ed0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 2ca646f01d67cac32ff7eafb7c785f503e92477d..aaaf36a9297045cb7f3ad763d8afe737162ac8a0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 2f08dda76ade2ac6a6abe57388955433e8cd5bbf..a2358310676aa49c6ac427a46906955f222d16be 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 88687fd577f239ebffde77346622a7cc3b1764ff..042d64e6d94e55d3a70bbf9b50f0986083f2e406 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index ee35528a3fd79b50608b30add9bfd095dc5c3726..b4d9a8c86d12a666ba63fd04e09112c6a062e962 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index e72e264a03425d999c7a4c09d2360c6689a83eef..c4216609aa779a6a6de191af127d186747521624 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index d8b5bb12df51418d35884ea1fc5c4bbe7cb7ad13..e4d6f3fe6db42f5bc43639b80a9df444debe3955 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 70b4e9f652daa52fc97e7e4d8408720f10bb7937..22d0f5fce2fdfea398084e21819f6ac25155073f 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.c
new file mode 100644 (file)
index 0000000..a3c44e4
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-string.h"
+#include "test-string-dynamics_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t data = f_string_dynamic_t_initialize;
+  f_string_dynamic_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_dynamics_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_dynamics_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_dynamics_t datas = f_string_dynamics_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_dynamic_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-dynamics_delete_callback.h
new file mode 100644 (file)
index 0000000..400f5f8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__dynamics_delete_callback
+#define _TEST__F_string__dynamics_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_dynamics_delete_callback()
+ */
+extern void test__f_string_dynamics_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_delete_callback()
+ */
+extern void test__f_string_dynamics_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__dynamics_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.c
new file mode 100644 (file)
index 0000000..7b98038
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-string.h"
+#include "test-string-dynamics_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t data = f_string_dynamic_t_initialize;
+  f_string_dynamic_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_dynamics_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_dynamics_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_dynamics_t datas = f_string_dynamics_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_dynamic_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-dynamics_destroy_callback.h
new file mode 100644 (file)
index 0000000..5449891
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__dynamicss_destroy_callback
+#define _TEST__F_string__dynamicss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_dynamicss_destroy_callback()
+ */
+extern void test__f_string_dynamicss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_destroy_callback()
+ */
+extern void test__f_string_dynamicss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__dynamicss_destroy_callback
index d02b27a0f97f990c0630070fbcc9f363bf307a16..f5a2bb44eda971c16596dc481857007fee9e4174 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index f7d833449069d7ab21124821b7645a3067fbc064..eca0be53f5afc542e354ff6a76460c03cab41541 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.c
new file mode 100644 (file)
index 0000000..ad10ea3
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-dynamicss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t data = f_string_dynamic_t_initialize;
+  f_string_dynamic_t data_array[] = { data };
+  f_string_dynamics_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_dynamics_t datas_array[] = { datas };
+
+  {
+    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_string_dynamicss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_dynamicss_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_dynamicss_t datass = f_string_dynamicss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_dynamics_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_delete_callback.h
new file mode 100644 (file)
index 0000000..cd45ef9
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__dynamicss_delete_callback
+#define _TEST__F_string__dynamicss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_dynamicss_delete_callback()
+ */
+extern void test__f_string_dynamicss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_delete_callback()
+ */
+extern void test__f_string_dynamicss_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__dynamicss_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.c
new file mode 100644 (file)
index 0000000..c1de611
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-dynamicss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t data = f_string_dynamic_t_initialize;
+  f_string_dynamic_t data_array[] = { data };
+  f_string_dynamics_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_dynamics_t datas_array[] = { datas };
+
+  {
+    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_string_dynamicss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_dynamicss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_dynamicss_t datass = f_string_dynamicss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_dynamics_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_destroy_callback.h
new file mode 100644 (file)
index 0000000..5449891
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__dynamicss_destroy_callback
+#define _TEST__F_string__dynamicss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_dynamicss_destroy_callback()
+ */
+extern void test__f_string_dynamicss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_destroy_callback()
+ */
+extern void test__f_string_dynamicss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__dynamicss_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_adjust.c b/level_0/f_string/tests/unit/c/test-string-map_multis_adjust.c
deleted file mode 100644 (file)
index 019f242..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multis_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_adjust.h b/level_0/f_string/tests/unit/c/test-string-map_multis_adjust.h
deleted file mode 100644 (file)
index d06e7c5..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_string__string_map_multis_adjust
-#define _TEST__F_string__string_map_multis_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_adjust()
- */
-extern void test__f_string_map_multis_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_adjust()
- */
-extern void test__f_string_map_multis_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_map_multis_adjust
index 87b287f702794e2b22fa42218b8fc11942224b8e..84441f3e9d831f3560027d0c1a129c9b5d0c954a 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index e9c446bb5a5940c94b6bf8220b8e5cf454fee2f2..c841371b84a4160f41f59b723b66314aee190767 100644 (file)
@@ -21,7 +21,7 @@ void test__f_string_map_multis_append_all__works(void **state) {
   const f_string_statics_t test_value = macro_f_string_statics_t_initialize_1(test_value_array, 0, length_values);
 
   {
-    f_status_t status = f_string_map_multis_resize(length_inner, &source);
+    f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.size, length_inner);
@@ -91,7 +91,7 @@ void test__f_string_map_multis_append_all__returns_data_not(void **state) {
   f_string_map_multis_t destination = f_string_map_multis_t_initialize;
 
   {
-    const f_status_t status = f_string_map_multis_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 1ecaf9e40f4390745bf9d37b083471fec16efa5b..858a94fa4f01fadf4d00f07d88507413cfd24df4 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.c
deleted file mode 100644 (file)
index da3d83a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multis_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_map_multis_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.h
deleted file mode 100644 (file)
index faa8988..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_map_multis_decimate_by_h
-#define _TEST__F_map_multis_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_decimate_by()
- */
-extern void test__f_string_map_multis_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_decimate_by()
- */
-extern void test__f_string_map_multis_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_map_multis_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.c
deleted file mode 100644 (file)
index b1f085e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multis_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_map_multis_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.h
deleted file mode 100644 (file)
index 36fa7b9..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_string_map_multis_decrease_by_h
-#define _TEST__F_string_map_multis_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_decrease_by()
- */
-extern void test__f_string_map_multis_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_decrease_by()
- */
-extern void test__f_string_map_multis_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multis_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.c
new file mode 100644 (file)
index 0000000..0a42c92
--- /dev/null
@@ -0,0 +1,103 @@
+#include "test-string.h"
+#include "test-string-map_multis_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multis_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t name = { .string = "name", .used = 0, .size = 1 };
+  f_string_dynamic_t value = { .string = "value", .used = 0, .size = 1 };
+  f_string_dynamic_t value_array[] = { value };
+  f_string_dynamics_t values = { .array = value_array, .used = 0, .size = 1 };
+  f_string_map_multi_t data = { .name = name, .value = values };
+  f_string_map_multi_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_map_multis_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+  data_array[0].value.array[0].size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_string_map_multis_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+  data_array[0].value.array[0].size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_string_map_multis_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_map_multis_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_map_multis_t datas = f_string_map_multis_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_map_multi_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].value.array, &datas.array[0].value.used, &datas.array[0].value.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].value.array[0].string, &datas.array[0].value.array[0].used, &datas.array[0].value.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_map_multis_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].name.string);
+  free((void *) datas.array[0].value.array[0].string);
+  free((void *) datas.array[0].value.array);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-map_multis_delete_callback.h
new file mode 100644 (file)
index 0000000..91a15b0
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_multis_delete_callback
+#define _TEST__F_string__map_multis_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_map_multis_delete_callback()
+ */
+extern void test__f_string_map_multis_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multis_delete_callback()
+ */
+extern void test__f_string_map_multis_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__map_multis_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.c
new file mode 100644 (file)
index 0000000..ba5959e
--- /dev/null
@@ -0,0 +1,103 @@
+#include "test-string.h"
+#include "test-string-map_multis_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multis_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t name = { .string = "name", .used = 0, .size = 1 };
+  f_string_dynamic_t value = { .string = "value", .used = 0, .size = 1 };
+  f_string_dynamic_t value_array[] = { value };
+  f_string_dynamics_t values = { .array = value_array, .used = 0, .size = 1 };
+  f_string_map_multi_t data = { .name = name, .value = values };
+  f_string_map_multi_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_map_multis_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+  data_array[0].value.array[0].size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_string_map_multis_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+  data_array[0].value.array[0].size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_string_map_multis_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_map_multis_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_map_multis_t datas = f_string_map_multis_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_map_multi_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].value.array, &datas.array[0].value.used, &datas.array[0].value.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].value.array[0].string, &datas.array[0].value.array[0].used, &datas.array[0].value.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_map_multis_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].name.string);
+  free((void *) datas.array[0].value.array[0].string);
+  free((void *) datas.array[0].value.array);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-map_multis_destroy_callback.h
new file mode 100644 (file)
index 0000000..6874bda
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_multis_destroy_callback
+#define _TEST__F_string__map_multis_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_map_multis_destroy_callback()
+ */
+extern void test__f_string_map_multis_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multis_destroy_callback()
+ */
+extern void test__f_string_map_multis_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__map_multis_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_increase.c b/level_0/f_string/tests/unit/c/test-string-map_multis_increase.c
deleted file mode 100644 (file)
index e62cab8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_map_multis_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_map_multis_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multis_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_string_map_multis_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_increase.h b/level_0/f_string/tests/unit/c/test-string-map_multis_increase.h
deleted file mode 100644 (file)
index e61a517..0000000
+++ /dev/null
@@ -1,34 +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_string_map_multis_increase_h
-#define _TEST__F_string_map_multis_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_increase()
- */
-extern void test__f_string_map_multis_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_map_multis_increase()
- */
-extern void test__f_string_map_multis_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_increase()
- */
-extern void test__f_string_map_multis_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multis_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.c b/level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.c
deleted file mode 100644 (file)
index edd3149..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_map_multis_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multis_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.h b/level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.h
deleted file mode 100644 (file)
index eb3b1ad..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_string_map_multis_increase_by_h
-#define _TEST__F_string_map_multis_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_increase_by()
- */
-extern void test__f_string_map_multis_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_increase_by()
- */
-extern void test__f_string_map_multis_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multis_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_resize.c b/level_0/f_string/tests/unit/c/test-string-map_multis_resize.c
deleted file mode 100644 (file)
index 4ed8a6e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multis_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multis_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multis_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multis_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multis_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_resize.h b/level_0/f_string/tests/unit/c/test-string-map_multis_resize.h
deleted file mode 100644 (file)
index 4d891ff..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_string_map_multis_resize_h
-#define _TEST__F_string_map_multis_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multis_resize()
- */
-extern void test__f_string_map_multis_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multis_resize()
- */
-extern void test__f_string_map_multis_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multis_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.c
deleted file mode 100644 (file)
index 31f43b9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multiss_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multiss_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multiss_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.h
deleted file mode 100644 (file)
index bea9999..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_string_map_multiss_adjust_h
-#define _TEST__F_string_map_multiss_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_adjust()
- */
-extern void test__f_string_map_multiss_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_adjust()
- */
-extern void test__f_string_map_multiss_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_adjust_h
index 776b0d4f5e8ab3be1f39adf245ea3bfcc1ea48c6..ed5ce887777f3334109721df33fbe59b0b427fb2 100644 (file)
@@ -33,7 +33,7 @@ void test__f_string_map_multiss_append__works(void **state) {
   };
 
   {
-    f_status_t status = f_string_map_multis_resize(length_inner, &source);
+    f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.size, length_inner);
@@ -106,7 +106,7 @@ void test__f_string_map_multiss_append__returns_data_not(void **state) {
   f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
 
   {
-    const f_status_t status = f_string_map_multis_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 974fcfdf7b2e0e1595007b3da4eac59d4c3e9e1a..5c7dbbcdbcaed28e82fdcc73d5eda4a92e144823 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index b9ece247e697f8e6632777bc3df2d220af06c002..f2352e55915ba20d40ef07f8e33b9049fa150262 100644 (file)
@@ -34,7 +34,7 @@ void test__f_string_map_multiss_append_all__works(void **state) {
   };
 
   {
-    f_status_t status = f_string_map_multiss_resize(length_outer, &source);
+    f_status_t status = f_memory_arrays_resize(length_outer, sizeof(f_string_map_multis_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multiss_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
@@ -44,7 +44,7 @@ void test__f_string_map_multiss_append_all__works(void **state) {
 
     for (; source.used < length_outer; ++source.used) {
 
-      status = f_string_map_multis_resize(length_inner, &source.array[source.used]);
+      status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_multi_t), (void **) &source.array[source.used].array, &source.array[source.used].used, &source.array[source.used].size, &f_string_map_multis_delete_callback);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[source.used].used, 0);
@@ -132,7 +132,7 @@ void test__f_string_map_multiss_append_all__returns_data_not(void **state) {
   f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
 
   {
-    const f_status_t status = f_string_map_multiss_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multis_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multiss_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index ae4841e42a0c792d5c1fbbd2402f590168282687..da35a9e14dc1ee27eba7b4e6d79c7401057416a4 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.c
deleted file mode 100644 (file)
index 458297f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multiss_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_map_multiss_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.h
deleted file mode 100644 (file)
index 9a600e9..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_string_map_multiss_decimate_by_h
-#define _TEST__F_string_map_multiss_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_decimate_by()
- */
-extern void test__f_string_map_multiss_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_decimate_by()
- */
-extern void test__f_string_map_multiss_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.c
deleted file mode 100644 (file)
index 04ff341..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multiss_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_map_multiss_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.h
deleted file mode 100644 (file)
index 1a0b66f..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_string_map_multiss_decrease_by_h
-#define _TEST__F_string_map_multiss_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_decrease_by()
- */
-extern void test__f_string_map_multiss_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_decrease_by()
- */
-extern void test__f_string_map_multiss_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.c
new file mode 100644 (file)
index 0000000..0f09df5
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-map_multiss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multiss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_map_multi_t data = f_string_map_multi_t_initialize;
+  f_string_map_multi_t data_array[] = { data };
+  f_string_map_multis_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_map_multis_t datas_array[] = { datas };
+
+  {
+    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_string_map_multiss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_map_multiss_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_map_multiss_t datass = f_string_map_multiss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_map_multis_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_map_multi_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_delete_callback.h
new file mode 100644 (file)
index 0000000..3407570
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_multiss_delete_callback
+#define _TEST__F_string__map_multiss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_map_multiss_delete_callback()
+ */
+extern void test__f_string_map_multiss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multiss_delete_callback()
+ */
+extern void test__f_string_map_multiss_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__map_multiss_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.c
new file mode 100644 (file)
index 0000000..b24e0cd
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-map_multiss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multiss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_map_multi_t data = f_string_map_multi_t_initialize;
+  f_string_map_multi_t data_array[] = { data };
+  f_string_map_multis_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_map_multis_t datas_array[] = { datas };
+
+  {
+    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_string_map_multiss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_map_multiss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_map_multiss_t datass = f_string_map_multiss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_map_multis_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_map_multi_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_destroy_callback.h
new file mode 100644 (file)
index 0000000..8e12442
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_multiss_destroy_callback
+#define _TEST__F_string__map_multiss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_map_multiss_destroy_callback()
+ */
+extern void test__f_string_map_multiss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multiss_destroy_callback()
+ */
+extern void test__f_string_map_multiss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__map_multiss_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_increase.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_increase.c
deleted file mode 100644 (file)
index d13a6f6..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_map_multiss_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_map_multiss_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_map_multiss_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_string_map_multiss_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_increase.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_increase.h
deleted file mode 100644 (file)
index 4e5f78e..0000000
+++ /dev/null
@@ -1,34 +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_string_map_multiss_increase_h
-#define _TEST__F_string_map_multiss_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_increase()
- */
-extern void test__f_string_map_multiss_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_map_multiss_increase()
- */
-extern void test__f_string_map_multiss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_increase()
- */
-extern void test__f_string_map_multiss_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.c
deleted file mode 100644 (file)
index 2d93fc0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_map_multiss_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multiss_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multis_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.h
deleted file mode 100644 (file)
index 823fad7..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_string_map_multiss_increase_by_h
-#define _TEST__F_string_map_multiss_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_increase_by()
- */
-extern void test__f_string_map_multiss_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_increase_by()
- */
-extern void test__f_string_map_multiss_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_resize.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_resize.c
deleted file mode 100644 (file)
index a152b03..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-map_multiss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_map_multiss_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multiss_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_map_multiss_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_map_multiss_t data = f_string_map_multiss_t_initialize;
-
-  {
-    const f_status_t status = f_string_map_multiss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_resize.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_resize.h
deleted file mode 100644 (file)
index f7cb290..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_string_map_multiss_resize_h
-#define _TEST__F_string_map_multiss_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_map_multiss_resize()
- */
-extern void test__f_string_map_multiss_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_map_multiss_resize()
- */
-extern void test__f_string_map_multiss_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_map_multiss_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_adjust.c b/level_0/f_string/tests/unit/c/test-string-maps_adjust.c
deleted file mode 100644 (file)
index 4ed7edd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_maps_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_adjust.h b/level_0/f_string/tests/unit/c/test-string-maps_adjust.h
deleted file mode 100644 (file)
index f25f52c..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_string__string_maps_adjust
-#define _TEST__F_string__string_maps_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_adjust()
- */
-extern void test__f_string_maps_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_adjust()
- */
-extern void test__f_string_maps_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_maps_adjust
index 4a8056c20348e0b314864d807f08f13ccb02c8c8..0a04a3c64d42e262097fe885ebc70fde711dd07c 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 8b8fce5103d293dadc7c8c233812f3c350b98d38..a73053b3d119edbf89bf8569ef9b2c7a4f5e5b80 100644 (file)
@@ -15,7 +15,7 @@ void test__f_string_maps_append_all__works(void **state) {
   const f_string_static_t test_value = macro_f_string_static_t_initialize_1("test_value", 0, 10);
 
   {
-    f_status_t status = f_string_maps_resize(length_inner, &source);
+    f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.size, length_inner);
@@ -76,7 +76,7 @@ void test__f_string_maps_append_all__returns_data_not(void **state) {
   f_string_maps_t destination = f_string_maps_t_initialize;
 
   {
-    const f_status_t status = f_string_maps_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index c946317e5e6f5ae1f8996c239d3755d5d79caa19..9975c9ea4103e1933de32aa46855346369cb52b7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-maps_decimate_by.c
deleted file mode 100644 (file)
index fcb4d47..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_maps_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_maps_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-maps_decimate_by.h
deleted file mode 100644 (file)
index 611748a..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_maps_decimate_by_h
-#define _TEST__F_maps_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_decimate_by()
- */
-extern void test__f_string_maps_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_decimate_by()
- */
-extern void test__f_string_maps_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_maps_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-maps_decrease_by.c
deleted file mode 100644 (file)
index ab81270..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_maps_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_maps_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-maps_decrease_by.h
deleted file mode 100644 (file)
index ed704c0..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_string_maps_decrease_by_h
-#define _TEST__F_string_maps_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_decrease_by()
- */
-extern void test__f_string_maps_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_decrease_by()
- */
-extern void test__f_string_maps_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_maps_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-maps_delete_callback.c
new file mode 100644 (file)
index 0000000..ed56012
--- /dev/null
@@ -0,0 +1,77 @@
+#include "test-string.h"
+#include "test-string-maps_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_maps_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t name = { .string = "name", .used = 0, .size = 1 };
+  f_string_dynamic_t value = { .string = "value", .used = 0, .size = 1 };
+  f_string_map_t data = { .name = name, .value = value };
+  f_string_map_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_maps_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_string_maps_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_maps_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_maps_t datas = f_string_maps_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_map_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].value.string, &datas.array[0].value.used, &datas.array[0].value.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_maps_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].name.string);
+  free((void *) datas.array[0].value.string);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-maps_delete_callback.h
new file mode 100644 (file)
index 0000000..125cc01
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_delete_callback
+#define _TEST__F_string__map_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_maps_delete_callback()
+ */
+extern void test__f_string_maps_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_maps_delete_callback()
+ */
+extern void test__f_string_maps_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__map_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.c
new file mode 100644 (file)
index 0000000..c1ccc1d
--- /dev/null
@@ -0,0 +1,77 @@
+#include "test-string.h"
+#include "test-string-maps_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_maps_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t name = { .string = "name", .used = 0, .size = 1 };
+  f_string_dynamic_t value = { .string = "value", .used = 0, .size = 1 };
+  f_string_map_t data = { .name = name, .value = value };
+  f_string_map_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_maps_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].name.size = 1;
+  data_array[0].value.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_string_maps_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_maps_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_maps_t datas = f_string_maps_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_map_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].value.string, &datas.array[0].value.used, &datas.array[0].value.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_maps_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].name.string);
+  free((void *) datas.array[0].value.string);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-maps_destroy_callback.h
new file mode 100644 (file)
index 0000000..0fe0e61
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__map_destroy_callback
+#define _TEST__F_string__map_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_maps_destroy_callback()
+ */
+extern void test__f_string_maps_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_maps_destroy_callback()
+ */
+extern void test__f_string_maps_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__map_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_increase.c b/level_0/f_string/tests/unit/c/test-string-maps_increase.c
deleted file mode 100644 (file)
index 46bed9f..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_maps_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_maps_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_maps_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_string_maps_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_increase.h b/level_0/f_string/tests/unit/c/test-string-maps_increase.h
deleted file mode 100644 (file)
index ff4ca74..0000000
+++ /dev/null
@@ -1,34 +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_string_maps_increase_h
-#define _TEST__F_string_maps_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_increase()
- */
-extern void test__f_string_maps_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_maps_increase()
- */
-extern void test__f_string_maps_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_increase()
- */
-extern void test__f_string_maps_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_maps_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_increase_by.c b/level_0/f_string/tests/unit/c/test-string-maps_increase_by.c
deleted file mode 100644 (file)
index f7d860a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_maps_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_maps_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_increase_by.h b/level_0/f_string/tests/unit/c/test-string-maps_increase_by.h
deleted file mode 100644 (file)
index f903f76..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_string_maps_increase_by_h
-#define _TEST__F_string_maps_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_increase_by()
- */
-extern void test__f_string_maps_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_increase_by()
- */
-extern void test__f_string_maps_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_maps_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_resize.c b/level_0/f_string/tests/unit/c/test-string-maps_resize.c
deleted file mode 100644 (file)
index c6550b3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-maps_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_maps_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_maps_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_maps_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_maps_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_resize.h b/level_0/f_string/tests/unit/c/test-string-maps_resize.h
deleted file mode 100644 (file)
index 2d4167f..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_string_maps_resize_h
-#define _TEST__F_string_maps_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_maps_resize()
- */
-extern void test__f_string_maps_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_maps_resize()
- */
-extern void test__f_string_maps_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_maps_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_adjust.c b/level_0/f_string/tests/unit/c/test-string-mapss_adjust.c
deleted file mode 100644 (file)
index 6fdbbb1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_mapss_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_mapss_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_mapss_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_adjust.h b/level_0/f_string/tests/unit/c/test-string-mapss_adjust.h
deleted file mode 100644 (file)
index 70db7f4..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_string_mapss_adjust_h
-#define _TEST__F_string_mapss_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_adjust()
- */
-extern void test__f_string_mapss_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_adjust()
- */
-extern void test__f_string_mapss_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_adjust_h
index 381700d16f7a08d8f318940e1183592ae6419a13..b86a5c44f0e952ad882e2f6f589c44915b468ef1 100644 (file)
@@ -22,7 +22,7 @@ void test__f_string_mapss_append__works(void **state) {
   };
 
   {
-    f_status_t status = f_string_maps_resize(length_inner, &source);
+    f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.size, length_inner);
@@ -85,7 +85,7 @@ void test__f_string_mapss_append__returns_data_not(void **state) {
   f_string_mapss_t destination = f_string_mapss_t_initialize;
 
   {
-    const f_status_t status = f_string_maps_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index ac771636ee12fe1a0d61d023627a93a85afe86a7..0a9369f0f5040a6a4bff465ae542c245ded91e91 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 369732a8ad985d1982c33486a6cc905fd343aeb6..76ed80cf2b3f351a7ea1ef1eeec3af72eac329c7 100644 (file)
@@ -23,7 +23,7 @@ void test__f_string_mapss_append_all__works(void **state) {
   };
 
   {
-    f_status_t status = f_string_mapss_resize(length_outer, &source);
+    f_status_t status = f_memory_arrays_resize(length_outer, sizeof(f_string_maps_t), (void **) &source.array, &source.used, &source.size, &f_string_mapss_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
@@ -33,7 +33,7 @@ void test__f_string_mapss_append_all__works(void **state) {
 
     for (; source.used < length_outer; ++source.used) {
 
-      status = f_string_maps_resize(length_inner, &source.array[source.used]);
+      status = f_memory_arrays_resize(length_inner, sizeof(f_string_map_t), (void **) &source.array[source.used].array, &source.array[source.used].used, &source.array[source.used].size, &f_string_maps_delete_callback);
 
       assert_int_equal(status, F_okay);
       assert_int_equal(source.array[source.used].used, 0);
@@ -110,7 +110,7 @@ void test__f_string_mapss_append_all__returns_data_not(void **state) {
   f_string_mapss_t destination = f_string_mapss_t_initialize;
 
   {
-    const f_status_t status = f_string_mapss_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_maps_t), (void **) &source.array, &source.used, &source.size, &f_string_mapss_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index ce9426b14fd873b2902589a9e767e45a207fcdca..caa162984daf4486759597e04c8eda3de6b3205e 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.c
deleted file mode 100644 (file)
index 281d947..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_mapss_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_mapss_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.h
deleted file mode 100644 (file)
index abe0d40..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_string_mapss_decimate_by_h
-#define _TEST__F_string_mapss_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_decimate_by()
- */
-extern void test__f_string_mapss_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_decimate_by()
- */
-extern void test__f_string_mapss_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.c
deleted file mode 100644 (file)
index b7c3961..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_mapss_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_mapss_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.h
deleted file mode 100644 (file)
index 289acbd..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_string_mapss_decrease_by_h
-#define _TEST__F_string_mapss_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_decrease_by()
- */
-extern void test__f_string_mapss_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_decrease_by()
- */
-extern void test__f_string_mapss_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.c
new file mode 100644 (file)
index 0000000..101e7ab
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-mapss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_mapss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_map_t data = f_string_map_t_initialize;
+  f_string_map_t data_array[] = { data };
+  f_string_maps_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_maps_t datas_array[] = { datas };
+
+  {
+    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_string_mapss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_mapss_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_mapss_t datass = f_string_mapss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_maps_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_map_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_mapss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-mapss_delete_callback.h
new file mode 100644 (file)
index 0000000..a0fea92
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__mapss_delete_callback
+#define _TEST__F_string__mapss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_mapss_delete_callback()
+ */
+extern void test__f_string_mapss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_mapss_delete_callback()
+ */
+extern void test__f_string_mapss_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__mapss_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.c
new file mode 100644 (file)
index 0000000..e553fb4
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-mapss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_mapss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_map_t data = f_string_map_t_initialize;
+  f_string_map_t data_array[] = { data };
+  f_string_maps_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_maps_t datas_array[] = { datas };
+
+  {
+    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_string_mapss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_mapss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_mapss_t datass = f_string_mapss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_maps_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_map_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_mapss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-mapss_destroy_callback.h
new file mode 100644 (file)
index 0000000..77db641
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__mapss_destroy_callback
+#define _TEST__F_string__mapss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_mapss_destroy_callback()
+ */
+extern void test__f_string_mapss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_mapss_destroy_callback()
+ */
+extern void test__f_string_mapss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__mapss_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_increase.c b/level_0/f_string/tests/unit/c/test-string-mapss_increase.c
deleted file mode 100644 (file)
index a5bb79e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_mapss_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_mapss_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_mapss_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_string_mapss_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_increase.h b/level_0/f_string/tests/unit/c/test-string-mapss_increase.h
deleted file mode 100644 (file)
index 028a849..0000000
+++ /dev/null
@@ -1,34 +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_string_mapss_increase_h
-#define _TEST__F_string_mapss_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_increase()
- */
-extern void test__f_string_mapss_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_mapss_increase()
- */
-extern void test__f_string_mapss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_increase()
- */
-extern void test__f_string_mapss_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_increase_by.c b/level_0/f_string/tests/unit/c/test-string-mapss_increase_by.c
deleted file mode 100644 (file)
index 99b63f0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_mapss_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_mapss_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_maps_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_increase_by.h b/level_0/f_string/tests/unit/c/test-string-mapss_increase_by.h
deleted file mode 100644 (file)
index 3765b11..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_string_mapss_increase_by_h
-#define _TEST__F_string_mapss_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_increase_by()
- */
-extern void test__f_string_mapss_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_increase_by()
- */
-extern void test__f_string_mapss_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_resize.c b/level_0/f_string/tests/unit/c/test-string-mapss_resize.c
deleted file mode 100644 (file)
index 38e9093..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-mapss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_mapss_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_mapss_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_mapss_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_mapss_t data = f_string_mapss_t_initialize;
-
-  {
-    const f_status_t status = f_string_mapss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_resize.h b/level_0/f_string/tests/unit/c/test-string-mapss_resize.h
deleted file mode 100644 (file)
index d7a6295..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_string_mapss_resize_h
-#define _TEST__F_string_mapss_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_mapss_resize()
- */
-extern void test__f_string_mapss_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_mapss_resize()
- */
-extern void test__f_string_mapss_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_mapss_resize_h
index 331851174b659cc5efdf429d90809ece6cb98400..8120d7b445fdaeaf17948aa2da6668d14b2563c7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 7bfa92bade56a7e166cea8b6d883e2a831388b0b..ed9e38c52c4dcd70f9e6167c2eb9190ab918758e 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index fc3a25a005809d86dd047b193ddbba21d05625da..d15bad74ce5a68dc658e269e7dcc510004fa2bca 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 49aa9866baf4b08d328a109e09cc97301d7c7af3..a9fc86347d02b5b750315d47fe2d81b16418814b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index f75bbd7fa4afa48b3535233080bec80df05ac9e6..8617a305db8ba3db8eb7c6321ecab49cc197b36b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 4edc8d8591358fa7cec53f62db002cabbd768f6c..1dd75823b9ec37112cc93cebe63b688f59d4d2ca 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index d31c1e3f70f172ccdca5c55f067e6947ddd5358a..ae967af745508052b37e0fae44afb843646d90ca 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index e1297171d1876928042db049685ebd932934f819..17fdcd0cae456345ee4ac4ec64b9d4fafab64cf4 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_adjust.c b/level_0/f_string/tests/unit/c/test-string-quantitys_adjust.c
deleted file mode 100644 (file)
index 2cc7f11..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantitys_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_adjust.h b/level_0/f_string/tests/unit/c/test-string-quantitys_adjust.h
deleted file mode 100644 (file)
index fc7c807..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_string__string_quantitys_adjust
-#define _TEST__F_string__string_quantitys_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_adjust()
- */
-extern void test__f_string_quantitys_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_adjust()
- */
-extern void test__f_string_quantitys_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_quantitys_adjust
index dcb6a3a46967146b2a4db9ec23e8aebf3ced4d94..8f023bdfd30e5bc44d78c55f120890395662d16b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index c21fd480d41d61d5315a03e9bffe0612f9c941e0..e87238499ce85649595962b94e47eabd5f51bc01 100644 (file)
@@ -41,7 +41,7 @@ void test__f_string_quantitys_append_all__returns_data_not(void **state) {
   f_string_quantitys_t destination = f_string_quantitys_t_initialize;
 
   {
-    const f_status_t status = f_string_quantitys_resize(length, &source);
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantity_t), (void **) &source.array, &source.used, &source.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 5bc452901bff71be629b40950e8fcdb22b8890f7..0c222205fa749d3f78de0241e414b4ab2e4bdad0 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.c
deleted file mode 100644 (file)
index cb45b3d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantitys_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_quantitys_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.h
deleted file mode 100644 (file)
index 9baefd2..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_quantitys_decimate_by_h
-#define _TEST__F_quantitys_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_decimate_by()
- */
-extern void test__f_string_quantitys_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_decimate_by()
- */
-extern void test__f_string_quantitys_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_quantitys_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.c
deleted file mode 100644 (file)
index 765e7d8..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantitys_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_quantitys_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.h
deleted file mode 100644 (file)
index f245982..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_string_quantitys_decrease_by_h
-#define _TEST__F_string_quantitys_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_decrease_by()
- */
-extern void test__f_string_quantitys_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_decrease_by()
- */
-extern void test__f_string_quantitys_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_increase.c b/level_0/f_string/tests/unit/c/test-string-quantitys_increase.c
deleted file mode 100644 (file)
index 1add3fa..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_quantitys_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_quantitys_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantitys_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_string_quantitys_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_increase.h b/level_0/f_string/tests/unit/c/test-string-quantitys_increase.h
deleted file mode 100644 (file)
index 8ccb0c4..0000000
+++ /dev/null
@@ -1,34 +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_string_quantitys_increase_h
-#define _TEST__F_string_quantitys_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_increase()
- */
-extern void test__f_string_quantitys_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_quantitys_increase()
- */
-extern void test__f_string_quantitys_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_increase()
- */
-extern void test__f_string_quantitys_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.c b/level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.c
deleted file mode 100644 (file)
index 8fa0546..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_quantitys_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantitys_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.h b/level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.h
deleted file mode 100644 (file)
index 1d52555..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_string_quantitys_increase_by_h
-#define _TEST__F_string_quantitys_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_increase_by()
- */
-extern void test__f_string_quantitys_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_increase_by()
- */
-extern void test__f_string_quantitys_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_resize.c b/level_0/f_string/tests/unit/c/test-string-quantitys_resize.c
deleted file mode 100644 (file)
index 67e4ebd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantitys_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_resize.h b/level_0/f_string/tests/unit/c/test-string-quantitys_resize.h
deleted file mode 100644 (file)
index f29fefd..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_string_quantitys_resize_h
-#define _TEST__F_string_quantitys_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_resize()
- */
-extern void test__f_string_quantitys_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_resize()
- */
-extern void test__f_string_quantitys_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_adjust.c b/level_0/f_string/tests/unit/c/test-string-quantityss_adjust.c
deleted file mode 100644 (file)
index 9b4c8b7..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantityss_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_adjust.h b/level_0/f_string/tests/unit/c/test-string-quantityss_adjust.h
deleted file mode 100644 (file)
index 75f4e4d..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_string_quantityss_adjust_h
-#define _TEST__F_string_quantityss_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_adjust()
- */
-extern void test__f_string_quantityss_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_adjust()
- */
-extern void test__f_string_quantityss_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_adjust_h
index 04f5016ea0919731ec636f9b1634c549db3838ee..801fbf7df4ae9b2ecf16bd27fcaab8f229bb1263 100644 (file)
@@ -41,7 +41,7 @@ void test__f_string_quantityss_append__returns_data_not(void **state) {
   f_string_quantityss_t destination = f_string_quantityss_t_initialize;
 
   {
-    const f_status_t status = f_string_quantitys_resize(length, &source);
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantity_t), (void **) &source.array, &source.used, &source.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 5ee4f33e4853908f8756f021ec49e449d82197d0..7ef50a90ad5a187c95d37fe01f7195962dec1775 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 8321f0cd105ca9fed05158c30e7a3201d12861c5..73a9a7b6efa94fdcb8b8e1c9cf7c3c3c46359ced 100644 (file)
@@ -58,7 +58,7 @@ void test__f_string_quantityss_append_all__returns_data_not(void **state) {
   f_string_quantityss_t destination = f_string_quantityss_t_initialize;
 
   {
-    const f_status_t status = f_string_quantityss_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_quantitys_t), (void **) &source.array, &source.used, &source.size, &f_string_quantityss_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index dd97727bb7a1759818ea954cc18f70a4dfadd438..28f45bc5664781d8ec01b35f262bee6c40fb0f56 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.c
deleted file mode 100644 (file)
index c6c8b1d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_quantityss_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.h
deleted file mode 100644 (file)
index 0500166..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_string_quantityss_decimate_by_h
-#define _TEST__F_string_quantityss_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_decimate_by()
- */
-extern void test__f_string_quantityss_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_decimate_by()
- */
-extern void test__f_string_quantityss_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.c
deleted file mode 100644 (file)
index b042e13..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_quantityss_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.h
deleted file mode 100644 (file)
index 1cacca3..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_string_quantityss_decrease_by_h
-#define _TEST__F_string_quantityss_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_decrease_by()
- */
-extern void test__f_string_quantityss_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_decrease_by()
- */
-extern void test__f_string_quantityss_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c
new file mode 100644 (file)
index 0000000..061a069
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-quantityss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantityss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_quantity_t data = f_string_quantity_t_initialize;
+  f_string_quantity_t data_array[] = { data };
+  f_string_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_quantitys_t datas_array[] = { datas };
+
+  {
+    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_string_quantityss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_quantityss_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_quantityss_t datass = f_string_quantityss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_quantityss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h
new file mode 100644 (file)
index 0000000..4f3ec97
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__quantityss_delete_callback
+#define _TEST__F_string__quantityss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_quantityss_delete_callback()
+ */
+extern void test__f_string_quantityss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantityss_delete_callback()
+ */
+extern void test__f_string_quantityss_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__quantityss_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c
new file mode 100644 (file)
index 0000000..35fe553
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-quantityss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantityss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_quantity_t data = f_string_quantity_t_initialize;
+  f_string_quantity_t data_array[] = { data };
+  f_string_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_quantitys_t datas_array[] = { datas };
+
+  {
+    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_string_quantityss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_quantityss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_quantityss_t datass = f_string_quantityss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_quantityss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h
new file mode 100644 (file)
index 0000000..f88891b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__quantityss_destroy_callback
+#define _TEST__F_string__quantityss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_quantityss_destroy_callback()
+ */
+extern void test__f_string_quantityss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantityss_destroy_callback()
+ */
+extern void test__f_string_quantityss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__quantityss_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_increase.c b/level_0/f_string/tests/unit/c/test-string-quantityss_increase.c
deleted file mode 100644 (file)
index 5cd7902..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_quantityss_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_quantityss_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_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_string_quantityss_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_increase.h b/level_0/f_string/tests/unit/c/test-string-quantityss_increase.h
deleted file mode 100644 (file)
index 51a95d2..0000000
+++ /dev/null
@@ -1,34 +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_string_quantityss_increase_h
-#define _TEST__F_string_quantityss_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_increase()
- */
-extern void test__f_string_quantityss_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_quantityss_increase()
- */
-extern void test__f_string_quantityss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_increase()
- */
-extern void test__f_string_quantityss_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.c b/level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.c
deleted file mode 100644 (file)
index 66c04d0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_quantityss_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantityss_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.h b/level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.h
deleted file mode 100644 (file)
index ccbf50c..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_string_quantityss_increase_by_h
-#define _TEST__F_string_quantityss_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_increase_by()
- */
-extern void test__f_string_quantityss_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_increase_by()
- */
-extern void test__f_string_quantityss_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_resize.c b/level_0/f_string/tests/unit/c/test-string-quantityss_resize.c
deleted file mode 100644 (file)
index f170ef0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_quantityss_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t data = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_resize.h b/level_0/f_string/tests/unit/c/test-string-quantityss_resize.h
deleted file mode 100644 (file)
index 77c4a07..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_string_quantityss_resize_h
-#define _TEST__F_string_quantityss_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_resize()
- */
-extern void test__f_string_quantityss_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_resize()
- */
-extern void test__f_string_quantityss_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_adjust.c b/level_0/f_string/tests/unit/c/test-string-ranges_adjust.c
deleted file mode 100644 (file)
index cdfba97..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_ranges_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_adjust.h b/level_0/f_string/tests/unit/c/test-string-ranges_adjust.h
deleted file mode 100644 (file)
index 4e016f6..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_string__string_ranges_adjust
-#define _TEST__F_string__string_ranges_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_adjust()
- */
-extern void test__f_string_ranges_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_adjust()
- */
-extern void test__f_string_ranges_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_ranges_adjust
index 75764a9de33fe3dd70de8f80fab7a076fd2c1ea2..d6f9e1586e6a11d7e408346fb6d7d409f229a7c1 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 386b6a5b5cc6a21c8b08f83b90ac2625c58961c9..a1df06ae191e0ef29e6668f3e95b5baa8c6b5c06 100644 (file)
@@ -41,7 +41,7 @@ void test__f_string_ranges_append_all__returns_data_not(void **state) {
   f_string_ranges_t destination = f_string_ranges_t_initialize;
 
   {
-    const f_status_t status = f_string_ranges_resize(length, &source);
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_range_t), (void **) &source.array, &source.used, &source.size);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 2f75492dfa5acbf2173e0087f58e936c2d158e6b..fc9a66ca33981d7b076c40851efad25e7898b758 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.c
deleted file mode 100644 (file)
index 3bce006..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_ranges_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_ranges_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.h
deleted file mode 100644 (file)
index 4217158..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_ranges_decimate_by_h
-#define _TEST__F_ranges_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_decimate_by()
- */
-extern void test__f_string_ranges_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_decimate_by()
- */
-extern void test__f_string_ranges_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_ranges_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.c
deleted file mode 100644 (file)
index 387d3b1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_ranges_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_ranges_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.h
deleted file mode 100644 (file)
index f291b11..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_string_ranges_decrease_by_h
-#define _TEST__F_string_ranges_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_decrease_by()
- */
-extern void test__f_string_ranges_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_decrease_by()
- */
-extern void test__f_string_ranges_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_ranges_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_increase.c b/level_0/f_string/tests/unit/c/test-string-ranges_increase.c
deleted file mode 100644 (file)
index c25e332..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_ranges_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_ranges_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_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_string_ranges_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_increase.h b/level_0/f_string/tests/unit/c/test-string-ranges_increase.h
deleted file mode 100644 (file)
index 0c6d13a..0000000
+++ /dev/null
@@ -1,34 +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_string_ranges_increase_h
-#define _TEST__F_string_ranges_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_increase()
- */
-extern void test__f_string_ranges_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_ranges_increase()
- */
-extern void test__f_string_ranges_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_increase()
- */
-extern void test__f_string_ranges_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_ranges_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_increase_by.c b/level_0/f_string/tests/unit/c/test-string-ranges_increase_by.c
deleted file mode 100644 (file)
index af1b0ec..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_ranges_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_ranges_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_increase_by.h b/level_0/f_string/tests/unit/c/test-string-ranges_increase_by.h
deleted file mode 100644 (file)
index 450434b..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_string_ranges_increase_by_h
-#define _TEST__F_string_ranges_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_increase_by()
- */
-extern void test__f_string_ranges_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_increase_by()
- */
-extern void test__f_string_ranges_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_ranges_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_resize.c b/level_0/f_string/tests/unit/c/test-string-ranges_resize.c
deleted file mode 100644 (file)
index 9870b8b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-ranges_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_ranges_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_ranges_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_ranges_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_ranges_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_resize.h b/level_0/f_string/tests/unit/c/test-string-ranges_resize.h
deleted file mode 100644 (file)
index f6f56b3..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_string_ranges_resize_h
-#define _TEST__F_string_ranges_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_ranges_resize()
- */
-extern void test__f_string_ranges_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_ranges_resize()
- */
-extern void test__f_string_ranges_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_ranges_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_adjust.c b/level_0/f_string/tests/unit/c/test-string-rangess_adjust.c
deleted file mode 100644 (file)
index cabfb46..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_rangess_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_rangess_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_rangess_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_adjust.h b/level_0/f_string/tests/unit/c/test-string-rangess_adjust.h
deleted file mode 100644 (file)
index a12fa45..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_string_rangess_adjust_h
-#define _TEST__F_string_rangess_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_adjust()
- */
-extern void test__f_string_rangess_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_adjust()
- */
-extern void test__f_string_rangess_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_adjust_h
index dab482d9298c56aadbf6d3b3d8fd772bf612c1c6..bdb2624f4eaae4e9a58a03a5e0266c97b1d98e31 100644 (file)
@@ -41,7 +41,7 @@ void test__f_string_rangess_append__returns_data_not(void **state) {
   f_string_rangess_t destination = f_string_rangess_t_initialize;
 
   {
-    const f_status_t status = f_string_ranges_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_ranges_t), (void **) &source.array, &source.used, &source.size, &f_string_rangess_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 096721f7d0667ebb0915514b60f7165deaa4b0fe..7b072638e16eebcdfd2606575ed4203c481f605a 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 15f73b349c5c3026b16e77baa700516fe50062fc..9773ce6f6c0e6867fb202eb23ad318be7f78642c 100644 (file)
@@ -58,7 +58,7 @@ void test__f_string_rangess_append_all__returns_data_not(void **state) {
   f_string_rangess_t destination = f_string_rangess_t_initialize;
 
   {
-    const f_status_t status = f_string_rangess_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_ranges_t), (void **) &source.array, &source.used, &source.size, &f_string_rangess_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index 985b03004dc18ccbbfba423f33feff83690f3c68..0ee22c08c3acd553479617602d1bf8e398ad8679 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.c
deleted file mode 100644 (file)
index 055e2c8..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_rangess_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_rangess_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.h
deleted file mode 100644 (file)
index 6fbf9d5..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_string_rangess_decimate_by_h
-#define _TEST__F_string_rangess_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_decimate_by()
- */
-extern void test__f_string_rangess_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_decimate_by()
- */
-extern void test__f_string_rangess_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.c
deleted file mode 100644 (file)
index 47eb21a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_rangess_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_rangess_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.h
deleted file mode 100644 (file)
index 492d203..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_string_rangess_decrease_by_h
-#define _TEST__F_string_rangess_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_decrease_by()
- */
-extern void test__f_string_rangess_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_decrease_by()
- */
-extern void test__f_string_rangess_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.c
new file mode 100644 (file)
index 0000000..d0be50c
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-rangess_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_rangess_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_range_t data = f_string_range_t_initialize;
+  f_string_range_t data_array[] = { data };
+  f_string_ranges_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_ranges_t datas_array[] = { datas };
+
+  {
+    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_string_rangess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_rangess_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_rangess_t datass = f_string_rangess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_ranges_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_rangess_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-rangess_delete_callback.h
new file mode 100644 (file)
index 0000000..678b767
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__rangess_delete_callback
+#define _TEST__F_string__rangess_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_rangess_delete_callback()
+ */
+extern void test__f_string_rangess_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_rangess_delete_callback()
+ */
+extern void test__f_string_rangess_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__rangess_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.c
new file mode 100644 (file)
index 0000000..c339fd2
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-rangess_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_rangess_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_range_t data = f_string_range_t_initialize;
+  f_string_range_t data_array[] = { data };
+  f_string_ranges_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_ranges_t datas_array[] = { datas };
+
+  {
+    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_string_rangess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_rangess_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_rangess_t datass = f_string_rangess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_ranges_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_range_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_rangess_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-rangess_destroy_callback.h
new file mode 100644 (file)
index 0000000..5c423ff
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__rangess_destroy_callback
+#define _TEST__F_string__rangess_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_rangess_destroy_callback()
+ */
+extern void test__f_string_rangess_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_rangess_destroy_callback()
+ */
+extern void test__f_string_rangess_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__rangess_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_increase.c b/level_0/f_string/tests/unit/c/test-string-rangess_increase.c
deleted file mode 100644 (file)
index 24caa5a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_rangess_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_rangess_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_rangess_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_string_rangess_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_increase.h b/level_0/f_string/tests/unit/c/test-string-rangess_increase.h
deleted file mode 100644 (file)
index 2090ba6..0000000
+++ /dev/null
@@ -1,34 +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_string_rangess_increase_h
-#define _TEST__F_string_rangess_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_increase()
- */
-extern void test__f_string_rangess_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_rangess_increase()
- */
-extern void test__f_string_rangess_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_increase()
- */
-extern void test__f_string_rangess_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_increase_by.c b/level_0/f_string/tests/unit/c/test-string-rangess_increase_by.c
deleted file mode 100644 (file)
index 8df2167..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_rangess_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_rangess_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_ranges_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_increase_by.h b/level_0/f_string/tests/unit/c/test-string-rangess_increase_by.h
deleted file mode 100644 (file)
index c377d7c..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_string_rangess_increase_by_h
-#define _TEST__F_string_rangess_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_increase_by()
- */
-extern void test__f_string_rangess_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_increase_by()
- */
-extern void test__f_string_rangess_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_resize.c b/level_0/f_string/tests/unit/c/test-string-rangess_resize.c
deleted file mode 100644 (file)
index cc8a2c1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-rangess_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_rangess_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_rangess_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_rangess_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_rangess_t data = f_string_rangess_t_initialize;
-
-  {
-    const f_status_t status = f_string_rangess_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_resize.h b/level_0/f_string/tests/unit/c/test-string-rangess_resize.h
deleted file mode 100644 (file)
index 7c02cd5..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_string_rangess_resize_h
-#define _TEST__F_string_rangess_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_rangess_resize()
- */
-extern void test__f_string_rangess_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_rangess_resize()
- */
-extern void test__f_string_rangess_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_rangess_resize_h
index 5819d71bd1f8e414171eab2178ce011309187ae5..71769afde995a4b6d5aaee1fa5c47086f7b49d2c 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index 94a78544727c0a625d9951e50c44e03c5373be26..616433c0214270359048384afb3bc134d8dfbfa5 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index fd1b6acebbb5344e8ca27dd6d20fbf9b4f6f600c..ece924ab418260804c9f23936521e20edbb6e9b7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_adjust.c b/level_0/f_string/tests/unit/c/test-string-triples_adjust.c
deleted file mode 100644 (file)
index 3035920..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_triples_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_adjust.h b/level_0/f_string/tests/unit/c/test-string-triples_adjust.h
deleted file mode 100644 (file)
index 413d272..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_string__string_triples_adjust
-#define _TEST__F_string__string_triples_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_adjust()
- */
-extern void test__f_string_triples_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_adjust()
- */
-extern void test__f_string_triples_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_triples_adjust
index 16b4fe7e5894b090f39f8400c8f66c4cf1962147..af1bb66291329270f5002ba29dd5c18d17472b0b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index c03ccb470f564982114cd3e360ad608dd8d12e01..279491ba66b38765d34d83d9b864b5cf40c27483 100644 (file)
@@ -61,7 +61,7 @@ void test__f_string_triples_append_all__returns_data_not(void **state) {
   f_string_triples_t destination = f_string_triples_t_initialize;
 
   {
-    const f_status_t status = f_string_triples_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index f472467b3f0836e948ddae200f4b107aa6ace562..ceb89508b37515e37ddfd88a34bac9bf54750585 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-triples_decimate_by.c
deleted file mode 100644 (file)
index 92b2a22..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_triples_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_triples_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-triples_decimate_by.h
deleted file mode 100644 (file)
index 776aa2c..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_triples_decimate_by_h
-#define _TEST__F_triples_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_decimate_by()
- */
-extern void test__f_string_triples_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_decimate_by()
- */
-extern void test__f_string_triples_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_triples_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-triples_decrease_by.c
deleted file mode 100644 (file)
index 22d61db..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_triples_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_triples_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-triples_decrease_by.h
deleted file mode 100644 (file)
index a2b27d1..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_string_triples_decrease_by_h
-#define _TEST__F_string_triples_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_decrease_by()
- */
-extern void test__f_string_triples_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_decrease_by()
- */
-extern void test__f_string_triples_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_triples_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-triples_delete_callback.c
new file mode 100644 (file)
index 0000000..9b2362e
--- /dev/null
@@ -0,0 +1,102 @@
+#include "test-string.h"
+#include "test-string-triples_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_triples_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t a = { .string = "a", .used = 0, .size = 1 };
+  f_string_dynamic_t b = { .string = "b", .used = 0, .size = 1 };
+  f_string_dynamic_t c = { .string = "c", .used = 0, .size = 1 };
+  f_string_triple_t data = { .a = a, .b = b, .c = c };
+  f_string_triple_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_triples_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].a.size = 1;
+  data_array[0].b.size = 1;
+  data_array[0].c.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_string_triples_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].a.size = 1;
+  data_array[0].b.size = 1;
+  data_array[0].c.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_okay);
+
+    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_string_triples_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_triples_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_triples_t datas = f_string_triples_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_triple_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].a.string, &datas.array[0].a.used, &datas.array[0].a.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].b.string, &datas.array[0].b.used, &datas.array[0].b.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].c.string, &datas.array[0].c.used, &datas.array[0].c.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_triples_delete_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].a.string);
+  free((void *) datas.array[0].b.string);
+  free((void *) datas.array[0].c.string);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-triples_delete_callback.h
new file mode 100644 (file)
index 0000000..cacc87d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__triples_delete_callback
+#define _TEST__F_string__triples_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_triples_delete_callback()
+ */
+extern void test__f_string_triples_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_triples_delete_callback()
+ */
+extern void test__f_string_triples_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__triples_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.c
new file mode 100644 (file)
index 0000000..a3804ae
--- /dev/null
@@ -0,0 +1,102 @@
+#include "test-string.h"
+#include "test-string-triples_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_triples_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_dynamic_t a = { .string = "a", .used = 0, .size = 1 };
+  f_string_dynamic_t b = { .string = "b", .used = 0, .size = 1 };
+  f_string_dynamic_t c = { .string = "c", .used = 0, .size = 1 };
+  f_string_triple_t data = { .a = a, .b = b, .c = c };
+  f_string_triple_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_string_triples_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].a.size = 1;
+  data_array[0].b.size = 1;
+  data_array[0].c.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_string_triples_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  data_array[0].a.size = 1;
+  data_array[0].b.size = 1;
+  data_array[0].c.size = 1;
+
+  {
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_okay);
+
+    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_string_triples_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_triples_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_triples_t datas = f_string_triples_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_triple_t), (void **) &datas.array, &datas.used, &datas.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].a.string, &datas.array[0].a.used, &datas.array[0].a.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].b.string, &datas.array[0].b.used, &datas.array[0].b.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].c.string, &datas.array[0].c.used, &datas.array[0].c.size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_triples_destroy_callback(0, length, (void *) datas.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datas.size, 0);
+  }
+
+  free((void *) datas.array[0].a.string);
+  free((void *) datas.array[0].b.string);
+  free((void *) datas.array[0].c.string);
+  free((void *) datas.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-triples_destroy_callback.h
new file mode 100644 (file)
index 0000000..c37bfdf
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__triples_destroy_callback
+#define _TEST__F_string__triples_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_triples_destroy_callback()
+ */
+extern void test__f_string_triples_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_triples_destroy_callback()
+ */
+extern void test__f_string_triples_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__triples_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_increase.c b/level_0/f_string/tests/unit/c/test-string-triples_increase.c
deleted file mode 100644 (file)
index 5249d73..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_triples_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_triples_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_triples_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_string_triples_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_increase.h b/level_0/f_string/tests/unit/c/test-string-triples_increase.h
deleted file mode 100644 (file)
index ea68b53..0000000
+++ /dev/null
@@ -1,34 +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_string_triples_increase_h
-#define _TEST__F_string_triples_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_increase()
- */
-extern void test__f_string_triples_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_triples_increase()
- */
-extern void test__f_string_triples_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_increase()
- */
-extern void test__f_string_triples_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_triples_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_increase_by.c b/level_0/f_string/tests/unit/c/test-string-triples_increase_by.c
deleted file mode 100644 (file)
index 8785980..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_triples_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_triples_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_increase_by.h b/level_0/f_string/tests/unit/c/test-string-triples_increase_by.h
deleted file mode 100644 (file)
index 45b7127..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_string_triples_increase_by_h
-#define _TEST__F_string_triples_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_increase_by()
- */
-extern void test__f_string_triples_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_increase_by()
- */
-extern void test__f_string_triples_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_triples_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_resize.c b/level_0/f_string/tests/unit/c/test-string-triples_resize.c
deleted file mode 100644 (file)
index 422808a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-triples_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_triples_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_triples_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_triples_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_triples_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_resize.h b/level_0/f_string/tests/unit/c/test-string-triples_resize.h
deleted file mode 100644 (file)
index 2e35b05..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_string_triples_resize_h
-#define _TEST__F_string_triples_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_triples_resize()
- */
-extern void test__f_string_triples_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_triples_resize()
- */
-extern void test__f_string_triples_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_triples_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_adjust.c b/level_0/f_string/tests/unit/c/test-string-tripless_adjust.c
deleted file mode 100644 (file)
index 9c3024e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_adjust__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_tripless_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_adjust(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_tripless_adjust__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_tripless_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_adjust.h b/level_0/f_string/tests/unit/c/test-string-tripless_adjust.h
deleted file mode 100644 (file)
index e20b796..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_string_tripless_adjust_h
-#define _TEST__F_string_tripless_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_adjust()
- */
-extern void test__f_string_tripless_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_adjust()
- */
-extern void test__f_string_tripless_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_adjust_h
index b1f294dde12ef7f540a5e81698ac7268a138235f..e455a0ac7f2513d59638415c60e3796a42fc3009 100644 (file)
@@ -61,7 +61,7 @@ void test__f_string_tripless_append__returns_data_not(void **state) {
   f_string_tripless_t destination = f_string_tripless_t_initialize;
 
   {
-    const f_status_t status = f_string_triples_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index a93519bffa70a265d947e83a462e2dee0e7b688d..7efb569283ad4b88777a80c1872d575f6a7074ee 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
index d6e9cc9b4a011ea94869a122b08f642cde596237..0202f613be4045ae628c8b174021299b50daa027 100644 (file)
@@ -87,7 +87,7 @@ void test__f_string_tripless_append_all__returns_data_not(void **state) {
   f_string_tripless_t destination = f_string_tripless_t_initialize;
 
   {
-    const f_status_t status = f_string_tripless_resize(length, &source);
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triples_t), (void **) &source.array, &source.used, &source.size, &f_string_tripless_delete_callback);
 
     assert_int_equal(status, F_okay);
     assert_int_equal(source.used, 0);
index dda4401e0908c9c09227352ceb7cf869a66c4572..59701313579def3da4ffb201b15837bdf802beab 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Type
+ * Project: String
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.c
deleted file mode 100644 (file)
index 10a407a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_decimate_by__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_tripless_decimate_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_tripless_decimate_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.h
deleted file mode 100644 (file)
index edef6d1..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_string_tripless_decimate_by_h
-#define _TEST__F_string_tripless_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_decimate_by()
- */
-extern void test__f_string_tripless_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_decimate_by()
- */
-extern void test__f_string_tripless_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.c
deleted file mode 100644 (file)
index f4d78d9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_decrease_by__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_tripless_decrease_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
-  }
-
-  assert_null(data.array);
-}
-
-void test__f_string_tripless_decrease_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.h
deleted file mode 100644 (file)
index a4f2670..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_string_tripless_decrease_by_h
-#define _TEST__F_string_tripless_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_decrease_by()
- */
-extern void test__f_string_tripless_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_decrease_by()
- */
-extern void test__f_string_tripless_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.c
new file mode 100644 (file)
index 0000000..6db2e3d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-tripless_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_tripless_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_triple_t data = f_string_triple_t_initialize;
+  f_string_triple_t data_array[] = { data };
+  f_string_triples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_triples_t datas_array[] = { datas };
+
+  {
+    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_string_tripless_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_tripless_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_tripless_t datass = f_string_tripless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_string_triples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_string_triple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_tripless_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-tripless_delete_callback.h
new file mode 100644 (file)
index 0000000..dbd76bc
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__tripless_delete_callback
+#define _TEST__F_string__tripless_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_tripless_delete_callback()
+ */
+extern void test__f_string_tripless_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_tripless_delete_callback()
+ */
+extern void test__f_string_tripless_delete_callback__works(void **state);
+
+#endif // _TEST__F_string__tripless_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.c
new file mode 100644 (file)
index 0000000..c5dec11
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-string.h"
+#include "test-string-tripless_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_tripless_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_triple_t data = f_string_triple_t_initialize;
+  f_string_triple_t data_array[] = { data };
+  f_string_triples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_string_triples_t datas_array[] = { datas };
+
+  {
+    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_string_tripless_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_string_tripless_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_string_tripless_t datass = f_string_tripless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_triples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_string_triple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_string_tripless_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-tripless_destroy_callback.h
new file mode 100644 (file)
index 0000000..29e4602
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__tripless_destroy_callback
+#define _TEST__F_string__tripless_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_string_tripless_destroy_callback()
+ */
+extern void test__f_string_tripless_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_tripless_destroy_callback()
+ */
+extern void test__f_string_tripless_destroy_callback__works(void **state);
+
+#endif // _TEST__F_string__tripless_destroy_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_increase.c b/level_0/f_string/tests/unit/c/test-string-tripless_increase.c
deleted file mode 100644 (file)
index ea5b57e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_increase__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_tripless_increase(length, &data);
-
-    assert_int_equal(status, F_okay);
-    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);
-}
-
-void test__f_string_tripless_increase__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_tripless_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_string_tripless_increase__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_increase.h b/level_0/f_string/tests/unit/c/test-string-tripless_increase.h
deleted file mode 100644 (file)
index caec0af..0000000
+++ /dev/null
@@ -1,34 +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_string_tripless_increase_h
-#define _TEST__F_string_tripless_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_increase()
- */
-extern void test__f_string_tripless_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_tripless_increase()
- */
-extern void test__f_string_tripless_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_increase()
- */
-extern void test__f_string_tripless_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_increase_by.c b/level_0/f_string/tests/unit/c/test-string-tripless_increase_by.c
deleted file mode 100644 (file)
index 213be1e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_increase_by__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_string_tripless_increase_by(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_tripless_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_triples_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_increase_by.h b/level_0/f_string/tests/unit/c/test-string-tripless_increase_by.h
deleted file mode 100644 (file)
index 6dc83b8..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_string_tripless_increase_by_h
-#define _TEST__F_string_tripless_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_increase_by()
- */
-extern void test__f_string_tripless_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_increase_by()
- */
-extern void test__f_string_tripless_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_resize.c b/level_0/f_string/tests/unit/c/test-string-tripless_resize.c
deleted file mode 100644 (file)
index 8da8956..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "test-string.h"
-#include "test-string-tripless_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_tripless_resize__works(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_tripless_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_resize(length, &data);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  free((void *) data.array);
-}
-
-void test__f_string_tripless_resize__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_string_tripless_t data = f_string_tripless_t_initialize;
-
-  {
-    const f_status_t status = f_string_tripless_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);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_resize.h b/level_0/f_string/tests/unit/c/test-string-tripless_resize.h
deleted file mode 100644 (file)
index d405ea2..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_string_tripless_resize_h
-#define _TEST__F_string_tripless_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_tripless_resize()
- */
-extern void test__f_string_tripless_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_tripless_resize()
- */
-extern void test__f_string_tripless_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_tripless_resize_h
index c42bca2a113759d76247184b39f49a1d1eee5b93..1d889ce15c1309e8a4dc0bb27b03ff9e97e34b05 100644 (file)
@@ -87,51 +87,23 @@ int main(void) {
     cmocka_unit_test(test__f_string_dynamicss_append_all__works),
     cmocka_unit_test(test__f_string_dynamicss_append_all__returns_data_not),
 
-    cmocka_unit_test(test__f_string_map_multis_adjust__works),
     cmocka_unit_test(test__f_string_map_multis_append__works),
     cmocka_unit_test(test__f_string_map_multis_append_all__works),
     cmocka_unit_test(test__f_string_map_multis_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_map_multis_decimate_by__works),
-    cmocka_unit_test(test__f_string_map_multis_decrease_by__works),
-    cmocka_unit_test(test__f_string_map_multis_increase__works),
-    cmocka_unit_test(test__f_string_map_multis_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_map_multis_increase_by__works),
-    cmocka_unit_test(test__f_string_map_multis_resize__works),
-
-    cmocka_unit_test(test__f_string_map_multiss_adjust__works),
+
     cmocka_unit_test(test__f_string_map_multiss_append__works),
     cmocka_unit_test(test__f_string_map_multiss_append__returns_data_not),
     cmocka_unit_test(test__f_string_map_multiss_append_all__works),
     cmocka_unit_test(test__f_string_map_multiss_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_map_multiss_decimate_by__works),
-    cmocka_unit_test(test__f_string_map_multiss_decrease_by__works),
-    cmocka_unit_test(test__f_string_map_multiss_increase__works),
-    cmocka_unit_test(test__f_string_map_multiss_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_map_multiss_increase_by__works),
-    cmocka_unit_test(test__f_string_map_multiss_resize__works),
-
-    cmocka_unit_test(test__f_string_maps_adjust__works),
+
     cmocka_unit_test(test__f_string_maps_append__works),
     cmocka_unit_test(test__f_string_maps_append_all__works),
     cmocka_unit_test(test__f_string_maps_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_maps_decimate_by__works),
-    cmocka_unit_test(test__f_string_maps_decrease_by__works),
-    cmocka_unit_test(test__f_string_maps_increase__works),
-    cmocka_unit_test(test__f_string_maps_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_maps_increase_by__works),
-    cmocka_unit_test(test__f_string_maps_resize__works),
-
-    cmocka_unit_test(test__f_string_mapss_adjust__works),
+
     cmocka_unit_test(test__f_string_mapss_append__works),
     cmocka_unit_test(test__f_string_mapss_append__returns_data_not),
     cmocka_unit_test(test__f_string_mapss_append_all__works),
     cmocka_unit_test(test__f_string_mapss_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_mapss_decimate_by__works),
-    cmocka_unit_test(test__f_string_mapss_decrease_by__works),
-    cmocka_unit_test(test__f_string_mapss_increase__works),
-    cmocka_unit_test(test__f_string_mapss_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_mapss_increase_by__works),
-    cmocka_unit_test(test__f_string_mapss_resize__works),
 
     cmocka_unit_test(test__f_string_mash__works),
     cmocka_unit_test(test__f_string_mash_nulless__works),
@@ -144,74 +116,32 @@ int main(void) {
     cmocka_unit_test(test__f_string_prepend_assure_nulless__works),
     cmocka_unit_test(test__f_string_prepend_nulless__works),
 
-    cmocka_unit_test(test__f_string_quantitys_adjust__works),
     cmocka_unit_test(test__f_string_quantitys_append__works),
     cmocka_unit_test(test__f_string_quantitys_append_all__works),
     cmocka_unit_test(test__f_string_quantitys_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_quantitys_decimate_by__works),
-    cmocka_unit_test(test__f_string_quantitys_decrease_by__works),
-    cmocka_unit_test(test__f_string_quantitys_increase__works),
-    cmocka_unit_test(test__f_string_quantitys_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_quantitys_increase_by__works),
-    cmocka_unit_test(test__f_string_quantitys_resize__works),
-
-    cmocka_unit_test(test__f_string_quantityss_adjust__works),
+
     cmocka_unit_test(test__f_string_quantityss_append__works),
     cmocka_unit_test(test__f_string_quantityss_append__returns_data_not),
     cmocka_unit_test(test__f_string_quantityss_append_all__works),
     cmocka_unit_test(test__f_string_quantityss_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_quantityss_decimate_by__works),
-    cmocka_unit_test(test__f_string_quantityss_decrease_by__works),
-    cmocka_unit_test(test__f_string_quantityss_increase__works),
-    cmocka_unit_test(test__f_string_quantityss_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_quantityss_increase_by__works),
-    cmocka_unit_test(test__f_string_quantityss_resize__works),
-
-    cmocka_unit_test(test__f_string_ranges_adjust__works),
+
     cmocka_unit_test(test__f_string_ranges_append__works),
     cmocka_unit_test(test__f_string_ranges_append_all__works),
     cmocka_unit_test(test__f_string_ranges_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_ranges_decimate_by__works),
-    cmocka_unit_test(test__f_string_ranges_decrease_by__works),
-    cmocka_unit_test(test__f_string_ranges_increase__works),
-    cmocka_unit_test(test__f_string_ranges_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_ranges_increase_by__works),
-    cmocka_unit_test(test__f_string_ranges_resize__works),
-
-    cmocka_unit_test(test__f_string_rangess_adjust__works),
+
     cmocka_unit_test(test__f_string_rangess_append__works),
     cmocka_unit_test(test__f_string_rangess_append__returns_data_not),
     cmocka_unit_test(test__f_string_rangess_append_all__works),
     cmocka_unit_test(test__f_string_rangess_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_rangess_decimate_by__works),
-    cmocka_unit_test(test__f_string_rangess_decrease_by__works),
-    cmocka_unit_test(test__f_string_rangess_increase__works),
-    cmocka_unit_test(test__f_string_rangess_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_rangess_increase_by__works),
-    cmocka_unit_test(test__f_string_rangess_resize__works),
-
-    cmocka_unit_test(test__f_string_triples_adjust__works),
+
     cmocka_unit_test(test__f_string_triples_append__works),
     cmocka_unit_test(test__f_string_triples_append_all__works),
     cmocka_unit_test(test__f_string_triples_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_triples_decimate_by__works),
-    cmocka_unit_test(test__f_string_triples_decrease_by__works),
-    cmocka_unit_test(test__f_string_triples_increase__works),
-    cmocka_unit_test(test__f_string_triples_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_triples_increase_by__works),
-    cmocka_unit_test(test__f_string_triples_resize__works),
-
-    cmocka_unit_test(test__f_string_tripless_adjust__works),
+
     cmocka_unit_test(test__f_string_tripless_append__works),
     cmocka_unit_test(test__f_string_tripless_append__returns_data_not),
     cmocka_unit_test(test__f_string_tripless_append_all__works),
     cmocka_unit_test(test__f_string_tripless_append_all__returns_data_not),
-    cmocka_unit_test(test__f_string_tripless_decimate_by__works),
-    cmocka_unit_test(test__f_string_tripless_decrease_by__works),
-    cmocka_unit_test(test__f_string_tripless_increase__works),
-    cmocka_unit_test(test__f_string_tripless_increase__returns_data_not),
-    cmocka_unit_test(test__f_string_tripless_increase_by__works),
-    cmocka_unit_test(test__f_string_tripless_resize__works),
 
     cmocka_unit_test(test__f_string_seek_line__returns_data_not_stop),
     cmocka_unit_test(test__f_string_seek_line__returns_none_stop),
@@ -226,6 +156,33 @@ int main(void) {
     cmocka_unit_test(test__f_string_seek_to__returns_none_stop),
     cmocka_unit_test(test__f_string_seek_to__works),
 
+    cmocka_unit_test(test__f_string_dynamicss_delete_callback__fails),
+    cmocka_unit_test(test__f_string_dynamicss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_map_multis_delete_callback__fails),
+    cmocka_unit_test(test__f_string_map_multis_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_map_multiss_delete_callback__fails),
+    cmocka_unit_test(test__f_string_map_multiss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_maps_delete_callback__fails),
+    cmocka_unit_test(test__f_string_maps_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_mapss_delete_callback__fails),
+    cmocka_unit_test(test__f_string_mapss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_quantityss_delete_callback__fails),
+    cmocka_unit_test(test__f_string_quantityss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_rangess_delete_callback__fails),
+    cmocka_unit_test(test__f_string_rangess_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_triples_delete_callback__fails),
+    cmocka_unit_test(test__f_string_triples_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_string_tripless_delete_callback__fails),
+    cmocka_unit_test(test__f_string_tripless_destroy_callback__fails),
+
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_string_append__parameter_checking),
       cmocka_unit_test(test__f_string_append_assure__parameter_checking),
@@ -273,45 +230,18 @@ int main(void) {
 
       cmocka_unit_test(test__f_string_dynamics_append__parameter_checking),
       cmocka_unit_test(test__f_string_dynamics_append_all__parameter_checking),
-
       cmocka_unit_test(test__f_string_dynamicss_append__parameter_checking),
       cmocka_unit_test(test__f_string_dynamicss_append_all__parameter_checking),
 
-      cmocka_unit_test(test__f_string_map_multis_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_map_multis_append__parameter_checking),
       cmocka_unit_test(test__f_string_map_multis_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multis_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multis_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multis_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multis_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multis_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_string_map_multiss_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_map_multiss_append__parameter_checking),
       cmocka_unit_test(test__f_string_map_multiss_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multiss_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multiss_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multiss_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multiss_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_map_multiss_resize__parameter_checking),
 
-      cmocka_unit_test(test__f_string_maps_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_maps_append__parameter_checking),
       cmocka_unit_test(test__f_string_maps_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_maps_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_maps_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_maps_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_maps_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_maps_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_string_mapss_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_mapss_append__parameter_checking),
       cmocka_unit_test(test__f_string_mapss_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_mapss_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_mapss_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_mapss_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_mapss_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_mapss_resize__parameter_checking),
 
       cmocka_unit_test(test__f_string_mash__parameter_checking),
       cmocka_unit_test(test__f_string_mash_nulless__parameter_checking),
@@ -324,65 +254,53 @@ int main(void) {
       cmocka_unit_test(test__f_string_prepend_assure_nulless__parameter_checking),
       cmocka_unit_test(test__f_string_prepend_nulless__parameter_checking),
 
-      cmocka_unit_test(test__f_string_quantitys_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_quantitys_append__parameter_checking),
       cmocka_unit_test(test__f_string_quantitys_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_string_quantityss_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_quantityss_append__parameter_checking),
       cmocka_unit_test(test__f_string_quantityss_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_resize__parameter_checking),
 
-      cmocka_unit_test(test__f_string_ranges_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_ranges_append__parameter_checking),
       cmocka_unit_test(test__f_string_ranges_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_ranges_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_ranges_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_ranges_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_ranges_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_ranges_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_string_rangess_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_rangess_append__parameter_checking),
       cmocka_unit_test(test__f_string_rangess_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_rangess_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_rangess_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_rangess_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_rangess_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_rangess_resize__parameter_checking),
 
-      cmocka_unit_test(test__f_string_triples_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_triples_append__parameter_checking),
       cmocka_unit_test(test__f_string_triples_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_triples_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_triples_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_triples_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_triples_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_triples_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_string_tripless_adjust__parameter_checking),
       cmocka_unit_test(test__f_string_tripless_append__parameter_checking),
       cmocka_unit_test(test__f_string_tripless_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_tripless_decimate_by__parameter_checking),
-      cmocka_unit_test(test__f_string_tripless_decrease_by__parameter_checking),
-      cmocka_unit_test(test__f_string_tripless_increase__parameter_checking),
-      cmocka_unit_test(test__f_string_tripless_increase_by__parameter_checking),
-      cmocka_unit_test(test__f_string_tripless_resize__parameter_checking),
 
       cmocka_unit_test(test__f_string_seek_line__parameter_checking),
 
       cmocka_unit_test(test__f_string_seek_line_to__parameter_checking),
 
       cmocka_unit_test(test__f_string_seek_to__parameter_checking),
+
+      // f_string_dynamicss_delete_callback() doesn't use parameter checking.
+      // f_string_dynamicss_destroy_callback() doesn't use parameter checking.
+
+      // f_string_map_multis_delete_callback() doesn't use parameter checking.
+      // f_string_map_multis_destroy_callback() doesn't use parameter checking.
+
+      // f_string_map_multiss_delete_callback() doesn't use parameter checking.
+      // f_string_map_multiss_destroy_callback() doesn't use parameter checking.
+
+      // f_string_maps_delete_callback() doesn't use parameter checking.
+      // f_string_maps_destroy_callback() doesn't use parameter checking.
+
+      // f_string_mapss_delete_callback() doesn't use parameter checking.
+      // f_string_mapss_destroy_callback() doesn't use parameter checking.
+
+      // f_string_quantityss_delete_callback() doesn't use parameter checking.
+      // f_string_quantityss_destroy_callback() doesn't use parameter checking.
+
+      // f_string_rangess_delete_callback() doesn't use parameter checking.
+      // f_string_rangess_destroy_callback() doesn't use parameter checking.
+
+      // f_string_triples_delete_callback() doesn't use parameter checking.
+      // f_string_triples_destroy_callback() doesn't use parameter checking.
+
+      // f_string_tripless_delete_callback() doesn't use parameter checking.
+      // f_string_tripless_destroy_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
   };
 
index 6b7f904df38f3e059f5bc6613f21ac2550230c71..c34ebd7d9e4780f364b318b39f2b89a2abe8ca7e 100644 (file)
@@ -23,7 +23,7 @@
 #include <fll/level_0/string.h>
 
 // Mock includes.
-//#include "mock-string.h"
+#include "mock-string.h"
 
 // Test includes.
 #include "test-string-append.h"
 #include "test-string-dynamics_append_all.h"
 #include "test-string-dynamicss_append.h"
 #include "test-string-dynamicss_append_all.h"
-#include "test-string-map_multis_adjust.h"
+#include "test-string-dynamicss_delete_callback.h"
+#include "test-string-dynamicss_destroy_callback.h"
 #include "test-string-map_multis_append.h"
 #include "test-string-map_multis_append_all.h"
-#include "test-string-map_multis_decimate_by.h"
-#include "test-string-map_multis_decrease_by.h"
-#include "test-string-map_multis_increase.h"
-#include "test-string-map_multis_increase_by.h"
-#include "test-string-map_multis_resize.h"
-#include "test-string-map_multiss_adjust.h"
+#include "test-string-map_multis_delete_callback.h"
+#include "test-string-map_multis_destroy_callback.h"
 #include "test-string-map_multiss_append.h"
 #include "test-string-map_multiss_append_all.h"
-#include "test-string-map_multiss_decimate_by.h"
-#include "test-string-map_multiss_decrease_by.h"
-#include "test-string-map_multiss_increase.h"
-#include "test-string-map_multiss_increase_by.h"
-#include "test-string-map_multiss_resize.h"
-#include "test-string-maps_adjust.h"
+#include "test-string-map_multiss_delete_callback.h"
+#include "test-string-map_multiss_destroy_callback.h"
 #include "test-string-maps_append.h"
 #include "test-string-maps_append_all.h"
-#include "test-string-maps_decimate_by.h"
-#include "test-string-maps_decrease_by.h"
-#include "test-string-maps_increase.h"
-#include "test-string-maps_increase_by.h"
-#include "test-string-maps_resize.h"
-#include "test-string-mapss_adjust.h"
+#include "test-string-maps_delete_callback.h"
+#include "test-string-maps_destroy_callback.h"
 #include "test-string-mapss_append.h"
 #include "test-string-mapss_append_all.h"
-#include "test-string-mapss_decimate_by.h"
-#include "test-string-mapss_decrease_by.h"
-#include "test-string-mapss_increase.h"
-#include "test-string-mapss_increase_by.h"
-#include "test-string-mapss_resize.h"
+#include "test-string-mapss_delete_callback.h"
+#include "test-string-mapss_destroy_callback.h"
 #include "test-string-mash.h"
 #include "test-string-mash_nulless.h"
 #include "test-string-mish.h"
 #include "test-string-prepend_assure.h"
 #include "test-string-prepend_assure_nulless.h"
 #include "test-string-prepend_nulless.h"
-#include "test-string-quantitys_adjust.h"
 #include "test-string-quantitys_append.h"
 #include "test-string-quantitys_append_all.h"
-#include "test-string-quantitys_decimate_by.h"
-#include "test-string-quantitys_decrease_by.h"
-#include "test-string-quantitys_increase.h"
-#include "test-string-quantitys_increase_by.h"
-#include "test-string-quantitys_resize.h"
-#include "test-string-quantityss_adjust.h"
 #include "test-string-quantityss_append.h"
 #include "test-string-quantityss_append_all.h"
-#include "test-string-quantityss_decimate_by.h"
-#include "test-string-quantityss_decrease_by.h"
-#include "test-string-quantityss_increase.h"
-#include "test-string-quantityss_increase_by.h"
-#include "test-string-quantityss_resize.h"
-#include "test-string-ranges_adjust.h"
+#include "test-string-quantityss_delete_callback.h"
+#include "test-string-quantityss_destroy_callback.h"
 #include "test-string-ranges_append.h"
 #include "test-string-ranges_append_all.h"
-#include "test-string-ranges_decimate_by.h"
-#include "test-string-ranges_decrease_by.h"
-#include "test-string-ranges_increase.h"
-#include "test-string-ranges_increase_by.h"
-#include "test-string-ranges_resize.h"
-#include "test-string-rangess_adjust.h"
 #include "test-string-rangess_append.h"
 #include "test-string-rangess_append_all.h"
-#include "test-string-rangess_decimate_by.h"
-#include "test-string-rangess_decrease_by.h"
-#include "test-string-rangess_increase.h"
-#include "test-string-rangess_increase_by.h"
-#include "test-string-rangess_resize.h"
+#include "test-string-rangess_delete_callback.h"
+#include "test-string-rangess_destroy_callback.h"
 #include "test-string-seek_line.h"
 #include "test-string-seek_line_to.h"
 #include "test-string-seek_to.h"
-#include "test-string-triples_adjust.h"
 #include "test-string-triples_append.h"
 #include "test-string-triples_append_all.h"
-#include "test-string-triples_decimate_by.h"
-#include "test-string-triples_decrease_by.h"
-#include "test-string-triples_increase.h"
-#include "test-string-triples_increase_by.h"
-#include "test-string-triples_resize.h"
-#include "test-string-tripless_adjust.h"
+#include "test-string-triples_delete_callback.h"
+#include "test-string-triples_destroy_callback.h"
 #include "test-string-tripless_append.h"
 #include "test-string-tripless_append_all.h"
-#include "test-string-tripless_decimate_by.h"
-#include "test-string-tripless_decrease_by.h"
-#include "test-string-tripless_increase.h"
-#include "test-string-tripless_increase_by.h"
-#include "test-string-tripless_resize.h"
+#include "test-string-tripless_delete_callback.h"
+#include "test-string-tripless_destroy_callback.h"
 
 #ifdef __cplusplus
 extern "C" {
index d11fad39cd860333a7bf661dcf014272d9385444..6dfcf236d63bf0bfb5a6864d64a7cd89715ceab9 100644 (file)
@@ -10,27 +10,27 @@ extern "C" {
       if (!environment) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    if (!name.used) {
-      return F_data_not;
-    }
+    if (!name.used) return F_data_not;
 
-    f_status_t status = f_string_maps_increase(F_memory_default_allocation_small_d, environment);
-    if (F_status_is_error(status)) return status;
+    {
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_map_t), (void **) &environment->array, &environment->used, &environment->size);
+      if (F_status_is_error(status)) return status;
 
-    environment->array[environment->used].name.used = 0;
-    environment->array[environment->used].value.used = 0;
+      environment->array[environment->used].name.used = 0;
+      environment->array[environment->used].value.used = 0;
 
-    status = f_string_dynamic_append_nulless(name, &environment->array[environment->used].name);
+      status = f_string_dynamic_append_nulless(name, &environment->array[environment->used].name);
 
-    if (F_status_is_error_not(status)) {
-      status = f_environment_get(name, &environment->array[environment->used].value);
-    }
+      if (F_status_is_error_not(status)) {
+        status = f_environment_get(name, &environment->array[environment->used].value);
+      }
 
-    if (F_status_is_error(status) || status == F_data_not || status == F_exist_not) {
-      environment->array[environment->used].name.used = 0;
-      environment->array[environment->used].value.used = 0;
+      if (F_status_is_error(status) || status == F_data_not || status == F_exist_not) {
+        environment->array[environment->used].name.used = 0;
+        environment->array[environment->used].value.used = 0;
 
-      return status;
+        return status;
+      }
     }
 
     ++environment->used;
@@ -49,7 +49,7 @@ extern "C" {
       return F_data_not;
     }
 
-    f_status_t status = f_string_maps_increase_by(names.used, environment);
+    f_status_t status = f_memory_array_increase_by(names.used, sizeof(f_string_map_t), (void **) &environment->array, &environment->used, &environment->size);
     if (F_status_is_error(status)) return status;
 
     for (f_number_unsigned_t i = 0; i < names.used; ++i) {
index 63aa40e204100db29ceced47ea09fda6c83bc3f0..5ce4c4d31eaa4f29b1764fbaa27d0dd58d1bd693 100644 (file)
@@ -47,12 +47,12 @@ extern "C" {
  *   F_exist_not if name does not exist.
  *
  *   Errors (with error bit) from: f_environment_get().
+ *   Errors (with error bit) from: f_memory_array_increase_by().
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
- *   Errors (with error bit) from: f_string_maps_increase_by().
  *
  * @see f_environment_get()
+ * @see f_memory_array_increase_by()
  * @see f_string_dynamic_append_nulless()
- * @see f_string_maps_increase_by()
  */
 #ifndef _di_fl_environment_load_name_
   extern f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t * const environment);
@@ -80,12 +80,12 @@ extern "C" {
  *   F_data_not if names.used is 0.
  *
  *   Errors (with error bit) from: f_environment_get().
+ *   Errors (with error bit) from: f_memory_array_increase_by().
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
- *   Errors (with error bit) from: f_string_maps_increase_by().
  *
  * @see f_environment_get()
+ * @see f_memory_array_increase_by()
  * @see f_string_dynamic_append_nulless()
- * @see f_string_maps_increase_by()
  */
 #ifndef _di_fl_environment_load_names_
   extern f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t * const environment);
index ce0e6ebaa70e28e2826469bbf228f003fc0f59dd..a674842e38649d005bc2a13c0fd88e39144ef245 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
       return;
     }
 
-    state->status = f_string_ranges_increase(state->step_small, found);
+    state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &found->array, &found->used, &found->size);
     if (F_status_is_error(state->status)) return;
 
     found->array[found->used].start = range->start;
index 4682ead70e74e882fb2fdc4ca38f9dc3e66d4e6d..fced4c0043597a47194901a9083244cb40538043 100644 (file)
@@ -71,12 +71,12 @@ extern "C" {
  *
  *     Errors (with error bit) from: f_fss_skip_past_delimit().
  *     Errors (with error bit) from: f_fss_skip_past_space().
- *     Errors (with error bit) from: f_string_ranges_increase().
+ *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: f_utf_buffer_increment().
  *
  * @see f_fss_skip_past_delimit()
  * @see f_fss_skip_past_space()
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
  * @see f_utf_buffer_increment()
  */
 #ifndef _di_fl_fss_basic_content_read_
index 5a82cf46dfd265b1dee39e74ea2536f9a0167f7c..f41c7a29040e0fe61360370cc3e5bad6e6d0864d 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
       return;
     }
 
-    state->status = f_string_ranges_increase(state->step_small, found);
+    state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &found->array, &found->used, &found->size);
     if (F_status_is_error(state->status)) return;
 
     found->array[found->used].start = range->start;
@@ -236,7 +236,7 @@ extern "C" {
         f_fss_seek_to_eol(buffer, range, state);
         if (F_status_is_error(state->status)) break;
 
-        state->status = f_string_ranges_increase(state->step_small, comments);
+        state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &comments->array, &comments->used, &comments->size);
         if (F_status_is_error(state->status)) break;
 
         if (range->start > range->stop || range->start >= buffer.used) {
index 8a77dd2951d758554b35a90205c7109a8a4cc48a..02fdf2a0e68c53c8b397e62e87baec9f4a031785 100644 (file)
@@ -74,20 +74,18 @@ extern "C" {
  *     F_interrupt (with error bit) if stopping due to an interrupt.
  *     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_increase_by().
  *     Errors (with error bit) from: f_fss_is_space().
  *     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().
+ *     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_utf_buffer_increment().
  *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
  * @see f_fss_is_space()
  * @see f_fss_seek_to_eol()
  * @see f_fss_skip_past_delimit()
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
  * @see f_utf_buffer_increment()
  */
 #ifndef _di_fl_fss_basic_list_content_read_
index acf68d829b083b63ba31951b6756bd04ba8b4c90..2de0279b1f174401d6beb47354340061016613ef 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
     f_string_ranges_t objects = f_string_ranges_t_initialize;
 
-    state->status = f_string_ranges_increase(state->step_small, &objects);
+    state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
 
     if (F_status_is_error(state->status)) {
       f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
@@ -46,7 +46,7 @@ extern "C" {
 
     if (F_status_is_error(state->status)) {
       f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-      f_string_ranges_resize(0, &objects);
+      f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
 
       return;
     }
@@ -105,7 +105,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -116,7 +116,7 @@ extern "C" {
         else {
           if (range->start >= buffer.used || range->start > range->stop) {
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_okay_eos : F_okay_stop;
@@ -164,7 +164,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -178,7 +178,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -260,7 +260,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -274,7 +274,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -324,7 +324,7 @@ extern "C" {
                   state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
                   if (F_status_is_error(state->status)) break;
 
-                  state->status = f_string_ranges_increase(state->step_small, &objects);
+                  state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
                   if (F_status_is_error(state->status)) break;
 
                   state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
@@ -401,7 +401,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -415,7 +415,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -431,7 +431,7 @@ extern "C" {
             state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
             if (F_status_is_error(state->status)) break;
 
-            state->status = f_string_ranges_increase(state->step_small, &objects);
+            state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             if (F_status_is_error(state->status)) break;
 
             state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
@@ -506,7 +506,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -520,7 +520,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -564,7 +564,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -578,7 +578,7 @@ extern "C" {
             comments->used = comments_used;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -599,7 +599,7 @@ extern "C" {
           position = found->depth[depth].used;
 
           if (found->depth[depth].array[position].content.size != 1) {
-            state->status = f_string_ranges_resize(1, &found->depth[depth].array[position].content);
+            state->status = f_memory_array_resize(1, sizeof(f_string_range_t), (void **) &found->depth[depth].array[position].content.array, &found->depth[depth].array[position].content.used, &found->depth[depth].array[position].content.size);
             if (F_status_is_error(state->status)) break;
           }
 
@@ -639,7 +639,7 @@ extern "C" {
             if (F_status_is_error(state->status)) break;
 
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-            f_string_ranges_resize(0, &objects);
+            f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
             f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
             if (range->start >= buffer.used) {
@@ -695,7 +695,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop;
@@ -709,7 +709,7 @@ extern "C" {
               comments->used = comments_used;
 
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-              f_string_ranges_resize(0, &objects);
+              f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
               f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
               state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop;
@@ -725,7 +725,7 @@ extern "C" {
         f_fss_seek_to_eol(buffer, range, state);
         if (F_status_is_error(state->status)) break;
 
-        state->status = f_string_ranges_increase(state->step_small, comments);
+        state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &comments->array, &comments->used, &comments->size);
         if (F_status_is_error(state->status)) break;
 
         if (range->start > range->stop || range->start >= buffer.used) {
@@ -774,7 +774,7 @@ extern "C" {
     } // while
 
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
-    f_string_ranges_resize(0, &objects);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
 
     delimits->used = delimits_used;
index 6170e65ab982ab6afc090a00cdf3250aadbc77c0..b229ae3030e87ec4e47a3564e29a53dba15376fc 100644 (file)
@@ -78,20 +78,18 @@ extern "C" {
  *     F_interrupt (with error bit) if stopping due to an interrupt.
  *     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_increase_by().
  *     Errors (with error bit) from: f_fss_is_space().
  *     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().
+ *     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_utf_buffer_increment().
  *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
  * @see f_fss_is_space()
  * @see f_fss_seek_to_eol()
  * @see f_fss_skip_past_delimit()
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
  * @see f_utf_buffer_increment()
  */
 #ifndef _di_fl_fss_embedded_list_content_read_
index e3e1254984aa10984113a372e0a9a2d0b483c47a..745706e408d1c46916c40a7bb06bd84d3c3bc644 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
       private_fl_fss_basic_read(buffer, F_false, range, &content_partial, &quote, delimits, state);
 
       if (state->status == F_fss_found_object || F_status_set_fine(state->status) == F_fss_found_object_content_not) {
-        status = f_string_ranges_increase(state->step_small, found);
+        status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &found->array, &found->used, &found->size);
 
         // The private function sets the error bit on unterminated quoted Object.
         if (state->status == F_status_set_error(F_fss_found_object_content_not)) {
index 5bceb8051f2c7ee124d01f78d4c3fc96a7907789..70563b58601a504a4b07471d4d7c746508df1145 100644 (file)
@@ -203,22 +203,20 @@ extern "C" {
  *     F_interrupt (with error bit) if stopping due to an interrupt.
  *     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_fss_is_graph().
  *     Errors (with error bit) from: f_fss_is_space().
  *     Errors (with error bit) from: f_fss_is_zero_width().
  *     Errors (with error bit) from: f_fss_skip_past_delimit().
  *     Errors (with error bit) from: f_fss_skip_past_space().
- *     Errors (with error bit) from: f_string_ranges_increase().
+ *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: f_utf_buffer_increment().
  *
- * @see f_memory_array_increase()
  * @see f_fss_is_graph()
  * @see f_fss_is_space()
  * @see f_fss_is_zero_width()
  * @see f_fss_skip_past_delimit()
  * @see f_fss_skip_past_space()
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
  * @see f_utf_buffer_increment()
  * @see fl_fss_basic_object_read()
  * @see fl_fss_extended_object_read()
index 214bd3c3052cfae35dd1f9eaeafbfc8ac310207b..7d03037ade5e5042b6beaae05aec9a0328d810ba 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
       return;
     }
 
-    state->status = f_string_ranges_increase(state->step_small, found);
+    state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &found->array, &found->used, &found->size);
     if (F_status_is_error(state->status)) return;
 
     found->array[found->used].start = range->start;
@@ -192,7 +192,7 @@ extern "C" {
         f_fss_seek_to_eol(buffer, range, state);
         if (F_status_is_error(state->status)) break;
 
-        state->status = f_string_ranges_increase(state->step_small, comments);
+        state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &comments->array, &comments->used, &comments->size);
         if (F_status_is_error(state->status)) break;
 
         if (range->start > range->stop || range->start >= buffer.used) {
index ad908b63bd7622ee888b5b073ae7951738b83997..5b656b5d78b319de45bce01224f84326ba05bd14 100644 (file)
@@ -76,20 +76,18 @@ extern "C" {
  *     F_interrupt (with error bit) if stopping due to an interrupt.
  *     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_increase_by().
  *     Errors (with error bit) from: f_fss_is_space().
  *     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().
+ *     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_utf_buffer_increment().
  *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
  * @see f_fss_is_space()
  * @see f_fss_seek_to_eol()
  * @see f_fss_skip_past_delimit()
- * @see f_string_ranges_increase()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
  * @see f_utf_buffer_increment()
  */
 #ifndef _di_fl_fss_extended_list_content_read_
index 4fa4bedfffc05542be0094a86986851c2bbce29f..d22ebfd2332dacc337677fe67bc3feca769e6552 100644 (file)
@@ -438,7 +438,7 @@ extern "C" {
           matches[j] = F_true;
         }
 
-        status = f_string_map_multis_increase(F_fss_default_allocation_step_small_d, values[j]);
+        status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_string_map_multi_t), (void **) &values[j]->array, &values[j]->used, &values[j]->size);
         if (F_status_is_error(status)) return status;
 
         if (indexs) {
@@ -512,7 +512,7 @@ extern "C" {
           matches[j] = F_true;
         }
 
-        status = f_string_maps_increase(F_fss_default_allocation_step_small_d, values[j]);
+        status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_string_map_t), (void **) &values[j]->array, &values[j]->used, &values[j]->size);
         if (F_status_is_error(status)) return status;
 
         if (indexs) {
@@ -619,7 +619,7 @@ extern "C" {
           map_multi = &values[j]->array[k];
         }
         else {
-          status = f_string_map_multis_increase(F_fss_default_allocation_step_small_d, values[j]);
+          status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_string_map_multi_t), (void **) &values[j]->array, &values[j]->used, &values[j]->size);
           if (F_status_is_error(status)) return status;
 
           if (indexs) {
@@ -735,7 +735,7 @@ extern "C" {
           map = &values[j]->array[k];
         }
         else {
-          status = f_string_maps_increase(F_fss_default_allocation_step_small_d, values[j]);
+          status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_string_map_t), (void **) &values[j]->array, &values[j]->used, &values[j]->size);
           if (F_status_is_error(status)) return status;
 
           if (indexs) {
index e1893e37890b16119d5ada1bbb149a6ce2b04c77..1503d600b3bd67a13ffee6f25f5872d09a023ea9 100644 (file)
@@ -24,10 +24,10 @@ extern "C" {
     uint8_t *quoted_object = 0;
 
     do {
-      state->status = f_string_ranges_increase(state->step_small, objects);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects->array, &objects->used, &objects->size);
       if (F_status_is_error(state->status)) return;
 
-      state->status = f_string_rangess_increase(state->step_small, contents);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
       if (F_status_is_error(state->status)) return;
 
       contents->array[contents->used].used = 0;
@@ -53,7 +53,8 @@ extern "C" {
               ++objects_quoted->used;
             }
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
+
             if (F_status_is_error(status)) {
               state->status = status;
 
@@ -92,7 +93,7 @@ extern "C" {
         if (state->status == F_fss_found_object_content_not) {
           found_data = F_true;
 
-          status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+          status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
           if (F_status_is_error(status)) {
             state->status = status;
index 1f3506c77f4435eccf2542f29afbf1117d952575..68ed193fcc8b29659784d51c7b581937365a218e 100644 (file)
@@ -70,14 +70,10 @@ extern "C" {
  *     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_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_basic_content_read().
  *     Errors (with error bit) from: fl_fss_basic_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_basic_content_read()
  * @see fl_fss_basic_object_read()
  */
index 67d54ef9453fe6494c1e24ff17610171422a49a1..5dd539d7562dbd4974a1b3a982f24a2f9027c781 100644 (file)
@@ -22,10 +22,10 @@ extern "C" {
     bool found_data = F_false;
 
     do {
-      state->status = f_string_ranges_increase(state->step_small, objects);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects->array, &objects->used, &objects->size);
       if (F_status_is_error(state->status)) return;
 
-      state->status = f_string_rangess_increase(state->step_small, contents);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
       if (F_status_is_error(state->status)) return;
 
       contents->array[contents->used].used = 0;
@@ -38,7 +38,7 @@ extern "C" {
           if (state->status == F_fss_found_object || state->status == F_fss_found_object_content_not) {
             ++objects->used;
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
             if (F_status_is_error(status)) {
               state->status = status;
@@ -78,7 +78,7 @@ extern "C" {
         if (state->status == F_fss_found_object_content_not) {
           found_data = F_true;
 
-          status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+          status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
           if (F_status_is_error(status)) {
             state->status = status;
index 328c741862e56ee48affa0c95ef05ea8543bd8a8..85ef1af52fff168fd10ab6090710a9db2e9ea9d1 100644 (file)
@@ -69,14 +69,10 @@ extern "C" {
  *     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_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_basic_list_content_read().
  *     Errors (with error bit) from: fl_fss_basic_list_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_basic_list_content_read()
  * @see fl_fss_basic_list_object_read()
  */
index 6864e7b66f3a52836a66b33c1dae3f1107590737..647cbf5769c8f54918a3197fdf6f3ecbb0486c7d 100644 (file)
@@ -69,14 +69,10 @@ extern "C" {
  *     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_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_embedded_list_content_read().
  *     Errors (with error bit) from: fl_fss_embedded_list_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_embedded_list_content_read()
  * @see fl_fss_embedded_list_object_read()
  */
index 390051535cec554bc0e2cfb6126130a525f4ea5c..3f1b68587aba7f7fd51538e53b2f2b87fb3e984a 100644 (file)
@@ -25,10 +25,10 @@ extern "C" {
     f_uint8s_t *quoted_content = 0;
 
     do {
-      state->status = f_string_ranges_increase(state->step_small, objects);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects->array, &objects->used, &objects->size);
       if (F_status_is_error(state->status)) return;
 
-      state->status = f_string_rangess_increase(state->step_small, contents);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
       if (F_status_is_error(state->status)) return;
 
       contents->array[contents->used].used = 0;
@@ -61,7 +61,7 @@ extern "C" {
               ++objects_quoted->used;
             }
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
             if (F_status_is_error(status)) return;
 
             contents->array[contents->used++].used = 0;
index 2bf678fe5f4d6adeb6b3795b66afa77e1f749565..556af07873a97c203a52f8c800ae03b83d5e2fa2 100644 (file)
@@ -73,14 +73,10 @@ extern "C" {
  *     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_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_extended_content_read().
  *     Errors (with error bit) from: fl_fss_extended_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_extended_content_read()
  * @see fl_fss_extended_object_read()
  */
index cbc037b40457ef488de2928b1e7af1c011d194e4..dc20d4b5c05c4f200d7202fddf93e5bbbe1e9f42 100644 (file)
@@ -22,10 +22,10 @@ extern "C" {
     bool found_data = F_false;
 
     do {
-      state->status = f_string_ranges_increase(state->step_small, objects);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects->array, &objects->used, &objects->size);
       if (F_status_is_error(state->status)) return;
 
-      state->status = f_string_rangess_increase(state->step_small, contents);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
       if (F_status_is_error(state->status)) return;
 
       contents->array[contents->used].used = 0;
@@ -38,7 +38,8 @@ extern "C" {
           if (state->status == F_fss_found_object || state->status == F_fss_found_object_content_not) {
             ++objects->used;
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
+
             if (F_status_is_error(state->status)) {
               state->status = status;
 
@@ -76,7 +77,7 @@ extern "C" {
         if (state->status == F_fss_found_object_content_not) {
           found_data = F_true;
 
-          status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+          status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
           if (F_status_is_error(status)) {
             state->status = status;
index 619a5468c2d92a9c52cc50c5f7dee68293bd3241..2fb17e268c41cefd2944333cd760631d4390fba6 100644 (file)
@@ -73,14 +73,10 @@ extern "C" {
  *     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_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_extended_list_content_read().
  *     Errors (with error bit) from: fl_fss_extended_list_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_extended_list_content_read()
  * @see fl_fss_extended_list_object_read()
  */
index 9e20a1204a74108c7ade3f379319fe079b6e232b..b354c75891d7a2c82faa06562def2f2888836426 100644 (file)
@@ -22,10 +22,10 @@ extern "C" {
     bool found_data = F_false;
 
     do {
-      state->status = f_string_ranges_increase(state->step_small, objects);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &objects->array, &objects->used, &objects->size);
       if (F_status_is_error(state->status)) return;
 
-      state->status = f_string_rangess_increase(state->step_small, contents);
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_string_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
       if (F_status_is_error(state->status)) return;
 
       contents->array[contents->used].used = 0;
@@ -47,7 +47,8 @@ extern "C" {
 
             ++objects->used;
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
+
             if (F_status_is_error(status)) {
               state->status = status;
 
@@ -82,7 +83,7 @@ extern "C" {
           contents->array[contents->used].used = 0;
 
           if (f_compare_dynamic_partial_string(f_fss_payload_s.string, buffer, f_fss_payload_s.used, objects->array[objects->used]) == F_equal_to) {
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
             if (F_status_is_error(status)) {
               state->status = status;
@@ -119,7 +120,7 @@ extern "C" {
         if (state->status == F_fss_found_object_content_not) {
           found_data = F_true;
 
-          status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+          status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
           if (F_status_is_error(status)) {
             state->status = status;
@@ -132,7 +133,7 @@ extern "C" {
           if (f_compare_dynamic_partial_string(f_fss_payload_s.string, buffer, f_fss_payload_s.used, objects->array[objects->used]) == F_equal_to) {
             ++objects->used;
 
-            status = f_string_ranges_increase(state->step_small, &contents->array[contents->used]);
+            status = f_memory_array_increase(state->step_small, sizeof(f_string_range_t), (void **) &contents->array[contents->used].array, &contents->array[contents->used].used, &contents->array[contents->used].size);
 
             if (F_status_is_error(status)) {
               state->status = status;
index 772fa61b6145ae76307349c59ac9069572e74655..54eb7912360862c5382462c83fb52fa7fbf2e1c2 100644 (file)
@@ -86,14 +86,10 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *
  *     Errors (with error bit) from: f_memory_array_increase().
- *     Errors (with error bit) from: f_string_ranges_increase().
- *     Errors (with error bit) from: f_string_rangess_increase().
  *     Errors (with error bit) from: fl_fss_basic_list_content_read().
  *     Errors (with error bit) from: fl_fss_basic_list_object_read().
  *
  * @see f_memory_array_increase()
- * @see f_string_ranges_increase()
- * @see f_string_rangess_increase()
  * @see fl_fss_basic_list_content_read()
  * @see fl_fss_basic_list_object_read()
  */
index a29e3f9cc39bf6b09424afa2b4f7c5ea322c302d..7ea854080bea16db55dccadeaa2ccfdbe9a091c8 100644 (file)
@@ -385,8 +385,8 @@ extern "C" {
       return;
     }
 
-    f_string_ranges_resize(0, &main->cache.objects);
-    f_string_rangess_resize(0, &main->cache.contents);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &main->cache.objects.array, &main->cache.objects.used, &main->cache.objects.size);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &main->cache.contents.array, &main->cache.contents.used, &main->cache.contents.size, &f_string_rangess_delete_callback);
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &main->cache.delimits.array, &main->cache.delimits.used, &main->cache.delimits.size);
 
     {
index ec6ca68f77175c88b3931d59ccdaf3b153271212..4d36fd4d7b5dd9d768893d6dedee2894e02a2271 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->cache.small.string, &main->cache.small.used, &main->cache.small.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->cache.packet.string, &main->cache.packet.used, &main->cache.packet.size);
 
-    f_string_ranges_resize(0, &main->cache.objects);
-    f_string_rangess_resize(0, &main->cache.contents);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &main->cache.objects.array, &main->cache.objects.used, &main->cache.objects.size);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &main->cache.contents.array, &main->cache.contents.used, &main->cache.contents.size, &f_string_rangess_delete_callback);
 
-    f_string_ranges_resize(0, &main->cache.packet_objects);
-    f_string_rangess_resize(0, &main->cache.packet_contents);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &main->cache.packet_objects.array, &main->cache.packet_objects.used, &main->cache.packet_objects.size);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &main->cache.packet_contents.array, &main->cache.packet_contents.used, &main->cache.packet_contents.size, &f_string_rangess_delete_callback);
 
-    f_string_ranges_resize(0, &main->cache.header_objects);
-    f_string_rangess_resize(0, &main->cache.header_contents);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &main->cache.header_objects.array, &main->cache.header_objects.used, &main->cache.header_objects.size);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &main->cache.header_contents.array, &main->cache.header_contents.used, &main->cache.header_contents.size, &f_string_rangess_delete_callback);
 
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &main->cache.delimits.array, &main->cache.delimits.used, &main->cache.delimits.size);
   }
index 599ee38ec24934bb90265e36e7dfd1b1e790fdce..7e24f8e7ed526802c1c228661765bb283962e936 100644 (file)
@@ -182,8 +182,7 @@ extern "C" {
  *   This does not alter main.setting.state.status.
  *
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
  * @see fll_program_data_delete()
  */
 #ifndef _di_control_main_delete_
index f2692c4cd44a7c29e4e4d25eb7471d1d3fdc260b..1fb1c21cabaad5ca018c1bd59ed51ff3fd209afa 100644 (file)
@@ -28,13 +28,13 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &cache->stack.array, &cache->stack.used, &cache->stack.size);
     f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &cache->delimits.array, &cache->delimits.used, &cache->delimits.size);
 
-    f_string_ranges_resize(0, &cache->comments);
-    f_string_ranges_resize(0, &cache->content_action);
-    f_string_ranges_resize(0, &cache->object_actions);
-    f_string_ranges_resize(0, &cache->object_items);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &cache->comments.array, &cache->comments.used, &cache->comments.size);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &cache->content_action.array, &cache->content_action.used, &cache->content_action.size);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &cache->object_actions.array, &cache->object_actions.used, &cache->object_actions.size);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &cache->object_items.array, &cache->object_items.used, &cache->object_items.size);
 
-    f_string_rangess_resize(0, &cache->content_actions);
-    f_string_rangess_resize(0, &cache->content_items);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &cache->content_actions.array, &cache->content_actions.used, &cache->content_actions.size, &f_string_rangess_delete_callback);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &cache->content_items.array, &cache->content_items.used, &cache->content_items.size, &f_string_rangess_delete_callback);
 
     controller_cache_action_delete_simple(&cache->action);
   }
index 95f0a7f298680da755dd49fc71cb64999738ab45..93825030e02ff85a9d17f500802b65e5be202bdd 100644 (file)
@@ -140,8 +140,7 @@ extern "C" {
  * @see controller_cache_action_delete_simple()
  *
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
- * @see f_string_rangess_resize()
+ * @see f_memory_arrays_resize()
  */
 #ifndef _di_controller_cache_delete_simple_
   extern void controller_cache_delete_simple(controller_cache_t * const cache) F_attribute_visibility_internal_d;
index c27eb904eb5dfaacce02f6a9a2833e401d01c543..c8b643129c9c084178ad5258e216c92e2873bad5 100644 (file)
@@ -63,8 +63,8 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &rule->name.string, &rule->name.used, &rule->name.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &rule->path.string, &rule->path.used, &rule->path.size);
 
-    f_string_maps_resize(0, &rule->define);
-    f_string_maps_resize(0, &rule->parameter);
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &rule->define.array, &rule->define.used, &rule->define.size, &f_string_maps_delete_callback);
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &rule->parameter.array, &rule->parameter.used, &rule->parameter.size, &f_string_maps_delete_callback);
 
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &rule->engine_arguments.array, &rule->engine_arguments.used, &rule->engine_arguments.size, &f_string_dynamics_delete_callback);
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &rule->environment.array, &rule->environment.used, &rule->environment.size, &f_string_dynamics_delete_callback);
index 8e4affe34df45b76a831dc27657a42bbd0a5a563..94165b372926542cd9f965ec155228bf5e74c1b7 100644 (file)
@@ -18,11 +18,11 @@ extern "C" {
 
     controller_control_delete_simple(&setting->control);
 
-    f_string_maps_resize(0, &setting->entry.define);
-    f_string_maps_resize(0, &setting->entry.parameter);
+    status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &setting->entry.define.array, &setting->entry.define.used, &setting->entry.define.size, &f_string_maps_delete_callback);
+    status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &setting->entry.parameter.array, &setting->entry.parameter.used, &setting->entry.parameter.size, &f_string_maps_delete_callback);
 
-    f_string_maps_resize(0, &setting->exit.define);
-    f_string_maps_resize(0, &setting->exit.parameter);
+    status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &setting->exit.define.array, &setting->exit.define.used, &setting->exit.define.size, &f_string_maps_delete_callback);
+    status = f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &setting->exit.parameter.array, &setting->exit.parameter.used, &setting->exit.parameter.size, &f_string_maps_delete_callback);
 
     controller_entry_items_delete_simple(&setting->entry.items);
     controller_entry_items_delete_simple(&setting->exit.items);
index 266d1f49b9890a529d42ec07a2398afd2bbcd980..0989cf83a606ae5862fa8e582c8855112f15db1e 100644 (file)
@@ -2327,17 +2327,19 @@ extern "C" {
 #ifndef _di_controller_entry_settings_read_map_
   f_status_t controller_entry_settings_read_map(const f_string_static_t buffer, const f_string_ranges_t ranges, f_string_maps_t *setting_maps) {
 
-    f_status_t status = f_string_maps_increase(controller_common_allocation_small_d, setting_maps);
-    if (F_status_is_error(status)) return status;
+    {
+      f_status_t status = f_memory_array_increase(controller_common_allocation_small_d, sizeof(f_string_map_t), (void **) &setting_maps->array, &setting_maps->used, &setting_maps->size);
+      if (F_status_is_error(status)) return status;
 
-    setting_maps->array[setting_maps->used].name.used = 0;
-    setting_maps->array[setting_maps->used].value.used = 0;
+      setting_maps->array[setting_maps->used].name.used = 0;
+      setting_maps->array[setting_maps->used].value.used = 0;
 
-    status = f_string_dynamic_partial_append_nulless(buffer, ranges.array[0], &setting_maps->array[setting_maps->used].name);
-    if (F_status_is_error(status)) return status;
+      status = f_string_dynamic_partial_append_nulless(buffer, ranges.array[0], &setting_maps->array[setting_maps->used].name);
+      if (F_status_is_error(status)) return status;
 
-    status = f_string_dynamic_partial_append_nulless(buffer, ranges.array[1], &setting_maps->array[setting_maps->used].value);
-    if (F_status_is_error(status)) return status;
+      status = f_string_dynamic_partial_append_nulless(buffer, ranges.array[1], &setting_maps->array[setting_maps->used].value);
+      if (F_status_is_error(status)) return status;
+    }
 
     ++setting_maps->used;
 
index ba799dfe09b0856b0017ab5db55ba9f0a1c901a5..f2e18c52a64db95d8327c3b43e9c8078836828d2 100644 (file)
@@ -224,11 +224,11 @@ extern "C" {
  *   The map to load the settings into.
  *
  * @return
+ *   Errors (with error bit) from: f_memory_aray_increase().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_maps_increase().
  *
+ * @see f_memory_aray_increase()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_maps_increase()
  */
 #ifndef _di_controller_entry_settings_read_map_
   f_status_t controller_entry_settings_read_map(const f_string_static_t buffer, const f_string_ranges_t ranges, f_string_maps_t *setting_maps) F_attribute_visibility_internal_d;
index 1c9e930e600ffdff6626e2bbc40b76bf06ee48e2..5d8e23f755d0d943d34ee3d88f89032444e9fc38 100644 (file)
@@ -4240,10 +4240,10 @@ extern "C" {
           setting_maps = &rule->parameter;
         }
 
-        status = f_string_maps_increase(controller_common_allocation_small_d, setting_maps);
+        status = f_memory_array_increase(controller_common_allocation_small_d, sizeof(f_string_map_t), (void **) &setting_maps->array, &setting_maps->used, &setting_maps->size);
 
         if (F_status_is_error(status)) {
-          controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_maps_increase", F_true, F_false);
+          controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_memory_array_increase", F_true, F_false);
 
           if (F_status_set_fine(status) == F_memory_not) {
             status_return = status;
index 9fb2d9790df7d1a9d138c0de498d45ebe4a64bd9..e52a96b83faff5ef51f2f04c5097caeba47e46a6 100644 (file)
@@ -706,7 +706,6 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_array_increase().
  *   Errors (with error bit) from: f_rip_dynamic_partial_nulless().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_maps_increase().
  *   Errors (with error bit) from: fll_fss_extended_read().
  *
  *   Errors (with error bit) from: controller_path_canonical_relative().
@@ -714,7 +713,6 @@ extern "C" {
  * @see f_memory_array_increase()
  * @see f_rip_dynamic_partial_nulless()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_maps_increase()
  * @see fll_fss_extended_read()
  *
  * @see controller_path_canonical_relative()
index 9fb2ba92c5220225384bdb36e022c473b6a10626..babffd39ced1f59e6dbe7ed7c566bb9ba125f22d 100644 (file)
@@ -174,8 +174,8 @@ extern "C" {
 
       f_memory_array_resize(0, sizeof(f_char_t), (void **) &buffer.string, &buffer.used, &buffer.size);
 
-      f_string_ranges_resize(0, &objects);
-      f_string_rangess_resize(0, &contents);
+      f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &objects.array, &objects.used, &objects.size);
+      f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &contents.array, &contents.used, &contents.size, &f_string_rangess_delete_callback);
     }
 
     // Error when required settings are not specified.
index 189077f21e192a117beaf1444a880f7bfe414002..05f0d3e250ee2e5567b77feba30dbf6ce333891d 100644 (file)
@@ -555,7 +555,7 @@ extern "C" {
 
     // Shrink an overly long array.
     if (iki_data->content.used > fake_max_over_array_d) {
-      f_string_ranges_resize(fake_allocation_large_d, &iki_data->content);
+      f_memory_array_resize(fake_allocation_large_d, sizeof(f_string_range_t), (void **) &iki_data->content.array, &iki_data->content.used, &iki_data->content.size);
     }
 
     if (iki_data->delimits.used > fake_max_over_array_d) {
@@ -563,11 +563,11 @@ extern "C" {
     }
 
     if (iki_data->variable.used > fake_max_over_array_d) {
-      f_string_ranges_resize(fake_allocation_large_d, &iki_data->variable);
+      f_memory_array_resize(fake_allocation_large_d, sizeof(f_string_range_t), (void **) &iki_data->variable.array, &iki_data->variable.used, &iki_data->variable.size);
     }
 
     if (iki_data->vocabulary.used > fake_max_over_array_d) {
-      f_string_ranges_resize(fake_allocation_large_d, &iki_data->vocabulary);
+      f_memory_array_resize(fake_allocation_large_d, sizeof(f_string_range_t), (void **) &iki_data->vocabulary.array, &iki_data->vocabulary.used, &iki_data->vocabulary.size);
     }
 
     while (iki_data->content.used) {
index dc243b265e69fe98dbabed277d223e3a35d75fdb..a8683eecfb47dff16c96b4fdfe29df49f3488d9a 100644 (file)
@@ -118,7 +118,6 @@ extern "C" {
  *   The iki data to shrink.
  *
  * @see f_memory_array_resize()
- * @see f_string_ranges_resize()
  */
 #ifndef _di_fake_iki_data_reset_
   extern void fake_iki_data_reset(f_iki_data_t * const iki_data);
index 003077e0dda0e98c9611992567ba1a1e3a0168bd..5b5d3ec0626bd167620b043bc58f1b7750f6a25e 100644 (file)
@@ -62,7 +62,6 @@ extern "C" {
     "f_string_dynamic_partial_append",
     "f_string_dynamic_partial_append_nulless",
     "f_string_dynamic_prepend",
-    "f_string_map_multis_resize",
     "f_thread_create",
     "f_utf_is_word_dash_plus",
     "fl_conversion_dynamic_to_unsigned_detect",
index fc147d7e1789b85390b10bf05c9f93fa536ff1b6..b0dc24927ff1edd66913ad9ab74076e2e609e00a 100644 (file)
@@ -95,7 +95,6 @@ extern "C" {
     fake_f_f_string_dynamic_partial_append_e,
     fake_f_f_string_dynamic_partial_append_nulless_e,
     fake_f_f_string_dynamic_prepend_e,
-    fake_f_f_string_map_multis_resize_e,
     fake_f_f_thread_create_e,
     fake_f_f_utf_is_word_dash_plus_e,
     fake_f_fl_conversion_dynamic_to_unsigned_detect_e,
index 5ef280374f51dd4b794e0999c87cad952ee5786c..554f96d1f83cf02564b7d3d2b0d611c3ff93c543 100644 (file)
@@ -10,7 +10,8 @@ extern "C" {
     if (!build_data) return;
 
     fake_build_setting_delete(&build_data->setting);
-    f_string_maps_resize(0, &build_data->environment);
+
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &build_data->environment.array, &build_data->environment.used, &build_data->environment.size, &f_string_maps_delete_callback);
   }
 #endif // _di_fake_build_data_delete_
 
@@ -36,6 +37,7 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_program_script.string, &build_setting->path_program_script.used, &build_setting->path_program_script.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_program_shared.string, &build_setting->path_program_shared.used, &build_setting->path_program_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_program_static.string, &build_setting->path_program_static.used, &build_setting->path_program_static.size);
+    f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources.string, &build_setting->path_sources.used, &build_setting->path_sources.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->path_sources_object.string, &build_setting->path_sources_object.used, &build_setting->path_sources_object.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->process_post.string, &build_setting->process_post.used, &build_setting->process_post.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_setting->process_pre.string, &build_setting->process_pre.used, &build_setting->process_pre.size);
@@ -109,6 +111,7 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_shared.string, &build_stage->file_library_shared.used, &build_stage->file_library_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_library_static.string, &build_stage->file_library_static.used, &build_stage->file_library_static.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_script.string, &build_stage->file_object_script.used, &build_stage->file_object_script.size);
+    f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_shared.string, &build_stage->file_object_shared.used, &build_stage->file_object_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_object_static.string, &build_stage->file_object_static.used, &build_stage->file_object_static.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_objects_static.string, &build_stage->file_objects_static.used, &build_stage->file_objects_static.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &build_stage->file_process_post.string, &build_stage->file_process_post.used, &build_stage->file_process_post.size);
@@ -137,6 +140,7 @@ extern "C" {
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_libraries_script.string, &data->path_build_libraries_script.used, &data->path_build_libraries_script.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_libraries_shared.string, &data->path_build_libraries_shared.used, &data->path_build_libraries_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_libraries_static.string, &data->path_build_libraries_static.used, &data->path_build_libraries_static.size);
+    f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_objects.string, &data->path_build_objects.used, &data->path_build_objects.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_objects_script.string, &data->path_build_objects_script.used, &data->path_build_objects_script.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_objects_shared.string, &data->path_build_objects_shared.used, &data->path_build_objects_shared.size);
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &data->path_build_objects_static.string, &data->path_build_objects_static.used, &data->path_build_objects_static.size);
@@ -208,7 +212,7 @@ extern "C" {
     fake_build_setting_delete(&data_make->setting_build);
     fake_make_setting_delete(&data_make->setting_make);
 
-    f_string_maps_resize(0, &data_make->environment);
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &data_make->environment.array, &data_make->environment.used, &data_make->environment.size, &f_string_maps_delete_callback);
 
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &data_make->parameter.build.array, &data_make->parameter.build.used, &data_make->parameter.build.size, &f_string_dynamics_delete_callback);
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &data_make->parameter.color.array, &data_make->parameter.color.used, &data_make->parameter.color.size, &f_string_dynamics_delete_callback);
@@ -261,7 +265,7 @@ extern "C" {
 #ifndef _di_fake_make_setting_delete_
   void fake_make_setting_delete(fake_make_setting_t * const setting_make) {
 
-    f_string_map_multis_resize(0, &setting_make->parameter);
+    f_memory_arrays_resize(0, sizeof(f_string_map_multi_t), (void **) &setting_make->parameter.array, &setting_make->parameter.used, &setting_make->parameter.size, &f_string_map_multis_delete_callback);
   }
 #endif // _di_fake_make_setting_delete_
 
index 0b4c22d3c65d43b64e95a663ac310c3250b1d8fd..3ba7d029dabd745b33d05392f75560f8a8e29852 100644 (file)
@@ -59,11 +59,11 @@ extern "C" {
         delimits.used = 0;
       }
 
-      f_string_ranges_resize(0, &comments);
+      f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &comments.array, &comments.used, &comments.size);
 
       if (F_status_is_error(data_make->main->setting.state.status)) {
-        f_string_ranges_resize(0, &list_objects);
-        f_string_rangess_resize(0, &list_contents);
+        f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &list_objects.array, &list_objects.used, &list_objects.size);
+        f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &list_contents.array, &list_contents.used, &list_contents.size, &f_string_rangess_delete_callback);
         f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size);
 
         return;
@@ -84,8 +84,8 @@ extern "C" {
         fake_print_error(&data_make->main->program.error, macro_fake_f(f_memory_array_resize));
 
         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_string_range_t), (void **) &list_objects.array, &list_objects.used, &list_objects.size);
+        f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &list_contents.array, &list_contents.used, &list_contents.size, &f_string_rangess_delete_callback);
         f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size);
 
         return;
@@ -170,8 +170,8 @@ extern "C" {
         } // for
       }
 
-      f_string_ranges_resize(0, &list_objects);
-      f_string_rangess_resize(0, &list_contents);
+      f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &list_objects.array, &list_objects.used, &list_objects.size);
+      f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &list_contents.array, &list_contents.used, &list_contents.size, &f_string_rangess_delete_callback);
       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)) {
@@ -189,7 +189,7 @@ extern "C" {
       {
         f_string_t function_name = macro_fake_f(macro_f_string_map_multis_t_resize);
 
-        data_make->main->setting.state.status = f_string_map_multis_resize(data_make->main->setting.state.step_small, &data_make->setting_make.parameter);
+        data_make->main->setting.state.status = f_memory_arrays_resize(data_make->main->setting.state.step_small, sizeof(f_string_map_multi_t), (void **) &data_make->setting_make.parameter.array, &data_make->setting_make.parameter.used, &data_make->setting_make.parameter.size, &f_string_map_multis_delete_callback);
 
         if (F_status_is_error_not(data_make->main->setting.state.status)) {
           data_make->setting_make.parameter.used = 1;
@@ -368,7 +368,7 @@ extern "C" {
       if (F_status_is_error(data_make->main->setting.state.status)) {
         fake_print_error(&data_make->main->program.error, macro_fake_f(fll_fss_snatch_map_apart));
 
-        f_string_map_multis_resize(0, &define);
+        f_memory_arrays_resize(0, sizeof(f_string_map_multi_t), (void **) &define.array, &define.used, &define.size, &f_string_map_multis_delete_callback);
 
         return;
       }
@@ -418,7 +418,7 @@ extern "C" {
       f_memory_array_resize(0, sizeof(f_char_t), (void **) &combined.string, &combined.used, &combined.size);
     }
 
-    f_string_map_multis_resize(0, &define);
+    f_memory_arrays_resize(0, sizeof(f_string_map_multi_t), (void **) &define.array, &define.used, &define.size, &f_string_map_multis_delete_callback);
 
     if (F_status_is_error(data_make->main->setting.state.status)) return;
 
index 5e8226168add622135e306f6940d1b56dfe32a80..dfa4f54cbe633441adeaff2739c9021e89c9103f 100644 (file)
@@ -30,9 +30,9 @@ extern "C" {
  *     F_interrupt (with error bit) on interrupt signal received.
  *
  *     Errors (with error bit) from: f_fss_apply_delimit().
+ *     Errors (with error bit) from: f_memory_array_resize().
  *     Errors (with error bit) from: f_string_dynamic_append().
  *     Errors (with error bit) from: f_string_dynamic_partial_append().
- *     Errors (with error bit) from: f_string_map_multis_resize().
  *     Errors (with error bit) from: fll_fss_basic_list_read().
  *     Errors (with error bit) from: fll_fss_extended_read().
  *     Errors (with error bit) from: fll_program_standard_signal_received().
@@ -52,9 +52,9 @@ extern "C" {
  *   If FALSE, then ignore the program input pipe.
  *
  * @see f_fss_apply_delimit()
+ * @see f_memory_array_resize()
  * @see f_string_dynamic_append()
  * @see f_string_dynamic_partial_append()
- * @see f_string_map_multis_resize()
  * @see fll_fss_basic_list_read()
  * @see fll_fss_extended_read()
  * @see fll_program_standard_signal_received()
index c3c9674541bd749fb1d4c809bdd23428b2b0bd90..a8e6925e8ec654cc9ad7d792636168fc9dfa7089 100644 (file)
@@ -1703,10 +1703,10 @@ extern "C" {
       }
     }
     else {
-      main->setting.state.status = f_string_map_multis_resize(fake_allocation_small_d, &data_make->setting_make.parameter);
+      main->setting.state.status = f_memory_arrays_resize(fake_allocation_small_d, sizeof(f_string_map_multi_t), (void **) &data_make->setting_make.parameter.array, &data_make->setting_make.parameter.used, &data_make->setting_make.parameter.size, &f_string_map_multis_delete_callback);
 
       if (F_status_is_error(main->setting.state.status)) {
-        fake_print_error(&main->program.error, macro_fake_f(f_string_map_multis_resize));
+        fake_print_error(&main->program.error, macro_fake_f(f_memory_arrays_resize));
 
         main->setting.state.status = F_status_set_error(F_failure);
 
index eff84a66ab3f2b94605180e44aae0eb02ab460e7..63b2426e9858e792285021e8c49e79cbbfb99f93 100644 (file)
@@ -627,10 +627,8 @@ extern "C" {
  *     F_failure (with error bit) on any error.
  *
  *     Errors (with error bit) from: f_memory_array_resize()
- *     Errors (with error bit) from: f_string_map_multis_resize()
  *
  * @see f_memory_array_resize()
- * @see f_string_map_multis_resize()
  */
 #ifndef _di_fake_make_operate_process_type_parameter_
   extern void fake_make_operate_process_type_parameter(fake_make_data_t * const data_make);
index 56751c2ec33ee70ecbe43926b6a970f63d5f7afb..4fcab1aa183b05483271b92c37bb8dabf492b8a1 100644 (file)
@@ -724,8 +724,8 @@ f_status_t firewall_perform_commands(firewall_data_t * const data, firewall_loca
           f_memory_array_resize(0, sizeof(f_char_t), (void **) &local_buffer.string, &local_buffer.used, &local_buffer.size);
           f_memory_array_resize(0, sizeof(f_char_t), (void **) &path_file.string, &path_file.used, &path_file.size);
 
-          f_string_ranges_resize(0, &basic_objects);
-          f_string_rangess_resize(0, &basic_contents);
+          f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &basic_objects.array, &basic_objects.used, &basic_objects.size);
+          f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &basic_contents.array, &basic_contents.used, &basic_contents.size, &f_string_rangess_delete_callback);
 
           if (F_status_set_fine(status) == F_failure || F_status_set_fine(status) == F_parameter) break;
         }
@@ -1280,8 +1280,8 @@ f_status_t firewall_process_rules(firewall_data_t * const data, f_string_range_t
     }
   }
 
-  f_string_ranges_resize(0, &local->rule_objects);
-  f_string_rangess_resize(0, &local->rule_contents);
+  f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &local->rule_objects.array, &local->rule_objects.used, &local->rule_objects.size);
+  f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &local->rule_contents.array, &local->rule_contents.used, &local->rule_contents.size, &f_string_rangess_delete_callback);
 
   return status;
 }
@@ -1301,11 +1301,11 @@ f_status_t firewall_delete_local_data(firewall_local_data_t * const local) {
   f_memory_array_resize(0, sizeof(f_char_t), (void **) &local->buffer.string, &local->buffer.used, &local->buffer.size);
   f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &local->chain_ids.array, &local->chain_ids.used, &local->chain_ids.size);
 
-  f_string_ranges_resize(0, &local->chain_objects);
-  f_string_rangess_resize(0, &local->chain_contents);
+  f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &local->chain_objects.array, &local->chain_objects.used, &local->chain_objects.size);
+  f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &local->chain_contents.array, &local->chain_contents.used, &local->chain_contents.size, &f_string_rangess_delete_callback);
 
-  f_string_ranges_resize(0, &local->rule_objects);
-  f_string_rangess_resize(0, &local->rule_contents);
+  f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &local->rule_objects.array, &local->rule_objects.used, &local->rule_objects.size);
+  f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &local->rule_contents.array, &local->rule_contents.used, &local->rule_contents.size, &f_string_rangess_delete_callback);
 
   return F_okay;
 }
index 9a93719ba6c490ff9390a127ea64d32d69db2b39..befaa415929e41bd10c77d2bdd16428ab952834f 100644 (file)
@@ -14,15 +14,12 @@ extern "C" {
     "f_file_stream_read_block",
     "f_file_stream_read_until",
     "f_fss_is_space",
+    "f_memory_array_increase",
     "f_memory_array_increase_by",
     "f_rip_dynamic",
     "f_string_dynamic_append",
     "f_string_dynamic_append_assure",
     "f_string_dynamic_append_nulless",
-    "f_string_ranges_increase",
-    "f_string_ranges_increase_by",
-    "f_string_rangess_increase",
-    "f_string_rangess_increase_by",
     "f_string_read_block_increase",
     "f_thread_create",
     "fl_conversion_dynamic_partial_to_unsigned_detect",
index 8ab62cae59393e2a5a94c543e469a1a594fc4352..12aad9eb59d29509c3e5303097109a77f4fc2994 100644 (file)
@@ -47,15 +47,12 @@ extern "C" {
     fss_read_f_f_file_stream_read_block_e,
     fss_read_f_f_file_stream_read_until_e,
     fss_read_f_f_fss_is_space_e,
+    fss_read_f_f_memory_array_increase_e,
     fss_read_f_f_memory_array_increase_by_e,
     fss_read_f_f_rip_dynamic_e,
     fss_read_f_f_string_dynamic_append_e,
     fss_read_f_f_string_dynamic_append_assure_e,
     fss_read_f_f_string_dynamic_append_nulless_e,
-    fss_read_f_f_string_ranges_increase_e,
-    fss_read_f_f_string_ranges_increase_by_e,
-    fss_read_f_f_string_rangess_increase_e,
-    fss_read_f_f_string_rangess_increase_by_e,
     fss_read_f_f_string_read_block_increase_e,
     fss_read_f_f_thread_create_e,
     fss_read_f_fl_conversion_dynamic_partial_to_unsigned_detect_e,
index ce3508ba2e43107eecfd446f0af0233e6e491aa6..f4cee6cf5874de7bdf2fe3474b03cde6f5bd4b72 100644 (file)
@@ -77,9 +77,9 @@ extern "C" {
 
     f_memory_array_resize(0, sizeof(f_char_t), (void **) &setting->buffer.string, &setting->buffer.used, &setting->buffer.size);
 
-    f_string_ranges_resize(0, &setting->objects);
-    f_string_ranges_resize(0, &setting->comments);
-    f_string_rangess_resize(0, &setting->contents);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &setting->objects.array, &setting->objects.used, &setting->objects.size);
+    f_memory_array_resize(0, sizeof(f_string_range_t), (void **) &setting->comments.array, &setting->comments.used, &setting->comments.size);
+    f_memory_arrays_resize(0, sizeof(f_string_ranges_t), (void **) &setting->contents.array, &setting->contents.used, &setting->contents.size, &f_string_rangess_delete_callback);
 
     f_fss_nest_delete(&setting->nest);
 
index 1281d79ad62f9c7a4988a55397655f027cf0ea56..e1a88fc85b30291479cb11b9ec3a6b4bf86af092 100644 (file)
@@ -343,10 +343,8 @@ extern "C" {
  *   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_ranges_resize().
  *
  * @see f_memory_resize()
- * @see f_string_ranges_resize()
  */
 #ifndef _di_fss_read_files_resize_
   extern f_status_t fss_read_files_resize(const f_number_unsigned_t length, fss_read_files_t * const files);
index 6904cea9c625df93392b47a848e141bd51a78071..f3e73acbf7676a4caf9a7f89b43172c2dea61c78 100644 (file)
@@ -371,14 +371,14 @@ extern "C" {
 
         main->setting.ignoress.used = 0;
 
-        main->setting.state.status = f_string_rangess_increase_by(values_data->used, &main->setting.ignoress);
+        main->setting.state.status = f_memory_array_increase_by(values_data->used, sizeof(f_string_ranges_t), (void **) &main->setting.ignoress.array, &main->setting.ignoress.used, &main->setting.ignoress.size);
 
         if (F_status_is_error(main->setting.state.status)) {
           if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
             fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
           }
 
-          fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_rangess_increase_by));
+          fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by));
 
           return;
         }
@@ -405,14 +405,14 @@ extern "C" {
             break;
           }
 
-          main->setting.state.status = f_string_ranges_increase_by(total, &main->setting.ignoress.array[j]);
+          main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_string_range_t), (void **) &main->setting.ignoress.array[j].array, &main->setting.ignoress.array[j].used, &main->setting.ignoress.array[j].size);
 
           if (F_status_is_error(main->setting.state.status)) {
             if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
               fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
             }
 
-            fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_ranges_increase_by));
+            fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by));
 
             return;
           }
index 7da014315e1524e93d6cb45bc327d4cb0fa88700..9101d78e761e769455ee8c9eb6124f0344c9698f 100644 (file)
@@ -15,10 +15,6 @@ extern "C" {
     "f_memory_arrays_resize",
     "f_string_dynamic_append",
     "f_string_dynamic_append_nulless",
-    "f_string_ranges_increase",
-    "f_string_ranges_increase_by",
-    "f_string_rangess_increase",
-    "f_string_rangess_increase_by",
     "f_string_read_block_increase",
     "f_thread_create",
     "fl_fss_basic_content_write",
index 840511ce8e524006ad2c057f978190e4fed600fc..39dd344e7fd9c2b9001be80c58f6f29b6aa154f3 100644 (file)
@@ -48,10 +48,6 @@ extern "C" {
     fss_write_f_f_memory_arrays_resize_e,
     fss_write_f_f_string_dynamic_append_e,
     fss_write_f_f_string_dynamic_append_nulless_e,
-    fss_write_f_f_string_ranges_increase_e,
-    fss_write_f_f_string_ranges_increase_by_e,
-    fss_write_f_f_string_rangess_increase_e,
-    fss_write_f_f_string_rangess_increase_by_e,
     fss_write_f_f_string_read_block_increase_e,
     fss_write_f_f_thread_create_e,
     fss_write_f_fl_fss_basic_content_write_e,
index 6916677b9c0e97e95f9b841244ae5543aebb4972..b2a5ae2c71853bf8e7104c5fa26cb2c069282655 100644 (file)
@@ -190,10 +190,10 @@ extern "C" {
     }
 
     // This is processed in a single set, so there is only ever one Ignores added.
-    main->setting.state.status = f_string_rangess_increase(main->setting.state.step_small, &main->setting.ignoress);
+    main->setting.state.status = f_memory_array_increase(main->setting.state.step_small, sizeof(f_string_ranges_t), (void **) &main->setting.ignoress.array, &main->setting.ignoress.used, &main->setting.ignoress.size);
 
     if (F_status_is_error(main->setting.state.status)) {
-      fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_rangess_increase));
+      fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase));
 
       return;
     }
@@ -377,10 +377,10 @@ extern "C" {
 
               // Ignore is enabled.
               if (flag & 0x2) {
-                main->setting.state.status = f_string_ranges_increase(main->setting.state.step_small, main->setting.ignores);
+                main->setting.state.status = f_memory_array_increase(main->setting.state.step_small, sizeof(f_string_range_t), (void **) &main->setting.ignores->array, &main->setting.ignores->used, &main->setting.ignores->size);
 
                 if (F_status_is_error(main->setting.state.status)) {
-                  fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_ranges_increase));
+                  fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase));
 
                   break;
                 }
index d3999de6b73c4ba1899f12fb4fa6c612c2220491..87795f742b930ccf7d0621f074d9a55e20f4b680 100644 (file)
@@ -71,10 +71,10 @@ extern "C" {
     }
 
     // This is processed in a single set, so there is only ever one Ignores added.
-    main->setting.state.status = f_string_rangess_increase(main->setting.state.step_small, &main->setting.ignoress);
+    main->setting.state.status = f_memory_array_increase(main->setting.state.step_small, sizeof(f_string_ranges_t), (void **) &main->setting.ignoress.array, &main->setting.ignoress.used, &main->setting.ignoress.size);
 
     if (F_status_is_error(main->setting.state.status)) {
-      fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_rangess_increase));
+      fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase));
 
       return;
     }
index 6db57f3c54ac36da093c01dbf65ad3ff28c90711..b2b5355780ae73446f978a11c18bee65109fbc54 100644 (file)
@@ -268,14 +268,14 @@ extern "C" {
 
       main->setting.replace.used = 0;
 
-      main->setting.state.status = f_string_maps_increase_by(main->program.parameters.array[iki_read_parameter_replace_e].values.used / 2, &main->setting.replace);
+      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_replace_e].values.used / 2, sizeof(f_string_map_t), (void **) &main->setting.replace.array, &main->setting.replace.used, &main->setting.replace.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
           fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
         }
 
-        iki_read_print_error(&main->program.error, macro_iki_read_f(f_string_maps_increase_by));
+        iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
 
         return;
       }
@@ -363,14 +363,14 @@ extern "C" {
 
       main->setting.wrap.used = 0;
 
-      main->setting.state.status = f_string_triples_increase_by(main->program.parameters.array[iki_read_parameter_wrap_e].values.used / 3, &main->setting.wrap);
+      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_wrap_e].values.used / 3, sizeof(f_string_triple_t), (void **) &main->setting.wrap.array, &main->setting.wrap.used, &main->setting.wrap.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
           fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
         }
 
-        iki_read_print_error(&main->program.error, macro_iki_read_f(f_string_triples_increase_by));
+        iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
 
         return;
       }
@@ -614,14 +614,14 @@ extern "C" {
 
     triple->used = 0;
 
-    main->setting.state.status = f_string_triples_increase_by(parameter.values.used / 3, triple);
+    main->setting.state.status = f_memory_array_increase_by(parameter.values.used / 3, sizeof(f_string_triple_t), (void **) &triple->array, &triple->used, &triple->size);
 
     if (F_status_is_error(main->setting.state.status)) {
       if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
         fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      iki_read_print_error(&main->program.error, macro_iki_read_f(f_string_triples_increase_by));
+      iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
 
       return F_false;
     }
index 73a76b19fdc2310a27606586ef200fe9ff4a05ca..cbf5cac9085350dca08ea22486e1f00413ac7dc3 100644 (file)
@@ -35,8 +35,6 @@ extern "C" {
  *     Errors (with error bit) from: f_file_exists().
  *     Errors (with error bit) from: f_memory_array_resize().
  *     Errors (with error bit) from: f_string_dynamic_append().
- *     Errors (with error bit) from: f_string_maps_resize().
- *     Errors (with error bit) from: f_string_triples_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
@@ -44,8 +42,6 @@ extern "C" {
  * @see f_file_exists()
  * @see f_memory_array_resize()
  * @see f_string_dynamic_append()
- * @see f_string_maps_resize()
- * @see f_string_triples_resize()
  * @see fll_program_parameter_process_context()
  * @see fll_program_parameter_process_verbosity_standard()
  */
@@ -65,7 +61,6 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_memory_array_resize().
- *     Errors (with error bit) from: f_string_triples_resize().
  * @param name
  *   The name of the parameter.
  *   This is used for printing error messages.
@@ -77,7 +72,6 @@ extern "C" {
  *   F_false if not found or not processed.
  *
  * @see f_memory_array_resize()
- * @see f_string_triples_resize()
  */
 #ifndef _di_iki_read_setting_load_parameter_substitution_
   extern f_status_t iki_read_setting_load_parameter_substitution(iki_read_main_t * const main, const f_console_parameter_t parameter, const f_string_static_t name, f_string_triples_t *triple);
index cc5ecc2a5a2638d239ed9e4412b61fdb4a466b41..3c8ef352b4f442187c03e952d3705dce9462fae2 100644 (file)
@@ -18,8 +18,6 @@ extern "C" {
     "f_memory_arrays_resize",
     "f_string_dynamic_append_nulless",
     "f_string_dynamics_append",
-    "f_string_maps_increase_by",
-    "f_string_triples_increase_by",
     "f_thread_create",
     "fl_iki_read",
     "fll_program_parameter_process_context_standard",
index 4901068f94f20145b1963f2db9c38f69dd7c3e7c..529607a4a52b14275e83b824bdc5864e05056072 100644 (file)
@@ -53,8 +53,6 @@ extern "C" {
     iki_read_f_f_string_dynamics_append_e,
     iki_read_f_f_string_dynamics_increase_by_e,
     iki_read_f_f_string_dynamics_resize_e,
-    iki_read_f_f_string_maps_increase_by_e,
-    iki_read_f_f_string_triples_increase_by_e,
     iki_read_f_f_thread_create_e,
     iki_read_f_fl_iki_read_e,
     iki_read_f_fll_program_parameter_process_context_standard_e,
index 81ed025d6c68ac730e8502247e8cf52bd2720c5d..c298a8ac4a925994a0481ee4e397667c17cc979f 100644 (file)
@@ -24,10 +24,11 @@ extern "C" {
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &setting->names.array, &setting->names.used, &setting->names.size, &f_string_dynamics_delete_callback);
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &setting->files.array, &setting->files.used, &setting->files.size, &f_string_dynamics_delete_callback);
 
-    f_string_maps_resize(0, &setting->replace);
-    f_string_triples_resize(0, &setting->reassign);
-    f_string_triples_resize(0, &setting->substitute);
-    f_string_triples_resize(0, &setting->wrap);
+    f_memory_arrays_resize(0, sizeof(f_string_map_t), (void **) &setting->replace.array, &setting->replace.used, &setting->replace.size, &f_string_maps_delete_callback);
+
+    f_memory_arrays_resize(0, sizeof(f_string_triple_t), (void **) &setting->reassign.array, &setting->reassign.used, &setting->reassign.size, &f_string_triples_delete_callback);
+    f_memory_arrays_resize(0, sizeof(f_string_triple_t), (void **) &setting->substitute.array, &setting->substitute.used, &setting->substitute.size, &f_string_triples_delete_callback);
+    f_memory_arrays_resize(0, sizeof(f_string_triple_t), (void **) &setting->wrap.array, &setting->wrap.used, &setting->wrap.size, &f_string_triples_delete_callback);
 
     f_iki_data_delete(&setting->data);